1 / 24

DAQmx

DAQmx. Alistair Bailey – Field Engineer. What is DAQmx?. At it’s core , DAQmx is a powerful hardware driver for controlling data acquisition hardware. DAQmx Core Concepts. Global Virtual Channel Contains the physical channel and other channel-specific information Task

zubin
Télécharger la présentation

DAQmx

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DAQmx Alistair Bailey – Field Engineer

  2. What is DAQmx? • At it’s core, DAQmx is a powerful hardware driverfor controlling data acquisition hardware.

  3. DAQmx Core Concepts Global Virtual Channel Contains the physical channel and other channel-specific information Task A collection of one or more channels Functions Performs a specific function in DAQmx Properties Control or set specific properties of your DAQmx session

  4. 1. DAQ Assistant • The DAQ Assistant is a configuration-based interface for controlling your DAQ instruments • You can configure things like: • Channels • Voltage ranges • Sampling rate • …and many other aspects of your measurement

  5. 2. Create Virtual Channel Creates a virtual channel and adds it to a DAQmx task. If a task doesn’t exist, it creates one.

  6. 2. Create Virtual Channel Creates a virtual channel and adds it to a DAQmx task. If a task doesn’t exist, it creates one. Channel Expansion across modules in a PXI chassis

  7. 3. Trigger Configures a trigger to perform a specific action. The most common actions are a start trigger and reference trigger.

  8. 4. Timing Configures the timing for hardware-timed data acquisition.

  9. 4. Timing Configures the timing for hardware-timed data acquisition. The DAQmx Task Buffer Temporary storage in computer memory for acquired or to-be-generated samples

  10. 5. Start Task Starts your task. The task is now in the running state.

  11. DAQmx Task State Model Create Verify Reserve Commit Start • Unverified • Verified • Reserved • Committed • Running Clear Set Unreserve Stop Abort Abort Abort

  12. 6. Read Reads samples from the acquisition task. Start your task and read data The Read function adapts to different data types and channel counts

  13. 7. Write Writes samples to the generation task. Write data, then start your task The Write function adapts to different data types and channel counts

  14. 8. Wait Until Done Waits for the data acquisition operation to complete before finishing.

  15. 9. Clear Task Clears the task, and releases all of the resources. If the task needs to be reused, use Stop Task instead. After the DAQmx read, clear the task.

  16. 10. Properties Access all of the properties associated with DAQmx. Properties can by written to or read. DAQmx Timing Query the actual sample rate DAQmx Channel Specify which terminal pules

  17. Why Use the API? Advanced control over your measurement system Multiple Language Support Ability to provide even better performance Task and State Management Advanced Application Architectures Multi-device Synchronization

  18. Example 1 – Multi Channel Analog Output • Two Channels • Different Frequencies • Fundamentals: • The sample rate is the “update rate” of the DAC • The only variable we can play with is the number of samples in our waveform. • Use “interpolation” and “decimation” to modify the frequency of one independently.

  19. Output Waveform Frequency • Output waveform frequency depends on three factors: • Update rate • Points in the buffer • Number of cycles in the buffer update rate # of cycles in buffer X Signal Frequency = points in the buffer

  20. Output Waveform Frequency • Buffer size = 1000 pts • # of cycles in buffer = 1 • Update rate = 1000 Hz • Buffer size = 1000 pts • # of cycles in buffer = 1 • Update rate = 2000 Hz • Buffer size = 1000 pts • # of cycles in buffer = 2 • Update rate = 1000 Hz Signal frequency = 1 Hz Signal frequency = 2 Hz Signal frequency = 2 Hz update rate Signal Frequency = # of cycles in buffer X points in the buffer

  21. Demo

  22. Example 2 – Simultaneous AI & AO • Options: • Independent of each other • All hardware with hardware timed AO • cDAQ with STC-3 • Start together • Use the same hardware trigger for AI & AO on the trigger VI • Same clock (preserves phase relationship) • Use the same sample clock on the timing VI

  23. Demo

  24. Questions?

More Related