mathiask88 / node-snap7

node.js wrapper for snap7
MIT License
163 stars 59 forks source link

Read string from PLC #23

Closed cropii closed 7 years ago

cropii commented 7 years ago

Hello i have data type string[6] (offset 2 to 10) i want to get value of it in node-snap7 but i noob and can't get it can you please help me.

teropes commented 7 years ago

Hi,

Read number of bytes with S7Client.DBRead(dbNumber, start, size, [callback]). Callback result is node.js Buffer. You can output string representation of the buffer with result.toString('utf-8').