Thanks Godra,
With the Button I thought synonymous already, that would not be so good.
Meanwhile I have tested with DataSubscriber:
Private Sub DataSubscriber16_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber16.DataChanged
'Zum Einschalten einer Gruppe. Coil 00080 (DO15) einlesen und dann "1" schreiben. Mit Pausen.
Dim CurrentValue As String = ModbusRTUCom1.Read("00080")
If CurrentValue = "True" Then
ModbusRTUCom1.Write("00065", "1")
ModbusRTUCom1.Write("00066", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00067", "1")
ModbusRTUCom1.Write("00068", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00069", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00070", "1")
ModbusRTUCom1.Write("00071", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00072", "1")
ModbusRTUCom1.Write("00073", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00074", "1")
ModbusRTUCom1.Write("00075", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00076", "1")
ModbusRTUCom1.Write("00077", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00078", "1")
Threading.Thread.Sleep(500) ' 0,5 sec warten
ModbusRTUCom1.Write("00080", "0")
End If
End Sub
This has also worked with the BasicButton and is suitable for my purposes well.
I will also try your suggested code
Steffen