LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time and Results Issue with the Multiple loops

Solved!
Go to solution

Hi Friends,
I need help to reconstruct this Labview Program in better way. I tried my best to compile this way but need an expert review.
Loops : There is Top Loop and Bottom Loop (Main program)
Top Loop Variable: A1 A2 and A3
Bottom Loop Variable: B
Labview Measurement Objective : ParmA1 vs Time, ParmA2 Vs Time, Parm A3 (A1-A2) vs Time , ParmB vs time and ParmA2 vs Parm B ( Objective is to plot and get the data at the same time, whenever I restart the program fresh data and graph aquistion must begin at simulataneosuly)
Time: Must be real time
Doubts:
A. Actuallly I thought initally to create project and club this three files in the single project:
1st for top Loop, 2nd for the bottom Loop and 3rd Main Control panel { which show the value of A1, A2 and A3 and B alonwith the graph [(A1, A2 vs Time) and (B vs time) and ( A2 vs time)]} . Problem, How can send one local value from one VI to other VI in same project ?
B. Bottom Loop have linearity with the voltage measurement (0-5V), but I see alot of noise even when there is no physical paramater measured. Does my bottom loop is incorrect. (Screen shot of the picture, noise seems too high)

16.png


C. Sometime I can read the parm A1 and A2 from computer port at a time but when I connect the RS232 multiple port bus and try to measure both, only A1 or A2 anyone get measured and other set to zero ( I share the screen)

17.png


D. I am not sure if the Both top and bottom loop work at same time, I tried to use while loop and expect there is no delay. I am not sure if I did right, I would like to A1, A2 A3 and B at the same time.

18.png


E. How can I plot ParmA2 vs parm B together they are in different loops?


F. I have two stop, for different loop, Can we create single stop for both the loops?


Any suggestion

Thanks.

0 Kudos
Message 1 of 2
(884 Views)
Solution
Accepted by skdubey

Your upper loop has no timing at all. The rate is completely determined by the communication. Your lower loop spins every 400ms (or longer if the code is slow, hard to tell). Not sure why you are displaying the ms timer value. That's not a useful number.

 

If you want to graph A2 vs B, they need to match pairwise in their timing. What kind if data rate is sufficient? Maybe you could put all in one loop.

 

Sorry, I cannot see your DAQ assistant configuration, but acquiring dynamic data, converting it to an array, then throwing everything away except the first point seems wasteful.

 

You seem to ignore all errors, so we cannot know if there are occasional communication problems. Maybe you need small delays.

 

What's with all these right-to left wires and Rube Goldberg code such as the following: 

 

altenbach_0-1616806827461.png

 

And yes, there are many ways to stop both loops with one stop button.

0 Kudos
Message 2 of 2
(830 Views)