How Can I Dynamically Change the Sampling Rate of a DAQ Assistant?Primary Software: LabVIEW Development Systems>>LabVIEW Full Development SystemPrimary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: Driver Software>>NI-DAQmx
Problem: I am using the DAQ Assistant Express VI inside of a while loop to acquire a distinct set of finite samples for each iteration of the loop. I would like to change the sampling rate of the DAQ Assistant for each while loop iteration, how can I accomplish this? Solution: Unfortunately, with the DAQ Assistant there is no way to accomplish this. Due to the implementation of the DAQ Assistant, the task it creates is not cleared until the VI containing the DAQ Assistant has finished running. It is also not possible to manually clear out the task, so the VI must finish before changes can be made. In order to accomplish this DAQmx VIs must be used. An acquisition task can be configured outside of the while loop, with the timing for the task configured (based on the loop iteration) inside of the while loop. After the timing is configured the task is started, the acquisition is performed, and the task is stopped so that it may be reconfigured during the next while loop iteration. Numerous DAQmx example programs are available in LabVIEW under Help»Find Examples to help get started programming with DAQmx. ![]() Related Links: NI Developer Zone: Getting Started with DAQmx: Using the DAQ Assistant Attachments:
Report Date: 11/26/2008 Last Updated: 12/01/2008 Document ID: 4RPBTKTG |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

