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


icon

Inputs/Outputs

  • cmsdt.png waveform

    waveform is the waveform for which you want to add or replace an attribute.

  • cstr.png name

    name is the name of the attribute.

  • cunclst.png value

    value is the value of the attribute. This input is polymorphic, so you can wire any data to it.

  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • imsdt.png waveform out

    waveform out is the waveform with the new or replaced attribute.

  • ibool.png replaced

    replaced indicates if an attribute was overwritten.

  • ierrcodeclst.png error out

    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.

    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. For more than one digital line, the function returns the line names in reverse order.
    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.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Waveform\Waveform - Create.vi