Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Altering a camera VI

Hi so I'm in college with little to no programming experience (read:intro to matlab taken) and I'm really trying to set up some working VI's but finding it very difficult. Right now I'm working with a GigE series camera. I've located the "grab and attributes setup" VI, got it working with my camera etc. And while it's really a great VI, There's some things I wanna add for my lab. For example, how would one go about adding a function like, record the images and save the file to the desktop? I've been searching through example after example but every time I look at the block diagram I'm still trying to decipher what half of the functions are for. Can someone point me in the direction of better tutorials or articles? Offer an example? Any help is always greatly appreciated and thank you!

0 Kudos
Message 1 of 3
(3,485 Views)

Might have better luck posting this in teh machine vision forum. 

 

If you're using IMAQ, there's a whole host of tools in the Vision and Motion pallete to save, manipulate, and analyze images from smart cameras/framegrabbers.

 

LabVIEW is built for modularity - don't try to make one massive VI that does everything, break it down into smaller bits and code/test/drop in subVI's. Easier to code, easier to test, easier to maintain.  Generally makes life easier.

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

Hi Waylon,

 

I can see why the Grab and Set Attributes example is a bit difficult for you to decipher. It is a rather complex VI that uses several features that you may not be accustomed to, such as Event Structures and Case Structures. This VI will grab an image every time the 'grab' button is pressed. So, if you want to save each image when it is grabbed, you would need to add an IMAQ Write File 2 VI (Functions Palette>>Vision and Motion>>Vision Utilities>>Files) to the end of the 'grab' event on the block diagram. Obviously, unless you wish to overwrite the file each time you grab a picture you will need to change the 'filepath' input. To do this, you can either prompt the user with a file dialog or add the number of times this event has executed to the filepath (see below).

 

FilePrompt.PNG               ...or... 

 

AddIteration.PNG

 

 

In my opinion, LabVIEW's visual nature makes it very easier for beginners. It's just a matter of learning the basic code architecture and how to troubleshoot. If you haven't found it already Context Help (ctrl+h or Help>>Show Context Help) will be a great resource for you in deciphering VIs and determining what specific LabVIEW functions do.

 

I hope that information is helpful!

 

 

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