LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to update one shift register with two independent while loops?

Solved!
Go to solution
Hello all, I've got a control panel...with two clusters with indicators...a left side and a right side. I have messages coming in from serial port, and I'm currently updating the left and right side within their own while loops. I have a single variable, that needs to be updated based on updates on both sides. Basically I need to track last selection updated on either side....if I had 1,2 and 4 on the left side, and 3 on the right side...I'd need to track that 4 was the last number updated on the shift register variable to carry on for further uses in my vi. Can someone give me an idea how to update this one variable based on two while loops running independently within this same frame sequence? Thanks in advance, cayenne
0 Kudos
Message 1 of 8
(2,746 Views)

Use an Action Engine to store your information. Both loops can update and ask the AE if anything changed.

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 8
(2,742 Views)

@Yamaeda wrote:

Use an Action Engine to store your information. Both loops can update and ask the AE if anything changed.

/Y 


Thank you for the reply!!

 

I'm not familiar with the concept of the "Action Engine"...and am starting to research, but if you had some links or quick example that would help immensely.

 

Again, thank you for the quick reply!!!

 

cayenne

0 Kudos
Message 3 of 8
(2,738 Views)

Hi cayenne,

 

You could probably use a LV2 Global which is a simplified Action Engine

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 4 of 8
(2,737 Views)
Solution
Accepted by cayenne

Thank you both of you for the suggestion.

 

I was able to figure a way to get the values out that I needed without the AE....but I read the link to the Nugget about them, and I can forsee a use for them in the future.

 

 

cayenne

0 Kudos
Message 5 of 8
(2,717 Views)

Morning:

 

I am new to the forum, and I could not find a place or a how to post my question: 

 

I currently have three While Loops in my VI, one of them is controling an Arduino for RPM control which it seems to be working fine. The other 2 Loops are calculating mean Pressure and Torque coefficient. Im having an issue in my front VI: The data is being graphically displayed but when I run the VI it only displays data for Pressure but not Torque. The Arduino and Pressure Loop are working but there seems to be a lag time or something that its not letting the Pressure and Torque loop to run at the same time in real time. The Torque graphs displays the x-axis but there is no amplitude. It seems that is waiting for the pressure loop interations to happen before starting Torque calculations. How can I have both loops run and be able to display both graphs?

 

 

0 Kudos
Message 6 of 8
(2,663 Views)

Go to the main LabVIEW board and press "New Message".  Please include code so we can help debug.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(2,657 Views)

This is a copy of my VI.

0 Kudos
Message 8 of 8
(2,656 Views)