Diagnosis of Network Variables List (NVL)

Function Block Description

The function block NETVARGETDIAGINFO gets information about the network variables list (NVL) functionality.

G-SE-0016808.1.gif-high.gif

 

 

Input Parameters

Parameter

Type

Comment

xExecute

BOOL

rising edge: Diagnosis information is available.

falling edge: The outputs of the function block are reset.

dwListIdentity

DWORD

List identifier of the GVL / GNVL where information should be retrieved from.

Output Parameters

Parameter

Type

Comment

xDone

BOOL

Information has been successfully retrieved.

xBusy

BOOL

The function block is active.

xError

BOOL

TRUE: An unknown list identifier has been used.

FALSE: No error has been detected in the NETVARGETDIAGINFO function block execution.

nSendCount

UDINT

Number of UDP datagrams sent.

tLastSend

TIME

Date when the last UDP datagram was sent.

nReceiveCount

UDINT

Number of UDP datagrams received.

tLastReceive

TIME

Date when the last UDP datagram was received.

nWriteCount

UDINT

Number of variables written.

sLastError

NetVarUDPError

Last error detected on the network variable protocol.

See description of the enumerated parameter NetVarUDPError below.

tLastError

TIME

Date when the last error was detected.

nErrorCount

UINT

Number of errors detected.

nAcknowledges

UINT

Number of acknowledges received.

dwDuplicateListIdIp1

DWORD

If a duplicate list identifier has been detected, this parameter indicates the first IP address of the sender which has the same list identifier as dwDuplicateListIdIp1.

dwDuplicateListIdIp2

DWORD

If a duplicate list identifier has been detected, this parameter indicates the second IP address of the sender which has the same list identifier as dwDuplicateListIdIp2.

NetVarUDPError Structure

The NetVarUDPError structure is an enumerated parameter and is defined by the following array:

Parameter

Value

Comment

NetVarError_NOERROR

0

no error detected

NetVarError_SENDDATA

1

unsuccessful data transfer

NetVarError_ACKNOWLEDGE

2

acknowledgement error detected

 

NOTE: This error is only detected when the Properties - GVL_Sender dialog box option Acknowledgement is activated.

NetVarError_INIT_COMM

3

communication initialization error detected

NetVarError_CHECKSUM

4

checksum error detected

 

NOTE: This error is only detected when the Properties - GVL_Sender dialog box option Transmit checksum is activated.

NetVarError_LAYOUT

5

layout error detected

The number of variables exchanged does not match between sender and receiver.

NetVarError_LISTID

6

duplicate list identifier detected

There are 2 senders on the network with the same list identifier.

NetVarError_TRANSMIT_OVERFLOW

7

The number of datagrams sent per cycle has reached the limit of 20.

NetVarError_RECEIVE_OVERFLOW

8

The number of datagrams received per cycle has reached the limit of 20.