Jump to content

how can i run this vi continuously?


Recommended Posts

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... :blink:

Link to comment

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 :)

Link to comment

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

Link to comment

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 :)

Link to comment
  • 2 weeks later...

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

Link to comment

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

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.