Chapter 4
Programming
4-32
©
National Instruments Corporation
with specific programming steps in the Programming Information section.
The instructions are arranged in a sequence of functions, which are used in
the examples below to program the DAQ-STC. Because the PCI-6032E
and PCI-6033E do not have analog output circuitry, they cannot run analog
output examples.
Analog output DAQ-STC programming consists of the following
functions:
AO_Reset_All;
MSC_Clock_Configure;
AO_Board_Personalize;
AO_Triggering;
AO_Counting;
AO_Updating;
AO_Channels;
AO_LDAC_Source_And_Update_Mode;
AO_Errors_To_Stop_On;
AO_FIFO;
AO_Arming;
AO_Start_The_Acquisition;
As the analog output examples increase in complexity, more of these
functions will be necessary. The functions will be presented in the
applicable examples; subsequent examples address only the specific
differences from Example 1. This manual provides the structure and
pseudo-code for each example. The PCI E Series Register Level
Programmer Manual Companion Disk contains the complete programs.
The following pseudo-code examples and the programs on the Companion
Disk follow the flowchart structure presented in the DAQ-STC Technical
Reference Manual.
Example 1
This is an example of CPU write to the DAC.
Write 5 V to DAC1 in bipolar mode. Use internal reference and disable
reglitching. The data FIFO is not used. Use the immediate update mode to
update the output on DAC1.
1.
Set up the PCI board resources. Use the function
Setup_Mite
provided on the Companion Disk.
2.
Configure the board by setting the following board level bits.