Event trigger - set output after distance, Event trigger - repetitive position trigger – Yaskawa LEGEND-MC User Manual

Page 297

Advertising
background image

287

LEGEND-MC User’s Manual

Event Trigger - Set Output after Distance

Set output bit 1 after a distance of 1000 counts from the start of the move. The accuracy of the trippoint is
the speed multiplied by the sample period.

The above example sets output bit 1 after a distance of 1000 counts from the start of the move. The
accuracy of the trippoint is the speed multiplied by the sample period.

Event Trigger - Repetitive Position Trigger

To set the output bit every 10000 counts during a move, the AR trippoint is used shown in the next
example.

#SETBIT

Label

SP 10000

Speed is 10000

PA 20000

Specify Absolute position

BGX

Begin motion

AD 1000

Wait until 1000 counts

SB1

Set output bit 1

EN

End program

#TRIP

Label

JG 50000

Specify Jog Speed

BGX;N=0

Begin Motion

#REPEAT

# Repeat Loop

AR 10000

Wait 10000 counts

TPX

Tell Position

SB1

Set output 1

WT50

Wait 50 msec

CB1

Clear output 1

N=N+1

Increment counter

JP #REPEAT,N<5

Repeat 5 times

STX

Stop

EN

End

Advertising