I am having EXTREME difficulty trying to establish communications with a Modbus device using LV8.2 shared variables. The device is a Eurotherm 6180XIO Datalogger configured as a Modbus master. The PC and a cFP-1804 are slaves. All IP addresses are set correctly. This approach using shared variables would seem simple, but I can't find any examples or proper guidance on how to get it working. I am trying to avoid having to mess around with TCP/IP, OPC, or any other old-fashioned method.
I have read many threads on related topics but none directly apply to this situation. I have created a library containing a Modbus I/O server and shared variables bound to read and write holding registers. I have followed all recommended tips for creating such variables but I can neither read or write data. All data types are U16 due to Modbus protocol limitations. I have also applied the LV x10 factor in the most significant digit in the register offset (6 digits instead of 5).
I have a cFP-1804 on the same network which reads into the datalogger OK. The registers I use are 31000 (for CH0 on module 0, 31002 for CH1, etc) and the data can be read as FLOAT32. I have updated the firmwate on the 1804 to the latest level. I cannot even get shared variables to read SGL values. Using registers 301001 for CH0 and 301002 for CH1 I can only read U16 values, and not a 2-word SGL.
Third party Modbus simulation software is able to write to and read from registers very easily, but not LabVIEW.
Some questions are:
- do I use a Modbus master or slave as an I/O server in the library as a target for binding the shared variables?
- is there some other wierd translation in register offsets between LabVIEW and traditional Modbus?
- is this actually possible using shared variables or am I wasting my time?