AdvancedHMI Software
General Category => Support Questions => Topic started by: psullivan on March 18, 2016, 11:17:21 AM
-
I am trying to read a 32-bit integer from a PLC and display it on a digital panel meter. I saw this thread about modbus addressing:
http://advancedhmi.com/forum/index.php?topic=765.0 (http://advancedhmi.com/forum/index.php?topic=765.0)
The more significant word is in input register 7 and the less significant word is in input register 8, I tried setting the "PLCAddressValue" to L30007 but that didn't work so I tried setting it to L30008 and in both cases the digital panel meter only displayed a single register. Any ideas on where I am going wrong?
-Pat
-
You may have to try different combinations of WordSwap and ByteSwap in the driver properties.
-
I gave that a try, but the problem isn't that I am getting the wrong value, the problem is that I am only getting the value from one of the registers at a time. If I force two consecutive modbus registers in my PLC to a value of 1, I should get 65537 when reading a 32 bit integer. However, I am always reading a value of 1.
-
Using version 3.99d along with a Modbus simulator I did a quick test
- Add 3 BasicLabels to the form with corresponding addresses in PLCAddressValue:
L40001
40001
40002
- Run the application
- In the simulator set 40001 to a value of 1
- I then see the first 2 BasicLabel go to 1
- In the simulator, set 40002 to a value of 1
- The first BasicLabel changes to 65537, the other two BasicLabels are both 1
What happens if you set both PLCAddressValue and PLCAddressKeypad to 40001, then run the app, click on the label and enter 65537 ?