Motion Coordinator Technical Reference Manual
Trio BASIC Commands 8-25
Motion and Axis Commands
Example:
A machine cycles an initialisation shape cycle 1000 times prior to running a pattern
continuously until requested to stop at the end of the pattern.
The same shape is used for the initialisation cycles and the pattern. This shape is
held in
TABLE values 100..150
The running pattern sequence is held in
TABLE values 1000..4999
The initialisation pattern is a single value held in
TABLE(160)
The initialisation control block is held in TABLE(200)..TABLE(206)
The running control block is held in TABLE(300)..TABLE(306)
' Set up Initialisation control block:
TABLE(200,160,-1,160,160,0,1000,300)
' Set up running control block:
TABLE(300,1000,-1,1000,4999,0,-1,-1)
' Run whole lot with single CAMBOX:
‘ Third parameter is pointer to first control block
CAMBOX(100,150,200,5000,1,20)
WAIT UNTIL IN(7)=OFF
TABLE(305,0) ' Set zero repeats: This will stop at end of pattern
Note:
Negative motion on link axis:
The axis the
CAMBOX is linked to may be running in a positive or negative direction.
In the case of a negative direction link the pattern will execute in reverse. In the
case where a certain number of pattern repeats is specified with a negative direc-
tion link, the first control block will produce one repeat less than expected. This is
because the
CAMBOX loads a zero link position which immediately goes negative on
the next servo cycle triggering a REPEAT COUNT. This effect only occurs when the
CAMBOX
is loaded, not on transitions from CONTROL BLOCK to CONTROL BLOCK. This
effect can easily be compensated for either by increasing the required number of
repeats, or setting the initial value of REPEAT POSITION to 1.