10-31-2011 03:20 AM
I have windowns home premium installed pc with twice of the specification of my laptop pc. The only difference - my laptop has windows 7 professional installed.
Running application on laptop runs with no problem. On laptop it crashes and relatively slower. Can I configure to run the application on a different thread?
Kind Regards
Austin
Solved! Go to Solution.
10-31-2011 06:51 AM
When you say it runs relatively slower, do you notice a 100% CPU usage? Maybe a different programming pattern might solve speed issues.
Otherwise check this link: http://zone.ni.com/reference/en-XX/help/371361H-01/glang/timed_loop/
You can set for each timed loop on which core it has to run.
10-31-2011 08:43 AM
You have a misconception/misunderstanding about threads and applications. You don't specify an application to "run in a different thread". You specify a specific task to run as a separate thread. An application can (and usually does) create multiple threads, and most of this automatic. You can explicitly create a new thread for a specific task that may take a while and you want to run it in the background. With an application you can specify processor affinity, which is something else alltogether. This essentially allows an application (if capable) to make use of multiple processors, or it specifically limits the application to a single processor (if, for example, the application was written at a time when there were no multi-core CPUs).
That said, your question cannot be answered without a whole of further details. What is your application doing? Is it doing a lot of calculations? Is it collecting a lot of data? Is is drawing a lot of things? Is it playing music? Do you have other processes running that are chopping up memory? Is it... I think you get the picture.
10-31-2011 09:27 AM
Thanks Smercurio
It is logging at 10khZ then another application controlling PID at 10kHZ. Both application running at the same time using a single PC above 4 HZ processor, 4 GB memory and above 200 GB hard disk.
Could you provide links to tutorials or something for as you mentioned below explicitly create a thread for specific task and also specifying processor affinity.
What are the implicitions of choosing a wrong operating system to run Labview executing code on FPGA at a fast rate?
Are there any guidelines on choosing operating systems and PC to develop user interfaces for high speed control and logging.
Kind Regards
Austin
10-31-2011 12:19 PM
Austin- We have a problem!
Not you and I spcifically but, your choice of words shows a lack of basic programming fundamentals. Thats OK, I'll interprate. What you seam to be discribing is getting data transfered between two application instances. You need a shared variable or a CLR method to do that.
10-31-2011 05:04 PM
My comments were generic in nature, rather than specific to LabVIEW, with the intention of clearing the misconception you had regarding threads. In LabVIEW the closest you can get is to set the "Preferred Execution System" in a VI's properties. For timed loops you can configure which processor to run on, if you have multiple processors/cores. Processor affinity refers to what you do at the operating system level. On Windows, for example, you can open up task manager, and configure a running process to utilize all cores or just specific ones. This applies to the overall process, and not to specific threads that the process may have created.
10-31-2011 05:09 PM - edited 10-31-2011 05:09 PM
What version of LabVIEW?
Bill