CreateSerial(string, string, SourceDataMapping, uint, BitOrder)
- Updated2026-01-12
- 2 minute(s) read
Creates the source waveform settings used to source serial waveforms using a comma-delimited string of pins or channels.
Syntax
Namespace: NationalInstruments.ModularInstruments.NIDigital
public void CreateSerial(string pinSetString, string waveformName, SourceDataMapping dataMapping, uint sampleWidth, BitOrder bitOrder)
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.
Parameters
| Name | Type | Description |
|---|---|---|
| pinSetString | string | The set of pins or channels for which to create the waveform. The pins or channels represented by the pinSetString must match the source pins in the pattern that references the waveform. The pin order in the pin set string determines the bit positions of the data written using one of the write waveform methods on the DigitalSourceWaveforms object. |
| waveformName | string | 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 | SourceDataMapping | Specifies whether the the waveform is broadcast to all sites or a unique waveform is sourced per site. |
| sampleWidth | uint | The width in bits of each serial sample. Valid values are between 1 and 32. |
| bitOrder | BitOrder | The bit order significance. This can be most significant bit first or least significant bit first. MostSignificantBitFirst is the default value. |
Exceptions
| Type | Description |
|---|---|
| Ivi.Driver.IviCDriverException | The NI-Digital Pattern Driver returned an error. |
| Ivi.Driver.SelectorNameException | The value for pinSetString contains a pin or pin group name not loaded in the pin map. |
| System.ArgumentException |
|