AdvancedHMI Software
General Category => Support Questions => Topic started by: coffin_dodger on February 22, 2018, 03:38:06 PM
-
When is the modbusTCP driver "ConnectionEstablished" event fired? Anyone got a sample, been trying to set a property on a textbox to indicate when connection is ok but up to now no joy. Any help much appreciated. Any coding example will do.
-
Just tried this in v3.99xPatched3 and it seems to be working (check the attached picture).
The code used is this:
Private Sub ModbusTCPCom1_ConnectionEstablished(sender As Object, e As EventArgs) Handles ModbusTCPCom1.ConnectionEstablished
MsgBox("Connection Established ModbusTCPCom1")
End Sub
Both controls on the form were set to use the same driver and had their PLCAddressValue set to 40001.
MODRSsim2 simulator program was used on the other end and toggling its port ON and OFF several times would always trigger the event.
-
These can be used to spread the knowledge, because I see it as a good content.