Cut-to-length example, Latch capture example – Yaskawa SMC–4000 User Manual
Page 358
348
SMC–4000 User Manual
Cut-to-Length Example
In this example, a length of material is to be advanced a specified distance. When the motion is complete,
a cutting head is activated to cut the material. The length is variable, and the operator is prompted to input
it in inches. Motion starts with a start button which is connected to input 1.
The load is coupled with a 2 pitch lead screw. A 2000 count/rev encoder is on the motor, resulting in a
resolution of 4000 counts/inch. The program below uses the variable LEN, to length. The IN command is
used to prompt the operator to enter the length, and the entered value is assigned to the variable LEN.
Latch Capture Example
#BEGIN
Label
AC 800000
Acceleration
DC 800000
Deceleration
SP 5000
Speed
LEN=3.4
Initial length in inches
#CUT
Cut routine
AI1
Wait for start signal
IN "enter Length(IN)", LEN
Prompt operator for length in inches
PR LEN *4000
Specify position in counts
BGX
Begin motion to move material
AMX
Wait for motion done
SB1
Set output to cut
WT100;CB1
Wait 100 msec, then turn off cutter
JP #CUT
Repeat process
EN
End program
Instruction
Interpretation
#Latch
Latch program
JG5000
Jog X
BG X
Begin motion on X axis
AL X
Arm Latch for X axis
#Wait
#Wait label for loop
JP #Wait,_ALX=1
Jump to #Wait label if latch has not occurred
Result=_RLX
Set value of variable ‘Result’ equal to the report position of X axis
Result=
Print result
EN
End