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