09-13-2006 09:50 AM
09-14-2006 05:41 AM
I've made some progress on my own with this problem. I've a workaround, but, in this workaround, something strange is happening.
Workaround: Run without the debugger active. i.e within the IDE use Debug->Start without Debugging, or double click the .exe in the \bin\debug directory. This runs fine, except for the strange problem described below.
The strange problem:
Consider the following code fragment.
1 private void initialise(){This results in an the external exception from the original post being thrown on the 2nd line, when run either with or without debugging.
Compare that with the following fragment
private void initialise()
{
Log.LogFile.LogLine("Starting DMM Initialisation");
try
{
dMM = new NI_DIMM.DMMWrapper2(DMMName, true, true);
string str = DMM.GetString(NI_DIMM.DMMWrapper2Properties.NidmmAttrSpecificDriverRevision);
Log.LogFile.LogLine("DMM initialised" + str);
initialiseSwitch();
}
catch...
}
private void initialiseSwitch()
{
try
{
swSource = DaqSystem.Local.LoadDevice(SourceSwitchName);
Log.LogFile.LogLine("Switch initialised");
}
catch...
}
This runs fine, as long as I have the Log calls and the try...catch blocks, there seems to be a time delay necessary between initialising the DMM and accessing the switch.
If this is the case, a NIDMMWaitUntilInitialised() function as part of NIDMM_32.DLL would be nice.
09-14-2006 09:46 AM
09-15-2006 02:57 AM
Bilal,
debugging now works fine.
Cheers,
Sam Overend