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.
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.
03-01-2012 11:07 AM
Hi all,
I am trying to create a user friendly panel to convenient myself in control and minotor a plant performance from several PI tuning method. For example when i selected A tuning method, then the graph should appear A performance, then when i select B tunign method, the graph should appear B performance.
I had attempt to work out but the result is shown in different graph and the result cannot run continuously as i change the input, the output is only change when i re-run the whole Vi. (picture below).
So i move out the graph and the input outside the case structure, consequently, the graph is not working ooutside the design and simulation loop.
Do anyone can help me solve my problem above? Thankyou very much.
03-01-2012 11:35 AM
Waveform charts "collect" a signal when their input wire gets data. So in the last screenshot, your chart will only get a data point when you exit the case structure. When LV exits the case structure, the input wire to the waveform gets data and the waveform chart collects it. Therefore, you'll want to keep your charts on the simulation diagram so they collect every data point. Perhaps you can write to a local variable of the chart in the other diagram.
03-01-2012 11:38 AM
Yuki
As usual, there are several ways to solve the problem you are running into. Maybe the simplest change to have one graph and simulation running on the same graph, change the SimTime Waveform by a 'Utilities >> Collector' and use a XY Graph outside the loop. This should allow you to change graphs and plot on the same location.
Hopefully that should do the trick.
03-01-2012 02:54 PM
Hi dbohls,
Thankyou for your reply, what you mean by a local variable of the chart in other diagram?
03-01-2012 02:56 PM
Hi barp,
Thankyou for your reply. I had attempt to work out as what you mention, but the graph does not show any response. Is picture below shows i am doing the right way?
03-01-2012 03:06 PM
If you right click you XY graph on of the options is create. If you go to that you will see the option to create a local varible. Is is like and extra copy of your graph so you can have one in each loop.
03-01-2012 03:07 PM
Yuki,
From the block diagram, you can right click on a control/indicator and create a local variable that can you can use to read from or write to the control/indicator. Read about it in LabVIEW's help file if you need more info on that.
Regarding your trouble with the collector, can you post your VI?
03-01-2012 04:18 PM
Dbohls,
Thanks you for your reply,
ok, while i try to read the help file, this is the regarding VI.
03-01-2012 04:26 PM
Hi dbohls,
I had try to use the XY graph local variable inside the loop and remove the wire to the XY graph,but the graph still not responding.
03-01-2012 06:24 PM - edited 03-01-2012 06:25 PM
Yuki,
You had a couple of problems.
1) You have your sim loops set to run for infinity. When a simulation loops executes, it runs the entire simulation from the start time to the finish time. If you run to infinitiy, it will keep running until you halt the VI, halt the simulation using a halt block, or the sim loop encounters an error. How can the result from the collector get to your graph on the outside of the sim loop if you never let the sim loop finish?
2) The collector does not produce any output until the final step of the simulation.
I attached an example that uses some local variables.