syntax – ONn,GTx ONn,GSx ONn,0
n= On EOT Limit

ON On Condition (On Event)

Clear the event

Value: N/A

Units: N/A

Range: N/A

Allows conditional program execution based on an event. When the programmable event occurs, the current program and move are interrupted and program execution begins at the predefined interrupt program. The interrupt program can be defined as a GT or a GS. Defining the interrupt as a GS allows program execution to return to the exact point in the original program where the interrupt occurred. The ON command currently supports End–of–Travel (EOT) as an event conditional.

After an ON event is defined, it is active in all user programs and need not be redefined except to change the interrupt program type, number or name, or clear the event condition.

Example: Using ON to handle an EOT event.

[POWERUP]

 

ONL,GT[ON EOT]

[Goto [ON EOT] {on an End–of–Travel input}

GT[HOME]

{Home the machine}

[MAIN]

 

LP

{Loop forever}

VE5 DA20 GO

{Define move}

DA0 GO

{Define move}

EB

 

[ON EOT]

 

IF(SA1)&256

{Check if EOT– switch was hit (bit #9 in SA)}

VEI DA0.5 GO

{Move off EOT– switch}

GT[HOME]

{Home the machine}

EB

 

VEI DA–0.5 GO

{Move off EOT+ switch}

GT[HOME]

{Home the machine}

[HOME]

 

GH3

{Home}

GT[MAIN]

{Jump to main loop}

MN1854

Keypad Programming 6-19

Page 74
Image 74
Baldor mn1854 manual Powerup ONL,GTON EOT, Gthome, Main, VE5 DA20 GO, DA0 GO, On EOT, VEI DA0.5 GO, Home GH3, Gtmain