05-30-2008 02:49 PM
05-30-2008 02:54 PM
"four second delays" sound like Virus check La-La-Land or Virtual Memory Allocation.
Ben
06-09-2008 10:13 AM
06-09-2008 11:23 AM
Watch yours app's memory useage using the Windows Task Manager. If vritual memory is climbing or you see a jump in page faults abou tthe time of the pause....
Here is a cut-n-paste of ideas i used to keep a Timed Loop running without interuption. Maybe one of these ideas can help.
Hi All,
After some experiments and punching a lot of buttons, it appears that multiple timed loops can run under Windows with HARDWARE timing.
This does not seem to be possible without adjusting the environment to help this happen.
The following is a list of things that can help you "adjust" Windoze do its job.
1) Set Windows to optimize background services.
Windows by default will attempt to optimize its scheduling to make foreground processes perform well. For single threaded applications this is fine but for LabVIEW, some of its background threads can suffer.
A) Start >>> Control Panel
B) Open "System" and choose the "Advanced" tab
C) In the "Performance" section click "Settings"
D) On the "Advanced" tab in the "Processor Scheduling" section select "Background Services"
E) Save or apply everything.
2) Stop Indexing services.
Windows will by default do file indexing. File indexing is functionality that tells windows to maintain in memory a cache of files on a disk or in a folder. This makes files show up in the Explorer faster and also makes searching for files faster.
A) Start >>> Accessories >>> Windows Explorer
B) Right-click C: drive and select "Properties"
C) On the "General" tab un-check "Allow Indexing Service to Index This Drive for Fast File Searching"
D) Save and apply everything
3) Set LabVIEW priority in Task manager. Windows will by default treat all processes that are ready to run as peers and will share the CPU evenly.
A) Open the Task Manager and select the "Processes" tab.
B) Locate "LabVIEW.exe" in the list of processes.
C) Right -click "LabVIEW.exe" and choose Set Priority >>> High
Note: Setting LV to run at higher than "High" will put it on equal footing with interrupt service routines etc. This could result in the machine "locking up" because LV is using all of the CPU and there is no opportunity to respond to interrupts from your mouse moving.
4) Shutdown Virus Checking. Virus checking gets its hooks into everything!
5) Disconnect Ethernet cable. Ethernet traffic requires intervention by the OS. No cable, no traffic, no distractions.
6) Set the VI properties of the sub-VI that will run the Timed Loop to "Priority = Time Critical" and "Execution Thread = Data Acquisition".
7) Configure hardware Timing source to run at 2000 Hz.
😎 Set "period" of timed loop = 2 (i.e. 2000 Hz clock / period of 2 = 1000 Hz)
Now wasn't that easy?
I have tested the above using the instructor machine with LV8 running three timed loops at 1000Hz for 20 minutes with no missed iterations and no "Finished Late" indications where the loop failed to start on time.
Ben
let me know if any of the above helps,
Ben
06-10-2008 05:12 PM
06-11-2008 07:41 AM
Hi Chris,
What does the Windows Task manger show is using all of the CPU durring those spikes?
Is the task associated with your LV process showing page faults?
Is the number of samples you are processing always the same?
Not giving up on your!
Ben
06-11-2008 08:30 AM - edited 06-11-2008 08:33 AM
06-11-2008 08:46 AM
Still sounds like you are being pre-empted or you are going into a page fail wait state.
Use the "Show Kernal Times" option of task manager to see if the red line is spiking durring the pauses.
Show "Page fault Delta" for the processes and see if that is spiking durring the hits.
Please reply to the other Q's above and did you try all of the stuff I listed in that previous punch list (disconnect network, set priority, ...)
Ben
06-11-2008 08:55 AM
06-11-2008 11:14 AM