03-19-2009 09:30 AM
03-19-2009 01:46 PM - edited 03-19-2009 01:54 PM
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.
03-20-2009 04:49 PM
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 (...).
03-23-2009 07:42 AM
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