10-12-2010 12:04 PM
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
10-12-2010 01:42 PM - edited 10-12-2010 01:47 PM
Hi Boilermaker99,
The function prototype to set an attribute such as this is as follows (copied from High-Speed Digitizers Help):
ViStatus niScope_SetAttributeViInt32 (ViSession vi, ViConstString channelList, ViAttr attributeID, ViInt32 value);
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:
Datatype | Access | Applies to | Coercion | High Level Functions |
---|---|---|---|---|
ViInt32 | R/W | Channel | None | N/A |
Specifies the terminal configuration for the channel.
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!
10-12-2010 01:44 PM
Thanks for the quick reply, I actually found that function in an example project about 15 minutes after I posted it
10-12-2010 01:50 PM
Ahh, good to hear. Cheers!