LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get 4 reentrant vi's not to call the write file vi at the same time?

When 2 of them finish at the same time the write file vi olny runs for the first to finish. Any suggestions?
0 Kudos
Message 1 of 16
(3,609 Views)
Make your own write file vi (it could just be a wrapper around the LabVIEW shipping write file vi) and make it non reentrant.
Message 2 of 16
(3,609 Views)
I did that already. No luck.
0 Kudos
Message 3 of 16
(3,609 Views)
Perhaps a few more details are needed. Are you writing to the same file each time? If so, are you appending the new data to the file or overwriting the old data? If you're overwriting the old data then the file will always look as if only one of the instances of the program wrote to the file. Perhaps you are inadvertently overwriting the data.

If you're writing to different files how are you accomplishing this? Are you leaving the path empty so that the dialog box appears? If not, are you certain that the wiring is not such that you're actually overwriting the file?

There may be other causes which would be more clear if you posted some code which shows an example of what you're doing and where the problem exists.
0 Kudos
Message 4 of 16
(3,609 Views)
How do you know that it doesn't work? Try setting the Preferred Execution System to "User Interface" for the non-reentrant VI.
0 Kudos
Message 5 of 16
(3,475 Views)
Let me try that, posting the code idea.
0 Kudos
Message 6 of 16
(3,609 Views)
Over my head.......
0 Kudos
Message 7 of 16
(3,474 Views)
Those are the 2 vi's that run uder the reentrant vi. They are just wired together. I hope this works.....
Download All
0 Kudos
Message 8 of 16
(3,608 Views)
You have attached two libraries, not two vis. On of these libraries has two vis and the other has several vis, none of which are top level. Which vi is your main vi and which are your subvis?
0 Kudos
Message 9 of 16
(3,608 Views)
LarSoe is referring to going to File>>VI Properties, selecting Execution from the pull-down menu, and choosing "User Interface" from the pull-down menu under Preferred Execution Method.
0 Kudos
Message 10 of 16
(3,474 Views)