User Manual

12/06 AWB2724-1584GB
73
16 Interactive display
The use of functions and function blocks (FBs) enables you to
display variables (text/values) on the PLC display and enter values
via the buttons/rocker switch. An MFD-CP4 that performs these
functions in parallel can be connected to the PLC for external HMI
tasks.
Display form
The display of the PLC and the MFD-CP4 has a matrix consisting
of 4 lines and 16 columns. Each line can therefore display 16
characters. Three characters sets are available for use.
A maximum of 12 variables can be displayed on one screen of the
display.
The display length and number of characters depends on the data
type concerned. If the variable consists of a decimal value, an
additional place must be allowed for the decimal point. The value
of the variable can be continuously updated. A value is entered via
the buttons/rocker switch.
Switching between Status display and Entry/output mode
In the initial state, the display shows the status of the PLC. The
Entry/output mode must be activated in order to output
application-specific texts/variables or to enter values/variables. For
greater clarity imagine two internal displays in the PLC with
displays that are being continuously refreshed. The first is for
displaying the status and the PLC menus. The second is for
displaying texts and variables in Entry/output mode.
The program must process the function “Disp_EnableDisplay”
(a page 75) from the library EC_Visu2.lib continuously in order
to activate Entry/output mode. The status at the xEnable function
input determines the mode (a figure 87):
FALSE: Status display of the PLC
TRUE: Entry/output mode
In Entry/output mode the display shows the values generated in
the user program. The program continuously updates the values
and accepts the entries made via the (rocker) buttons. You can use
functions and function blocks to define the form of the variables,
their presentation and positioning on the display:
The function block “Disp_DisplayElement” is used to show a
variable on the display.
Function block “Disp_DisplayPage” is used to display a screen of
8 variables.
Function block “Disp_DisplayPage”
For each variable you define its use, i.e. text display or value entry.
The inputs of the function block must be parameterised for this
purpose. Function block “Disp_DisplayPage” supports the cursor
control function. If several variables requiring a value entry are
shown, the first entry position is marked by a cursor. After the
entry is completed, the cursor moves to the next position. An
application involving several screens and the calling of one screen
can be implemented in the user program. For this use the rocker
buttons P1, P2, P3, P4 and the ESC, DEL, ALT and OK buttons for
which the status can normally be scanned in the program.
Information on the menu display, current cursor position and
button status is indicated by the outputs of the
“Disp_GetDisplayInfo” function block.
The “Disp_DisplayElement” and “Disp_DisplayPage” function
blocks are used for defining elements. The term “element” refers
to the function blocks. An element is a variable that has additional
properties such as the positioning on the display. The additional
properties are defined by the parameters assigned to the function
block inputs.
Data type
min. / max. value
max. places
max. accuracy
Format
BYTE 255 4 2 1.23
WORD 65 535 6 4 1.2345
DWORD 4 294 967 295 11 9 1.234568
USINT 255 4 2 1.23
UINT 65 535 6 4 1.2345
UDINT
4 294 967 295 11 9 1.234568
SINT –128/127 5 2 –1.23
INT
–32768/32767 7 4 –1.2345
DINT –2 147 483 648/
+2 147 483 647
12 9 –1.234568
Figure: 87: Changing from Status display t Entry/output mode