Galil DMC-2X00 Projector User Manual


 
DMC-2X00 Chapter 7 Application Programming y 117
PA VP Command position
BGA Start motion
AMA After completion
JP #LOOP Repeat
EN End
Example - Position Follower (Continuous Move)
Method: Read the analog input, compute the commanded position and the position error. Command
the motor to run at a speed in proportions to the position error.
Instruction Interpretation
#CONT Label
AC 80000;DC 80000 Acceleration rate
JG 0 Start job mode
BGX Start motion
#LOOP
vp=@AN[1]*1000 Compute desired position
ve=vp-_TPA Find position error
vel=ve*20 Compute velocity
JG vel Change velocity
JP #LOOP Change velocity
EN End
Extended I/O of the DMC-2x00 Controller
The DMC-2x00 controller offers 64 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 1 80 pin high density
connector.
Configuring the I/O of the DMC-2x00
The 64 extended I/O points of the DMC-2x00 series controller can be configured in blocks of 8. The
extended I/O is denoted as blocks 2-9 or bits 17-80.
The command, CO, is used to configure the extended I/O as inputs or outputs. The CO command has
one field:
CO n
where n is a decimal value which represents a binary number. Each bit of the binary number
represents one block of extended I/O. When set to 1, the corresponding block is configured as an
output.
The least significant bit represents block 2 and the most significant bit represents block 9. The decimal
value can be calculated by the following formula. n = n
2
+ 2*n
3
+ 4*n
4
+ 8*n
5
+16* n
6
+32* n
7
+64*
n
8
+128* n
9
where n
x
represents the block. If the n
x
value is a one, then the block of 8 I/O points is to
be configured as an output. If the n
x
value is a zero, then the block of 8 I/O points will be configured
as an input. For example, if block 4 and 5 is to be configured as an output, CO 12 is issued.