03-13-2006 03:44 AM
03-16-2006 02:06 AM
03-16-2006 03:51 AM
Hi Peter
Thank you for your reply.
It seems to me that since LabView has no problems running on multiple processors my program will no doubt be running faster on a dualcore cpu - even if i dont mess around with priorities.
However I would like to give the important part of my program a high prority, so that other applications will be on hold. If I set the priority to "high" is there a chance that the computer will crash? Usually the important part of the program will be running for something like a minute at a time - but at other times it needs to run for up to 10 minutes.
I have attached my program and one of the subvi's. It is in the second frame that the important things goes on - image grabbing and analysis. The while loop has to run at 40 Hz so I wondered if it is possible to set the priority high in this frame only and then reduce the priority at other times - thereby giving cpu time to other applications to run?
Best regards,
Simon Viftrup
03-16-2006 04:09 AM
Hi again
After looking into priority and trying to change it in the task bar I guess setting the program for high priority at all times will be fine (since it only matters when the program actually needs the cpu). My program really only needs computation time during the image analysis.
I tried extracting the set priority call from your vi, is it enough if i just add this small code (see attached vi) to my program?
Best regards,
Simon Viftrup
03-16-2006 05:16 AM
Hi Simon,
You're right. It should be fine just setting the priority high at all times. Your attached code should work fine. You can always check in Windows Task Manager. Jut right click your process and see status under Set Priority. This also enables you to control execution priority, but you would have to set it each time it is run. Actually, it is also possible to set the affinity, when right clickin the process.
With a dual CPU system, your code should be able to run faster. Not twice as fast, but maybe something like 30-50% faster.
Best regards,
Peter
03-16-2006 05:42 AM
03-16-2006 06:11 AM
03-16-2006 07:06 AM
Thanks Peter
It works perfectly!
03-16-2006 07:12 AM
03-16-2006 07:24 AM
Well there is one more thing.
I took out the central part of the program. It basiclly grabs an image, and does a blob center analysis. The issue is that our equiptment is able to run at 40Hz, but this program can only run at about 38Hz! So either I need to somehow make it run faster or i need to upgrade my pc. Its running on a AMD 64 3000+ cpu with nforce4 motherboard, and 2*512 DDR memory in DUAL. Will the obtainable repetition rate be proportional to the cpu clock rate (on an AMD 64 cpu)? Will this vi be able to efficiantly use a dual cpu?
The cost of a dual amd cpu is very low and we need a new computer anyway so upgrading is not a problem.
Best regards,
Simon