Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

10.7.

1 LCD related instructions

LCD_KEY

LCD_KEY binds LCD keys and PLC variables.

 EN:Enable

 MODIFY:Modifies the corresponding variables.

 ENTER:Confirms the corresponding variables.

 UP:The corresponding variable of UP key.

 DOWN:The corresponding variable of DOWN key.

 LEFT:The corresponding variable of LEFT key.

 RIGHT:The corresponding variable of RIGHT key.

LCD_PAGE

LCD_PAGE instruction binds the LCD display page.

 EN:Enable

 MASK:The current page group mask, generally 1.

 INDX:Currently displayed page number.you can

modify the page number,the LCD will display the

page.

241
Supplementary explanation:MASK input is a byte.Take VB0 as an example:
VB0
7 6 5 4 3 2 1 0
When 0 bit is equal to 1, LCD will display 0 group.
When 1 bit is equal to 1, LCD will display 1 group.
When 2 bit is equal to 1, LCD will display 2 group.
.
.
.
When 7 bit is equal to 1, LCD will display 7 group.
LCD_EDIT

LCD_EDIT: Binds the PLC variable to the edit state of

the LCD.

 EN:Enable

 UNIT:Edit the number of objects in the page

 AUTO:Whether uses LCD keys to edit.

 DEPTH:The current edit depth of edit object.

 LOOP:LOOP edit.

 FLASH:The edit object is flashing or not.

 V:The current value of edit object.

 VMIN:The minimum value of edit object.

 VMAX:The maximum value of edit object.

For example:
You have to edit display pages in LCD software.

242
Display page 1:

Display page 2:

Display page 3:

Display page 4:

Grouping of display pages in display page property:

243
Display page 1:Display page 1 is divided into 0 group and 1 group.

Display page 2:Display page 2 is divided into 0 group and 1 group.

Display page 3:Display page 3 is divided into 0 group.

Display page 4:Display page 4 is divided into 0 group.

244
PLC program:

Analysis:
In network 0,the program binds LCD keys and PLC variables.
PLC has ten function keys.Each function key corresponds to a PLC variable.
F1 corresponds to SM191.0
F2 corresponds to SM191.1
F3 corresponds to SM191.2

245
F4 corresponds to SM191.3
ESC corresponds to SM190.0
OK corresponds to SM190.1
UP corresponds to SM190.2
DOWN corresponds to SM190.3
LEFT corresponds to SM190.4
RIGHT corresponds to SM190.5

NETWORK 0:

MODIFY is ESC function key,corresponds to SM190.0


The functions of function keys:
You can customize F1~F4.
ESC is used for modifying values and exiting edit.
OK is used for confirming modified values.
UP and DOWN function keys can toggle display page .They can also increase
or decrease values.
LEFT and RIGHT function keys can be used for toggling edit objects.
The function of NETWORK1 is binding PLC variables and LCD pages.

Operation result:

The display page 1 of the 0 group is displayed by default.The value of

246
VB200 is 1.0 bit is equal to 1,so LCD displays 0 group.The value of VB201
is 0, which means the first display page.The first display page is display
page 1.
You can use the program to specify the display group and the display page .
For example:

The LCD will display group 1 and display page2.


If you use LCD function keys to toggle the display pages,the value of VB201
will change.
NETWORK2:

LCD -EDIT instruction binds the PLC variables and LCD edit states.

247
For example:
When you modify the first variable of display page 1:

The instruction will display as follows:

Vb205 = 0 Variable 0,the first variable.


Vb206 = 1 It means that you can use LCD function keys to edit variables.
Vb207 = 1 It means you can modify single digit.Vb207 = 2,you can modify
single digit and tens digit.
Vb208 = 0 No loop
Vb209 = 0 No flicker
Vd210 = 0 The current value of variable is 0
Vd214 = -30000 The minimum value is -30000
Vd218 = 30000 The maximum value is 30000

248
For example:
Modify the value of variable to 161.

For example:
Modify text list

VB205 Variable 1, the second variable.


VB206 It means that you can use LCD function keys to edit variables.
VB207 Edit depth is 1.
VB208 LOOP
VB209 No flicker
VD210 The current value of variable is 1
VD214 The minimum value is 0
VD218 The maximum value is 1

249

You might also like