02-11-2008 01:44 PM
02-12-2008 09:57 AM
06-11-2008 10:35 AM
NathanT,
Thanks for the suggestion, but upgrading the versions of NI 488.2 (GPIB), NI-VISA, and ICP to the current versions does not correct my problem.
This appears to be something specific to the 3458A IVI driver itself.
In the hp3458a_InitWithOptions function, the call that if commented out allows the custon test executive to exit correctly is
checkErr( Ivi_GetInfoFromResourceName (resourceName, (ViString) optionString, newResourceName, newOptionString, &isLogicalName));
What I did in the experiment I ran, was comment out the above line and just copy the value of optionString to newOptionString and resourceName to newResourceName
Here's the snippet from my modified version:
//checkErr( Ivi_GetInfoFromResourceName (resourceName, (ViString) optionString, newResourceName, newOptionString, &isLogicalName));
strcat(newResourceName, resourceName);
strcat(newOptionString, optionString);
isLogicalName = VI_FALSE;
Doing this now allows the custom test executive to exit properly.
Could I trouble you to look into this? Thank you very much in advance!
ChrisM
06-12-2008 12:23 PM - edited 06-12-2008 12:24 PM
This function returns the appropriate resource name and option string that Ivi_SpecificDriverNew function uses to create a new IVI session. The Resource Name can be an actual resource descriptor or a logical name or driver session name that the user configures with the IVI Configuration utility.
If the string that the user passes in the Resource Name parameter is an actual resource descriptor, this function returns the original resource descriptor and option string in the New Resource Name and New Option String parameters and returns VI_FALSE in the Is Logical Name parameter.
If the string that the user passes in the Resource Name parameter is a logical name or driver session name, this function returns strings in the New Resource Name and New Option String parameters based on the settings of the logical name or virtual instrument in the IVI Configuration Store. The function return VI_TRUE in the Is Logical Name parameter.
Example:
Ivi_GetInfoFromResourceName ("GPIB0::2::INSTR",
"Simulate=1",newRsrcString, newOptionString,&isLogicalName);
newRsrcString and newOptionString contain the same values you pass to the function, and isLogicalName is VI_FALSE.
Ivi_GetInfoFromResourceName ("SampleDMM", "",
newRsrcString, newOptionString,&isLogicalName);
newRsrcString and newOptionString now contain the resource descriptor from the IVI configuration and the option that tells the engine through the Ivi_SpecificDriverNew function that the initial session setup comes from the IVI configuration.
isLogicalName is VI_TRUE.
/*-------------------- Prototype ---------------------*/
ViStatus Ivi_GetInfoFromResourceName (ViRsrc Resource_Name, ViString Option_String, ViChar New_Resource_Name[ ],ViChar New_Option_String[],ViBoolean*Is_Logical_Name);
07-07-2008 09:44 AM
Nathan,
I apologize but your reply has confused me somewhat.
Because the snippet of code I am executing doesn't use the IVI Configuration Store, commenting out the line of code works. I believe the function call translates an IVI logical name to a VISA resource string, however, since I am passing in a VISA resource string, the call to the IVI Configuration Store API is not needed.
The snippet of code I am executing just performs an initialize, followed by a close.
I suspect that there some funny going on in COM land...the code actually executes in a COM Server. On my machine, when I exit my custom test executive, the exectable file not only stays active (I can see this via the Task Manager), but it consumes 100% of the CPU Usage.
Thanks again for your assistance!
Chris
08-27-2008 07:16 AM
Is there anyone else who may be able to help me with this problem?
Thanks in advance!
Chris
08-28-2008 07:53 AM
Hello Chris,
It would be great if you could answer the questions that I posed in my previous post. If the instrument driver is not behaving properly after being modified, I recommend that you do an uninstall/reinstall of the instrument driver. What development environment are you using?
Cheers,
NathanT