3.27
EDH0162En1040 – 06/99
MM4005
CB — Clear I/O outputs bits
Usage
IMM
PGM
MIP
Syntax
xxCBnn
Parameters
Description
xx
[int]
— I/O bit number.
nn
[float]
— I/O bit mask.
Range
xx
—
0
to
8.
nn
—
0
to
255.
Units
xx
— None.
nn
— None.
Defaults
xx
Missing: 0.
Out of range: Error E.
Floating point: Error A.
nn
Missing: 255.
Out of range: Error C.
Floating point: Decimal part truncated.
Description
This command clears one to all output bits of the I/O port. If
xx
is specified
between 1 and 8, the
nn
mask must be missing and then the selected bit
will be cleared.
If
xx
is missing or set to 0 and
nn
is between 1 and 255, the controller will
clear all bits corresponding to the mask. For example, if
nn
is 140, the
equivalent binary mask is 10001100 which means that I/O output bits num-
ber 3, 4 and 8 will be cleared (remember that I/O bits are numbered from 1
to 8).
If
xx
is missing or set to 0 and
nn
is not specified, the controller clears all 8
bits. This is equivalent to setting
xx
to 0 and
nn
to 255.
NOTE
Remember that having an open collector configuration, a clear bit means
a non-conductive transistor. Using a pull-up resistor, a clear output bit
will measure a logic high, thus making the output port be the reverse
logic type.
NOTE
For the hardware definition of the I/O port, please see Appendix B,
Connector Pinouts, GPIO Connector.
Returns
None.
Errors
A
—
Unknown message code.
E
—
Incorrect I/O channel number.
Rel. Commands
RO
—
Read I/O output.
SB
—
Set I/O output bits.
SO
—
Set I/O output port byte.
TG
—
Toggle I/O output bits.
Example CB224
|
Set I/O output port bits number 6, 7 and 8 low.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com