CiModDiag (FB)

FUNCTION_BLOCK CiModDiag EXTENDS AbbLConCA

Function block CiModDiag is intended to be used for Diagnostic purpose. User can get more information about the CI module and Modbus Tcp.

CiModDiag function block can be used to get the additional diagnosis information related to the CI521 / CI522 communication module. This block provides addition information like device state, parameter state, device information, CI module diagnosis buffer, CI module related errors and details of error generated in the ModTcpMast core block.

Note

This function block must be connected to CiModCi52x function block instance using ADR operator to read the diagnosis of particular CI cluster.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Enable

BOOL

FALSE

A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.

AbbLConCA

Output

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConCA

Error

BOOL

FALSE

Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.

AbbLConCA

Input

dwCiP

POINTER TO CiModCi52x

2 : Pointer to CI Instance

Output

DevState

eDeviceState

3: CI Device Status

ParaState

eParaState

4: CI Parameter Status

DeviceInfo

ARRAY [0..10] OF CiModDiagModInfo

5: CI Type and extended Module Types. Refer Ci52x system technology in online help.

DiagBuffer

ARRAY [0..9] OF CiModCiClusterDiag

6: CI module Diagnostic buffer

ErClass

ARRAY [0..9] OF BYTE

7: CI Error class, Refer Automation Builder online help for details

ErNo

ARRAY [0..9] OF BYTE

8: CI Error Number, Refer Automation Builder online help for details

ModMastErr

ARRAY [0..22] OF BOOL

9: Modbus Tcp Error message of the block

ModMastErNo

ARRAY [0..22] OF WORD

10: Modbus Tcp Error number. Refer ERROR_ID Enum from ModbusTcp Library for details