NModbus4 - PLC Master to PC Slave listen event?
NModbus4 - PLC Master to PC Slave listen event?
(OP)
I have an Automation Direct DL06 setup in a peer to peer configuration. The PLC is the master and the PC is the slave. The ladder logic is straight forward, just sending a double word (4 bytes) from the master starting a V3000 to PC. I've set V3000 to "Test". See below:

When the ladder logic runs the DataStoreWrittento event fires and the code below is my attempt to get the value "Test" from the modbus data store. Instead of getting "Test", I get 25940 and 29811... I would appreciate any assistance getting the "Test" value out of memory.

When the ladder logic runs the DataStoreWrittento event fires and the code below is my attempt to get the value "Test" from the modbus data store. Instead of getting "Test", I get 25940 and 29811... I would appreciate any assistance getting the "Test" value out of memory.

RE: NModbus4 - PLC Master to PC Slave listen event?
i.e. 25940 is a decimal value. Converting to hex gives you 6554. Looking at these characters in an ASCII table indicates 65 is e, and 54 is T. I've not checked to see if your second value lines up.
Thus, you've probably got a big endian / little endian issue, and you're looking at raw data values but expecting them to be parsed into ASCII for you to read.
RE: NModbus4 - PLC Master to PC Slave listen event?
Keith Cress
kcress - http://www.flaminsystems.com
RE: NModbus4 - PLC Master to PC Slave listen event?