wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/SetOutput

Version 2 (modified by Don Wilson, 13 years ago) ( diff )

--

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.

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

Note: See TracWiki for help on using the wiki.