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