English
Language : 

CJ1W-MCH72 Datasheet, PDF (212/374 Pages) Omron Electronics LLC – Programmable Controller SYSMAC CJ-series CJ1W-MCH72
All BASIC commands
Section 4-2
SERVO MOTOR
(AXIS 0)
LEAD SCREW
/i
Example
ENCODER (AXIS 7)
A flying shear that moves at the speed of the material cuts a long sheet
of paper into cards every 160 m. The shear can move up to 1.2 metres,
of which 1m is used in this example. The paper distance is measured by
an encoder. The unit conversion factor is set to give units of metres on
both axes. Note that axis 7 is the link axis.
WHILE IN(2)=ON
MOVELINK(0,150,0,0,7) ' dwell (no movement) for 150m
MOVELINK(0.3,0.6,0.6,0,7) ' accelerate to paper speed
MOVELINK(0.7,1.0,0,0.6,7) ' track the paper then decelerate
WAIT LOADED ' wait until acceleration movelink is finished
OP(8,ON) ' activate cutter
MOVELINK(-1.0,8.4,0.5,0.5,7) retract cutter back to start
WAIT LOADED
OP(8,OFF) ' deactivate cutter at end of outward stroke
WEND
In this program, the controller waits for the roll to feed out 150 m in the
first
line. After this distance the shear accelerates to match the speed of the
paper, moves at the same speed, and then decelerates to a stop within
the 1 m stroke. This movement is specified using two separate
MOVELINK commands. This allows the program to wait for the next
move buffer to be clear, NTYPE=0, which indicates that the acceleration
phase is complete. Note that the distances on the measurement axis
(the link distance in each MOVELINK command), 150, 0.8, 1.0 and 8.2,
add up to 160 m. To make sure that the speed and the positions of the
cutter and paper match during the cut process, the parameters of the
MOVELINK command must be correct. The easiest way to do this is to
consider the acceleration, constant speed and deceleration phases sep-
arately, and then combine them as required, according to these 2 rules:
201