GetLocalIOStatus: Returns the Embedded I/O Status

Function Description

This function returns the embedded I/O status.

NOTE: This information is also available through the System Variable PLC_R.i_wLocalIOStatus.

Graphical Representation

G-RU-0010340.2.gif-high.gif

 

 

IL and ST Representation

To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.

I/O Variables Description

The table describes the input parameter:

Input

Type

Comment

Mode

LOCAL_IO_GET_STATUS

Parameter of the function: currently only LOCAL_IO_GET_GEN_STATUS (00 hex) is available.

The table describes the output variable:

Output

Type

Comment

GetLocalIOStatus

LOCAL_IO_GEN_STATUS

Status of the embedded I/O.

Example 1

This example shows a direct use of LOCAL_IO_GET_GEN_STATUS enumerator of the LOCAL_IO_GET_STATUS enumeration type for the Mode input parameter:

VAR
    MyLocalIOStatus : LOCAL_IO_GEN_STATUS;
END_VAR
     
MyLocalIOStatus := GetLocalIOStatus(LOCAL_IO_GET_GEN_STATUS);

Example 2

This example shows the use of an intermediate variable for Mode input parameter.

VAR
    MyLocalIOStatus : LOCAL_IO_GEN_STATUS;
    MyMode : LOCAL_IO_GET_STATUS;
END_VAR
     
MyMode := LOCAL_IO_GET_GEN_STATUS;
MyLocalIOStatus := GetLocalIOStatus(MyMode);