FB_CXSetTextDisplay

FB_CXSetTextDisplay 1:

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

VAR_INPUT

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

bExecute: Command is executed with rising edge.

nDevID: Device ID of the CX1100-Device.

nMode: Modeswitch (see Enumeration)

stLine: String with 20 characters. This String is displayed with the appropriate command.

nCursorPos: Cursor position. The string is being written beginning from this position.

VAR_OUTPUT

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

bBusy: Command is being transported via ADS. bBusy remains TRUE, while no new command is accepted.

bErr: Gets TRUE, with any error.

nErrorID: Contains the error id if bErr is TRUE.

 

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_CX1000_DisplayNoAction: No Action.

 e_CX1000_DisplayOn: Switches display on.

 e_CX1000_DisplayOff: Switches display off.

 e_CX1000_CursorOn: Switches cursor on.

 e_CX1000_CursorOff: Switches cursor off.

 e_CX1000_CursorBlinkOn: Switches blinking of cursor on.

 e_CX1000_CursorBlinkOff: Switches blinking of cursor off.

 e_CX1000_BackLightOn: Switches background light on.

 e_CX1000_BackLightOff: Switches background light off.

 e_CX1000_ClearDisplay: Clears display.

 e_CX1000_WriteLine1: Write line 1.

 e_CX1000_WriteLine2: Write line 2.