EasyManua.ls Logo

Galil DMC-4040 - Accessing Extended I;O; Example Applications; Wire Cutter

Galil DMC-4040
284 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Accessing Extended I/O
When configured as an output, each I/O point may be defined with the SBn and CBn commands (where n=1 through
8 and 17 through 48). Outputs may also be defined with the conditional command, OBn (where n=1 through 8 and
17 through 48).
4080
For 5-8 axis controllers, each I/O point may be defined with the SBn and CBn commands (where n=1
through 48).
The command, OP, may also be used to set output bits, specified as blocks of data. The OP command accepts 3
parameters. The first parameter sets the values of the main output port of the controller (Outputs 1-8, block 0). The
additional parameters set the value of the extended I/O as outlined:
OP m,a,b
where m is the decimal representation of the bits 1-8 (values from 0 to 255) and a,b,c,d represent the extended I/O in
consecutive groups of 16 bits (values from 0 to 65535). Arguments which are given for I/O points which are
configured as inputs will be ignored. The following table describes the arguments used to set the state of outputs.
Argument Blocks Bits Description
m 0 1-8 General Outputs
a 2,3 17-32 Extended I/O
b 4,5 33-48 Extended I/O
For example, if block 8 is configured as an output, the following command may be issued:
OP 7,,7
This command will set bits 1,2,3 (block 0) and bits 33,34,35 (block 4) to 1. Bits 4 through 8 and bits 36 through 48
will be set to 0. All other bits are unaffected.
When accessing I/O blocks configured as inputs, use the TIn command. The argument 'n' refers to the block to be
read (n=0,2,3 or 4). The value returned will be a decimal representation of the corresponding bits.
Individual bits can be queried using the @IN[n] function (where n=1 through 8 or 17 through 48). If the following
command is issued;
4080
Individual bits can be queried using the @IN[n] function (where n=1 through 48).
MG @IN[17]
the controller will return the state of the least significant bit of block 2 (assuming block 2 is configured as an input).
Example Applications
Wire Cutter
An operator activates a start switch. This causes a motor to advance the wire a distance of 10”. When the motion
stops, the controller generates an output signal which activates the cutter. Allowing 100 ms for the cutting
completes the cycle.
Suppose that the motor drives the wire by a roller with a 2” diameter. Also assume that the encoder resolution is
1000 lines per revolution. Since the circumference of the roller equals 2π inches, and it corresponds to 4000
quadrature, one inch of travel equals:
4000/2π = 637 count/inch
This implies that a distance of 10 inches equals 6370 counts, and a slew speed of 5 inches per second, for example,
equals 3185 count/sec.
Chapter 7 Application Programming 169 DMC-40x0 User Manual

Table of Contents

Related product manuals