LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FRAME control while program running.

hey,

Im trying to control frames while the camera and program are running, im not really sure how to do that. I tried using event case but i failed. Any ideas how i can modyfy this program? right now, the program doesnt even run, when i delete the event structure it runs perfectly but im unable to control frames after the run.

frame.JPG

 

0 Kudos
Message 1 of 3
(2,460 Views)

Hi Peter,

in order to make this code running, you need to change the program architecture.

 

I would like you to check this link with Producer/Consumer Architecture, which does really suit to your needs. You will have two parallel loops, the Producer is the source of events (enqueueing elements into the queue) and the Consumer is acquiring data from the camera and parsing events (dequeueing from the queue).

 

Try to apply this hint and if you have any other following question, feel free to ask.

 

Marek S.

0 Kudos
Message 2 of 3
(2,415 Views)

Hi Peter,

 

I believe there are some issues with the overall architecture of your code here. The while loop contains the entirety of your code, causing the IMAQdx session to be opened, attributes to be set, and session to be closed at every iteration of the while loop. It is likely that this is why the code is not functioning properly. Also are both the top and bottom 'Active Attribute' properties setting the framerate? This will also likely cause problems.

 

There are some great examples on how to progressively change acquisition attributes available in the LabVIEW Example finder (Help»Find Examples...). In the IMAQdx section (Browse»Hardware Input and Output»IMAQdx) there are a couple of examples on setting attributes. I would particularly recommend checking out the High Level, Grab and Basic Attributes.vi example. This may be a great example to build of for overall application architecture.

 

 

Matt
NI Community Team
National Instruments
0 Kudos
Message 3 of 3
(2,384 Views)