NI DIGITAL PATTERN DRIVER Levels And Timing Functions - ni/grpc-device GitHub Wiki

Levels And Timing Functions

niDigital_LoadSpecifications

Loads a specifications sheet from a specified file.

C Function Prototype: ViStatus niDigital_LoadSpecifications (ViSession vi, ViConstString specificationsFilePath)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
specificationsFilePath Absolute file path to a specifications file.

Return value: Reports the status of the operation.

niDigital_UnloadSpecifications

Unloads the given specifications sheet present in the previously loaded specifications file that you select.

You must call the niDigital_LoadSpecifications function to reload the file with updated specifications values. You must then call the niDigital_ApplyLevelsAndTiming function in order to apply the levels and timing values that reference the updated specifications values.

C Function Prototype: ViStatus niDigital_UnloadSpecifications (ViSession vi, viConstString specificationsFilePath)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
specificationsFilePath Absolute file path to a loaded specifications file.

Return value: Reports the status of the operation.

niDigital_LoadLevels

Loads a levels sheet from a specified file.

C Function Prototype: ViStatus niDigital_LoadLevels (ViSession vi, ViConstString levelsFilePath)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
levelsFilePath Absolute file path to the specified levels sheet file.

Return value: Reports the status of the operation.

niDigital_LoadTiming

Loads a timing sheet from a specified file.

C Function Prototype: ViStatus niDigital_LoadTiming (ViSession vi, ViConstString timingFilePath)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
timingFilePath Absolute file path to the specified timing sheet file.

Return value: Reports the status of the operation.

niDigital_ApplyLevelsAndTiming

Applies digital levels and timing values defined in previously loaded levels and timing sheets.

When applying a levels sheet, only the levels specified in the sheet are affected. Any levels not specified in the sheet remain unchanged. When applying a timing sheet, all existing time sets are deleted before the new time sets are loaded.

C Function Prototype: ViStatus niDigital_ApplyLevelsAndTiming (ViSession vi, ViConstString siteList, ViConstString levelsSheet, ViConstString timingSheet, ViConstString initialStateHighPins, ViConstString initialStateLowPins, ViConstString initialStateTristatePins)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
siteList Comma-delimited list of strings in the form of siteN , where N is the site number. If you enter an empty string, this function applies the levels and initial states to all sites.
levelsSheet Name of the levels sheet to apply. Use the name of the sheet or pass the absolute file path you use in the niDigital_LoadLevels function. The name of the levels sheet is the file name without the directory and file extension.
timingSheet Name of the timing sheet to apply. Use the name of the sheet or pass the absolute file path that you use in the niDigital_LoadTiming function. The name of the timing sheet is the file name without the directory and file extension.
initialStateHighPins Comma-delimited list of pins, pin groups, or channels to initialize to a high state.
initialStateLowPins Comma-delimited list of pins, pin groups, or channels to initialize to a low state.
initialStateTristatePins Comma-delimited list of pins, pin groups, or channels to initialize to a non-drive state (X)

Return value: Reports the status of the operation.

niDigital_ConfigureVoltageLevels

Configures voltage levels for the pins you specify.

C Function Prototype: ViStatus niDigital_ConfigureVoltageLevels (ViSession vi, ViConstString channelList, ViReal64 vil, ViReal64 vih, ViReal64 vol, ViReal64 voh, ViReal64 vterm)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
channelList

List of channel names or list of pins. Do not pass a mix of channel names and pin names. An empty string denotes all digital pattern instrument channels.

Pin names and pin groups apply to all enabled sites, unless the pin name explicitly specifies the site. You can specify a pin in a specific site using the form siteN/pinName, where N is the site number. This function ignores pins that are not mapped to the digital pattern instrument.

Specify channel names using the form PXI1Slot3/0,2-3 or PXI1Slot3/0,PXI1Slot3/2-3, where PXI1Slot3 is the instrument resource name and 0, 2, 3 are channel names. To specify channels from multiple instruments, use the form PXI1Slot3/0,PXI1Slot3/2-3,PXI1Slot4/2-3. The instruments must be in the same chassis.

