LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interaction betwen the process of operating symstem and labview in one while of 1 us

Hello,

In this moment I am creating one application with one camera that work with speed bigger than 1000fps. Of every frame I do one processing that it is lower of 1us. In the programe there are several threads, one for controller the events, buttons... other for controller one tunable laser and other for the camera. The problem is that I can finish this processing when I move the mouse and lose frames. I use one microprocessor Intel core i3-3220 that have 3.3Ghz and 2 core.

what could I do? I think that with one microprocessor of 4 core and high speed I can solve this.

Are there one solve for reserve one core for the processing of the system?

0 Kudos
Message 1 of 5
(3,081 Views)

Windows is an Operating System that prioritises user interaction over running programs/tasks and it is not a real-time OS with enforced priorities and determinism so if you need to guarantee to handle every frame, you should look at using a real-time operating system.

 

That said, there are some things you can do:

- Upgrading your processor will help, the i3 is at the lower end of the range and if you were to upgrade to an i7 you would have 8 logical cores and also the turbo boost function (which can make fewer cores run faster which can speed-up single-threaded applications).

- You could change your application to be more multi-threaded (for example, enqueing the frames for processing in multiple consumer loops)

- There are other things you can do in the operating system like changing the process priority, disabling any unused services etc.

- You can also set the processor affinity of a process - forcing it to run in certain cores of the processor


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(3,070 Views)

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 3 of 5
(3,068 Views)

You definitely want multi-processing using Producer/Consumer Design Patterns and Queues to pass the data around.  It is probably possible to do what you want, but you do want a "beefier" PC (I agree with Sam's recommendation -- an I7 system won't set you back as much as your camera, I'd guess).

 

I can tell you that we've got a 24-camera system running at 30fps (so the combined frame rate is 720 fps) creating AVI "mini-grabs" whenever an "event" (24 "Event-detectors", one per station) fires -- we save an AVI that lasts 2-3 second before the Event and ends 2-3 second after the Event).  We developed this several years ago, and processors have only gotten better ...

 

I'm not 100% sure Sam is right about "reserving" a Core on a Windows PC.  I know you can do this (and I've done it) on a Real-Time system, but wasn't aware that Windows would "play nicely" and let you do this, too.  [I'm prepared to be shown to be wrong -- it won't be the first time].  Having said that, you could turn your PC into a Real-Time system by taking Windows out and putting LabVIEW RT on it.  You'd need a second PC (which could be the I3 you are currently using) to be the Host machine that "runs the Experiment", with the RT-PC having the Camera and doing the RT Processing (and streaming the data back to the Host using Network Streams, or even potentially saving it locally ...].

 

Bob Schor

0 Kudos
Message 4 of 5
(3,028 Views)

Yeah, I'll admit I've never played around with it seriously and I don't know if it has other unforeseen side effects, but you can tell a process which cores it should run on:

2015-10-06_12-06-37.png

 

One of the things I have noticed though is that cores don't tend to be evenly loaded - some cores usually have higher usage than the others.

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 5
(2,987 Views)