EasyManuals Logo
Home>Beckhoff>Power Supply>CX2100-0904

Beckhoff CX2100-0904 User Manual

Beckhoff CX2100-0904
87 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #26 background imageLoading...
Page #26 background image
Product overview
2.8 Example Program
The following PLC program shows by way of an example how the three function blocks are used for the
power supply unit.
PROGRAM MAIN
VAR
nCounter AT %Q*: USINT;
(* navi switch *)
bUp AT %I*: BOOL;
bDown AT %I*: BOOL;
bLeft AT %I*: BOOL;
bRight AT %I*: BOOL;
bEnter AT %I*: BOOL;
bToggle AT %I*: BOOL;
nIn: USINT;
eNaviSwitchCx2: E_CX2100_NaviSwitch;
(* get display *)
fbGetDisplayText : FB_CXGetTextDisplayUSB;
bExecuteRead: BOOL;
eModeRead: E_CX2100_DisplayModesRd;
nCursorMode: USINT;
nBacklight: USINT;
bReadCursorInfoReq: BOOL := TRUE;
bReadBacklightReq: BOOL := TRUE;
bReadLine1Req: BOOL;
bReadLine2Req: BOOL;
bReadLinesReq: BOOL := TRUE;
(* set display *)
fbSetDisplayText: FB_CXSetTextDisplayUSB;
bExecuteWrite: BOOL;
eModeWrite: E_CX2100_DisplayModesWr;
bCursorOnReq: BOOL;
bCursorOffReq: BOOL;
bBlinkCursorOnReq: BOOL;
bBlinkCursorOffReq: BOOL;
bBacklightOnReq: BOOL;
bBacklightOffReq: BOOL;
bClearDisplayReq: BOOL;
bWriteLine1Req: BOOL;
bWriteLine2Req: BOOL;
bWriteLinesReq: BOOL;
bSetCursorPosXReq: BOOL;
bSetCursorPosYReq: BOOL;
bSetCursorPosXYReq: BOOL;
(* common *)
nCursorPosX: USINT;
nCursorPosY: USINT;
sLine1: STRING;
sLine2: STRING;
bBusy : BOOL;
bError: BOOL;
nErrorID: UDINT;
END_VAR
nCounter := nCounter + 1;
nIn.2 := bUp;
nIn.3 := bDown;
nIn.4 := bLeft;
nIn.5 := bRight;
nIn.6 := bEnter;
(* get navi switch *)
eNaviSwitchCx2 := F_CXNaviSwitchUSB(nIn);
(* prepare get display mode *)
IF (eModeRead = eCX2100_DisplayNoActionRd) AND (eModeWrite = eCX2100_DisplayNoActionWr) THEN
IF bReadCursorInfoReq THEN
eModeRead := eCX2100_ReadCursorInfo;
bExecuteRead := TRUE;
ELSIF bReadBacklightReq THEN
eModeRead := eCX2100_ReadBackLight;
bExecuteRead := TRUE;
CX2100-09x426 Version: 1.3

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Beckhoff CX2100-0904 and is the answer not in the manual?

Beckhoff CX2100-0904 Specifications

General IconGeneral
BrandBeckhoff
ModelCX2100-0904
CategoryPower Supply
LanguageEnglish

Related product manuals