B8961 and B8962 User Manual
68
See the illustration below for the value of (FKEY) returned for each key:
The following example shows how to use the keypad function keys as an operator
interface:
1.
Write a menu messa ge (MS) on the keypad display above the corresponding
function keys.
2.
Use the FK command to pause command processing until the operator selects
a valid function key. Only keys explicitly defined in the FK statement are con-
sidered valid.
3.
Gosub to the appropriate prog ram.
Example of a 3-screen menu program:
Program 20:
[SCREEN 1]
Name the main program
MS1,””
Clears keypad screen
MS3,”Select a Part”
Writes a Message
MS21,”Part A Part B Part C”
Writes a message above function keys
FK1,2,3,17,18
Wait for selected key press
GT(FKEY)
Jumps to prog # 1,#2,or #3 if F1,F2,
or F3 is pressed
Jumps to prog #17,or #18 if the up or
down arrow keys are pressed.
EN
End of Routine
Program 18:
[SCREEN 2]
MS21,”Part D Part E Part F”
Writes a message above F1,F2,F3.
FK1,2,3,17,18
Wait for selected key press
IF(FKEY)=17 GT[SCREEN 1] EB
If Up arrow goto screen 1
IF(FKEY)=18 GT[SCREEN 3] EB
If Down arrow goto screen 3
(FKEY)=(FKEY)+3
Add offset to FKEY variable to goto
correct part subroutine.
GT(FKEY)
Jumps to part D, E,F in program
#4,5,or 6
EN
End of Routine
Содержание B8962
Страница 111: ...109 Chapter 7 Programming with Serial Communication...
Страница 132: ...B8961 and B8962 User Manual 130...
Страница 136: ...B8961 and B8962 User Manual 134 B8961 and B8962 Hardware Connections...
Страница 137: ...135 Chapter 8 Hardware Reference B8961 and B8962 Input and Output Schematics...
Страница 138: ...B8961 and B8962 User Manual 136 Connecting IDC Limit Switches to the B8961 2...
Страница 156: ...B8961 and B8962 User Manual 154...