NI-4133 Driver Software API Function Reference

InitializeLibrary()

InitializeLibrary(version, libraryHandle)

Returns a library handle to identify the PXIe-4133 library. You must call this function at least once for the application.

If you are building a DLL, do not call InitializeLibrary from DllMain or a C++ static initializer or destructor.

Parameter Name Type Description
version uint32 Version of the PXIe-4133 library used to compile this application. Specify a value of NI4133_LIBRARY_VERSION for this parameter.
libraryHandle ni4133_LibraryHandle Newly allocated library handle.
Table 7. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

FinalizeLibrary()

FinalizeLibrary(libraryHandle)

Finalizes the PXIe-4133 library. If you are building a DLL, do not call FinalizeLibrary from DllMain or a C++ static initializer or destructor.

Parameter Name Type Description
libraryHandle ni4133_LibraryHandle Specifies the library handle.
Table 8. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

GetLibraryVersion()

GetLibraryVersion(version)

Returns the version of the PXIe-4133 runtime library.

Parameter Name Type Description
version uint32 Version of the PXIe-4133 library that is installed.
Table 9. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

Open()

Open(libraryHandle, resourceName, channel, sessionHandle)

Opens a session with a single channel on a PXIe-4133 instrument.

If you are building a DLL, do not call Open from DllMain or a C++ static initializer or destructor.

Parameter Name Type Description
libraryHandle ni4133_LibraryHandle Specifies the Library handle to the open session.
resourceName char Specifies the name of the active PXIe-4133 instrument.
channel char Associates an active channel with the new session. Valid values are 0 or 1.
sessionHandle ni4133_SessionHandle Newly created session.
Table 10. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

Close()

Close(sessionHandle)

Closing the session invalidates the session handle. Avoid calling other functions with an invalid session handle.

If you are building a DLL, do not call Close from DllMain or a C++ static initializer or destructor.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to close.
Table 11. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

MeasureReverseVoltage()

MeasureReverseVoltage(sessionHandle, outputCurrentLevel, measurementDelay, measurementTime, outputVoltageLimit, measurementMode, deltaTime, reverseVoltageMeasurementBuffer[], bufferSize, actualBufferSize)

Sources reverse current to the DUT and measures breakdown voltage.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to measure.
outputCurrentLevel double Specifies the current level to source to the DUT.
measurementDelay double Specifies the delay, in seconds, between sourcing current and measuring voltage.
measurementTime double Specifies the time, in seconds, over which the reverse voltage is measured. Increase this time to improve measurement resolution.
outputVoltageLimit double Specifies the clamping voltage of the PXIe-4133. If the DUT breakdown voltage exceeds this value, the measured reverse voltage will be approximately equal to the outputVoltageLimit.
measurementMode ni4133_MeasurementMode In average mode, the acquired samples are averaged over the specified measurementTime and a single averaged measurement is returned. In waveform mode, the samples acquired over the specified measurementTime are returned.
deltaTime double Returns the sampling period of the measurements.
reverseVoltageMeasurementBuffer[] double An array that contains the requested number of reverse voltage measurements.
bufferSize size Specifies the size of voltage measurements buffer. Set this field to 0 to query the expected buffer size for a given set of parameters. The actual required buffer size is returned by actualBufferSize.
actualBufferSize size Returns the actual buffer size for all valid voltage measurements. The buffer must be allocated at least to the size value specified.
Table 12. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

MeasureReverseCurrent()

MeasureReverseCurrent(sessionHandle, outputVoltageLevel, leakageCurrentSenseRange, measurementDelay, measurementTime, measurementMode, deltaTime, reverseCurrentMeasurementBuffer[], reverseVoltageMeasurementBuffer[], bufferSize, actualBufferSize)

Sources reverse voltage to the DUT and measures leakage current. The sourced current is limited to 12 µA.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to measure.
outputVoltageLevel double Specifies the voltage level to source to the DUT.
leakageCurrentSenseRange ni4133_LeakageCurrentSenseRange Specifies the current range used to measure leakage current.
measurementDelay double Specifies the delay, in seconds, between sourcing voltage and measuring current.
measurementTime double Specifies the time, in seconds, over which the reverse current is measured. Increase this time to improve measurement resolution.
measurementMode ni4133_MeasurementMode In average mode, the acquired samples are averaged over the specified measurementTime and a single averaged measurement is returned. In waveform mode, the samples acquired over the specified measurementTime are returned.
deltaTime double Returns the sampling period of the measurements.
reverseCurrentMeasurementBuffer[] double An array that contains the requested number of reverse current measurements.
reverseVoltageMeasurementBuffer[] double An array that contains the requested number of reverse voltage measurements. Reverse voltage measurements are useful when characterizing the settling time of the reverse current.
bufferSize size Specifies the buffer size for current or voltage measurements. Set this field to 0 to query the expected buffer size for a given set of parameters. The actual required buffer size is returned by actualBufferSize.
actualBufferSize size Returns the actual buffer size for all valid current or voltage measurements. Each buffer must be allocated at least to the specified value.
Table 13. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

