9-12 Programming Examples
Example Programs
Trio Motion Technology
’ Limit adjust to 10mm
r_adj=REG_POS*0.5' Apply 50% of error
IF ABS(r_adj)>10 THEN r_adj=SGN(r_adj)*10
OP(8,OFF)
ELSE
’ mark not seen last cycle: Set Zero adjust
r_adj=0
OP(8,ON)' light "no register" warning lamp
ENDIF
BASE(3)' Correction on axis 3
MOVELINK(75-r_adj,150,25,25,1)
‘ 75 is the diff. between the mark spacing and
‘ the print head circumference
' Move linked to conveyor
WAIT IDLE
BASE(0)
REGIST(3)
GOTO loop
initial:
BASE(0)' Setup axis 0
UNITS=20' Edges/mm
P_GAIN=0.5
REP_DIST=200' 200mm=180 degrees
SERVO=ON
BASE(1)' Setup axis 1
SERVO=OFF
UNITS=15'Edges/mm on conveyor
BASE(3)' Setup axis 3
UNITS=20' Match axis 0 units
' Datum axis 0 keeping sync with paper:
WDOG=ON
BASE(0)
CONNECT(20/15,1)
WAIT UNTIL IN(0)=ON' Wait for prox
DEFPOS(-150)
ADDAX(3)' Add moves on axis 3
RETURN