Common MODBUS functions • 297
Diagnostic function
Example:
•Setting the watchdog for a time overrun of more than 1 s
1.Write 0x000A (=1000 ms / 100 ms) in the register for time overrun (0x1000).
2.Write 0x0010 (=2(5-1)) in the coding mask (register 0x1001) to start the watchdog.
3.Use the function ‘Force Single Coil’ to trigger the watchdog.
4.Read the register of the minimum current trigger time and compare this with zero to check whether a time overrun has occurred.
Repeat step 3 and 4.
•Setting the watchdog for a time overrun of more than 10 min
1.Write 0x1770 (=10*60*1000 ms / 100 ms) in the register for time overrun (0x1000).
2.Write 0x0001 in the watchdog trigger register (0x1003) to start the watchdog.
3.Write 0x0001, 0x0000, 0x0001... or a counter value in the watchdog trigger register (0x1003) to trigger the watchdog.
4.Read the register of the minimum current trigger time and compare it with zero to check if a time overrun has occurred.
Repeat step 3 and 4.
6.2.13Diagnostic function
The following registers can be read to determine errors in the network node:
Register address 0x1020
Designation |
LedErrCode |
Access |
Read |
Description |
Declaration of the Error code |
|
Register address 0x1021 |
Designation |
LedErrArg |
Access |
Read |
Description |
Declaration of the Error argument |
Modular I/O System
ETHERNET TCP/IP