I am trying swich on out N of FEN20 device modbus.
I have written the following code in vb.NET
Dim modbusClient As New ModbusClient("192.168.0.202", 502)
modbusClient.Connect()
modbusClient.WriteSingleRegister(2048, 1)
modbusClient.Disconnect()
I get switch ON the OUT Nº 0 (2048 starting adress, 1 is value 0001 out 1) I can turn on output 1 but immediately after it goes off and set to 0
I have tested with RMMS application and works correctly!, so, change value register address 2048 to 1 and out1 enable to 24V and change value to 0 and out1 goes 0V.
Could somebody help me please?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I am trying swich on out N of FEN20 device modbus.
I have written the following code in vb.NET
Dim modbusClient As New ModbusClient("192.168.0.202", 502)
modbusClient.Connect()
modbusClient.WriteSingleRegister(2048, 1)
modbusClient.Disconnect()
I get switch ON the OUT Nº 0 (2048 starting adress, 1 is value 0001 out 1) I can turn on output 1 but immediately after it goes off and set to 0
I have tested with RMMS application and works correctly!, so, change value register address 2048 to 1 and out1 enable to 24V and change value to 0 and out1 goes 0V.
Could somebody help me please?
Hi,
you are definitely sending only a "High" signal with that codeand never a "Low" signal to that Device.
Could you maybe try what happens if you don't disconnect? Maybe the device turns all outputs to "low" if connection has been closed?
Stefan