LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Speed at parallel procuder loops

Hi,

 

following situation. I want to log one temp sensor and one voltage sensor

Every one is creating data in a separate producer while loop and sending it with queue to a common consumer loop.

What is the reason that the shown graph of voltage is slow as the temp sensor?

 

Thanks

0 Kudos
Message 1 of 26
(2,729 Views)

Turn on highlight execution and learn!

 

Are your two producer loops running at different rates?  Your voltage one is running at about 50 Hz (1 sample every iteration of 50 Hz sample rate).  The temperature one is rather undefined.  It is running as fast as it again which means it is basically the default acquisition rate of that DAQ module.

 

So if one is running faster than the other, it is queuing up data faster in that loop.  But when you go to remove the data via the queue, you are only grabbing 1 at a time from each.   That consumer loop can only run once each queue as acquired an element.  So they are dequeued at the same rate, and the faster producer it proceeding to fill up its queue until eventually you run out of memory.

 

Change your architecture.  Consider using a notifier, or even just a local variable for the slower acquisition.

0 Kudos
Message 2 of 26
(2,720 Views)

Do you really need the voltage read at a different rate than the temperature?  Could you put both on the same DAQ board and therefore make a single task for reading both the temperature and the temperature.


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 26
(2,708 Views)

Hi,

the voltage is in future a pressure sensor with 100ms. It´s needed. The temperature sensor is fixed by hardware with 4 sample / second

0 Kudos
Message 4 of 26
(2,652 Views)

@Hulk1978 wrote:

The temperature sensor is fixed by hardware with 4 sample / second


By what hardware?  You are just using a DAQmx task.  So I don't see why you couldn't just go ahead and sample the temperature at the 10Hz (100ms) along with the pressure sensor.  1 task = simpler life.


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 5 of 26
(2,637 Views)

I'm getting Buffer Error, at the try for higher Sample rate.

Error -200279

This was the reason for the Producer loops. I Don t have so much experience. Time by time i try to improve my small measurement vi.

Actually i'm Testing queues and notifiers .

Hardware is a USB 6008or 9 and a tc01

 

0 Kudos
Message 6 of 26
(2,631 Views)

That's because you are trying to only read 1 sample of the higher speed device at a slower rate.

 

Trying reading N samples or all available samples (-1) of the higher speed device.  You'll get an array of multiple samples you can then process.

0 Kudos
Message 7 of 26
(2,624 Views)

Do you have an example?

I will Check tomorrow.

Thx

0 Kudos
Message 8 of 26
(2,615 Views)

@Hulk1978 wrote:

Do you have an example?



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
Message 9 of 26
(2,607 Views)

Good morning,

 

with this version i´m getting error -201426 at sample clock. vi. At least one device does not support tasks with multiple devices.

I think, it´s the temp sensor

 

vi.png

0 Kudos
Message 10 of 26
(2,553 Views)