vil Voltage that the instrument will apply to the input of the DUT when the pin driver drives a logic low (0).
vih Voltage that the instrument will apply to the input of the DUT when the test instrument drives a logic high (1).
vol Output voltage below which the comparator on the pin driver interprets a logic low (L).
voh Output voltage above which the comparator on the pin driver interprets a logic high (H).
vterm Termination voltage the instrument applies during non-drive cycles when the termination mode is set to Vterm. The instrument applies the termination voltage through a 50 ohm parallel termination resistance.

Return value: Reports the status of the operation.

niDigital_ConfigureActiveLoadLevels

Configures IOL, IOH, and VCOM levels for the active load on the pins you specify.

The DUT sources or sinks current based on the level values. To enable active load, set the termination mode to NIDIGITAL_VAL_ACTIVE_LOAD. To disable active load, set the termination mode of the instrument to High Z or VTERM.

C Function Prototype: ViStatus niDigital_ConfigureActiveLoadLevels (ViSession vi, ViConstString channelList, ViReal64 iol, ViReal64 ioh, ViReal64 vcom)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
channelList

List of channel names or list of pins. Do not pass a mix of channel names and pin names. An empty string denotes all digital pattern instrument channels.

Pin names and pin groups apply to all enabled sites, unless the pin name explicitly specifies the site. You can specify a pin in a specific site using the form siteN/pinName, where N is the site number. This function ignores pins that are not mapped to the digital pattern instrument.

Specify channel names using the form PXI1Slot3/0,2-3 or PXI1Slot3/0,PXI1Slot3/2-3, where PXI1Slot3 is the instrument resource name and 0, 2, 3 are channel names. To specify channels from multiple instruments, use the form PXI1Slot3/0,PXI1Slot3/2-3,PXI1Slot4/2-3. The instruments must be in the same chassis.

iol Maximum current that the DUT sinks while outputting a voltage below VCOM.
ioh Maximum current that the DUT sources while outputting a voltage above VCOM.
vcom Commutating voltage level at which the active load circuit switches between sourcing current and sinking current.

Return value: Reports the status of the operation.

niDigital_ConfigureTerminationMode

Specifies the behavior of the pin when the pin driver is in a non-drive pin state (L, H, X, V, M, E).

C Function Prototype: ViStatus niDigital_ConfigureTerminationMode (ViSession vi, ViConstString channelList, ViInt32 mode)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
channelList

List of channel names or list of pins. Do not pass a mix of channel names and pin names. An empty string denotes all digital pattern instrument channels.

Pin names and pin groups apply to all enabled sites, unless the pin name explicitly specifies the site. You can specify a pin in a specific site using the form siteN/pinName, where N is the site number. This function ignores pins that are not mapped to the digital pattern instrument.

Specify channel names using the form PXI1Slot3/0,2-3 or PXI1Slot3/0,PXI1Slot3/2-3, where PXI1Slot3 is the instrument resource name and 0, 2, 3 are channel names. To specify channels from multiple instruments, use the form PXI1Slot3/0,PXI1Slot3/2-3,PXI1Slot4/2-3. The instruments must be in the same chassis.

mode

The specified behavior of the pin.

- NIDIGITAL_VAL_ACTIVE_LOAD (1200): Specifies that, for non-drive pin states (L, H, X, V, M, E), the active load is connected and the instrument sources or sinks a defined amount of current to load the DUT. The amount of current sourced by the instrument and therefore sunk by the DUT is specified by IOL. The amount of current sunk by the instrument and therefore sourced by the DUT is specified by IOH. The voltage at which the instrument changes between sourcing and sinking is specified by VCOM.

