Author Topic: ModBusTCP ConnectionEstablished Event  (Read 1282 times)

coffin_dodger

  • Newbie
  • *
  • Posts: 3
    • View Profile
ModBusTCP ConnectionEstablished Event
« 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.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: ModBusTCP ConnectionEstablished Event
« Reply #1 on: February 22, 2018, 04:37:29 PM »
Just tried this in v3.99xPatched3 and it seems to be working (check the attached picture).

The code used is this:

Code: [Select]
    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.

Constanz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: ModBusTCP ConnectionEstablished Event
« Reply #2 on: April 25, 2018, 06:13:49 AM »
These can be used to spread the knowledge, because I see it as a good content.