Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Creating IVI Driver for Pickering 40-140-221

Hello All,

 

I am trying to use the Switch Executive to control the Pickering 40-140-221 PXI Reed Relay Card.  When I "Add IVI Switch" under Switch Executive, I get the following error: "An error has occurred while attempting to access device PickeringRelay Primary Error: (Hex 0xBFFA401C) Unknown status code."

 

I am not sure if I have set up the IVI wrong or what.  I know for sure that the card works.

 

In the IVI Drivers, Driver Sessions, I have the Software tab setup as such:

Software Module: pi40iv

Prefix: pi40iv

Module Path: pi40iv32.dll

Published APIs: IviSwtch 1.0

 

The hardware tab is has the reed relay card added and checked.

 

In the general tab, only Cache and Range Check are checked, and it is "Don't Simulate".

 

Thanks.

0 Kudos
Message 1 of 8
(7,517 Views)

It is possible that the IVI logical name setup is lacking some configuration. For example, it may be necessary to specify Model in driver setup string, e.g. by putting string "Model:40-140-221;" in the driver setup field of your logical name configuration.

Also, you can look up the error (which is driver-specific, so I cannot tell you what it is) in the driver. 0xbffa401c is specific_driver_error_base + 0x1c (or +28 decimal) and you can take a peek into the pickering header file where this may be defined, or just look into their documentation to figure out what this error code means.

 

I have a feeling, without knowing the error code, that the driver setup string may just fix your problem. If not, please feel free to reply with an additional information about that error code that you can find in the documentation of the specific driver.

 

Hope this helps,

0 Kudos
Message 2 of 8
(7,496 Views)

I have tried changing the names, and it still doesn't work.

I have checked the error against the manual, and I could find an error that matches this error code.Smiley Sad

I have no clue what is going on.

0 Kudos
Message 3 of 8
(7,487 Views)

One thing you can try doing is to use the pickering driver directly, with the logical name you defined for NISE. THen, if it failed, you can call the GetError function and examine the error code, looking for a better description.

If there is no error from using the specific driver directly, try using the driver with the IviSwtch interface.I./e. use IviSwtch_init() function with the logical name used with pickering device. Then, call IviSwtch_GetError function after the init call fails. Let us know what error description you obtained from the driver this way.

 

 

Message 4 of 8
(7,443 Views)
Oh, did you locate the error code in the pickering header file? It should be in there, if it is not in the documentation... look into the pickering .h file that can be found in the ivi\include directory, and look for the ivi specific error base + 28 (or + 0x1c) error code....
0 Kudos
Message 5 of 8
(7,442 Views)

I'm having the same problem with a pickering device and switch executive. I found this in the .h file:

 

#define PI40IV_ERROR_BAD_ATTR_CODE (IVI_SPECIFIC_ERROR_BASE + 28) /* Unspecified error */

 

So what's the fix, to remove this line?

 

 

 

0 Kudos
Message 6 of 8
(7,190 Views)

Hi Ryan,

I will first point you to some resources that I was able to find in our website and they don't help you solve your problem please post back to the forum.

There is one of our discussion forums that has similar error message that states: “This is likely a driver specific error for Pickering's driver.  You might be able to find the error in their .h include file.  You could possibly retrieve an error description by calling their error message function.  Again, you might also need to consult their user manual or support.” This seems to be what you did and it looks like your header file has a: “Unspecified error”.  This is still very specific to that driver so you will have to either contact Pickering or step through the code and see which functions is throwing the error.

Quick question, if you download the driver from: “Pickering Interfaces Ltd System 40”, does it comes with examples? Can you run one?

Also make sure you have read through or follow these instructions of KB: “How Do I Create Switch Logical Names From Measurement & Automation Explorer?” , it might not directly solve your problem but it would be a good base to avoid naming problems. Do you have Switch Executive? If you do, please look at this KB 417EOR88: Using 3rd Party IVI Compliant Switches with Switch Executive.

 

Another good DF is: http://forums.ni.com/ni/board/message?board.id=140&message.id=7343&requireLogin=False

Message Edited by Jaime F on 03-17-2009 01:02 PM
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 7 of 8
(7,170 Views)

I replaced it with a different model (40-610-021-2/31/1) and this one worked. The one that didn't was: 40-610-021-4/16/1

 

Ryan

0 Kudos
Message 8 of 8
(7,158 Views)