Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 

Outputting Data with a National Instruments Board

In this example, sine wave data is generated in MATLAB, output to the D/A converter on a National Instruments board, and displayed with an oscilloscope. The setup is shown below.


As described in "The Data Acquisition Session", using the Data Acquisition Toolbox to access the capabilities of your D/A hardware involves these steps:

For this example, one hardware channel is added to the analog output object, two seconds of data is queued in the engine with two putdata calls, and a manual trigger is issued to initiate the output. The complete data acquisition session for the sound card is shown below.

Initialization: Create the analog output object AO for a National Instruments board. The installed adaptors and hardware ID's are found with daqhwinfo.

Configuration: Add one channel to AO, define an output time of four seconds, assign values to the basic setup properties, generate data to be queued, and queue the data with one call to putdata.

Execution: Start AO, issue a manual trigger, and wait for the device object to stop running.

Termination: Delete AO.



[ Previous | Help Desk | Next ]