Owning Palette: Waveform VIs and Functions
Requires: Base Development System
Adds or replaces a waveform attribute. You can use any type of data for the value of the attribute.
Add to the block diagram | Find on the palette |
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. |
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.
Name | Attribute | Data Type | Acceptable Values | Description |
Hardware Device Number | NI_DeviceNumber | String | Any value is acceptable for NI_DeviceNumber. | NI_DeviceNumber is the device number of the hardware producing the waveform. |
Name of Channel | NI_ChannelName | String | Any value is acceptable for NI_ChannelName. | NI_ChannelName is the name of the virtual channel producing the waveform. |
Name of Digital Line(s) | NI_LineNames | String | Any value is acceptable for NI_LineNames. | NI_LineNames is the name of the digital line in the waveform. For more than one digital line, the function returns the line names in reverse order. |
Unit for Data | NI_UnitDescription | String | Volts, 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.
Name | Attribute | Data Type | Acceptable Values | Description |
Start Timestamp | NI_ExpStartTimeStamp | Time stamp | Any 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. |
Timestamp | NI_ExpTimeStamp | Time stamp | Any 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 Dimension | NI_ExpXDimension | String | Use 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_ExpIsRelativeTime | Boolean | TRUE 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. |
Refer to the Waveform - Create VI in the labview\examples\Waveform directory for an example of using the Set Waveform Attribute function.