Example program – Yaskawa SMC–4000 User Manual
Page 336
Advertising
326
SMC–4000 User Manual
Example Program:
#TIMER
Timer
INITIME=TIME
Initialize time variable
PR50000;BGX
Begin move
AMX
After move
ELAPSED=TIME-INTIME
Compute elapsed time
EN
End program
#LIMSWI
Limit Switch Routine
JP #FORWARD,_LFX=0
Jump if Forward Limit
AMX
Wait for Motion Done
PR 1000;BGX;AMX
Move Away from Reverse Limit
JP #END
Exit
#FORWARD
Forward Label
PR -1000;BGX;AMX
Move Away from Forward Limit
#END
Exit
RE
Return to Main Program
Advertising