To download NI software, including the products shown below, visit ni.com/downloads.
This example illustrates how to dynamically change the physically lines being sampled in a DAQmx Analog Input task thru the use of an Event Structure.
This example uses the 'physical channels' control to trigger an event on a Value Change. When this event is triggered, the current task is cleared and a new task is created with the new value of 'physical channels'. In this event, the waveform chart's history is also cleared. The built-in Timeout event is used to perform the actual DAQmx Read at an interval of 10ms.
1.) Open the VI.
2.) Specify the line(s) you wish to sample.
3.) Run!
4.) Choose the line(s) you wish to sample and watch the waveform chart change accordingly!!!
This example is currently written for a DAQmx Analog Input task, however, this can probably be expanded upon for other measurement types.
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.