Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Set Waveform Attribute Function

LabVIEW 2011 Help

Edition Date: June 2011

Part Number: 371361H-01

»View Product Info
Download Help (Windows Only)

Owning Palette: Waveform VIs and Functions

Requires: Base Package

Adds or replaces a waveform attribute. You can use any type of data for the value of the attribute.

Details  Example

waveform is the waveform for which you want to add or replace an attribute.
name is the name of the attribute.
value is the value of the attribute. This input is polymorphic, so you can wire any data to it.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
waveform out is the waveform with the new or replaced attribute.
replaced indicates if an attribute was overwritten.
error out contains error information. This output provides standard error out functionality.

Set Waveform Attribute Details

If the attribute in name already exists, the function overwrites the attribute with the new value, and replaced is TRUE. If the attribute in name does not exist already, the function creates a new attribute. Some attributes are set by NI-DAQ and Express VIs.

The following table lists the waveform attributes set by NI-DAQ.

NameAttributeData TypeAcceptable ValuesDescription
Hardware Device NumberNI_DeviceNumberStringAny value is acceptable for NI_DeviceNumber.NI_DeviceNumber is the device number of the hardware producing the waveform.
Name of ChannelNI_ChannelNameStringAny value is acceptable for NI_ChannelName.NI_ChannelName is the name of the virtual channel producing the waveform.
Name of Digital Line(s)NI_LineNamesStringAny value is acceptable for NI_LineNames.NI_LineNames is the name of the digital line in the waveform.
Unit for DataNI_UnitDescriptionStringVolts, PSI, and so forth are acceptable values for NI_UnitDescription.NI_UnitDescription is the units of measure for the waveform.

The following table lists the waveform attributes set by Express VIs.

NameAttributeData TypeAcceptable ValuesDescription
Start TimestampNI_ExpStartTimeStampTime stampAny value is acceptable for NI_ExpStartTimeStamp.NI_ExpStartTimeStamp is the time stamp of the first sample in the first waveform. In Express VIs, this is set once per start of the VI and does not change, even if waveform data is generated in a loop. In Express VIs, NI_ExpStartTimeStamp is set according to the PC clock unless the waveform originates in NI-DAQ. When the waveform originates in NI-DAQ, NI-DAQ sets NI_ExpStartTimeStamp.
TimestampNI_ExpTimeStampTime stampAny value is acceptable for NI_ExpTimeStamp.NI_ExpTimeStamp is the time stamp of the first sample in the waveform. In Express VIs, NI_ExpTimeStamp is set according to the PC clock unless the waveform originates in NI-DAQ. When the waveform originates in NI-DAQ, NI-DAQ sets NI_ExpTimeStamp.
X DimensionNI_ExpXDimensionStringUse a single character for the NI_ExpXDimension value. Currently, only t for time and f for frequency are supported. The value for NI_ExpXDimension is case sensitive.If the value of NI_ExpXDimension is t, t0 and dt are unchanged. If the value of NI_ExpXDimension is f, Express VIs interpret t0 and dt as f0 and df. For all other values, or unknown dimension, t0 and dt are interpreted as X0 and dX.
Relative Time?NI_ExpIsRelativeTimeBooleanTRUE or FALSE are acceptable values for NI_ExpIsRelativeTime.If and only if NI_ExpXDimension is t, Express VIs set t0 as a relative/absolute time stamp value.
Note  Express VIs also use the attributes set by NI-DAQ. If the waveform does not originate in NI-DAQ, Express VIs add NI_ChannelName.

Example

Refer to the Create Waveform example VI in the labview\examples\Waveform\Operations.llb for an example of using the Set Waveform Attribute function.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit