DMC-21x3 Accessories Appendix C Command Reference• 111
CO
FUNCTION: Configure Extended I/O
DESCRIPTION:
The CO command configures the extended I/O.
The 64 extended I/O points of the controller can be configured in banks of 8. The
extended I/O is denoted as bits 17-80 and banks 2-9.
ARGUMENTS: CO n where
n is a decimal value which represents a binary number. Each bit of the binary number
represents one bank of extended I/O. When set to 1, the corresponding bank is
configured as an output.
The least significant bit represents bank 2 and the most significant bit represents bank 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 bank.
To configure a bank as an output bank, substitute a one into that n
x
in the formula. If the
n
x
value is a zero, then the bank of 8 I/O points will be configured as an input. For
example, if banks 3 and 4 are to be configured outputs, CO 6 is issued. Use MG_CO
to verify the daughter board is capable of the desired configuration.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL CONTROLLERS WITH I/O DAUGHTER BOARD
OPERAND USAGE:
_CO returns the extended I/O configuration value
EXAMPLES:
CO 255 Configure all points as outputs
CO 0 Configure all points as inputs
CO 1 Configures bank 1 to outputs on extended I/O