Input Interrupt Function; Extended I/O Of The Cds-3310 Controller - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

A CDS-3310 has one auxiliary encoder. This encoder has two inputs (channel A and channel B).
Channel A input is mapped to input 81 and Channel B input is mapped to input 82. To use this input
for 2 TTL signals, the first signal will be connected to AA+ and the second to AB+. AA- and AB-
will be left unconnected. To access this input, use the function @IN[81] and @IN[82].

Input Interrupt Function

The CDS-3310 provides an input interrupt function which causes the program to automatically execute
the instructions following the #ININT label. This function is enabled using the II m,n,o command.
The m specifies the beginning input and n specifies the final input in the range. The parameter o is an
interrupt mask. If m and n are unused, o contains a number with the mask. A 1 designates that input to
be enabled for an interrupt, where 2
and 3 (2
A low input on any of the specified inputs will cause automatic execution of the #ININT subroutine.
The Return from Interrupt (RI) command is used to return from this subroutine to the place in the
program where the interrupt had occurred. If it is desired to return to somewhere else in the program
after the execution of the #ININT subroutine, the Zero Stack (ZS) command is used followed by
unconditional jump statements.
Important: Use the RI command (not EN) to return from the #ININT subroutine.
Example - Input Interrupt

Extended I/O of the CDS-3310 Controller

The CDS-3310 controller, with optional DB-28040, offers 40 extended I/O points which can be
configured as inputs or outputs in 8 bit increments through software. The I/O points are accessed
through the daughter board, which utilizes one 50-pin IDC ribbon connectors.
CDS-3310
0
2
+ 2
= 5).
Instruction
#A
II 1
JG 30000,-20000
BG AB
#B
TP AB
WT 1000
JP #B
EN
#ININT
MG "Interrupt has occurred"
ST AB
#LOOP;JP #LOOP,@IN[1]=0
JG 15000,10000
WT 300
BG AB
RI
0
1
is bit 1, 2
is bit 2 and so on. For example, II,,5 enables inputs 1
Interpretation
Label #A
Enable input 1 for interrupt function
Set speeds on A and B axes
Begin motion on A and B axes
Label #B
Report A and B axes positions
Wait 1000 milliseconds
Jump to #B
End of program
Interrupt subroutine
Displays the message
Stops motion on A and B axes
Loop until Interrupt cleared
Specify new speeds
Wait 300 milliseconds
Begin motion on A and B axes
Return from Interrupt subroutine
Chapter 7 Application Programming
i
53

Advertisement

Table of Contents
loading

Table of Contents