User manual

28Page
Velleman Projects
3.21
ReadBackInOutMode
Syntax
int ReadBackInOutMode(int CardAddress);
Parameter
CardAddress: The address of previously opened card.
Result
int: Value between 0 and 3 representing the input/output mode of the digital terminals.
0: All the digital I/O terminals are outputs
1: The digital I/O terminals 1 to 4 are inputs and terminals 5 to 8 are outputs.
2: The digital I/O terminals 1 to 4 are outputs and terminals 5 to 8 are inputs.
3: All the digital I/O terminals are inputs
Description
The input / output mode of the digital terminals is read back.
Example
int IOmode;
IOmode = ReadBackInOutMode(CardAddress);
if ((IOmode & 1)>0)
RadioButton3->Checked = true;
else
RadioButton4->Checked = true;
if ((IOmode & 2)>0)
RadioButton6->Checked = true;
else
RadioButton5->Checked = true;