SetOutput
Set a digital output to ON or OFF for the main board or a DIO option card.
int SetOutput(int bd, int out, bool on);
Parameters
- bd - 0 for main board or number of digital output card.
- out - output number 1-4 main board, 1-8 DIO option card.
- on - true = turn output on, false = turn output off
Return Value
- Returns the result - OK success
Remarks
The main board or option card must already be opened by calling OpenMnBd first. The call does a wait for acknowledgement. If the application is using main board communication events these events may be called during the wait for acknowledgement.
Examples
if(SetOutput(MNBD_DEV, 1, true) == OK) DisplayText(0, 0, "Output 1 is ON");
if(SetOutput(1, 4, false) == OK) DisplayText(0, 0, "Card 1 Output 4 is now OFF");
See Also
Last modified
7 years ago
Last modified on 04/19/18 07:00:13
Note:
See TracWiki
for help on using the wiki.