Data Acquisition Toolbox    

Example: Queuing Data with putdata

This example illustrates how you can use putdata to queue 8000 samples, and then output the data a total of five times using the RepeatOutput property.

You can run this example by typing daqdoc6_3 at the MATLAB command line.

  1. Create a device object -- Create the analog output object AO for a sound card. The installed adaptors and hardware IDs are found with daqhwinfo.
  2. Add channels -- Add one channel to AO.
  3. Configure property values -- Define an output time of one second, assign values to the basic setup properties, generate data to be queued, and issue two putdata calls. Because the queued data is repeated four times and two putdata calls are issued, a total of 10 seconds of data is output.
  4. Output data -- Start AO and wait for the device object to stop running.
  5. Clean up -- When you no longer need AO, you should remove it from memory and from the MATLAB workspace.

  Queuing Data with putdata Configuring Analog Output Triggers