From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot data that is larger than 1 among the data I collect with DAQ separately?

Solved!
Go to solution

How do I plot data that is larger than 1 among the data I collect with DAQ separately?

 

So I try to insert the '>' function into the 'case' function when the data value is greater than 1, but it is impossible.

 

Can you fix this? Help.

0 Kudos
Message 1 of 18
(2,611 Views)

Hi Yoon-soo,

 

unfortunately you are using the most current LabVIEW2019 version, which is not yet installed everywhere. Attaching a down-converted version of your VI would allow more people to debug it…

 

How do I plot data that is larger than 1 among the data I collect with DAQ separately?

Suggestions:

- change the Y axis of your graph to start at min=1…

- replace all values below 1 with NaN

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 18
(2,600 Views)

Thank you for your advice.

 

I'm looking for a way to save the previous version, but I can't find it.(pic.1)

 

Since I can't modify my posting, I uploaded a picture of my example to pic2.

Download All
0 Kudos
Message 3 of 18
(2,586 Views)
Solution
Accepted by topic author Yoon-soo

Hi Yoon-soo,

 

for pic1: just press "Save…"!

 

For pic2 you could use my 2nd suggestion:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 18
(2,580 Views)

Thank you very much. If it doesn't work out after I try, I'll post it again.

0 Kudos
Message 5 of 18
(2,575 Views)

How do I plot data that is larger than 1 among the data I collect with DAQ separately?

 

So I try to insert the '>' function into the 'case' function when the data value is greater than 1, but it is impossible.

 

A friendly friend who has just seen my writing a few days ago tried to help me, but there is a limit to my ability to solve.

 

Can you correct my code?? Help....

 

(Problem areas are indicated on pic2.)

Download All
0 Kudos
Message 6 of 18
(2,634 Views)

You can't connect an array to a case structure.

 

So do you want to execute if it at least one value in that array is greater than 1?  Or all values?

 

Insert an  OR array elements, or an AND array elements into the wire going to the case selector.

Message 7 of 18
(2,616 Views)

Thank you for your interest.

 

I want to plot and store only values larger than 1 among the data received in real time.

0 Kudos
Message 8 of 18
(2,594 Views)

Then wrap your case structure in a For Loop so it auto-indexes over each element in your array.

Message 9 of 18
(2,581 Views)

With each iteration, you are getting an array of N values, some might be larger and some might be smaller than 1 (and some might be exactly one!). So first you need to define the problem you are trying to solve with each iteration of the loop.

 

  • Do you want to selectively plot&save only the array elements that are larger than one?
  • Do you want to plot&save each array only if all elements are larger than one?
  • Do you want to plot&save each array only if at least elements are larger than one?
  • something else?
  • Since I assume that you still want to show the data with correct x-axis points, do you want to create gaps in the plot whenever the data is <1?

It also seems like you are using a graph. Could it be that a chart would be more appropriate? (Do you know the difference?)

 

So please sit down and define the exact problem first. Does the program work correctly and the only remaining problem is that it currently graphs all data?

 

(We really don't need to know who else could not help you. Focus on the important things!).

Message 10 of 18
(2,576 Views)