LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Working with occurances

Solved!
Go to solution
Wow what a discussion! I looked at state machine basics, but i just don't want a loop to run over and over again to check which state is given from the initializer loop... I am not at work and can't test anything. But my display and record loops should be set on and off from a third loop, i just want to seperate these things. About the global and race conditions, i think it will come in handy to put all your front panel object references in a global, so you have access to them at all times without having all wires everywhere, i overcome the race condition by using a sequence when i want to write or read certain properties of the FPObjects. But maybe wires give a better overview of flow control...? I'm not yet familiar with queues and notifiers, but i was going to implement them. At least for passing data from the display loop to the record loop, recording takes place every 2048 x 107 samples (1 sec) and displaying takes place every 40 ms (for smooth update).
Merry Christmas BTW!
Best regards,
Thijs
0 Kudos
Message 11 of 14
(411 Views)
Hi again,

I understand now and am using the producer/consumer with events design pattern to build my application. But... now i have one producer loop where i put commands: play pause record in a queue and the consumer loop which reads out those commands. Now i want a display loop with a delay of 25ms and a recording loop seperate with a delay of around 1000 ms, depends on the aquired data points.

Can i have one producer loop and two consumer loops? Or is this abnormal?

Regards,
Thijs
0 Kudos
Message 12 of 14
(387 Views)
Solution
Accepted by topic author ThijsBoeree

As long as you use seperate queues for each consumer loop there is no problem with that.

Rolf Kalbermatter
My Blog
Message 13 of 14
(382 Views)

Mostly just to reword what Rolf said: 1 queue per loop and you will be fine.


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 14 of 14
(380 Views)