User Manual

12/06 AWB2724-1584GB
Description of important
functions / function blocks
81
Example of a screen output with texts and value entries
With the Disp_DisplayPage function block
The following display has to be implemented
The contents of the variables MO11 and TEMP8 are changed
continuously by the user program.
Operations via the PLC inputs
I1 = FALSE: Status display
I1 = TRUE: Entry/output mode
I2 = FALSE: ESC button active
I2 = TRUE: ESC button disabled
I3 = TRUE: The values are refreshed by the program.
I4 = TRUE: Entry active.
Execution
The example program consists of programs:
“Startprogram”: (called on system event Start)
Auxiliary variable “g_xFirstCycleAfterStartProgram” is set.
PLC_PRG:
2 values are incremented.
The program “Visualisation” is called.
VISUALIZATION
Registering and positioning of variables on the display in the
first cycle.
The auxiliary variable g_xFirstCycleAfterStartProgram is
reset.
Activation of Entry/output mode (I1).
Enable ESC button (I2).
Start display (I3).
Start entry (I4).
Declaring display variables
X First declare a variable of type string for each text element you
wish to display such as “MO11” in the folder
“Global_Variables_Display”
Example:
X Create an auxiliary variable and write the program
“Startprogram” as in the “Example of text and values output”.
X Write the PLC_PRG and Visualisation programs according to
the following example:
Figure: 94: Example of a page for entries and outputs
VAR_GLOBAL
g_sDisp_String1 :STRING := 'MO11 :';
g_sDisp_String2 :STRING := 'TIM14 :';
g_sDisp_String3 :STRING := 'MOZ14 :';
g_sDisp_String4 :STRING := 'TEMP8 :' ;
END_VAR
PROGRAM PLC_PRG (**********************)
VAR
fbTimer1 :TON;
(* Display values of the application *)
byValue :BYTE;
wValue :WORD;
dwValue :DWORD;
usiValue :USINT;
siValue :SINT;
END_VAR
----------------------------------------------------------
fbTimer1(IN:=NOT fbTimer1.Q , PT:=t#50ms );
IF fbTimer1.Q = TRUE THEN
usiValue := usiValue + 1;
byValue:=byValue+1;
END_IF
Visualisation(); (* Call visualisation *)