LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to exchange data between loops?

don't worry if you dont get it to work at first well.  Concurrency is one of the most difficult problems in programming and software architecting.  At least Labview simplifies it compared to c++ threads.  Good luck.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 11 of 14
(774 Views)
Shared variables have all the advantages and problems of globals and locals (a local shared variable is a global under the hood).  They were designed to allow easy data transfer between targets, not between loops.  I would recommend using queues.  Most other solutions will end up causing concurrency problems in all but the simplest situations.
Message 12 of 14
(755 Views)

Thanks DFGray I havent played with shared variables yet I use queues extensivly and love them.  I thought that shared variables vere more a kin to queues than globals but I guess not.  Thanks.

 

Paul 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 13 of 14
(736 Views)
To be fair, unlike local and globals, shared variables at least have error in/out terminals. 😄
This means that execution order can be made slightly more predictable without having to resort to sequences IF the error clusters are used.
0 Kudos
Message 14 of 14
(722 Views)