RTC
®
4 PC Interface Board
Rev. 1.3 e
10 Commands And Functions
76
innovators for industry
List Command
clear_io_cond_list
Function
clears the bits of the 16-bit digital output port that are set (=1) in
mask_clear
,
if the current
IOvalue
at the digital
input
port meets the following condition:
((IOvalue AND mask_1) = mask_1) AND (((not IOvalue) AND mask_0) = mask_0)
(i.e. the bits specified in
mask_1
must be
1
and the bits specified in
mask_0
must be
0
).
Parameters
mask_1,
mask_0,
mask_clea
r
unsigned 16-bit mask values
Integration
Pascal:
procedure clear_io_cond_list(mask_1, mask_0, mask_clear: word);
C:
void clear_io_cond_list(unsigned short mask_1, unsigned short mask_0,
unsigned short mask_clear);
Basic:
sub clear_io_cond_list(ByVal mask_1%, ByVal mask_0%, ByVal
mask_clear%)
Comments
• The command affects only those bits of the output port that are set (=1) in the param-
eter
mask_clear
.
Examples
(Pascal)
• clear bit #4 of the output port (DIGITAL_OUT4), if bit #0 of the input port
(DIGITAL_IN0) is HIGH and bits #1 to #3 (DIGTAL_IN1…3) of the input port are LOW:
clear_io_cond_list($0001, $000E, $0010)
• always clear bit #15 of the output port (and leave the other bits unchanged):
clear_io_cond_list(0, 0, $8000)
References