Delta Tau GEO BRICK LV User Manual
Turbo PMAC User Manual
Writing and Executing Motion Programs
271
WRITING AND EXECUTING MOTION PROGRAMS
Motion programs are Turbo PMAC’s chief mechanism for describing the desired motion with the
associated math, logic, and I/O operations. They provide a simple, yet powerful and flexible means for
describing the motion and operations synchronous to that motion.
associated math, logic, and I/O operations. They provide a simple, yet powerful and flexible means for
describing the motion and operations synchronous to that motion.
Turbo PMAC can hold up to 224 motion programs at one time. Any coordinate system can run any of
these programs at any time, even if another coordinate system is already executing the same program.
Turbo PMAC can run as many motion programs simultaneously as there are coordinate systems defined
on the card (up to 16). A motion program can call any other motion program as a subprogram, with or
without arguments.
these programs at any time, even if another coordinate system is already executing the same program.
Turbo PMAC can run as many motion programs simultaneously as there are coordinate systems defined
on the card (up to 16). A motion program can call any other motion program as a subprogram, with or
without arguments.
Turbo PMAC’s motion program language is perhaps best described as a cross between a high-level
computer language like BASIC or Pascal, and G-Code (RS-274) machine tool language. In fact, it can
accept straight “G-Code” programs directly, provided it has been set up properly. It has the
computational and logical constructs of a computer language, and move specification constructs very
much like machine tool languages. Numerical values in the program can be specified as constants or
expressions.
computer language like BASIC or Pascal, and G-Code (RS-274) machine tool language. In fact, it can
accept straight “G-Code” programs directly, provided it has been set up properly. It has the
computational and logical constructs of a computer language, and move specification constructs very
much like machine tool languages. Numerical values in the program can be specified as constants or
expressions.
Sequenced Motion Program Execution
A powerful feature of Turbo PMAC motion programs is their automatic sequencing of calculations in
synchronization with the programmed moves. Unlike many motion-programming languages, it is not
necessary to include in your program explicit structures to wait for the end of a programmed move.
Instead, the Turbo PMAC’s operating system automatically monitors the progress of the programmed
move execution and triggers pending calculations (motion, I/O, and/or logic) at the end of a programmed
move. This greatly simplifies the writing of motion-program sequences.
synchronization with the programmed moves. Unlike many motion-programming languages, it is not
necessary to include in your program explicit structures to wait for the end of a programmed move.
Instead, the Turbo PMAC’s operating system automatically monitors the progress of the programmed
move execution and triggers pending calculations (motion, I/O, and/or logic) at the end of a programmed
move. This greatly simplifies the writing of motion-program sequences.
A key implication of this scheme is that calculations in motion programs occur only at the boundaries of
programmed moves. If you have calculations that you want to occur at other times, these calculations
should be executed in Turbo PMAC PLC programs instead. See the Writing and Executing PLC
Programs section of this manual for details.
programmed moves. If you have calculations that you want to occur at other times, these calculations
should be executed in Turbo PMAC PLC programs instead. See the Writing and Executing PLC
Programs section of this manual for details.
Flow Control
In a motion program, Turbo PMAC has WHILE loops and IF...ELSE branches that control program
flow. These constructs can be nested indefinitely. In addition, there are GOTO statements, with either
constant or variable arguments (the variable GOTO can perform the same function as a Case statement).
GOSUB statements (constant or variable destination) allow subroutines to be executed within a program.
CALL statements permit other programs to be entered as subprograms. Entry to the subprogram does not
have to be at the beginning – the statement CALL 20.15000 causes entry into Program 20 at line
N15000. GOSUBs and CALLs can be nested only 15 deep.
flow. These constructs can be nested indefinitely. In addition, there are GOTO statements, with either
constant or variable arguments (the variable GOTO can perform the same function as a Case statement).
GOSUB statements (constant or variable destination) allow subroutines to be executed within a program.
CALL statements permit other programs to be entered as subprograms. Entry to the subprogram does not
have to be at the beginning – the statement CALL 20.15000 causes entry into Program 20 at line
N15000. GOSUBs and CALLs can be nested only 15 deep.
G-Codes
To handle machine-tool-style G-codes, which provide direct access to part programs created by
CAD/CAM programs, Turbo PMAC treats a Gnn statement as CALL 1000.nn000. The following
values on the line (e.g. X1000) can be treated as parameters to be passed, as for a canned cycle, or the
subprogram can execute without arguments, return, and execute the rest of the line (as for a modal G-
code). The machine tool designer writes Program 1000 to implement the G-codes as he wishes, allowing
customization and enhancements. Delta Tau provides a sample file implementing all of the standard G-
codes. M, S, T, and D codes are similarly implemented.
CAD/CAM programs, Turbo PMAC treats a Gnn statement as CALL 1000.nn000. The following
values on the line (e.g. X1000) can be treated as parameters to be passed, as for a canned cycle, or the
subprogram can execute without arguments, return, and execute the rest of the line (as for a modal G-
code). The machine tool designer writes Program 1000 to implement the G-codes as he wishes, allowing
customization and enhancements. Delta Tau provides a sample file implementing all of the standard G-
codes. M, S, T, and D codes are similarly implemented.