Using Built–in Variable (AROWREL)

(AROWREL) is a built–in Boolean read only variable that determines the status of any of the four arrow keys. When used with (FKEY), the program can detect if an arrow key is being held down. (AROWREL) will only return the status of the four arrow keys. If a different key is pressed, (AROWREL) will return the value 0. (AROWREL) will return one of these values:

(AROWREL)=0 One of the arrow keys is being held down. (AROWREL)=1 The arrow key has been released.

Example JOG application using (AROWREL) and (FKEY):

[MAIN]

{Program #1}

FK12,13

{Wait for a Left or Right arrow key}

GT(FKEY)

{Jump to arrow key program #12 or #13}

[LEFT ARROW]

{Program #12}

MC+

{Enable MC mode}

AC.1

{Start MC move}

VE1

{Move in positive direction}

GO

 

LP

 

IF(AROWREL)=1

{Check status of arrow key}

VE0

{Stop MC move on key release}

GO

 

GT1

{Return to main program}

EB

 

EB

 

[RIGHT ARROW]

{Program #13}

MC+

{Enable MC mode}

AC.1

{Start MC move}

VE–1

{Move in negative direction}

GO

 

LP

 

IF(AROWREL)=1

{Check status of arrow key}

VE0

{Stop MC move on key release}

GO

 

GT1

{Return to main program}

EB

 

EB

 

MN1853

Keypad Programming 6-27

Page 86
Image 86
Baldor MIN1853 manual Using Built-in Variable Arowrel