LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Preemptively add waveform attribute

Is there a way to preemptively set waveform attributes based on a DAQmx channel? For example, if you add Units to a DAQmx Task, it populates the NI_UnitDescription with that unit type for all waveforms generated by that task. On a per-channel basis, DAQmx automatically populates the NI_ChannelName attribute based off of DAQmx channel name. [Automatically created ones]

 

Is there a way to arbitrarily set attributes of a particular DAQmx channel that get propagated to the waveform attributes automatically on acquisition?

 

I have a bunch of workarounds where I can just create key/value pairs based off the channel name and look later, but since I'm already reading the waveform attributes for some other characteristics (e.g., channel name and units) I figured I'd see if I could keep things simple by adding user-defined attributes directly to the channels then pull those from the acquired waveforms at the same time.

0 Kudos
Message 1 of 2
(52 Views)

Sound and Vibration Toolkit and FlexLogger use this feature (adding channel attributes at configuration time that appear as waveform attributes at run time). However, this feature does not appear to be public.

On the Data Acquisition Idea Exchange , crossrulz posts this idea. Jay comments "...Additionally, it would be sweet if when using a DAQmx Read with a Scalar or nD Waveform data type the the waveform attributes would contain user defined attributes stored with the Task."

Go give that idea Kudos, and let's see if we can revive this idea!

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 2 of 2
(28 Views)