F_IolGetPortState

F_IolGetPortState 1:

Function converts the variable State Ch into the E_IolPortState.

The data type E_IolPortstate can be further used afterwards.

F_IolGetPortState 2:Inputs

Name

Type

Description

nIolChState

USINT

IO-Link channel state

F_IolGetPortState 3:Outputs

Name

Type

Description

E_IoLGetPortState

E_IolPortState

Displays the port state as an enum

Sample

VAR
  nStateCh2  AT%I*    :USINT;
  nPortState          :E_IolPortState;
END_VAR
nPortState := F_IolGetPortState(nStateCh2);
F_IolGetPortState 4:

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.25

Tc3_IoLink from v3.3.4.0