AdvancedHMI Software
General Category => Support Questions => Topic started by: ronj on September 29, 2015, 08:42:57 AM
-
Hi,
I have an application using Modbus TCP to control a VSD that has separate "coils" for forward and reverse operation. To stop, I need to clear both "coils". Is there a way for a single button to write the same value (in this case reset) to more than one "coil" address?
Regards,
Ron
-
You can do this with a little VB code.
- Add a Button to the form from the All Windows Forms group in the ToolBox
- Double click the button to get back to the code
- Enter code similar to this:
ModbusTCPCom1.Write("40001","0")
ModbusTCPCom1.Write("40002","1")
-
Hi Archie,
Your suggestion works well - thanks.
I notice it also works in the click event of a PilotLight like this:
Private Sub PilotLight4_Click(sender As Object, e As EventArgs) Handles PilotLight4.Click
ModbusTCPCom1.Write("00001", "0")
ModbusTCPCom1.Write("00002", "0")
End Sub
Is there any problem with using a PilotLight like this?
Ron
-
You can use any of the controls. They all have the click event that works the same.