05-12-2011 11:58 AM
Hi,
I'm using the Ag34410 IVI instrument driver in a Labwindows/CVI application.
I cant' figure out how to access the attribute that indicates the position of the front panel switch that determines whether the front or rear panel test probe terminals are in use.
I don't see this attribute listed under any of the GetAttributeVIxxxx(...) commands.
Here's an excerpt from Agilent 34410A Programmers Reference that defines the attribute:
******
Syntax
ROUTe:TERMinals?
Description
This command queries the 34410A/34411A multimeter to determine whether the front or rear input terminals are selected (via the front/rear switch on the front panel).
Example
The following query returns the current state of the 34410A/34411A front/rear switch (the set of input terminals selected).
ROUT:TERM?
Typical Response: "FRON"
*****
Did I miss something?
Is there some way to directly issue the above SCPI command via the IVI instrument driver?
Thanks,
Kirk
05-13-2011 11:04 AM
Hi,
The command is already included in the driver
/*- HP34401A_ATTR_TERMINAL_ROUTE -*/
static ViStatus _VI_FUNC hp34401aAttrTerminalRoute_ReadCallback (ViSession vi,
ViSession io,
ViConstString channelName,
ViAttr attributeId,
ViInt32 *value)
{
ViStatus error = VI_SUCCESS;
ViChar rdBuffer[10];
size_t rdBufferSize = sizeof(rdBuffer);
viCheckErr( viPrintf (io, ":ROUT:TERM?;"));
viCheckErr( viScanf (io, "%#s", &rdBufferSize, rdBuffer));
/* Need to only check only the first character of the return string. */
if (rdBuffer[0] == 'F')
*value = HP34401A_VAL_TERMINAL_FRONT;
else
*value = HP34401A_VAL_TERMINAL_REAR;
Error:
return error;
}
05-13-2011 11:57 AM
I'm using the 34410 driver not the 34401 driver.
The function I assume I would use would be:
ViStatus Ag34410_GetAttributeViString (ViSession Vi, ViConstString RepCapIdentifier, ViAttr AttributeID, ViInt32 AttributeValueBufferSize, ViChar _VI_FAR AttributeValue[]);
Trouble is when I look through the constans for the AttributeID argument, I don't find HP34410A_ATTR_TERMINAL_ROUTE.
Maybe they left it out of the 34410 version of the driver.
You can see that HP34401A_ATTR_TERMINAL_ROUTE is in the 34401 header but not in the 34410 header that I am using.
I tried to attach the 2 header files "Ag34410.h" and "hp34401a.h" to this post so you can take a look for yourself but I kept getting the message:
Please correct the highlighted errors and try again
Any ideas??
Thanks,
Kirk
05-16-2011 10:03 AM
The NI IVI specific driver supports 34401, 34410, 34411, and L4411.
05-17-2011 10:34 AM
Kirk,
You are probably using Agilent's IVI-COM driver with an IVI-C wrapper which might not include this attribute. On our web site, ni.com/idnet, you can find a native IVI-C driver for use in LabWindows/CVI. Here is the link:
05-17-2011 10:42 AM
Yes, I'm using the driver that was supplied on CD with the meter.
I just posted a support question to Agilent to see what they say.
I'll take a look at the NI driver.
One complication: I'll have to figure out how to update a system that has been shipped to a customer. Not sure if there is a "hands off" way for our customer to install the new driver.
Kirk