High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change the NISCOPE_ATTR_CHANNEL_TERMINAL_CONFIGURATION attribute in my code using ni-scope

I am trying to setup my PCI-5922 to do a differential measurement, I need to modify the Terminal Configration property. I am using a wrapper to make calls to the device, there is function for this setting, how do I access this property in my code

0 Kudos
Message 1 of 4
(5,964 Views)

Hi Boilermaker99,

 

The function prototype to set an attribute such as this is as follows (copied from High-Speed Digitizers Help):

 

C Function Prototype

ViStatus niScope_SetAttributeViInt32 (ViSession vi, ViConstString channelList, ViAttr attributeID, ViInt32 value);

 

 

Parameters

Name Type Description
vi ViSession The instrument handle you obtain from niScope_init that identifies a particular instrument session.
channelList ViConstString The channel to configure. For more information, refer to Channel String Syntax.
attributeID ViAttr The ID of an attribute.
value ViInt32

The value that you want to set the attribute. Some values might not be valid depending on the current settings of the instrument session.

 

 

The specific attribute you are looking for is as follows:

 

 

NISCOPE_ATTR_CHANNEL_TERMINAL_CONFIGURATION

 

Datatype Access Applies to Coercion High Level Functions
ViInt32 R/W Channel None N/A

 

Description

Specifies the terminal configuration for the channel.

 

Defined Values

NISCOPE_VAL_SINGLE_ENDED (0)

NISCOPE_VAL_UNBALANCED_DIFFERENTIAL (1)

NISCOPE_VAL_DIFFERENTIAL (2)

 

 

Thus, to setup the device to perform a differential measurement, you want to use something similar to the following function call:

 

ViStatus niScope_SetAttributeViInt32 (vi, "0", NISCOPE_ATTR_CHANNEL_TERMINAL_CONFIGURATION, NISCOPE_VAL_DIFFERENTIAL);

 

Additionally, I would like to point out that we provide a shipping example in C that shows how to configure the 5922 for differential mode. The example program can be found under Start » Programs » National Instruments » NI-SCOPE » Examples » C » Differential. It allows a user to type a number depending on which terminal configuration they want and then it sets the attribute based on that input. Hope this helps!

Daniel S.
National Instruments
0 Kudos
Message 2 of 4
(5,962 Views)

Thanks for the quick reply, I actually found that function in an example project about 15 minutes after I posted it

0 Kudos
Message 3 of 4
(5,959 Views)

Ahh, good to hear. Cheers!

Daniel S.
National Instruments
0 Kudos
Message 4 of 4
(5,957 Views)