LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Creating a new waveform graphs for each loop until the while loop is end?

Solved!
Go to solution

Firstly I make a while loop with a certain condition to stop it. (my vi example is stop until a random number generator generate a 0)

Then, after every loop, I wanna create a waveform graph (like creating a random generated array with 10 elements)

However I want the vi create a new waveform graph for me after every loop (after create a new 10 elements array)
 
So how can I make it?
0 Kudos
Message 1 of 7
(4,461 Views)

Hi ying,

 

there is no graph, array or waveform in your VI…

 

- Execution of program parts are ordered by DATAFLOW: when you want to execute something after your while loop you need to enforce dataflow.

- What's the problem with creating a new plot (or: new plot data) in each iteration of your (to be programmed) main loop?

Best regards,
GerdW


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

Thanks for your replay!

if I change the case like this:

i want to create an array with 10 random generated elements inside a while loop, and the while loop will stop in certain condition.

 

if I wanna create a new line within the same waveform graph when every time finish a while loop, so how can I make it?

0 Kudos
Message 3 of 7
(4,407 Views)

Hi ying,

 

if I wanna create a new line within the same waveform graph when every time finish a while loop, so how can I make it?

You need to add a new plot to your graph data. The context help of the graph shows you how you need to format the data!

(LabVIEW also comes with example VIs, there are some that explain charts and graphs.)

 

i want to create an array with 10 random generated elements inside a while loop, and the while loop will stop in certain condition.

Just do it!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(4,402 Views)
Solution
Accepted by Ying88827

Hi Ying88827,

 

I made you a VI, All the explanation are in comment.

 

Regards.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
Message 5 of 7
(4,397 Views)

Thank you so much!

0 Kudos
Message 6 of 7
(4,389 Views)

U're welcome

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 7 of 7
(4,385 Views)