8-174Trio BASIC Commands
Axis Parameters
Trio Motion Technology
length=200
OPEN_WIN=10
CLOSE_WIN=length-10
GOSUB Initial
Loop:
TICKS=0' Set millisecond counter to 0
IF MARK THEN
offset=REG_POS
' This next line makes offset -ve if at end of sheet:
IF ABS(offset-length)<offset THEN offset=offset-length
PRINT "Mark seen at:"offset[5.1]
ELSE
offset=0
PRINT "Mark not seen"
ENDIF
' Reset registration prior to each move:
DEFPOS(0)
REGIST(3+768)' Allow mark at first 10mm/last 10mm of sheet
CAM(0,50,(length+offset*0.5)*cf,1000)
WAIT UNTIL TICKS<-500
GOTO Loop
(variable “cf” is a constant which would be calculated depending on the machine
draw length per encoder edge)
REG_POSB
Type:
Axis Parameter (Read Only)
Description:
Useable only on MC206 built-in axes. REG_POSB returns the position at which a reg-
istration Z mark was seen on an axis. See
REGIST()
for more details.