The following example demonstrates how to program the board using the C programming language under Windows. The example shows how to get or set a group or channel voltage.
To run, enter the following command line:
GxAoExampleC <Slot|Address> <Operation> [<Group> <Channel|Range> <Voltage|Frequency> [<Test Mode>]]
Where:
<Slot|Address> |
Board PXI Slot number where the board resides. |
<Operation> |
Operation code:GCV=Get channel voltageSCV=Set channel voltageSVR=Set group voltage rangeGVR=Get group voltage rangeSUM=Print board summaryARB=Output arbitrary waveformSTREAM=Stream waveforms |
<Group > |
Required for all example operations except SUM.Group number: 0 to 3 |
<Channel|Range> |
Required for all example operations except SUM.Channel (SCV, GCV, ARB, STREAM): 0 to 15Range (SVR, GVR): 0 to 3 |
<Voltage|Frequency> |
Required for SCV, ARB, and STREAM modes.Voltage (SCV): -5.0 to 5.0Frequency (ARB, STREAM): Sample rate to be used while outputting waveform. |
<Test Mode> |
Required for STREAM only.Valid test modes are:-POLL: Check streaming buffer by polling the status register.-INTR: Streaming buffer generates interrupt if half-empty. |