Modbus Tcp Communications Auto Restart


dcharv

Recommended Posts

I have connected a PLC to DAQ factory using modbus TCP and communication works fine.

If I switch off the PLC, i get a "P-ModbusTCP 0010: Timeout" error as expected.

When the PLC is switched on, communication does not restart unless I restart DAQ factory or if form the comm monitor I enter the configuration window.

Is there a way to restart the communications automaticaly ?

Link to comment
Share on other sites

yes, this worked, thanks

actualy I wrote sequence that checks every 10 sec if the plc is communicating and if not tries to reinitialize the port

v2000 is a plc memory location that increments every sec

private x=0

while(1)

if (v2000[0] == x)

v.plc_error[0]=1

device.test_plc.InitComm()

else

v.plc_error[0]=0

endif

x=v2000[0]

delay(10)

endwhile

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.