06-16-2010 08:53 AM
Hello!
I'm having some problems with XML files. The section with xml is on the upper-left corner of the VI.
The VI is attached so someone can have a look. What hapens is, when I load the configuration from the XML file, as soon as i press the RUN! button, LV Crashes (Labview Development software had a problem and needs to be closed).
I have no clue what it can be.
Thanks!
Thiago
06-17-2010 03:45 AM
Dear Thiago,
thank you so much for your post on our webforum. I'm sorry to hear about the problems with the XML file. I couldn't test your VI, since the sub VI's are missing. I tried to reduce your VI to only the xml part, and there wasn't any problem in saving and after that loading the xml file. But the problem happends after the XML file handling so I don't believe this is the problem.
You can run your VI highlighted (set a breakpoint after the xml part and run highlighted from there) to see where the problem exactly occurs. Besides that the next time Labview starts you will get a pop up asking you to investigate error ; please do so, the error log can give us valuable information. Please give also the error what you are seeing in this dialog.
Also important; what Labview version are you using, and which operating system (also serivce pack).
Besides that I have some questions and suggestions about your block diagram;
- is there a specific reason to use 2 event structures? If not you can use just one and add the save event to this. You are also able to handle third event; stop, if stop hass been pressed (value changed) the event structure will handle that event.
- it is also not reccomended to use the property node to read or write values (especially if you are using many of them); the property nodes are not efficient to do that. Looking to the block diagram we can maybe just cluster the elements and then wirer this cluster from the XML part to the other part. Just read the cluster when writing the XML file and write the cluster when reading the XML file. Please notice the attached pictures for this approach.
Best regards,