ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transferring Data between Analog Read and Analog Write Loop

In my program, I am reading pressure transducer data from a analog input. The pressure data needs to be input to another while loop which is analog output. The two loops are running at a different frequencies. The read running slower than the write. The analog output is variable and depends on the analog input. I have set up a case structure that helps determine the analog output according to different ranges of the input. What would be the best way to transfer data between these two loops. I am thinking either notifiers or local variables. The read loop would already determine the case, just need to choose the same case in the write loop. I have attached what I think the loops would look like with local variables. I am just wondering what the better way to do this would be since the loops are running at different speeds.

Thanks,

Harsh

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

Since the Write loop only cares about the latest value, I would just use a Global Variable.



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

Yes, the global variable looks like a good option, I used it using a simple numeric control instead of pressure data and it seemed to work. But using a notifier caused issues as I think the the case would switch to default in the increments where no notifications were being received.

 

0 Kudos
Message 3 of 3
(2,588 Views)