AdvancedHMI Software
General Category => Support Questions => Topic started by: drumsticksplinter on July 19, 2016, 05:28:37 PM
-
Hi
Hopefully someone will be able to offer some advice please?
I'm communicating to a Click plc using Modbus RTU. I have my vb project reading and writing to the registers in the plc just fine. However, I need to be able to write a int32 value to the plc and I get an overflow error when trying to do so. I'm sending the value of a numeric up down box to what Click plc's call an "I2" register (2 word integer):
Dim Total_Counts As Int32 = TotalCounts.Value
Mainform.ModbusRTUCom1.Write(449153, Total_Counts)
I presume that the overflow error is because I'm trying to write to a Int16 with a Int32? Is it possible to write long numbers at all?
Thanks,
Adam
-
Try it this way:
ModbusRTUCom1.Write("L449153", Total_Counts)
-
Thanks Archie, will try tomorrow :)
-
When connecting the Click PLC to HMI, do I have to create a "send and receive instructions" in the PLV
-
When connecting the Click PLC to HMI, do I have to create a "send and receive instructions" in the PLV
The Click automatically responds to Modbus requests, so you do not have to do anything in the program to get the HMI to show data.