frentzen Posted March 6, 2007 Report Share Posted March 6, 2007 Hi, i want to run this vi continuously , but i get the following mistake "The data type of the Variant is not compatible with the data type, which is connected with the entrance". has anybody a sollution? i attached the vi and the xml-file i want to read. Thanks, Thomas Quote Link to comment
LAVA 1.0 Content Posted March 6, 2007 Report Share Posted March 6, 2007 CITATION(frentzen @ Mar 5 2007, 01:21 PM) Hi,i want to run this vi continuously , but i get the following mistake "The data type of the Variant is not compatible with the data type, which is connected with the entrance". has anybody a sollution? i attached the vi and the xml-file i want to read. Thanks, Thomas Hi, I get no error when I run your code... Quote Link to comment
Mikkel Posted March 6, 2007 Report Share Posted March 6, 2007 QUOTE(frentzen @ Mar 5 2007, 01:21 PM) Hi,i want to run this vi continuously , but i get the following mistake "The data type of the Variant is not compatible with the data type, which is connected with the entrance". has anybody a sollution? i attached the vi and the xml-file i want to read. Thanks, Thomas In stead of using a script to parse your XML file, you could try to parse the XML data (after reading it as a text file) by using the LabVIEW VIs "ParseXMLFragments.vi", "FindFirstTag.vi", "FindMatchingCloseTag.vi", all located in \vi.lib\Utility\xml.llb. This would solve the variant related problems, as well as being more clean code. -Mikkel Quote Link to comment
frentzen Posted March 6, 2007 Author Report Share Posted March 6, 2007 ZITAT(Mikkel @ Mar 5 2007, 02:08 PM) In stead of using a script to parse your XML file, you could try to parse the XML data (after reading it as a text file) by using the LabVIEW VIs "ParseXMLFragments.vi", "FindFirstTag.vi", "FindMatchingCloseTag.vi", all located in \vi.lib\Utility\xml.llb.This would solve the variant related problems, as well as being more clean code. -Mikkel Hi, Thanks for your answears. i just forgot a little thing to mention. I want to run the vi continously with file path integrated in the vi. the xml-file gets new data every minute and the vi should always get the new data. thank you so far, thomas Quote Link to comment
Ton Plomp Posted March 6, 2007 Report Share Posted March 6, 2007 This is a long shot, but generate a .net callback VI for a file change event. No I don't know which .net event you need, but if you figure it out and share it with us it would be great! Ton Quote Link to comment
Mikkel Posted March 6, 2007 Report Share Posted March 6, 2007 QUOTE(frentzen @ Mar 5 2007, 03:15 PM) Hi,Thanks for your answears. i just forgot a little thing to mention. I want to run the vi continously with file path integrated in the vi. the xml-file gets new data every minute and the vi should always get the new data. thank you so far, thomas Well, then it would be natural to use a 'While Loop' around your code. If you want the path to be constand, you can use a 'Path Constant' on your diagram. Once a second (use 'Wait (ms)') you could check if the datafile's time/date has changed, and reread the file if it has. More information about loops, delays, and file operations can be found in the examples installed along with LabVIEW (Help/Find Examples...). -Mikkel Quote Link to comment
frentzen Posted March 15, 2007 Author Report Share Posted March 15, 2007 ZITAT(Mikkel @ Mar 5 2007, 03:56 PM) Well, then it would be natural to use a 'While Loop' around your code. If you want the path to be constant, you can use a 'Path Constant' on your diagram. Once a second (use 'Wait (ms)') you could check if the datafile's time/date has changed, and reread the file if it has. More information about loops, delays, and file operations can be found in the examples installed along with LabVIEW (Help/Find Examples...).-Mikkel Hi, i put the path now into the vi, but i still got the same failure notice. the german ni support told me, it runs without problems. has anybody a solution? Thanks a lot. Thomas Quote Link to comment
Mellroth Posted March 15, 2007 Report Share Posted March 15, 2007 QUOTE(frentzen @ Mar 14 2007, 12:28 PM) i put the path now into the vi, but i still got the same failure notice. the german ni support told me, it runs without problems.has anybody a solution? I tried your VI, and it gave an error (you should really check the error outputs) stating that temproot was NULL. To make your VI run without this error, I had to fix the file name from "Mean[1].20061013_123043.xml" to "Mean.20061013_123043.xml". Hope this helps. /J Quote Link to comment
frentzen Posted March 20, 2007 Author Report Share Posted March 20, 2007 ZITAT(JFM @ Mar 14 2007, 01:39 PM) I tried your VI, and it gave an error (you should really check the error outputs) stating that temproot was NULL.To make your [wiki]VI[/wiki] run without this error, I had to fix the file name from "Mean[1].20061013_123043.xml" to "Mean.20061013_123043.xml". Hope this helps. /J That really helps. Thanks a lot. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.