09-24-2012
10:18 PM
- last edited on
01-14-2025
05:20 PM
by
Content Cleaner
Hi all, i'm using a cRIO as a modbus I/O slave (serial) to control some devices and sensors. I would like to implement a watchdog.
The watchdog will expire if there's no communication with the master for 20 secs, which will then reset the I/O to their default values.
I had a look at the slave modbus I/O addressing table:
| Data Item | Data Type | Modbus | Modbus Slave | Description | |||
|---|---|---|---|---|---|---|---|
| Read | Write | Read | Write | ||||
| CommFail | Boolean value | Yes | No | Yes | No | Represents a signal the Modbus I/O server generates. The signal is TRUE in the following cases:
|
| ErrorStatus | 32-bit signed integer | N/A | N/A | Yes | No |
Represents the error status of the Modbus Slave I/O server. If CommFail is FALSE, this data item is 0. IfCommFail is TRUE, this data item returns an error code. |
| Updating | Boolean value | Yes | No | Yes | No | Represents a signal the Modbus or Modbus Slave I/O server generates. The signal is TRUE while the Modbus I/O server polls a Modbus device or the Modbus Slave I/O server is being updated. |
I created bound variables for the above. The variables work fine on the master modbus I/O. But it's always connected (CommFail = "F"), even when i unplug the serial cable.
And strangely, Updating is always "F" on the slave modbus, even when the values are being updated.