| 1 | = SetDACPercent = |
| 2 | Set a DAC output percentage. |
| 3 | |
| 4 | {{{ |
| 5 | int SetDACPercent(int dev, uint8 percent); |
| 6 | }}} |
| 7 | |
| 8 | == Parameters == |
| 9 | |
| 10 | * dev - number of DAC card. |
| 11 | * percent - percent value 0 - 100. |
| 12 | |
| 13 | == Return Value == |
| 14 | |
| 15 | * Returns the result - OK success |
| 16 | |
| 17 | == Remarks == |
| 18 | |
| 19 | The option card must already be opened by calling OpenMnBd(dev) first. The DAC output registers must already be initialized by calling, SetDACReg, etc... If the application is using main board communication events these events may be called during the wait for acknowledgement. |
| 20 | |
| 21 | == Examples == |
| 22 | |
| 23 | {{{ |
| 24 | int dac = 1; // number of dac card - not number of slot |
| 25 | int percent = 50; |
| 26 | |
| 27 | if(SetDACPercent(dac, percent) != OK) |
| 28 | { |
| 29 | DisplayText(0, 0, "SetDACPercent Error"); |
| 30 | } |
| 31 | }}} |
| 32 | |
| 33 | |
| 34 | == See Also == |
| 35 | |
| 36 | * [http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/DAC/SetDACReg SetDACReg] |
| 37 | * [http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/SetDACTrackScale SetDACTrackScale] |