Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an IVI wrapper for VXIPNP driver (Labwindows/CVI)

Hello
 
I'd like to use the NI Switch Executive to control an ASCOR switch (for which there is no IVI Driver available). So I thought I would attempt to create an  IVI driver which would wrap the VXIPNP driver functions that are available. I created an IVI template using the CVI wizard and attemted just a basic instrument reset to investigate the method of obtaining an instrument handle. However I can't get that far as the program  falls over at the following line in the IviInit function.
viCheckErr(viOpen(rmSession,
 
 
0 Kudos
Message 1 of 4
(3,152 Views)
Hello
 
I'd like to use the NI Switch Executive to control an ASCOR switch (for which there is no IVI Driver available). So I thought I would attempt to create an  IVI driver which would wrap the VXIPNP driver functions that are available. I created an IVI template using the CVI IVI driver wizard and attempted just a basic instrument reset to investigate the method/feasibility of obtaining an instrument handle. However I can't get that far as the program  falls over at the following line in the IviInit function.
viCheckErr(viOpen(rmSession, resourceName, VI_NULL, VI_NULL, &io)
 
Error Code = 0xbfff0011
Error Message = "Insufficient location information or the requested device or resource is not present in the system."
 
I do know that the device is present, and (from debugging) that the resourceName string is correct as set up in the MAX/IVI Config Store. Also I can do GPIB *IDN query OK - so the comms is fine.
 
Two questions
1) Is what I'm attempting feasible (ie wrapping VXIPNP with IVI functions ) ?
2) Any "finger trouble" reasons for the error message (I suspect MAX config but can't be sure) ?
 
You will probabably correctly surmise that I am not an IVI, MAX or NI switch executive expert
 
Cheers
DWW
0 Kudos
Message 2 of 4
(3,152 Views)

Hi,

   the following link may prove useful :

http://forums.ni.com/ni/board/message?board.id=180&message.id=17521

Also, what version of CVI, Switch Executive and IVI are you using?

What's the model for the ASCOR switch, and where did you download the vxipnp driver from?

Can you post your starting code here?

Can you post screen shots of your MAX configuration for the ivi instrument (logical name, driver session settings, hardware assett etc).

Thanks

Sacha Emery

National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 3 of 4
(3,140 Views)

Sacha

Actually I found the problem last night - rather embarrassing finger trouble with the MAX. I'd cut and paste the resource string from a text file ("GPIB0::18::INSTR") so it had double quotes surrounding it in the Hardware Asset Resource Desciptor. Of course had the MAX error checking been any good it would have highlighed the error - he said in a rather churlish manner.

Thanks for you response

DWW

0 Kudos
Message 4 of 4
(3,131 Views)