Commenting Programs; Executing Programs - Multitasking - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

beginning the program with the label #AUTO. The program must be saved into non-volatile memory
using the command, BP.
Automatic Subroutines for Monitoring Conditions:

Commenting Programs

There are two methods for commenting programs. The first method uses the NO command and allows
for comments to be embedded into Galil programs. The second method used the REM statement and
requires the use of Galil software.
NO Command
The CDS-3310 provides a command, NO, for commenting programs. This command allows the user
to include up to 78 characters on a single line after the NO command and can be used to include
comments from the programmer as in the following example:
NOTE: The NO command is an actual controller command. Therefore, inclusion of the NO
commands will require process time by the controller.
HINT: Some users annotate their programs using the word "NOTE" since everything after the "NO"
is a comment. Likewise an apostrophe (') can be used instead of the NO command when commenting
programs.
REM Command
If you are using Galil software to communicate with the CDS-3310 controller, you may also include
REM statements. 'REM' statements begin with the word 'REM' and may be followed by any
comments which are on the same line. The Galil terminal software will remove these statements when
the program is downloaded to the controller. For example:

Executing Programs - Multitasking

The CDS-3310 can run up to 8 independent programs simultaneously. These programs are called
threads and are numbered 0 through 7, where 0 is the main thread. Multitasking is useful for executing
independent operations such as PLC functions that occur independently of motion.
The main thread differs from the others in the following ways:
CDS-3310
#ININT
#LIMSWI
#POSERR
#MCTIME
#CMDERR
#COMINT
#TCPERR
#AMPERR
#AUTOERR
Instruction
#PATH
NO This is a comment
#PATH
REM 2-D CIRCULAR PATH
Label for Input Interrupt subroutine
Label for Limit Switch subroutine
Label for excess Position Error subroutine
Label for timeout on Motion Complete trip point
Label for incorrect command subroutine
Label for communication interrupt
Label for TCP/IP communication error
Label for Amplifier Error
Label for checksum error on power up. See _RS.
Interpretation
Label
Comment - No Operation
Chapter 7 Application Programming
i
19

Advertisement

Table of Contents
loading

Table of Contents