07-30-2021 07:35 AM
I am using conditioned output in the loop and condition is when it is bigger than zero then pass the data and plot....correct me if that is wrong ...
07-30-2021 07:52 AM - edited 07-30-2021 07:56 AM
Hi Joan,
@Joan80 wrote:
I am using conditioned output in the loop and condition is when it is bigger than zero then pass the data and plot....correct me if that is wrong ...
Two points:
IF-THEN-ELSE usually is a case structure in LabVIEW:
(You might replace the value by NaN to get an invisble point in your chart - this might be an option depending on your requirements…)
07-30-2021 08:44 AM
Thank you Gerd, that did the job 🙂 my misconception on conditional for...thanks again
07-31-2021 06:29 PM - edited 07-31-2021 06:33 PM
hi, sorry, I tested it again and my enthusiasm was premature, there are -4 vals again after the while loop... but it is to do with asking the loop for 'false' to do nothing (do not pass any vals) rather than use default and pass the values. I have to say that I cannot replace these vals with anything as I do not want to introduce artefacts to the data...any suggestions how to code the loop to skip this vals?
08-01-2021 04:16 AM
Hi Joan,
@Joan80 wrote:
my enthusiasm was premature, there are -4 vals again after the while loop... but it is to do with asking the loop for 'false' to do nothing
The usual reply is:
Attach your code so we can tell you what you did wrong and suggest improvements…
(And please attach real code this time and not just images of code!)
08-01-2021 02:36 PM
08-02-2021 12:06 AM
A few thoughts (numbered for reference, not importance, to make easier to reply etc):
Hopefully these can get you moving through some of these problems.
08-02-2021 12:36 AM - edited 08-02-2021 01:00 AM
hi,
cheers,
does anyone knows about practical solution to skip data vals that are outside the range of interest in labview in a simple and concise manner? (topic of this post).
Preferentially not involving loops as loops require vals even in case of unmet condition (unwired terminals) which introduces artefact to the data
08-02-2021 12:44 AM
A combination of the previously mentioned In Range or Coerce function and the Case Structure would do what you want:
Here the first Chart has no gaps, but as a result the X axis doesn't really give "time" (or sample number, more accurately) anymore.
In the second, only the points between 0.5 and 1 are plotted, but the points that are below that are replaced with NaN (so gaps).
You can choose based on whichever suits your needs better.