12-30-2020 08:48 PM - edited 12-30-2020 09:28 PM
Hi everyone,
I am a beginner of Labview and I am trying to write a programme to build an array and export it to txt.
It was successful when I run the sub VI directly. However, when I added a main VI and use global variable to control the stop button of while loop in sub VI, the programme does not run properly. It can successfully run one time but when I try another run with the same procedure there is a wrong "True" value passing through the global variable, forcing my while loop in sub VI stopped. It is alternating between these two condition and I cannot figure out why this happen.
Can anyone explain this? I have attached my VIs below.
Cheng
Solved! Go to Solution.
12-30-2020 09:24 PM
You have not attached anything.
12-30-2020 09:29 PM
Sorry for that, I have uploaded now. Thanks for reminding me!
12-30-2020 10:05 PM
Kindly share the vi after down converting to LabVIEW 2018 version.
12-31-2020 06:38 AM - edited 12-31-2020 06:39 AM
Hi cl,
please take the LabVIEW beginners tutorials as offered in the Training resources in the header of this LabVIEW board…
Your VIs show a big race condition: two processes access the very same resource - and the winner is unknown (aka more or less randomly choosen)!
Solutions:
12-31-2020 09:06 AM
Thank you for your explanation, GerdW! Sure, I will follow your suggestion to watch the tutorial!
12-31-2020 01:27 PM - edited 12-31-2020 03:00 PM
A few more general comments:
12-31-2020 02:45 PM
Hi altenbach, Thank you so much for your useful comments! There are many things you pointed out that I should be very careful about when I am making LabVIEW programs in the future.
I have some further questions and would be appreciated if you can help me.
1. Could you post an example that I can refer to as you pointed out the proper way of saving data with state machine?
2. Using express VI for elapsed time seems to be quite easy for me, is there any disadvantage using it?