| 1 | = GetOutput = |
| 2 | Get a digital output state for the main board or a DIO option card. |
| 3 | |
| 4 | {{{ |
| 5 | bool GetOutput(int bd, int output); |
| 6 | }}} |
| 7 | |
| 8 | == Parameters == |
| 9 | |
| 10 | * bd - 0 for main board or number of digital output card. |
| 11 | * output - output number (1-4) main board (1-8) option card. |
| 12 | |
| 13 | == Return Value == |
| 14 | |
| 15 | * Returns the result - true = output is on, false = output is off |
| 16 | |
| 17 | == Remarks == |
| 18 | |
| 19 | 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 StartRepeatIO or StartRepeatMulti, at the beginning of the application or by calling MnBdRequest MNBD_GET_IO_STATUS prior to GetOutput. |
| 20 | |
| 21 | == Examples == |
| 22 | |
| 23 | {{{ |
| 24 | if(GetOutput(MNBD_DEV, 1) == true) |
| 25 | DisplayText(0, 0, "Output 1 is ON"); |
| 26 | }}} |
| 27 | |
| 28 | {{{ |
| 29 | if(GetOutput(1, 4) == false) |
| 30 | DisplayText(0, 0, "Card 1 Output 4 is OFF"); |
| 31 | }}} |
| 32 | |
| 33 | == See Also == |
| 34 | |
| 35 | * [http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/SetOutput SetOutput] |
| 36 | * [http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/SetOutputMask SetOutputMask] |