NI SCOPE Utility Funcitons - ni/grpc-device GitHub Wiki

Utility Funcitons

niScope_ResetDevice

C Function Prototype

ViStatus niScope_ResetDevice (ViSession vi);

Purpose

Performs a hard reset of the device. Acquisition stops, all routes are released, RTSI and PFI lines are tristated, hardware is configured to its default state, and all session attributes are reset to their default state.

Related topics:

  • Thermal Shutdown

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_Disable

C Function Prototype

ViStatus niScope_Disable (ViSession vi);

Purpose

Aborts any current operation, opens data channel relays, and releases RTSI and PFI lines.

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_ProbeCompensationSignalStart

C Function Prototype

ViStatus niScope_ProbeCompensationSignalStart (ViSession vi);

Purpose

Generates a 1 kHz square wave signal for probe compensation.

Most oscilloscopes output the probe compensation signal on PFI 1.

The following oscilloscopes output the probe compensation signal in unique locations.

Device Output Location Notes
PXIe5110
PXIe5111
PXIe5113
Probe compensation terminal The signal at this terminal is enabled by default.
PXIe5163
PXIe5164
SMB PFI 0 Though the PFI 0 line is also available from the AUX 0 MHDMR connector of these oscilloscopes, the probe compesation signal is available only from SMB PFI 0.
Note  Some features are not supported by all digitizers. Refer to Features Supported by Device) for more information.

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_ProbeCompensationSignalStop

C Function Prototype

ViStatus niScope_ProbeCompensationSignalStop (ViSession vi);

Purpose

Disables the 1 kHz square wave signal for probe compensation.

Note  Some features are not supported by all digitizers. Refer to Features Supported by Device) for more information.

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_IsDeviceReady

C Function Prototype

ViStatus niScope_IsDeviceReady (ViRsrc resourceName, ViConstString channelList, ViBoolean* deviceReady);

Purpose

Call this function to determine whether the device is ready for use or the device is still undergoing initialization.

Parameters

Input
Name Type Description
resourceName ViRsrc

resourceName specifies the resource name of the device to initialize.

resourceName Examples

Example # Device Type Syntax Variable
1 NI-DAQmx device myDAQmxDevice (myDAQmxDevice = device name)
2 NI-DAQmx device DAQ::myDAQmxDevice (myDAQmxDevice = device name)
3 NI-DAQmx device DAQ::2 (2 = device name)
4 IVI logical name or IVI virtual name myLogicalName (myLogicalName = name)

For NI-DAQmx devices, the syntax is just the device name specified in MAX, as shown in Example 1. Typical default names for NI-DAQmx devices in MAX are Dev1 or PXI1Slot1. You can rename an NI-DAQmx device by right-clicking on the name in MAX and entering a new name.

An alternate syntax for NI-DAQmx devices consists of DAQ::NI-DAQmx device name, as shown in Example 2. This naming convention allows for the use of an NI-DAQmx device in an application that was originally designed for a Traditional NI-DAQ device. For example, if the application expects DAQ::1, you can rename the NI-DAQmx device to 1 in MAX and pass in DAQ::1 for the resource name, as shown in Example 3.

If you use the DAQ::n syntax and an NI-DAQmx device name already exists with that same name, the NI-DAQmx device is matched first.

You can also pass in the name of an IVI logical name or an IVI virtual name configured with the IVI Configuration utility, as shown in Example 4. A logical name identifies a particular virtual instrument. A virtual name identifies a specific device and specifies the initial settings for the session.

Note  NI-DAQmx device names are not case-sensitive. However, all IVI names, such as logical names, are case-sensitive. If you use logical names, driver session names, or virtual names in your program, you must make sure that the name you use matches the name in the IVI Configuration Store file exactly, without any variations in the case of the characters.
channelList ViConstString Use only "" or a null pointer. If you specify a channel, NI-SCOPE will return an error.
Output
Name Type Description
deviceReady ViBoolean* Returns True if the device is ready to use, or False if the device is still initializing.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_reset

