CDS-3310
Chapter
7 Application Programming
i
19
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:
#ININT
Label for Input Interrupt subroutine
#LIMSWI
Label for Limit Switch subroutine
#POSERR
Label for excess Position Error subroutine
#MCTIME
Label for timeout on Motion Complete trip point
#CMDERR
Label for incorrect command subroutine
#COMINT
Label for communication interrupt
#TCPERR
Label for TCP/IP communication error
#AMPERR
Label for Amplifier Error
#AUTOERR
Label for checksum error on power up. See _RS.
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:
Instruction Interpretation
#PATH Label
NO This is a comment
Comment - No Operation
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:
#PATH
REM 2-D CIRCULAR PATH
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:
Summary of Contents for CDS-3310
Page 26: ...18 i Chapter 2 Getting Started CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 32: ...24 i Chapter 3 Connecting I O CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 124: ...CDS 3310 Chapter 8 Hardware Software Protection i 63 THIS PAGE LEFT PLANK INTENTIONALLY...
Page 138: ...CDS 3310 Chapter 10 Theory of Operation i 77 THIS PAGE LEFT BLANK INTENTIONALLY...