User manual
19Page
Velleman Projects
3.12
ReadAllDigital
Syntax
int ReadAllDigital(int CardAddress);
Parameter
CardAddress: The address of previously opened card.
Result
int: The 8 LSB correspond to the status of the digital input channels. '1' means that the corresponding
input of the card is HIGH, '0' means that the input is LOW.
Description
The function returns the status of the digital inputs of the card.
Example
i = ReadAllDigital(CardAddress);
CheckBox1->Checked = (i & 1)>0;
CheckBox2->Checked = (i & 2)>0;
CheckBox3->Checked = (i & 4)>0;
CheckBox4->Checked = (i & 8)>0;
CheckBox5->Checked = (i & 16)>0;
CheckBox6->Checked = (i & 32)>0;
CheckBox7->Checked = (i & 64)>0;
CheckBox8->Checked = (i & 128)>0;