LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I retrieve the MAX "Configurable Initial Settings" from within an IVI driver

Solved!
Go to solution
I must be missing something. How does MAX associate the string "AGN6700J_ATTR_DIGITAL_PIN3_FUNCTION" in the Software Module Key with the actual attribute? Do I have to point to the .sub file somewhere in MAX?
0 Kudos
Message 21 of 24
(1,654 Views)

MAX does not have to associate the string, it just adds the string to the Configuration Store xml file.

 

The Configuration Store is then accessed when you initialize the driver session and the settings are applied when "Ivi_ApplyDefaultSetup" is called.  Somewhere down the chain of calls it probably is just doing SetAttributexxxxxx, based on the datatype and value that you have in the Driver Session.

 

-Nathan

 

p.s. I recommend that you try doing it with the same Instrument Specific Driver that I did.

Message Edited by NathanT on 03-19-2009 01:54 PM
0 Kudos
Message 22 of 24
(1,644 Views)
Solution
Accepted by topic author pblase

Ok, got it (finally!!!)

I'm not sure exactly what the issue was. I did the following:

1) Made sure that the Driver entries in MAX were pointing to the proper dll's. I have two entries for each driver, one for the debug (_dbg) version, one for the non-debug version. All of the dll's, along with the appropriate .lib, .sub, and .h files are copied to the appropriate locations in /Program Files/IVI.

 

1A) I also edited the .xml configuration file generated by MAX and manually removed a couple of garbage entries that were in there from past experiments. There's a problem is MAX in that it doesn't always properly handle changes in the initial configuration entries. For instance, if I delete a master initial configuration entry in the Driver page, it isn't always properly deleted in the corresponding Driver Session tab, and it becomes impossible to delete it.

 

2) checked the spelling  on the parameters Ivi_SpecificDriverNew(...) call. The first parameter wants the prefix used for the driver subroutines ("Stage", in my driver), not the prefix used for the attributes ("STAGE").

 

3) I also made sure that I was passing in the "NewOptionString" variable returned by the Ivi_GetInfoFromResourceName (...) call as the second parameter in SpecificDriverNew (...).

 

 

0 Kudos
Message 23 of 24
(1,617 Views)

Hello pblase,

        I am happy to hear that you got it working correctly.  It sounds like there were a couple of different things that you had to address.   I will look into the issue mentioned in "1A" and make sure that it is documented as a bug.

 

Cheers,

 

NathanT

0 Kudos
Message 24 of 24
(1,601 Views)