EasyManuals Logo

Moog SmartMotor User Manual

Moog SmartMotor
909 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #179 background imageLoading...
Page #179 background image
Part 1: Programming
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 179 of 909
TSWAIT
Wait for Synchronized Move to Complete
After a GS command has been issued to start a synchronized move, the TSWAIT command
can be used to pause program execution until the move has been completed. A standard
TWAIT command would not work where the motor issuing the PTS() and GS commands had a
zero length contribution to the total move. The TSWAIT command was created for this reason.
ADTS=100 'Set target synchronized accel/decel
VTS=100000 'Set target synchronized velocity
PTS(30000;1,40000;2) 'Set target positions, axes 1 & 2
GS 'Go, starts the synchronized move
TSWAIT 'Optional wait for synch. move to complete
The previous example is a synchronized move in its simplest form. The code could be written
in either motor 1 or 2 and it would work the same.
The TSWAIT command merely pauses program execution (except for interrupt routines). It
may be desirable to continue running the program while waiting. In that event, the program
can loop around the Synchronized Move Status Bit, which is status word 7, bit 15, accessible
by variable B(7,15). So the following While Loop code example is equivalent to the TSWAIT
command, except that more code can be added within the loop for execution during the wait.
WHILE B(7,15)==1 'While synchronized move in process
...
LOOP 'Loop back
The next code example adds subroutine efficiency, the efficiency of setting up the next move
while the existing move is ongoing, and adds an error check before continuing to issue
synchronized move commands.
Part 1: Programming: TSWAIT

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Moog SmartMotor and is the answer not in the manual?

Moog SmartMotor Specifications

General IconGeneral
BrandMoog
ModelSmartMotor
CategoryServo Drives
LanguageEnglish

Related product manuals