Материал: m012900e

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам

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

298 • Common MODBUS functions Configuration function

6.2.14Configuration function

The following registers can be read, in order to determine the configuration of the connected modules:

Register address 0x1022

Designation

CnfLen.AnalogOut

Access

Read

Description

Number of I/O bits with the process data words of the outputs

 

Register address 0x1023

Designation

CnfLen.AnalogInp

Access

Read

Description

Number of I/O bits with the process data words of the inputs

 

Register address 0x1024

Designation

CnfLen.DigitalOut

Access

Read

Description

Number of I/O bits with the process data bits of the outputs

 

Register address 0x1025

Designation

CnfLen.DigitalInp

Access

Read

Description

Number of I/O bits with the process data bits of the inputs

 

Register address 0x1027

Designation

Perform an internal bus cycle

Access

Read

Description

 

 

Register address 0x1028

Designation

Activate/deactivate configuration via BootP

Access

read / write

Description

0: No BootP is used

 

1: BootP is active

 

Register address 0x2030

Designation

Description of the connected I/O modules

Access

Read

Description

Length 65 words

Modular I/O System

ETHERNET TCP/IP

Common MODBUS functions • 299

Firmware information

6.2.15Firmware information

The following registers are used to read out information related to the coupler and/or controller firmware:

Register address 0x2010

Designation

Revision, INFO_REVISION

Access

Read

Description

Firmware index, z. B. 0005 for version 5

 

Register address 0x2011

Designation

Series code, INFO_SERIES

Access

Read

Description

WAGO series number, i.e. 0750 for WAGO-I/O-SYSTEM 750

 

Register address 0x2012

Designation

Item number, INFO_ITEM

Access

Read

Description

WAGO order number, i.e. 342 for coupler, 842 for controller

 

Register address 0x2013

Designation

Major sub item code, INFO_MAJOR

Access

Read

Description

Extended WAGO order number for special firmware versions or settings;

 

0xFFF for coupler/controller

 

Register address 0x2014

Designation

Minor sub item code, INFO_MINOR

Access

Read

Description

Extended WAGO order number for special firmware versions or settings;

 

0xFFF for coupler/controller

 

Register address 0x2020

Designation

Description, INFO_DESCRIPTION

Access

Read

Description

Information on coupler/controller, 128 words

 

Register address 0x2021

Designation

Description, INFO_DESCRIPTION

Access

Read

Description

Time of firmware version, 16 words

 

Register address 0x2022

Designation

Description, INFO_DATE

Access

Read

Description

Date of firmware version, 16 words

 

Register address 0x2023

Designation

Description, INFO_LOADER_INFO

Access

Read

Description

Information on firmware programming, 32 words

Modular I/O System

ETHERNET TCP/IP

300 • Common MODBUS functions General Registers

6.2.16General Registers

The following registers contain constants which can be used to test the communication with the master:

Register address 0x2000

Designation

Zero, GP_ZERO

Access

Read

Description

Constant with zero

 

Register address 0x2001

Designation

Ones, GP_ONES

Access

Read

Description

Constant with ones. Is –1 if this is declared as "signed int" or MAXVALUE

 

with "unsigned int"

 

Register address 0x2002

Designation

1,2,3,4, GP_1234

Access

Read

Description

Constant value to test whether High and Low byte is changed over (In-

 

tel/Motorola format). Should appear in master as 0x1234. If 0x3412 appears,

 

High and Low byte have to be changed over.

 

Register address 0x2003

Designation

mask 1, GP_AAAA

Access

Read

Description

Constant to check whether all bits are available. Used together with the

 

0x2004 register.

 

Register address 0x2004

Designation

mask 1, GP_5555

Access

Read

Description

Constant to check whether all bits are available. Used together with the

 

0x2003.

 

Register address 0x2005

Designation

Highest positive number, GP_MAX_POS

Access

read

Description

Constant to check the arithmetic.

 

Register address 0x2006

Designation

Highest negative number, GP_MAX_NEG

Access

read

Description

Constant to check the arithmetic.

 

Register address 0x2007

Designation

Highest half positive number, GP_HALF_POS

Access

read

Description

Constant to check the arithmetic.

 

Register address 0x2008

Designation

Highest half negative number, GP_HALF_NEG

Access

read

Description

Constant to check the arithmatic.

Modular I/O System

ETHERNET TCP/IP

Common MODBUS functions • 301

Special PFC Register (only for controller 750-842)

6.2.17Special PFC Register (only for controller 750-842)

The following register is only significant for the fieldbus controller. The PFC register is used as an interface for WAGO-I/O-PRO, i.e. for debugging purposes:

Register address 0x1040

Designation

Process data communication channel

Access

read / write

Description

 

Modular I/O System

ETHERNET TCP/IP