Manual
Chapter 6
Discrete I/O
6-7
setbit
Use this routine to write a one bit into the output image table.
Calling sequence:
setbit(rack,
gr
oup, bit
);
Arguments:
rack: an integer 0 to 7, the logical rack number.
group: an integer 0 to 7, the module group number.
bit: an integer 0 to 15 (decimal) or 0 to 17 (octal), the bit number.
Returned values:
none.
Example:
setbit(ALARM_RACK, ALARM_GRP, ALARM_TERM);
turns on the alarm if the three constants have been defined with the rack,
group, and terminal (bit) number.
Note: setbit is a macro that compiles into a call on putbit with a
constant data value of 1.