11-03-2009 08:24 PM
I have an exported NI MAX configuration file from another machine, call it x.nce. I successfully imported this to my machine using MAX, but now I wantto import all of the tasks, channels, scales into a Labview project. The .nce file isn't supported for import into Labview 8.6 projects (only .txt and .init files are supported in Labview Projects),so I exported the information to y.txt. I then attempted to import this into my labview project, but an error occurred:
Error -201074 occurred at _DAQmxImportConfig.vi, possible reason(s): Measurements: Import operations supports tasks, channels, and scales only, but a hardware object was found in the file. Remove the hardware objects from the input file.
I attempt to export the tasks, channels, and scales from MAX, but the tasks and channels are dependent upon one of the Devices, so I had to included the device in the export. I then editted y.txt and removed the sections [DAQmxDevice] and [DAQmxAccessory]. Then I attempted to import this new z.txt file into my Labive project. But now I get the error:
Error -201064 occurred at _DAQmxImportConfig.vi, possible reason(s): Measurements: Configuration file is missing the required header fields. Add required header informaiton at the top of the text file prior to any data. Line Number: 1
I have other MAX configurations that I've successfully exported from other Labview projects and I've been able to import these configurations into this project. I thought the purpose of having import/export was so that you don't have to hassle with hand-editting these files.
So, how do I go about importing a configuration exported from MAX into a Labview project space? (had this been done originally, I could have just opened the project and ran with it).
If I hand edit the exported file so that it only includes a couple of channels, (as in the attached file: test1.txt), it still fails.
[DAQmx] MajorVersion MinorVersion
8 7
[DAQmxChannel] AO.Max AO.Min AO.OutputType AO.TermCfg AO.Voltage.Units ChanType Descr PhysicalChanName
LoadBank_Command 10 0 Voltage RSE Volts Analog Output Dev1/ao2
VFD_Speed_CMD 10 0 Voltage RSE Volts Analog Output Dev1/ao3
11-03-2009 08:42 PM
After reviewing the test.txt file that I posted, I saw that it showed some graphic characters in it. Opening test.txt (generated by MAX) with a binary editor revealed that the MAX Exported .txt file used NULL (ascii zero) instead of SPACES (ascii 32) for spaces and that the Project import function could not handle the NULL.
I switched from .txt to a .ini file, but still had to hand edit the file to delete the hardware section, and then I was able to imported the configuration into the project space okay.
So NI, if this isn't already on your list, how about checking this out?
And why can't you ignore the hardware portion of a configuration if you don't want to load it into the project space so I don't have to hand edit it?
11-03-2009 11:27 PM
11-04-2009 07:43 AM
Yeah, I already figured this out after about an hour of iteration with the .txt text file, then I switched to the .ini file. Too bad that link information doesn't pop-up when I search for that error message in Labview.
This still doesn't explain why the .txt file had nulls in it instead of spaces, which I believe is a bug to be fixed.
Conclusion: Labview projects can't use the text file exported from MAX. Use the .ini format instead.