Galil DMC-2X00 user manual Configuring the I/O of the DMC-2x00

Models: DMC-2X00

1 267
Download 267 pages 56.53 Kb
Page 172
Image 172

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 = n2 + 2*n3 + 4*n4 + 8*n5 +16* n6 +32* n7 +64* n8 +128* n9 where nx represents the block. If the nx value is a one, then the block of 8 I/O points is to be configured as an output. If the nx 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.

DMC-2X00

Chapter 7 Application Programming y 117

Page 172
Image 172
Galil DMC-2X00 user manual Configuring the I/O of the DMC-2x00