LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing Problems...

I have this VI simulating what in future will be 8 motors.
I want to compare different parameter settings so I'll be plotting them togheter (dif. parameters).
For each parameter motor should pull masses forward and then backward and I'll be measuring speed, current, etc.
Problem is I have to wait until all testing with each parameter is done to see the plotting... This is maybe due the sequence wich won't return anything before its end...
Is there a way of solving that? I would like the graphs to update with each mass movement (slide indicator).
I'm dumb...so if u could try to put in words so an 8 year old child (that doesn't even speak English well) would understand...
🙂
Thanks in advance,

Erick
0 Kudos
Message 1 of 3
(2,434 Views)
Your VI is far too difficult for me to read because it is not legible at all (sorry for that). The thing is that you don't plot your graphs for each parameter but after all testing, and that's what LabView does.

- First of all you have to get rid of all the sequences you have except the first one which is out of the while loop. You can initialise your controls in that sequence like you've already done (don't forget to put a data dependency between the sequence and the FOR LOOP). What could be interesting to do in order to destroy all the sequences is use property nodes (Value) instead of local variables. This will make your VI a little bit more legible for you (and me).

- Then put the correct graphs in your third FOR LOOP (the one with the number of motors for
N). Ex : if 1 is set to TRUE then update this graph (put the terminal in the case structure) and only this one

I'll be OK to help you if you make your VI more legible. Sorry again for that but it is really important.

Hope this helps anyway !
Julien
0 Kudos
Message 2 of 3
(2,434 Views)
In its current state your vi is very difficult to read. I don't understand why you have the sequence structure in parallel to your main loop. This appears to be an initialization stage but could cause problems since it is running in parallel. I think, though, that you may have already run into this problem as it looks like you are doing the same initializations within the loop.

It is good practice to avoid sequence structures. Your code will not execute until the data that is required is ready. You can use this data dependency to force the order of execution. You can run wires directly rather than using the local variables as you have done extensively in your program. While local variables are certainly useful in specific situations, it appears that they
can be avoided in most, if not all, of your cases.

I would also suggest that you program some of the tasks into subvis. This is beneficial for several reasons. First, it compacts the code so that it can fit on one screen. Second, it provides a convenient way to force data dependency. You can use Error In and Error Out clusters to force the flow of the data. You can do this even if these are just passing through. LV has good examples on how to create and use subvis.

In order to see the graphs update inside the loop you must put them inside the loop. An indicator will not update until all structures preceding it have completed.

If you'll clean up your vi so that the block diagram fits on one screen it will be much easier to help you to help you to make it do what you want it to do.
0 Kudos
Message 3 of 3
(2,434 Views)