07-25-2011 08:55 AM - edited 07-25-2011 08:56 AM
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.
08-01-2011 09:11 AM - edited 08-01-2011 09:13 AM
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.
08-02-2011 06:08 PM
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.