03-30-2020 05:56 AM
Dear all,
I have simple problem but I'm stuck. Programming is not my strongest point, I'm noob in LabView, and there is a huge time pressure and I don't get it, probably from stress too.
I have a sensor reading out data continuously. It is one of the many measurements. But the change in this data is important, so it needs to be recorded in a time interval, unlike the others.
A bigger while loop is running already with all the systems.
I can record it, make an array inside growing each time with a new measurement via shift register. But I just can't stop the while loop with the Boolean and extract that array. I need that array with large amount of data points to write into measurement file afterwards, as TDMS. I'll investigate the signal behavior.
It might sound stupid but I'm working on it for two days. I've read ten's of threads, tried many examples, tried BooleanPtByPt, or other things. This is how I came to this point. But I can't figure out the rest.
Please help me,
I'd be very thankful if you could help.
Solved! Go to Solution.
03-30-2020 07:04 AM
We're missing quite a bit of context here. But a few of the problems are clear.
The boolean's value is read when the loop begins,and that value is passed to the loop. Inside the loop, it will never change.
I hope this leads you towards a quick fix of the problem.
There are probably more structual changes needed if the program keeps growing.
03-30-2020 07:22 AM
As already mentioned by wiebe@CARYA, your buttons are not correctly placed.
But you can still use local variable, and the buttons will be read even if the buttons are not in the executed loop.
Also I would like to say, if you need fast measurements, place your array indicator outside of while loop, where your read your sensor. This way your loop will be faster, because indicator will not get refreshed every iteration when you read from sensor.
BR, Jakob
03-30-2020 08:18 AM
You are godsent, thank you so much!
Local variable was the trick I couldn't figure out.
03-30-2020 08:18 AM
thank you so much for the suggestion. It works!!
I wish you all a nice day