LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to share one boolean between parallel loops

I have a T/F variable for connection to the server, both loops are using it and one of them is checking for server connection every few seconds and the other reads it every few minutes. I see so many options to share the variable but I still feel the best way to do it is simply shared variable - i need no steady data flow, i don't mind missing data... Am I right with that?

0 Kudos
Message 1 of 3
(2,217 Views)

Hi Fyzik,

 

I still feel the best way to do it is simply shared variable

- When both loops are in the same VI: use a local variable.

- When both loops are in one executable, but different VIs: use a global or a notifier.

(You can replace locals/globals by FGVs aka AEs.)

- When both loops are in different executables: use a shared variable.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,209 Views)

I would just go with a simple Global Variable myself.  I don't trust Network Published Shared Variables, but a Single Process Shared Variable will work.


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 3 of 3
(2,179 Views)