DigitalSourceWaveforms.CreateSerial Method (DigitalPinSet, String, SourceDataMapping, UInt32, BitOrder)
- Updated2023-11-24
- 2 minute(s) read
DigitalSourceWaveformsCreateSerial Method (DigitalPinSet, String, SourceDataMapping, UInt32, BitOrder)
Creates the source waveform settings used to source serial waveforms using a specified DigitalPinSet.
Namespace: NationalInstruments.ModularInstruments.NIDigital
Assembly: NationalInstruments.ModularInstruments.NIDigital.Fx40 (in NationalInstruments.ModularInstruments.NIDigital.Fx40.dll) Version: 2021
Syntax
public void CreateSerial( DigitalPinSet pinSet, string waveformName, SourceDataMapping dataMapping, uint sampleWidth, BitOrder bitOrder )
Public Sub CreateSerial ( pinSet As DigitalPinSet, waveformName As String, dataMapping As SourceDataMapping, sampleWidth As UInteger, bitOrder As BitOrder )
Parameters
- pinSet
- Type: NationalInstruments.ModularInstruments.NIDigitalDigitalPinSet
The set of pins or channels for which to create the waveform. The pinSet must match the source pins in the pattern that references the waveform. The pin order in the pin set determines the bit positions of the data written using one of the write waveform methods on the DigitalSourceWaveforms object. - waveformName
- Type: SystemString
The name of the waveform to use in the pattern file. Waveform names must be unique. Use the waveformName with source_start opcode in your pattern. - dataMapping
- Type: NationalInstruments.ModularInstruments.NIDigitalSourceDataMapping
Specifies whether the waveform is broadcast to all sites or a unique waveform is sourced per site. - sampleWidth
- Type: SystemUInt32
The width in bits of each serial sample. Valid values are between 1 and 32. - bitOrder
- Type: NationalInstruments.ModularInstruments.NIDigitalBitOrder
The bit order significance. This can be most significant bit first or least significant bit first. MostSignificantBitFirst is the default value.
Exceptions
Exception | Condition |
---|---|
IviCDriverException | The NI-Digital Pattern Driver returned an error. |
SelectorNameException | The pinSet contains a pin or pin group name not loaded in the pin map. |
ArgumentException | The value for waveformName is an empty string or contains an invalid character. |
OutOfRangeException |
|
Remarks
The number of waveforms is limited to 512.
You cannot reconfigure settings after waveforms are created.
For more information, refer to Opcodes and Source Waveform Configurations in the Digital Pattern Help.