LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error in simultaneous read and write to xml

Hi,

 

I am writing to an xml file and in a parralel loop i have to read from the same xml.

this is throwing an error in unflatten from xml saying the xml tags are invalid.

 

Is the simultaneous access not handled by Labview(8.6) for xml files? 

 

I tried to search the forum but could not find a thread on the same.

Kindly let me know if this has been discussed earlier.

 

Regards

 

0 Kudos
Message 1 of 4
(2,502 Views)

Hi Gsingh,

 

 I am not sure if you can/or can't. But why would you want to introduce this race condition? Surely, you would be better of writing to xlm and then sending a notifier to the second loop to signal that the file is now ready to be read.

 

If your not familiar with Notifiers (or other types) of syncrhonization within loops, please take a look at these KnowledgeBase articles and links:

 

What Is a Notifier?

http://digital.ni.com/public.nsf/allkb/B9398355D9550EAF862566F20009DE19?OpenDocument

 

Please let me know if this helps,

 

Kind Regards,
James.

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 4
(2,489 Views)

Hi James,

 

Thanks a lot for the info...

In my application i write configuration settings in an xml in a VI and a seperate parallel VI has to read this configuration for  its every operation.

also as soon as the configuration is updated the parallel vi should take up the new configuration.

 

I'll try  implementing the same with notifiers and check out if it works..

Thanks again.. 

 

Regards

Gagan 

0 Kudos
Message 3 of 4
(2,460 Views)

Hi Gagan,

 

Thanks for the update and I hope your well today.

 

I would consider the notify approach just to avoid reading the same line twice or missing a line in your configuration file.

 

Please let me know how you get on and if you have any problems.

 

Kind Regards,
James.

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 4
(2,448 Views)