LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Camera Control Program - Loop Problem

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?

 

 

0 Kudos
Message 1 of 9
(3,980 Views)

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.

0 Kudos
Message 2 of 9
(3,843 Views)

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.

0 Kudos
Message 3 of 9
(3,841 Views)

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.

0 Kudos
Message 4 of 9
(3,833 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 9
(3,825 Views)

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

0 Kudos
Message 6 of 9
(3,816 Views)

Okay. So I swapped Wait until next multiple with a normal Wait but the problem persists. I am posting the picture of my code.

0 Kudos
Message 7 of 9
(3,815 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 9
(3,812 Views)

Okay Thanks.

0 Kudos
Message 9 of 9
(3,809 Views)