MeasurePulsedCurrentAndVoltage()

MeasurePulsedCurrentAndVoltage(sessionHandle, idleCurrentLevel, pulseCurrentOutputRange, measurementMode, pulseConfigurataionList[], numberOfPulseConfigurations, pulseMeasurementArray[], pulseMeasurementArrayBufferSizeInBytes, requiredPulseMeasurementArrayBufferSizeInBytes)

Generates a series of pulses to the DUT and measures the forward current and voltage for each pulse.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to measure.
idleCurrentLevel double Specifies the idle current level sourced between all pulses.
pulseCurrentOutputRange ni4133_PulseCurrentOutputRange Specifies the current output range of the pulse sequence.
measurementMode ni4133_MeasurementMode In average mode, the acquired samples are averaged over the specified measurementTime and a single averaged measurement is returned. In waveform mode, the samples acquired over the specified measurementTime are returned.
pulseConfigurationList[] PulseConfiguration An array that specifies the configuration of each pulse to generate.
numberOfPulseConfigurations size Specifies the number of pulse configurations to generate for pulseConfigurationList[].
pulseMeasurementArray[] PulseMeasurementArray An array of PulseMeasurement structs where each struct contains an array of voltage and current measurements for each generated pulse.
pulseMeasurementArrayBufferSizeInBytes size Specifies the size of the pulse measurement array buffer in bytes. Set this field to 0 to query the expected buffer size for a given set of parameters. The actual required buffer size is returned by requiredPulseMeasurementArrayBufferSizeInBytes.
requiredPulseMeasurementArrayBufferSizeInBytes size Specified the required pulse measurement array buffer size in bytes.
Table 14. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

ConfigureAbortTrigger()

ConfigureAbortTrigger(sessionHandle, abortTriggerSource, abortTriggerPolarity)

Configures the trigger source and polarity to abort a measurement.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to configure.
abortTriggerSource char Specifies the abort trigger source.
abortTriggerPolarity ni4133_TriggerPolarity Specifies the abort trigger polarity.
Table 15. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

ConfigurePulseEvent()

ConfigurePulseEvent(sessionHandle, pulseEventDelay, pulseEventDestination)

Configures the PXIe-4133 to export a pulse event to PXI triggers or PFI lines with a specific delay.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to configure.
pulseEventDelay double Specifies the delay, in seconds, between the pulse output and the pulse event.
pulseEventDestination char Specifies the destination terminal of the pulse event.
Table 16. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

ConfigurePulseTrigger()

ConfigurePulseTrigger(sessionHandle, pulseTriggerSource, triggerDelay, triggerTimeout)

Configures the trigger source, delay, and timeout to generate a pulse.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to configure.
pulseTriggerSource char Specifies the pulse trigger source.
triggerDelay double Specifies the delay, in seconds, between receiving the trigger and generating a pulse.
triggerTimeout double Specifies the timeout, in seconds, to wait for a trigger.
Table 17. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

ConfigureReadyForPulseTriggerEvent()

ConfigureReadyForPulseTriggerEvent(sessionHandle, readyForPulseTriggerEventDestination)

Configures the PXIe-4133 to export a Ready For Pulse Trigger event to PXI triggers or PFI lines.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to configure.
readyForPulseTriggerEventDestination char Specifies the destination terminal of the Ready For Pulse Trigger event.
Table 18. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

ConfigureReadyForStartTriggerEvent()

ConfigureReadyForStartTriggerEvent(sessionHandle, readyForStartTriggerEventDestination)

Configures the PXIe-4133 to export a Ready For Start Trigger event to PXI triggers or PFI lines.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to configure.
readyForStartTriggerEventDestination char Specifies the destination terminal of the Ready For StartTrigger event.
Table 19. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

ConfigureStartTrigger()

ConfigureStartTrigger(sessionHandle, startTriggerSource, triggerDelay, triggerTimeout)

Configures the trigger source, delay, and timeout to start a pulse sequence.

Parameter Name Type Description
sessionHandle ni4133_SessionHandle Specifies the session to configure.
startTriggerSource char Specifies the start trigger source.
triggerDelay double Specifies the delay, in seconds, between receiving the trigger and generating a pulse.
triggerTimeout double Specifies the timeout, in seconds, to wait for a trigger.
Table 20. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.

GetErrorDescriptions()

GetErrorDescriptions(libraryHandle, statusCode, language, description, bufferSize, requriedBufferSize)

Returns the error description for the specified status code.

Parameter Name Type Description
libraryHandle ni4133_LibraryHandle Specifies the library handle.
statusCode ni4133_Status Specifies the status code to look up.
language ni4133_Language Specifies the language in which to return error information.
description char Error description text.
bufferSize size Number of chars allocated for description.
requriedBufferSize size Number of chars required for description.
Table 21. Return Type
Type Description
ni4133_Status Returns a status code to indicate if the function completed successfully.