FB_CXSetTextDisplay

FB_CXSetTextDisplay 1:

The functionblock FB_CXSetTextDisplay can be used to send text messages to the two line display of the CX1100.

FB_CXSetTextDisplay 2: Inputs

VAR_INPUT
    bExecute   : BOOL;
    nDevID     : UDINT;
    nMode      : E_CX1100_DisplayModes;
    stLine     : STRING(20);
    nCursorPos : DWORD;
END_VAR

Name

Type

Description

bExecute

BOOL

The command is executed with a rising edge.

nDevID

UDINT

Device ID of the CX1100 device.

nMode

E_CX1100_DisplayModes

Mode switching

stLine

STRING

String with 20 characters. This string is shown in the display with the corresponding command.

nCursorPos

DWORD

Cursor position. The string is written from this position in the display.

FB_CXSetTextDisplay 3: Outputs

VAR_OUTPUT
    bBusy    : BOOL;
    bErr     : BOOL;
    nErrorID : UDINT;
END_VAR

Name

Type

Description

bBusy

BOOL

The command is in the process of being transmitted by ADS. No new command will be accepted as long as bBusy remains TRUE.

bErr

BOOL

Becomes TRUE, as soon as an error occurs.

nErrorID

UDINT

Supplies the error number when the bError output is set.

E_CX1000_DisplayModes :

E_CX1000_DisplayModes : (
 e_CX1100_DisplayNoAction := 0,
 e_CX1100_DisplayOn := 1,
 e_CX1100_DisplayOff,
 e_CX1100_CursorOn,
 e_CX1100_CursorOff,
 e_CX1100_CursorBlinkOn,
 e_CX1100_CursorBlinkOff,
 e_CX1100_BackLightOn,
 e_CX1100_BackLightOff,
 e_CX1100_ClearDisplay,
 e_CX1100_WriteLine1,
 e_CX1100_WriteLine2
); 

e_CX1100_DisplayNoAction: no action.

e_CX1100_DisplayOn: switch on the display.

e_CX1100_DisplayOff: switch off the display.

e_CX1100_CursorOn: switch on the cursor.

e_CX1100_CursorOff: switch off the cursor.

e_CX1100_CursorBlinkOn: switch on the cursor blinking.

e_CX1100_CursorBlinkOff: switch off the cursor blinking.

e_CX1100_BackLightOn: switch on the backlight.

e_CX1100_BackLightOff: switch off the backlight.

e_CX1100_ClearDisplay: clear display.

e_CX1100_WriteLine1: write the first line.

e_CX1100_WriteLine2: write the second line.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

CX (x86)

Tc2_SystemCX