FK

Function Key

syntax – FKi,i,..,i

 

Value:

N/A

 

 

Units:

N/A

 

 

Range:

i=1–28

 

The FK command allows you to define a function key within your program. The FK command pauses processing until the buttons you have “armed” are pressed. The number of the button pressed is assigned to the system variable, (FKEY). You can then manipulate or directly use this variable to branch to other routines or make other decisions. FK allows the programmer to redefine the keypad’s function keys as operator menu selection buttons. You can even write your program with menus that look and feel like our setup menus. The returned values of the FKEY’s are:

Note: 24, the ESC key, cannot be assigned since it stops the program.

 

 

F1

F2

 

F3

 

 

=1

=2

 

=3

 

RUN

EDIT

HELP

COPY

DEL

 

=4

=5

=6

=7

=8

 

 

 

 

u

 

1=9

2=10

3=11

=12

=13

 

 

 

 

 

4=14

5=15

6=16

=17

=18

 

 

 

 

.

,

 

7=19

8=20

9=21

=22

=23

 

ESC

 

±

ALPHA

ENTER

 

=Not

 

 

 

0=25

=26

=27

=28

Example:

Used

FK1,2,3,4

GS(FKEY)

Pauses command execution until F1, F2, F3, or RUN is pressed on the keypad. (FKEY) is assigned a value of 1–4. Subroutine 1–4 is called with the GS(gosub) command.

Figure 6-1 shows how to use the keypad function keys as an operator interface. A 3–screen menu program is provided

1.Write a menu message (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 considered valid.

3.Gosub to the appropriate program.

MN1853

Keypad Programming 6-7

Page 66
Image 66
Baldor MIN1853 manual =12 =13 =17 =18 =22 =23, =26 =27 =28, RUN Edit, Copy DEL, Gsfkey