Thanks for your quick response!
I tried that, but alas to no avail!
I’m also using the Modicon Modbus Protocol Reference Guide and on page 24 it has the function information for code 01 and it provides a sample query.
Since the register is 513, which converted to Hex is 201, the data I’m passing that is pertinent (or at least what I believe to be, perhaps you could confirm?) is the Slave Address which is 0, the Function which is 1, the Starting Address Hi is 2, Starting Address Lo is 1, No. of Points Hi is 0, and No. of Points Lo is 2. I believe No. of Points Lo is 2 because I need to read registers 513 and 514. Is that right? Perhaps I’m missing something?
The result I get from the TCP Read in labview is a string that I convert to an unsigned byte array. The resulting array is [0,0,0,0,0,4,0,1,1,0].
I have a power supply running 3 volts at very low current across pin A0 and ACOM and I’m using the PAC Manager software to verify and watch live as the state changes from on to off as I turn on and off the power supply. I’m running my labview program a couple times while it’s off, then turn on the power supply and run it a few times again, trying this back and forth a number of times but nothing changes. The unsigned byte array always returns the same values.
We have a working send/receive LabView VI that uses Modbus/TCP with an Opto22 enet 100 which works. I’m basically using those VI’s and changing the modbus querry values in an attempt to get the desired response - a 0 or 1 to indicate that the channel is off or on respectively.
I’m hoping I’ve provided enough, perhaps too much, information to allow you to help me out!
If there is anything else you’d like to know just ask. I can provide images of our VI’s or anything else you need!
Thanks in advance!!!