- NIDIGITAL_VAL_VTERM (1201): Specifies that, for non-drive pin states (L, H, X, V, M, E), the pin driver terminates the pin to the configured VTERM voltage through a 50 Ω impedance. VTERM is adjustable to allow for the pin to terminate at a set level. This is useful for instruments that might operate incorrectly if an instrument pin is unterminated and is allowed to float to any voltage level within the instrument voltage range. To address this issue, enable VTERM by configuring the VTERM pin level to the desired voltage and selecting the VTERM termination mode. Setting VTERM to 0 V and selecting the VTERM termination mode has the effect of connecting a 50 Ω termination to ground, which provides an effective 50 Ω impedance for the pin. This can be useful for improving signal integrity of certain DUTs by reducing reflections while the DUT drives the pin.

- NIDIGITAL_VAL_HIGH_Z (1202): Specifies that, for non-drive pin states (L, H, X, V, M, E), the pin driver is put in a high-impedance state and the active load is disabled.

Return value: Reports the status of the operation.

niDigital_CreateTimeSet

Creates a time set with the name that you specify. Use this function when you want to create time sets programmatically rather than with a timing sheet.

C Function Prototype: ViStatus niDigital_CreateTimeSet (ViSession vi, ViConstString name)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
name The specified name of the new time set.

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetPeriod

Configures the period of a time set. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetPeriod (ViSession vi, ViConstString timeSet, ViReal64 period)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
timeSet The specified time set name.
period Period for this time set, in seconds.

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetDriveEdges

Configures the drive format and drive edge placement for the specified pins. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetDriveEdges (ViSession vi, ViConstString pinList, ViConstString timeSet, ViInt32 format, ViReal64 driveOnEdge, viReal64 driveDataEdge, ViReal64 driveReturnEdge, ViReal64 driveOffEdge)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
pinList List of pin and pin group names for which to configure the time set edges.
timeSet The specified time set name.
format

Drive format of the time set.

- NIDIGITAL_VAL_NR (1500): Non-return.

- NIDIGITAL_VAL_RL (1501): Return to low.

- NIDIGITAL_VAL_RH (1502): Return to high.

- NIDIGITAL_VAL_SBC (1503): Surround by complement.

driveOnEdge Delay, in seconds, from the beginning of the vector period for turning on the pin driver. This option applies only when the prior vector left the pin in a non-drive pin state (L, H, X, V, M, E). For the SBC format, this option specifies the delay from the beginning of the vector period at which the complement of the pattern value is driven.
driveDataEdge Delay, in seconds, from the beginning of the vector period until the pattern data is driven to the pattern value. The ending state from the previous vector persists until this point.
driveReturnEdge Delay, in seconds, from the beginning of the vector period until the pin changes from the pattern data to the return value, as specified in the format.
driveOffEdge Delay, in seconds, from the beginning of the vector period to turn off the pin driver when the next vector period uses a non-drive symbol (L, H, X, V, M, E).

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetCompareEdgesStrobe

Configures the strobe edge time for the specified pins. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetCompareEdgesStrobe (ViSession vi, ViConstString pinList, ViConstString timeSet, ViReal64 strobeEdge)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
pinList List of pin and pin group names for which to configure the time set edges.
timeSet The specified time set name.
strobeEdge Time when the comparison happens within a vector period.

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetDriveFormat

Configures the drive format for the pins not specified in the pinList. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetDriveFormat (ViSession vi, ViConstString pinList, ViConstString timeSet, ViInt32 driveFormat)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
pinList List of pin and pin group names for which to configure the time set edges.
timeSet The specified time set name.
driveFormat

Drive format of the time set.

- NIDIGITAL_VAL_NR (1500): Non-return.

- NIDIGITAL_VAL_RL (1501): Return to low.

- NIDIGITAL_VAL_RH (1502): Return to high.

- NIDIGITAL_VAL_SBC (1503): Surround by complement.

Return value: Reports the status of the operation.

niDigital_DeleteAllTimeSets

Deletes all time sets from instrument memory.

