DMC-18x6 Command Reference
56
CO
FUNCTION: Configure Extended I/O
DESCRIPTION:
The CO command configures which points are inputs and which are outputs on the extended I/O.
Note: for the DMC-18x6 series controller, this command only applies if DB-14064 is present.
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 outputs, 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 inputs.
For example, if banks 3 and 4 are to be configured as outputs, CO 6 is issued.
USAGE: DEFAULTS:
While Moving
Yes
Default Value
-
In a Program
Yes
Default Format
-
Command Line
Yes
Controller Usage
ALL
OPERAND USAGE:
_CO returns extended I/O configuration value
RELATED COMMANDS:
Clear Output Bit
Set Output Bit
Set Output Port
Tell Inputs
EXAMPLES:
CO 255
Configure all points as outputs
CO 0
Configure all points as inputs
CO 1
Configures bank 2 as outputs on extended I/O
Hint: See user manual appendix for more information on the extended I/O boards.