11-06-2006 07:54 PM
11-07-2006 10:54 AM
Hi Tom,
As you already know, this issue appeared with MAX 4.0 and it is fixed with MAX 4.1. The previous workaround was to export your configuration locally and copy it manually to the network location.
It is possible that the crash might have permanently corrupted your mxs file system stored in the data folder. To restore a clean data folder follow the steps below: FOLLOWING THESE STEPS WILL DELETE EVERY CONFIGURED ITEM IN MAX (NISE CONFIGURATIONS, DAQMX TASKS, VIRTUAL CHANNELS). Excel needs to be installed to use this procedure.
1. Export the configuration to Excel using the NISE Excel example GenerateExcelReport.xls (Program Files\National Instruments\Switch Executive\Examples\Excel)
2. In the command prompt type (with MAX closed) : net stop mxssvr
3. Delete the MAX Data directory (Program Files\National Instruments\MAX\Data)
4. Reboot your computer
5. Import your xls file created in the first step using the example: ImportFromExcel.xls
Note: You may get an "Invalid resource name" error when you attempt to import your xls file. This will occur if Hardware Assets do not match DAQmx device names. Deleting the MAX Data directory forces your system to redetect all your DAQmx devices. All the devices will be reverted to default names, usually PXI_Slot_ or Dev_. If the Hardware Asset for any device differs from it's DAQmx name, simply right-click on the device under NI-DAQmx Devices to Rename it so they are the same.
The following two steps will allow you to export the configuration to a network drive.
6. Export the configuration to your local drive by right clicking on the configuration
7. Copy the exported NISE configuration from your local drive to your network drive
Let me know if you have further questions or if this does not resolve your issue!
Chad Erickson
Switch Product Support Engineer
NI - USA
11-07-2006 12:32 PM
Hi Chad,
Thanks for the detailed reply. A couple of additional questions...
1/ The machine I have the problem on is a factory production machine, which doesn't have a copy of Excel installed. Is it possible to simply copy the entire MAX/Data subdirectory to a machine that does have Excel, then copy the repaired directory back when I've completed the process?
2/ When I try to run the "ImportFromExcel.xls" spreadsheet I get a runtime error whenever I move the mouse over any of the buttons or the dropdown box (the ones contained inside the yellow border). The error reads "compile error in hidden module: Mainsheet". Any ideas what I've done wrong?? The "GenerateExcelReport.xls" runs fine.
Regards,
Tom
11-08-2006 10:54 AM
Hi Tom,
The only reason to have Excel installed is to facilitate the creation of a backup Switch Executive configuration. I notice in your first forum post you've already saved your desired configuration to a local drive sucessfully, so I was incorrect in referencing Excel in any way in the recommended procedure. Instead, the aforementioned procedure should have been the following:
1. With MAX closed, type in the command prompt: net stop mxssvr
2. Delete or rename the MAX Data directory (Program Files\National Instruments\MAX\Data)
3. Reboot your computer
4. Open MAX (this will recreate a default Data directory)
5. Import your saved Switch Executive configuration
In response to your first question, I've never attempted copying the MAX/Data subdirectory from one machine to another, and therefore would not recommend it to any customer. It would be an interesting test, but I would recommend having the same software versions installed on both machines. Let me know if you need me to test this solution in order for you to fix your issue. As to your second question, so far I've been unable to reproduce this runtime error. I've not yet contacted the developer of the example, but that is my next step if necessary.
Chad Erickson
Switch Product Support Engineer
NI - USA
11-08-2006 01:55 PM
Hi Chad,
Sorry for the confusion. I've actually got two machines setup, one with a corrupted "virtual device", and another that is ok. I was experimenting with the Excel export on the good machine just to see how it would work.
I've followed your instructions re deleting the Max/Data directory on my corrupted machine, and this worked perfectly. I was also able to import my original "good" virtual device settings I had saved before I deleted the directory. Thanks for your help :-)))
Re the Excel bug: I don't actually need to used the Excel sheet anymore, as deleting the directory solved my problems. However for general interest I have more information on this.
It initially throws this exception error
"Runtime error 40036. Application defined or object defined error".
After you press END, it then starts raising the errors "compile error in hidden module: Mainsheet" when you move the mouse over the buttons. I'm assuming the 40036 runtime error is our clue. Should I shutdown the mxssvr server (or some other server), before I attempt to import the excel data?
Regards,
Tom
11-08-2006 02:21 PM
11-08-2006 02:38 PM
11-08-2006 04:39 PM
Hi Chad,
Yes, Excel is open before I load the workbook. I can't even view the visual basic code to debug it as the project appears to be locked.
I'm not too worried. I've fixed my immediate problem using your last email. However this may be something someone else has problems with in the future.
Regards,
Tom