Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining an IVI Driver Session from IVI Logical Name in IVI-COM

Is there anyway to obtain a IVI driver session from a IVI Logical Name in C#? The IVI Logical Name is obtained from NI MAX. I am using an Agilent 34980A IVI-COM Driver. The Agilent 34980A IVI-COM Driver does not provide this capability as far as I know for obtaining the IVI Driver Session from the IVI Logical Name.

 

I initialize the driver by using the “Initialize” method and pass in the Logical Name as one of the arguments. My Agilent 34980A Instrument is initialized after the call is made to the method. I verified this with NI-Trace.

 

But here is my dilemma. I have 2 or more Agilent 34980A Instruments in my test setup. Each Agilent 34980A has its own unique IVI Logical Name. I only know the Logical Names in my C# code. I managed the IVI Logical Names but I need a way to logically associate each driver session to each IVI Logical Name. Sure I can lug around the driver sessions in my code and associate it to the IVI Logical Names. Maybe there is another way to do this with IVI Config Server.

 

For example I need to reset the Agilent 34980A Instrument further down in my code by calling the following statement:

 

 

driver.Utility.Reset();

 

 

// driver handle session was defined earlier on in IviSessionFactoryClass

 

 

.

// I need to know which IVI logical name is assigned to which driver session. When I call the reset method, I don't know which Agilent 34980A I am resetting.

 

 

 

Is there an API call in IVI Config Server that serves that purpose for obtaining the driver session based on the IVI Logical Name? I did find some call for IVI-C for finding a specific driver handle based on the lVI Logical Name. But I did not find a call like that for IVI-COM.

 

Any help on this would be very grateful.

0 Kudos
Message 1 of 2
(5,027 Views)