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.

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,564 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,560 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,556 Views)

Hi cayenne,

 

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

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 4 of 8
(2,555 Views)
Solution
Accepted by topic author 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,535 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,481 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,475 Views)

This is a copy of my VI.

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