Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
50
Добавлен:
11.10.2020
Размер:
3.2 Mб
Скачать

162 MODBUS Functions

Internal Variables

6.5.1 Description of the internal variables

6.5.1.1 Watchdog (Fieldbus failure)

The watchdog monitors the data transfer between the fieldbus master and the controller. Every time the controller receives a specific request (as define in the watchdog setup registers) from the master, the watchdog timer in the controller resets.

In the case of fault free communication, the watchdog timer does not reach its end value. After each successful data transfer, the timer is reset.

If the watchdog times out, a fieldbus failure has occurred. In this case, the fieldbus controller answers all following MODBUS TCP/IP requests with the exception code 0x0004 (Slave Device Failure).

In the controller special registers are use to setup the watchdog by the master (Register addresses 0x1000 to 0x1008).

By default, the watchdog is not enabled when you turn the controller on. To activate it, the first step is to set/verify the desired time-out value of the Watchdog Time register (0x1000). Second, the function code mask must be specified in the mask register (0x1001), which defines the function code(s) that will reset the timer. Finally, the Watchdog-Trigger register (0x1003) must be changed to a non-zero value to start the timer.

Reading the Minimum Trigger time (Register 0x1004) reveals whether a watchdog fault occurred. If this time value is 0, a fieldbus failure is assumed. The timer of watchdog can manually be reset, if it is not timed out, by writing a value of 0x1 to the Restart Watchdog register (0x1007).

After the watchdog is started, it can be stopped by the user via the Watchdog Stop register (0x1005) or the Simply Stop Watchdog register (0x1008)

6.5.1.2 Watchdog Register:

The watchdog registers can be addressed in the same way as described with the MODBUS read and write function codes. Specify the respective register address in place of the reference number.

Register address 0x1000 (MODBUS Address 404097)

 

Designation

Watchdog time, WS_TIME

 

 

Access

read / write

 

 

Default

0x0000

 

 

Description

This register stores the watchdog timeout value as an unsigned 16 bit value.

 

 

The default value is 0. Setting this value will not trigger the watchdog.

 

 

However, a non zero value must be stored in this register before the watchdog

 

 

can be triggered. The time value is stored in multiples of 100ms (e.g., 0x0009

 

 

is .9 seconds) It is not possible to modify this value while the watchdog is

 

 

running.

 

 

 

 

 

 

WAGO-I/O-SYSTEM 750

 

 

ETHERNET TCP/IP

 

 

MODBUS Functions 163

 

 

Internal Variables

 

 

 

 

 

 

 

 

 

Register address 0x1001 (MODBUS Address 404098)

 

 

Designation

Watchdog function coding mask, function code 1...16, WDFCM_1_161...16

 

 

Access

read / write

 

 

Default

0x0000

 

 

Description

Using this mask, the specific function codes can be configured to reset the

 

 

 

watchdog function. The function code can be selected by writing a ‘1’ to the

 

 

 

appropriate bit(s) ( 2(Funtion code-1) +2(Funtion code-1... ).

 

 

 

Bit 1001.0 corresponds to function code1,

 

 

 

Bit 1001.1 corresponds to function code2...

 

 

 

A value of 0xFF enables Modbus functions code 1 through 16 to reset the

 

 

 

watchdog. It is not possible to modify this value while the watchdog is

 

 

 

running.

 

Register address 0x1002 (MODBUS Address 404099)

Designation

Watchdog function coding mask, function code 17...32, WD_FCM_17_32

Access

read / write

Default

0x0000

Description

Same function as above, however, with the function codes 17 to 32. These

 

codes are currently not supported, for this reason the default value should not

 

be changed.. It is not possible to modify this value while the watchdog is

 

running.

 

Register address 0x1003 (MODBUS Address 404100)

Designation

Watchdog-Trigger, WD_TRIGGER

Access

read / write

Default

0x0000

Description

This register is used to trigger the watchdog. The default value after power up

 

is 0. The writing of a non zero value will trigger the watchdog. The watchdog

 

is triggered each time the contents of this register are modified. The watchdog

 

cannot be triggered if the watchdog timer register is set to 0.

 

Register address 0x1004 (MODBUS Address 404101)

Designation

Minimum current trigger time, WD_AC_TRG_TIME

Access

read / write

Default

0xFFFF

Description

This register stores the time value for the shortest remaining watchdog

 

duration. The default value is 0xFFFF. When the watchdog timer is triggered,

 

this register is continuously compared to the remaining watchdog time, and the

 

lesser of the two values is stored in this register. If the value in this register is

 

0, a watchdog fault has occured.

WAGO-I/O-SYSTEM 750 ETHERNET TCP/IP

164 MODBUS Functions

Internal Variables

Register address 0x1005 (MODBUS Address 404102)

Designation

Watchdog stoppen, WD_AC_STOP_MASK

Access

read / write

Default

0x0000

Description

This register is used to stop the watchdog timer by entering a value of

 

0xAAAA followed by 0x5555.

 

Register address 0x1006 (MODBUS Address 404103)

Designation

While watchdog is running, WD_RUNNING

Access

read

Default

0x0000

Description

Current watchdog status.

 

at 0x0000: Watchdog not active,

 

at 0x0001: Watchdog active.

 

at 0x0002: Watchdog exhausted.

 

Register address 0x1007 (MODBUS Address 404104)

Designation

Restart watchdog, WD_RESTART

Access

read / write

Default

0x0001

Description

This register restarts the watchdog timer by writing a value of 0x1 into it.

 

If the watchdog was stopped before the overrun, it is not restarted.

 

Register address 0x1008 (MODBUS Address 404105)

Designation

Simply stop watchdog WD_AC_STOP_SIMPLE

Access

read / write

Default

0x0000

Description

This register stops the watchdog by writing the value 0x0AA55 or 0X55AA

 

into it. The watchdog timeout fault is deactivated and it is possible to write in

 

the watchdog register again. If there is an existing watchdog fault, it is reset

 

Register address 0x1009 (MODBUS Address 404106)

Designation

Close MODBUS socket after watchdog timeout

Access

read / write

Description

0 : MODBUS socket is not closed

 

1: MODBUS socket is closed

 

Register address 0x100A (MODBUS Address 404107)

Designation

Alternative watchdog

Access

read / write

Default

0x0000

Description

This register provides an alternate way to activate the watchdog timer.

 

Proceedure: Write a time value in register 0x1000; then write a 0x0001 into

 

register 0x100A. With the first MODBUS request, the watchdog is started.

 

The watchdog timer is reset with each Modbus/TCP instruction. If the watch

 

dog times out, all outputs are set to zero. The outputs will become

 

operational again, after communications are re-established.

All register data is in word format.

WAGO-I/O-SYSTEM 750 ETHERNET TCP/IP

Соседние файлы в папке 750-841