LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI DC Power driver for Xantrex XDC

Have system configured to run IVI drivers in my CVI code, use MAX to switch between the XanM9B driving an XFR20-130, and xanxdc driving an XDC20-300. Works fine with the XanM9B driver in both "specific driver" and "Don't simulate" modes. When I switch over to the other driver, though, my code fails at IviDCPwr_init() with "specific driver" and "Don't simulate". It tells me "Function or method not supported". Any idea what is going on here? Is there something I'm setting up incorrectly in the IVI driver, or is "init" really not supported by the XDC driver (unlikely). Thanks for your help.
0 Kudos
Message 1 of 8
(3,960 Views)
Hi Jason,

From that error, it sounds like it cannot locate the function titled "IviDCPwr_init()" in your xanxdc IVI driver. I would double check your header file and/or prototypes to be sure that IVI driver has the function declared. It may be the case that the function name or parameters may be different, so that is why it cannot locate the initialization function. Also, are these two separate IVI drivers loaded into your project? Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
Message 2 of 8
(3,960 Views)
Hi Jeremy,
Thanks for your prompt response. From what I understand, I should only #include "IviDCPwr.h" and load the "IviDCPwr.fp" into my project. The IVI generic driver then makes the calls to the specific driver depending on how MAX is configured. Currently I have created a Logical Name in MAX called "PowerSupply". If I select XanM9B in the driver session dropdown for "PowerSupply", and call:
IviDCPwr_init("PowerSupply", VI_X, VI_X, &PS);
the function and subsequent IVI function calls work perfectly.

When I go back into MAX and select xanxdc in the driver session dropdown for "PowerSupply" and run the same code, the init function fails with that error message.

I have checked both specific driver session settings, they are identical. Am I using
the IVI generic driver incorrectly?

I popped open the .h files for both specific drivers and the _init function prototype is in both headers as follows:

ViStatus _VI_FUNC XanXDC_init( ViRsrc resourceName, ViBoolean IDQuery, ViBoolean resetDevice, ViSession *vi );

ViStatus _VI_FUNC XanM9B_init (ViRsrc resourceName, ViBoolean IDQuery, ViBoolean resetDevice, ViSession *vi);

The only difference is the Xan*_init and the trailing space after *vi. I know the generic IVI driver has the function declared because the call succeeds when I use the xanM9B driver session.

Thanks again for your help, I look forward to your response!

Jason
0 Kudos
Message 3 of 8
(3,960 Views)
Also, the error message getting thrown is:
NON-FATAL RUN-TIME ERROR: "PowerSupply.c", line 26, col 5, thread id 0x000006F4: Function IviDCPwr_init: (return value == -1074135023 [0xbffa0011]). (0xbffa0011) Function or method not supported.
0 Kudos
Message 4 of 8
(3,960 Views)
Hi,

I took some time today to download and install the drivers you were using along with IVI Compliance Package 2.2. I made a simple application that used the IvIDCPwr Class driver to init and close the instrument drivers. I ran into the same problem you had seen. After further investigation, I found that the prefix used in the instrument driver for xanxdc is different than the prefix on the driver. It is case sensitive! The driver uses an all-lowercase prefix, while the class driver uses a prefix with some uppercase characters. When you go into MAX and browse to IVI Drivers >> Advanced >> Instrument Driver Software >> xanxdc, on the General Tab you should see a textbox for Prefix (case-sensitive). Change this from xanxdc to XanXDC
. It should now use this new prefix to call the correct function and not get this error anymore. I am going to report this to our development team as well to let them know that the xanxdc driver needs to be updated with a case-sensitive prefix. Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
Message 5 of 8
(3,960 Views)
Jeremy,
Well, I'm glad to hear I'm not the only one that can't get it. Unfortunately, when I follow your instructions I see the following:

"Prefix
A read-only field that specifies the prefix associated with this instrument driver software module. "

Is there a file I can edit on my system to test this fix out or do I have to wait for a new DLL? I can't edit that textbox (at least in my copy of MAX3.0.2).
0 Kudos
Message 6 of 8
(3,960 Views)
Hmm,

I was doing this using MAX 3.1.1. It's packaged with many of our drivers. I would go and download one of our latest drivers and install that (i.e, if you have 488.2, DAQ, etc., then get the latest one on our website). In addition, make sure you have ICP 2.2 installed. If not, it's a free download on our website as well. Go to www.ni.com/support, and under option 3 click on the link for drivers and updates. The other thing is I've told our developers about this issue and they are working to get a new version of the xanxdc driver up on the web in place of the old one. It should be up fairly soon since it's a small fix, but I just don't know exactly when.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 7 of 8
(3,960 Views)
Jeremy,
After updating NI-VISA and IVI Compliance Packages to their latest and greatest, I was able to get in and edit the prefix! Thanks for your dedicated help. I'll be looking forward to the updated IVI driver, but this solution will work in the meantime. Thanks again for your help.

Jason
0 Kudos
Message 8 of 8
(3,960 Views)