From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need direction on fairly basic program

I am a summer intern helping automate a lab experiment. If I were doing this in C++ I would be able to complete the task fairly easy, however I am using labview and am having trouble adapting to this syntax.

what I am trying to do is give directions to a camera to take pictures at an interval of every 15 seconds. I am to find the length of a certain feature of an image, and this length grows with time and then output this data to a excel spreadsheet, simply place the length along with the time. this is to be done several times (a loop).

I have already figured out the image analysis part through the use of various filters in the NI vision assistant program. I have converted this to a labview VI, and want to insert it into a loop such that it would be completed several times.

can anyone give me any direction as to where to look for more information that is more specific to the task i'm trying to complete?


I have included a diagram that may help to illustrate what im doing, it is rudimentary (sorry).

thanks for any help
0 Kudos
Message 1 of 6
(2,350 Views)
I came from a text-based background too...  I think you'll find that most of the things you're used to in those languages are in LabVIEW, just maybe in a different form.

For your loop, use a for loop structures->for loop.  Wire 200 to the N in the top left corner (number of iterations)

Then place your sub vi in there and then use time & dialog->wait.  Wire 20 000 to the wait function, as it count milliseconds

And you should be set...at least as far as your image is concerned
0 Kudos
Message 2 of 6
(2,340 Views)

When you get something together post it and we'll be glad to help you get it structured right.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 6
(2,333 Views)
here it is, I sincerely apologize for the elementary-ness of this VI. but here it is.


thanks!
0 Kudos
Message 4 of 6
(2,311 Views)
Kirkland,
 
The vi looks good.  All you just need to wire 20000 to the wait vi that is inside your loop and you dont need the wait function that is outside your loop.  The wait inside the loop will cause the loop to wait every loop, whereas the wait outside the loop would just cause one wait when you first run the vi which makes sense because its outside the loop and not associated with it.
 
Brian
 
it should look like this
0 Kudos
Message 5 of 6
(2,295 Views)
Thank you for the reply that was very helpful. How may I tell the VI to take the snapped image to my analysis subVI, and then save the final piece of data from the subVI to something like an excel spreadsheet?

And I apologize if these are questions easily answered through other means, in that case I would appreciate it if you could simply direct me to those means so I wouldn't be wasting anyone's time.

thanks
0 Kudos
Message 6 of 6
(2,282 Views)