07-30-2008 04:29 PM
Okay. Thank you. Do you have any suggestions as to why it would only cause problems around 425 seconds into the run or when the acquire mode is started up again after a period of pause? I read the links that you sent me, but I still had a few questions on implementation. First, I understand your point about eliminating variables, but I don't see instances where that is possible. Also, can you suggest instances where the shift register might come in handy or at least suggest an example vi. Lastly, how do I use the DAQmx? How do I add it to my block diagram and do I have to add all of those different subvi's to control each aspect of the acquisition? I'm using version 7.1. Could that be a contributing factor? Thanks! Sorry for the basic level questions, but unfortunately, that is where I am at.
Brad
07-30-2008 04:31 PM
07-31-2008 10:20 AM
Hey Brad,
Yes you would want to put the data acquisition part into the producer loop and the rest of your code in the consumer loop. Also if you do not use the DAQ Assistant then you will need to use the different DAQmx subVI’s to set up and read from you data acquisition task. The benefit to using these is that you can run the task creation and configuration VIs(create channel, timing, etc..) once before the producer loop then only have a DAQmx read VI in the producer loop and finally close the task after the loop finishes executing.
As far as shift registers go you can definitely eliminate all the array local variables and replace them with a shift register for the array. This will also let you remove the large stacked sequence structure that is used to initialize the array, because you can initialize the shift register storing the array using data flow instead of using a sequence structure to initialize the variable.
Let me know if you have any questions.
Thanks,