10-24-2012 04:17 AM
Hi I'm currently trying to change a program that accepts a singe value setpoint input to a range of inputs over time. I have generated this range of inputs from a waveform which has given me a dt value and an array of the y value at each step.
What's my best way to have each row of the array put into the next section at a time interval of dt between them?
Thanks
Gordon
P.S.. Sorry if im missing something obvious I'm quite new to LabView.
10-24-2012 04:24 AM - edited 10-24-2012 04:25 AM
Hi Gordon
Have you looked at design patterns in LabVIEW yet?
You can find these by going to File > New and then in the 'Create New' folder structure navigating to VI - From Template - Frameworks - Design Patterns.
I think the 'Producer/Consumer Design Pattern (Data)' would be perfect for something like this where you want to write your data to a table at a different rate than you're acquiring the data.
Hope this helps
10-24-2012 04:42 AM
Thanks for that..... I gave it a try but it doesnt seem to be working (or atleast im not getting it to work)
Ive attached my file in the hope it makes it clearer
10-24-2012 06:07 AM
Hi
I've taken a look at your code and attached what I hope might be of some use to you.
The idea with the producer consumer loop is that we sample live data in the producer loop at a high rate and then deal with that data at a slower or different rate in the consumer loop.
I think the problem here is that software controlled timing is only going to allow us to get within a 1ms timing accuracy but the dt timings are much smaller than this therefore the program doesn't really demonstrate or make possible what I think you're trying to do. To get timings more accurate then 1ms I think you will need to use some realtime hardware.
Kind Regards