C Function Prototype: ViStatus niDigital_DeleteAllTimeSets (ViSession vi)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetEdgeMultiplier

Configures the edge multiplier of the pins in the time set. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetEdgeMultiplier (ViSession vi, ViConstString pinList, ViConstString timeSet, ViInt32 edgeMultiplier)

Parameter Description
vi The specified digital pattern instrument handle
pinList List of pin and pin group names for which to configure the time set edges.
timeSet The specified time set name.
edgeMultiplier The specified edge multiplier for the pins in the pin list.

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetDriveEdges2x

Configures the drive edges of the pins in the time set, including 2x edges. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetDriveEdges2x (ViSession vi, ViConstString pinList, ViConstString timeSet, ViInt32 format, ViReal64 driveOnEdge, viReal64 driveDataEdge, ViReal64 driveReturnEdge, ViReal64 driveOffEdge, ViReal64 driveData2Edge, ViReal64 driveReturn2Edge)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
pinList List of pin and pin group names for which to configure the time set edges.
timeSet The specified time set name.
format

Drive format of the time set.

- NIDIGITAL_VAL_NR (1500): Non-return.

- NIDIGITAL_VAL_RL (1501): Return to low.

- NIDIGITAL_VAL_RH (1502): Return to high.

- NIDIGITAL_VAL_SBC (1503): Surround by complement.

driveOnEdge Delay, in seconds, from the beginning of the vector period for turning on the pin driver. This option applies only when the prior vector left the pin in a non-drive pin state (L, H, X, V, M, E). For the SBC format, this option specifies the delay from the beginning of the vector period at which the complement of the pattern value is driven.
driveDataEdge Delay, in seconds, from the beginning of the vector period until the pattern data is driven to the pattern value. The ending state from the previous vector persists until this point.
driveReturnEdge Delay, in seconds, from the beginning of the vector period until the pin changes from the pattern data to the return value, as specified in the format.
driveOffEdge Delay, in seconds, from the beginning of the vector period to turn off the pin driver when the next vector period uses a non-drive symbol (L, H, X, V, M, E).
driveData2Edge Delay, in seconds, from the beginning of the vector period until the pattern data in the second DUT cycle is driven to the pattern value.
driveReturn2Edge Delay, in seconds, from the beginning of the vector period until the pin changes from the pattern data in the second DUT cycle to the return value, as specified in the format.

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetCompareEdgesStrobe2x

Configures the compare strobes for the specified pins in the time set, including the 2x strobe. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetCompareEdgesStrobe2x (ViSession vi, ViConstString pinList, ViConstString timeSet, ViReal64 strobeEdge, ViReal64 strobe2Edge)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
pinList List of pin and pin group names for which to configure the time set edges.
timeSet The specified time set name.
strobeEdge Time when the comparison happens within a vector period.
strobe2Edge Time when the comparison happens for the second DUT cycle within a vector period.

Return value: Reports the status of the operation.

niDigital_ConfigureTimeSetEdge

Configures the edge placement for the pins specified in the pin list. Use this function to modify time set values after applying a timing sheet with the niDigital_ApplyLevelsAndTiming function, or to create time sets programmatically without the use of timing sheets. This function does not modify the timing sheet file or the timing sheet contents that will be used in future calls to niDigital_ApplyLevelsAndTiming; it only affects the values of the current timing context.

C Function Prototype: ViStatus niDigital_ConfigureTimeSetEdge (ViSession vi, ViConstString pinList, ViConstString timeSet, ViInt32 edge, ViReal64 time)

Parameter Description
vi The specified digital pattern instrument handle
pinList List of pin and pin group names for which to configure the time set edges.
timeSet The specified time set name.
edge

Name of the edge.

- NIDIGITAL_VAL_DRIVE_ON (2800)

- NIDIGITAL_VAL_DRIVE_DATA (2801)

- NIDIGITAL_VAL_DRIVE_RETURN (2802)

