Examples and tips
Example
'================================================
'BAG FEEDER program
'================================================
'Working with marks, if any mark is missing, feed the
'theoretical distance. But if the mark is missing for
'a number of consecutive bags, stop the operation.
'A digital output is activated a certain time to cut
'the bag.
'================================================
'Variable initialisation
start_signal=7
max_fail=3
program_alarm=0
failed=0
feeder_axis=2
BASE(feeder_axis)
'Position counter (MPOS,DPOS) goes from 0 to 999999
'and 0 again
UNITS=27
SPEED=100
ACCEL=1000
DECEL=1000
REP_DIST=1000000
REP_OPTION=1
SERVO=ON
WDOG=ON
'Main program
loop:
'Define current position as zero
DEFPOS(0)
'Wait for rising edge in Digital Input
'"start_signal"
PROGRAMMING MANUAL
Position
Bag_distance-expected_pos+REG_POS
Bag_distance
REG_POS
Speed
MARK=TRUE
MOVEMODIFY
MOVEABS
REGIST(1)
WAIT IDLE
DEFPOS(0)
IN(start_signal)
fig. 54
MARK=FALSE
Mark not detected,
no correction
MOVEABS
MOVEABS
REGIST(1)
WAIT IDLE
DEFPOS(0)
Time
Time
332
Need help?
Do you have a question about the TJ2-MC64 - PROGRAMMING and is the answer not in the manual?
Questions and answers