Prev: The libOSMesa nightmare
Next: error 201025 or 200802
From: Bigga on 29 Jul 2008 13:10 I am having a similar problem to the one described below. I have read several threads and have tried several options to no avail. I get the 200279 error either when I acquire slightly more than 400 seconds of continuous data (then the message disappears for a while) or when I acquire some data, pause the acquisition, and then try to restart it. There are a few options that I could try still like increasing my buffer, but I feel like that will just delay the problem not eliminate it. I have attached my VI. Could someone recommend the best course of action? Should I reformat my VI using the producer/consumer technique? Thank you much! Brad Wind Tunnel Controller.vi: http://forums.ni.com/attachments/ni/170/344857/1/Wind Tunnel Controller.vi
From: Nathan_R on 30 Jul 2008 12:10 Hi Brad, I took a look at your VI and do think that you could benefit from using a producer/consumer design pattern. You might also consider replacing the DAQ Assistant with using the lower level DAQmx VI?s. Using the lower level VI?s correctly will be more efficient than the DAQ assistant. Also to decrease overhead in the VI try to eliminate all or at least most of the local variable usage and the stacked sequence structures. Use data flow to control when things execute instead of the sequences. If you need data transferred between iterations of a loop use shift registers instead of local variables. Local variables are much less efficient than just connecting items together with wires. Below are links to some great resources on these topics. <a href="http://zone.ni.com/devzone/cda/tut/p/id/2835" target="_blank">Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications</a> <a href="http://zone.ni.com/devzone/cda/tut/p/id/3023" target="_blank">Application Design Patterns: Producer/Consumer</a> <a href="http://zone.ni.com/devzone/cda/tut/p/id/7592" target="_blank">Tutorial: Timing, Shift Registers, and Case Structures</a> Let me know if you have any questions and take care. Thanks,
From: Bigga on 30 Jul 2008 17:40 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
From: Nathan_R on 31 Jul 2008 11:40 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,
|
Pages: 1 Prev: The libOSMesa nightmare Next: error 201025 or 200802 |