AdvancedHMI Software
General Category => Open Discussion => Topic started by: halosome on September 29, 2019, 03:04:03 PM
-
Is it possible to assign the PLCAddress on those displayers in programming? I tried use to integers or strings ("41001") and they all failed.
I am trying to use a group of displayers to show several groups of devices by selecting different ModbusTCP Addresses.
-
See your other topic for answer:
https://www.advancedhmi.com/forum/index.php?topic=2517.0
-
I try to make it simple so I directly drag the controls in the form, but when I change the controls' PLCaddress, the value not changed, it sticks to the one from the address in the form designer.
Dim addr1 as integer = 40001
Dim addr2 as integer = 40011
If DeviceID=1 then
Odometer1.PLCAddressValue.PLCAddress = addr1.ToString
Odometer2.PLCAddressValue.PLCAddress = (addr1+1).ToString
Else
Odometer1.PLCAddressValue.PLCAddress = addr2.ToString
Odometer2.PLCAddressValue.PLCAddress = (addr2+1.ToString
End If
-
Hello Godra and Archie, please help.
It seems most of the problems are solved except this one, I really need help in solving this issue because I would like to create one page for several same devices (their Modbus addresses are the only difference). Once I select a device, the device base address plus offsets will be applied to all the display components. But currently they all stick to the address at the form designer.
-
Dim addr1 As Integer = 40001
Dim addr2 As Integer = 40011
If DeviceID = 1 Then
Odometer1.PLCAddressValue = New Drivers.PLCAddressItem(addr1.ToString)
Odometer2.PLCAddressValue = New Drivers.PLCAddressItem((addr1 + 1).ToString)
Else
Odometer1.PLCAddressValue = New Drivers.PLCAddressItem(addr2.ToString)
Odometer2.PLCAddressValue = New Drivers.PLCAddressItem((addr2 + 1).ToString)
End If
-
It seems working! I will test it tomorrow.
Thank you!