Programmable Hardware I/O; Digital Outputs - Galil Motion Control DMC-1600 Series User Manual

Table of Contents

Advertisement

The DMC-1600 position parameters such as PR, PA and VP have units of quadrature counts.
Speed parameters such as SP, JG and VS have units of counts/sec. Acceleration parameters such
as AC, DC, VA and VD have units of counts/sec 2 . The controller interprets time in milliseconds.
All input parameters must be converted into these units. For example, an operator can be
prompted to input a number in revolutions. A program could be used such that the input number
is converted into counts by multiplying it by the number of counts/revolution.
Example:
#RUN
IN "ENTER # OF REVOLUTIONS",N1
PR N1*2000
IN "ENTER SPEED IN RPM",S1
SP S1*2000/60
IN "ENTER ACCEL IN RAD/SEC2",A1 Prompt for ACCEL
AC A1*2000/(2*3.14)
BG
EN

Programmable Hardware I/O

Digital Outputs

The DMC-1600 has an 8-bit uncommitted output port for controlling external events. The
DMC-1650 through DMC-1680 has an additional 8 outputs. The DMC-1600 has an additional 64
I/O (configured as inputs or outputs with CO command). Each bit on the output port may be set
and cleared with the software instructions SB (Set Bit) and CB(Clear Bit), or OB (define output
bit).
For example:
Instruction
SB6
CB4
The Output Bit (OB) instruction is useful for setting or clearing outputs depending on the value of
a variable, array, input or expression. Any non-zero value results in a set bit.
Instruction
OB1, POS
OB 2, @IN [1]
OB 3, @IN [1]&@IN [2]
OB 4, COUNT [1]
The output port can be set by specifying an 8-bit word using the instruction OP (Output Port).
This instruction allows a single command to define the state of the entire 8-bit output port, where
2 0 is output 1, 2 1 is output 2 and so on. A 1 designates that the output is on.
For example:
Instruction
DMC-1600
Label
Prompt for revs
Convert to counts
Prompt for RPMs
Convert to counts/sec
Convert to counts/sec2
Begin motion
End program
Function
Sets bit 6 of output port
Clears bit 4 of output port
Function
Set Output 1 if the variable POS is non-zero. Clear Output 1 if POS equals 0.
Set Output 2 if Input 1 is high. If Input 1 is low, clear Output 2.
Set Output 3 only if Input 1 and Input 2 are high.
Set Output 4 if element 1 in the array COUNT is non-zero.
Function
Chapter 7 Application Programming • 149

Advertisement

Table of Contents
loading

Table of Contents