From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-05-2005 05:13 PM - edited 12-05-2005 05:13 PM
Message Edited by Azazel on 12-05-2005 05:15 PM
12-05-2005 05:40 PM
12-05-2005 07:18 PM - edited 12-05-2005 07:18 PM
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 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 the bottom from 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
12-06-2005 07:57 AM