Client I/O

The OPC UA Client modules that belong to a virtual OPC UA device offer different status variables as well as control variables. These variables are explained below.

Client I/O 1:

Reading the status codes

Please note that the status code of the state machine is listed here in hexadecimal notation. If the code is displayed as a decimal number in TwinCAT, it must be converted for interpretation.

Client I/O 2:Fig.1: OPCUAClientModulesStatusCodes

Variable

Schema

0

1- State machine state

2- Keep alive count if using subscriptions

3- Connection state (&read busy)

Client I/O 3:Status

0x0123

-

0 = Initialize (init)

 

0 = false(&off)

 

 

 

1 = Connect

 

1 = true(&off)

 

 

 

2 = Resolve namespace

 

2 = false(&on)

 

 

 

3 = Get node handles

 

3 = true(&on)

 

 

 

4 = Continuous read/write

 

 

 

 

 

5 = Triggered read/write

 

 

 

 

 

6 = Awaiting data change notifications (subscriptions))

 

 

 

 

 

7 = Disconnect

 

 

 

 

 

8 = Reset

 

 

Client I/O 4:Control

0x0123

-

-

-

0 = Standard (default)
1 = Reset state machine
2 = Execute (in triggered read mode)

Variable

Data type

Description

Client I/O 5:Connected

BIT

1 TRUE | 0= FALSE.

Client I/O 6:ReadBusy

BIT

1 TRUE | 0= FALSE. This function is only active when reading and writing via trigger variables.

Client I/O 7:KeepAlives

BIT4

Shows the number of KeepAlive messages counted. Only active when reading and writing using subscriptions.

Client I/O 8:StmState

BYTE

Can be read in the table above.

Client I/O 9:ResetStm

BIT

The client is reset when this bit is set to 1.

Client I/O 10:Execute

BIT

1 TRUE | 0= FALSE. Reading/writing takes place if this bit is set to 1 during reading and writing via trigger variables. 

If this bit remains set, there is no difference to cyclic reading/writing.