Re: Using queue's with DAQ cards and general programing???



<img src="http://forums.ni.com/attachments/ni/170/155171/1/Data%20ACquisition.JPG";>
A) Do not create or acquire repeatedly. Do it once before the loop starts and just insert new elements in the queue.
B) Similar to what I said for A. Destroy the task when you leave the loop.
C) Add a wait timer in all loops&nbsp;so they do not run too fast and goble up all of the CPU.
D) Send data two places. Your existing queue sends data to second loop which does logging only (in my revised scheme). Move all of your number crunching from loop two to the display loop at the bottom. Feed&nbsp;the bottom&nbsp;from&nbsp;a second queue you will be feeding as you are doing with your existing "data" queue in the top loop.This will eliminate three queues and prevent your number crunching from gettin the way of your data logging. The user interface should be the only loop that can be hurt number crunching and dispaly updates.
Have fun,
Ben
Message Edited by Ben on 12-05-2005 07:19 PM


Data ACquisition.JPG:
http://forums.ni.com/attachments/ni/170/155171/1/Data ACquisition.JPG
.



Relevant Pages

  • Re: Exiting a windows Program?
    ... Using a forloop as a timer is a really bad idea. ... Brian ... Prev by Date: ...
    (microsoft.public.vc.language)
  • Re: Delay or suspend Application waiting for thread to complete
    ... If I use a loop that includes a ... call to Application.ProcessMessages, all processes, including the timer and ... Prev by Date: ...
    (comp.lang.pascal.delphi.misc)
  • Re: Calling a procedure with loop
    ... would this not be better in a Timer ... >ProcName; ... >but break out of the loop without looping. ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: how can a control for true/false be changed while program is running
    ... Of course in a more general case, you would add another button or local variable and use logical OR between them so the loop can also be stopped either with the timer or manually as needed.Message Edited by altenbach on 09-19-2005 11:13 AM ... Prev by Date: ...
    (comp.lang.labview)
  • Re: question about thread scheduling
    ... I will try what you suggested, the reason that I didn't use the sleep method ... whatsoever to tamper with the timer tick. ... If the NN run in a different thread as the control loop ...
    (microsoft.public.windowsce.platbuilder)