Settings in the plc program – BECKHOFF CX1100-000x User Manual

Page 19

Advertising
background image

Product overview

Embedded PC

17

Using the "Write At" switch, the numerical input box and the "Second Line" check box, it is possible to write to a
specified position on the display. The useful range of values for the position extends from 0 to 15. The user should
also, however, consider the length of the text. (Each line has 16 characters!) In the example illustrated below, the text
"CX1100-000x" is written to Position 0 (the start of the line) on Line 2.

Settings in the PLC program

The function block FB_CX1000SetTextDisplay is provided in the library for the CX family (TcCX1000System.lib) in
order to operate the display from a PLC program. All the functions of the display can be manipulated from this
function block. The library must, however, be integrated through the library administrator. If this has been done, the
block is available as a function block. It is instanced as such in the declarations part of the program.

PROGRAM MAIN

VAR

Display_0 : FB_CX1000SetTextDisplay;

END_VAR

It is then called from the program with its parameters. There are five parameters for this function block:

bExecute

: BOOL

nDevID

: UDINT

nMode

: E_CX1000_DisplayModes

stLine

: STRING(20)

nCursorPos : DWORD

The command is executed in response to a rising edge at "bExecute". "nDevID" provides the Device ID of the
CX1100 that is to be written to. The ID is displayed in the System Manager. (The General tab for the CX1100, top
right). The parameter "stLine" is used to pass a text of at most 20 characters. Only the first 16 of these characters,
however, will be displayed. The writing position of the text uses quoted through "nCursorPos". 0 to 15 is a useful
range for this value. "nMode" selects the operating mode of the function block. The modes are:

e_CX1000_DisplayNoAction

: No action.

e_CX1000_DisplayOn

: Switch on the display.

Advertising