08-11-2011 02:15 PM
Hi all,
I created this LV program to control two cameras at a time. The loop has been setup so that images can be acquired at a specific rate (frames per second control). However this loop doesn't seem to work. Can someone help me on how to fix this?
08-11-2011 05:12 PM
I don't have IMAQ.
In what way doesn't it work? You need to provide much more detail (e.g. wrong times, computer crashes, images upside down, loop never completes, etc... ).
If you have problems with the loop logic, strip out all IMAQ stuff, set proper default values for all controls, and attach the program once more.
08-11-2011 05:16 PM - edited 08-11-2011 05:17 PM
I created a timed loop using the Wait Until the next ms VI, so it can capture images according to the frames per second that the user inputs. However this doesnt seems to work. For example, if the frames per second is set to 1 , it captures one image in every two seconds rather than one every second.
08-11-2011 05:32 PM
If you are using a timed loop, you don't need a wait. Are you using a plain loop?
I get exactly 1000ms using your code and a rate of 1.
08-12-2011 07:18 AM
Post images of your code so we can look at it with donwload, transfer to machine, boot another with the right verions, transfer file open agian argh!
But in general...
THe Wiat until next ms multiple is seldom found in my code since it does not work like most people would expect.
If your timer is set for 100 msec and you code takes 101 msec to execute the resulting delay will be 200 msec since it is the next multiple. Similarly if the ms time just clicked past an even multiple. Use the normal wait.
If you are using the Express VI thingy it is not re-entrant so combining two in the same code will add their delays together.
Go with Christian's suggestion to use a timed loop and post code IMAGES if you still have trouble.
Ben
08-12-2011 11:00 AM
No, I am not using a timed loop. I am using a normal while loop and I am timing it using the Wait VI. But the program doesn't work in the sense that when I set the frames per second to be 1, it takes roughly 1700ms to get a picture and when I set the fps to 2, it roughly takes 1100 ms to get a picture. What do you think the problem might be? I am also attaching the picture of my code.
thanks
08-12-2011 11:02 AM
Okay. So I swapped Wait until next multiple with a normal Wait but the problem persists. I am posting the picture of my code.
08-12-2011 11:07 AM
You probably wan tto move this question to the vision forum since it sounds like it the speed of the image acq that is slowing you down.
Ben
08-12-2011 11:09 AM
Okay Thanks.