C Function Prototype

ViStatus niScope_reset (ViSession vi);

Purpose

Stops the acquisition, releases routes, and all session attributes are reset to their default states.

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_ResetWithDefaults

C Function Prototype

ViStatus niScope_Reset_With_Defaults (ViSession vi);

Purpose

Performs a software reset of the device, returning it to the default state and applying any initial default settings from the IVI Configuration Store.

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_revision_query

C Function Prototype

ViStatus niScope_revision_query (ViSession vi, ViChar driverRev[IVI_MAX_MESSAGE_BUF_SIZE], ViChar instrRev[IVI_MAX_MESSAGE_BUF_SIZE]);

Purpose

Returns the revision numbers of the instrument driver and instrument firmware.

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.
Output
Name Type Description
driverRev ViChar[] Returns the instrument driver software revision numbers in the form of a string; you must pass a ViChar array at least IVI_MAX_MESSAGE_BUF_SIZE bytes in length.
instrRev ViChar[] Returns the instrument firmware revision numbers in the form of a string; you must pass a ViChar array at least IVI_MAX_MESSAGE_BUF_SIZE bytes in length.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_self_test

C Function Prototype

ViStatus niScope_self_test (ViSession vi, ViInt16* selfTestResult, ViChar selfTestMessage[IVI_MAX_MESSAGE_BUF_SIZE]);

Purpose

Runs the instrument self-test routine and returns the test result(s).

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.
Output
Name Type Description
selfTestResult ViInt16*

This control contains the value returned from the instrument self-test.

Self-Test Code Description

0—Self-test passed

1—Self-test failed

selfTestMessage ViChar[] Returns the self-test response string from the instrument. Refer to the device-specific help topics for an explanation of the string contents; you must pass a ViChar array at least IVI_MAX_MESSAGE_BUF_SIZE bytes in length.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_GetStreamEndpointHandle

ViStatus niScope_GetStreamEndpointHandle (ViSession vi, ViConstString Stream_Name, ViUInt32 *Writer_Handle);

Purpose

Returns a writer endpoint that can be used with NI-P2P to configure a peer-to-peer stream with a digitizer endpoint.

Related topics:

  • Peer-to-Peer Streaming

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.
Stream_Name ViConstString The stream endpoint FIFO to configure. Refer to the device-specific documentation for peer-to-peer streaming in the High-Speed Digitizers Help for more information.
Output
Name Type Description
Writer_Handle ViUInt32 Returns a reference to a peer-to-peer writer FIFO that can be used to create a peer-to-peer streaming session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_CableSenseSignalStart

C Function Prototype

ViStatus niScope_CableSenseSignalStart (ViSession Instrument_Handle);

Purpose

Generates the CableSense signal on all channels of an oscilloscope for which the signal is enabled, as configured by the NISCOPE_ATTR_CABLE_SENSE_MODE attribute.

Note  The input impedance of the channel(s) to convey the CableSense signal must be set to 50 Ω.
You can call this function only during an acquisition. If you call this function while your oscilloscope is not acquiring, NISCOPE generates an error.

Supported Devices

  • PXIe-5110
  • PXIe-5111
  • PXIe-5113
  • PXIe-5160
  • PXIe-5162

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


niScope_CableSenseSignalStop

C Function Prototype

ViStatus niScope_CableSenseSignalStop (ViSession Instrument_Handle);

Purpose

Disables the CableSense signal on all channels of an oscilloscope for which the signal is enabled.

Supported Devices

  • PXIe-5110
  • PXIe-5111
  • PXIe-5113
  • PXIe-5160
  • PXIe-5162

Parameters

Input
Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call niScope_GetErrorMessage. To obtain additional information concerning the error condition, use niScope_GetError and niScope_ClearError. The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors


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