06-22-2012 01:08 AM
06-22-2012 01:29 AM
Hi Omar,
I can't open your VI as Iam using LV2009.Anyway there is a link handling similar problem.please go through it
And don't forget to post if the issue is solved.
06-22-2012 10:49 AM
One problem you have is that you are creating the DAQmx task and closing it on every iteration of your while loop. That is wrong. You need to create the task before the loop and close it after the loop. What is happening is that you aren't even collecting the data that is occurring during the portion of time where your DAQ task is closed.
You also have some odd code segments in there. Why do you AND a boolean with a True constant? The result is always going to be what is on the boolean wire. Why do you use a select statment where you output a true if the incoming wire is true and a false if the incoming wire is false? The output of the select function is going to be exacting what is on the incoming wire. Both of these are Rube Goldberg Code.
06-22-2012 11:51 AM
My original vi was written using LV2011. I build the exact code on LV2010 and the problem went away, so I think the newer version is causing some type of glitch.
@Raven: Thanks for your input. I'm taking your words of wisdom and applying them to my existing code today.
06-22-2012 12:03 PM
Since you are not looking at any errors that might be generated, your 'loss of data' could have been due to an error. With continuous sample mode, it is not a good idea to write text files in the same loop since it is possible that you cannot do that fast enough. Much better to use a producer/consumer architecture. And be sure to wire up an error indicator.
06-22-2012 01:13 PM
I tried doing the producer / consumer method going off the example vi but I could not get it to work. So instead I went with what I have. Learning that is on my to-do list. Thanks for your input.