- NIDIGITAL_VAL_DRIVE_OFF (2803)

- NIDIGITAL_VAL_COMPARE_STROBE (2804)

- NIDIGITAL_VAL_DRIVE_DATA_2 (2805)

- NIDIGITAL_VAL_DRIVE_RETURN_2 (2806)

- NIDIGITAL_VAL_COMPARE_STROBE_2 (2807)

time The time from the beginning of the vector period in which to place the edge.

Return value: Reports the status of the operation.

niDigital_GetTimeSetPeriod

Returns the period of the specified time set.

C Function Prototype: ViStatus niDigital_GetTimeSetPeriod (ViSession vi, ViConstString timeSet, ViReal64* period)

Parameter Description
vi The specified digital pattern instrument handle
timeSet The specified time set name.
Output
period Returned period, in seconds, that the edge is configured to.

Return value: Reports the status of the operation.

niDigital_GetTimeSetEdge

Returns the edge time of a pin in the specified time set.

C Function Prototype: ViStatus niDigital_GetTimeSetEdge (ViSession vi, ViConstString pin, ViConstString timeSet, ViInt32 edge, ViReal64* time)

Parameter Description
vi The specified digital pattern instrument handle
pin Name of the specified pin.
timeSet The specified time set name.
edge

Name of the edge.

- NIDIGITAL_VAL_DRIVE_ON (2800)

- NIDIGITAL_VAL_DRIVE_DATA (2801)

- NIDIGITAL_VAL_DRIVE_RETURN (2802)

- NIDIGITAL_VAL_DRIVE_OFF (2803)

- NIDIGITAL_VAL_COMPARE_STROBE (2804)

- NIDIGITAL_VAL_DRIVE_DATA_2 (2805)

- NIDIGITAL_VAL_DRIVE_RETURN_2 (2806)

- NIDIGITAL_VAL_COMPARE_STROBE_2 (2807)

Output
time Time from the beginning of the vector period in which to place the edge.

Return value: Reports the status of the operation.

niDigital_GetTimeSetEdgeMultiplier

Returns the edge multiplier of the specified time set.

C Function Prototype: ViStatus niDigital_GetTimeSetEdgeMultiplier (ViSession vi, ViConstString pin, ViConstString timeSet, ViInt32* edgeMultiplier)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
pin Name of the specified pin.
timeSet The specified time set name.
Output
edgeMultiplier Returned edge multiplier of the time set for the specified pin.

Return value: Reports the status of the operation.

niDigital_GetTimeSetDriveFormat

Returns the drive format of a pin in the specified time set.

C Function Prototype: ViStatus niDigital_GetTimeSetDriveFormat (ViSession vi, ViConstString pin, ViConstString timeSet, ViInt32* format)

Parameter Description
vi The specified digital pattern instrument handle
pin Name of the specified pin.
timeSet The specified time set name.
Output
format Returned drive format of the time set for the specified pin.

Return value: Reports the status of the operation.

niDigital_GetTimeSetName

Gets the name of a time set from the time set index.

You must provide a ViChar array to serve as a buffer for the value. You pass the number of bytes in the buffer as the nameBufferSize. If the current value of the attribute, including the terminating NULL byte, is larger than the size you indicate in the buffer size, the function copies (buffer size - 1) bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value. For example, if the value is "123456" and the buffer size is 4, the function places "123" into the buffer and returns 7. If you want to call this function just to get the required buffer size, you can pass 0 for nameBufferSize and VI_NULL for the name.

C Function Prototype: ViStatus niDigital_GetTimeSetName (ViSession vi, ViInt32 timeSetIndex, ViInt32 nameBufferSize, ViChar[] name)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
timeSetIndex The specified time set index.
nameBufferSize The number of elements in the ViChar array you specify for name.
Output
name The returned time set name at the specified timeSetIndex.

Return value: Reports the status of the operation.

⚠️ **GitHub.com Fallback** ⚠️