Omron TJ2-MC64 - PROGRAMMING Programming Manual page 142

Hide thumbs Also See for TJ2-MC64 - PROGRAMMING:
Table of Contents

Advertisement

BASIC commands
/i
Example
A machine must move to one of 3 positions depending on the selection made
by 2 switches. The options are home (if both switches are off), position 1 (if
the first switch is on and the second switch is off) and position 2 (if the first
switch is off and the second switch is on). Position 2 has priority over position
1.
'define absolute positions
home=1000
position_1=2000
position_2=3000
WHILE IN(run_switch)=ON
IF IN(6)=ON THEN 'switch 6 selects position 2
MOVEABS(position_2)
WAIT IDLE
ELSEIF IN(7)=ON THEN 'switch 7 selects position 1
MOVEABS(position_1)
WAIT IDLE
ELSE
MOVEABS(home)
WAIT IDLE
ENDIF
WEND
Example
An X-Y plotter has a pen carousel. The position of this carousel is fixed rela-
tive to the absolute zero position of the plotter. To change pens, an absolute
move to the carousel position finds the target irrespective of the plot position.
MOVEABS(28.5,350) ' move to just outside the pen holder area
WAIT IDLE
SPEED = pen_pickup_speed
MOVEABS(20.5,350) ' move in to pick up the pen
PROGRAMMING MANUAL
fig. 35
136

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-prtTj1-drtTj1-cortTj1-mlGrt1-ml2Tj1-fl02

Table of Contents