3.109
EDH0162En1040 – 06/99
MM4005
SB — Set I/O output bits
Usage
IMM
PGM
MIP
Syntax
xxSBnn
Parameters
Description
xx
[int]
— I/O bit number.
nn
[int]
— I/O bit mask.
Valeurs
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 sets 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 set.
If
xx
is missing or set to 0 and
nn
is between 1 and 255, the controller will
set all bits corresponding to the mask. For example, if
nn
is 140, the equiva-
lent binary mask is 10001100 which means that I/O output bits number 3, 4
and 8 will be set (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 sets all 8
bits. This is equivalent to setting
xx
to 0 and
nn
to 255.
NOTE
Remember that having an open collector configuration, a set bit means a
conducting transistor. Using a pull-up resistor, a set output bit will mea-
sure a logic low, 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
CB
—
Clear I/O outputs bits.
RO
—
Read I/O output.
SO
—
Set I/O output byte.
TG
—
Toggle I/O output bits.
Example SB224
|
Set I/O output port bits number 6, 7 and 8 high.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание MM4005
Страница 360: ...Section 7 Servo Tuning Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 368: ...Section 8 Appendices Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 405: ...EDH0162En1040 06 99 8 36 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 406: ...Section 9 Index Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...