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

Version 3 (modified by Don Wilson, 4 years ago) ( diff )

--

GetOutput

Get a digital output state for the main board or a DIO option card.

bool GetOutput(int bd, int output);

Parameters

  • bd - 0 for main board or number of digital output card.
  • output - output number (1-4) main board (1-8) option card.

Return Value

  • Returns the result - true = output is on, false = output is off

Remarks

The main board or option card must already be opened by calling OpenMnBd first. This function returns the status of the memory buffer for the output. It is necessary to have communications code in place for this memory to be updated in an application. This can be done by using StartRepeatMulti, at the beginning of the application prior to GetOutput.

Examples

if(GetOutput(MNBD_DEV, 1) == true)
    DisplayText(0, 0, "Output 1 is ON");
if(GetOutput(1, 4) == false)
    DisplayText(0, 0, "Card 1 Output 4 is OFF");

See Also

Note: See TracWiki for help on using the wiki.