LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Gig-E Camera & DAQ emulation?

I would like to test a program which is written to interface with a Gig-E camera and USB DAQ without having the camera and DAQ connected (for offline debugging purposes.)

 

I was thinking of writing another VI to pretend to be the camera and DAQ which can run in the background on my development machine.

Is this possible or am I barking up the wrong tree entirely?

 

Developing a program without all of the associated hardware attached seems like a problem that a lot of people will have had before me. Is there a standard way to go about this?

 

I don't really want to have to go back throuugh my program and litter it with 'is hardware connected?' case structures, so was hoping for a higher level solution.

 

(I only found this via Google: http://stackoverflow.com/questions/5463616/is-there-a-virtual-dummy-imaq-camera-for-labview and would rather keep all the programming in LabView than start trying to learn Python from scratch)

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

Hi Phil,

 

The IMAQ functions expect an actual camera present and therefore you cannot use another VI to pretend to be the camera as such.

 

However I'd recommend using the "NI Vision Acquisition Express VI" which you can find from the Vision & Motion >> Vision Express palette on your block diagram. This allows you to easily acquire images from a source which could be images in a folder or an avi file. This means that you can import images like those that the camera will be seeing, and once your camera is available, just replace the Express VI with the IMAQ functions for your camera. Another option would be to use the low-level functions such as "IMAQ ReadFile".

 

Another option would be to set up your coding with "Diagram Disabled" structures in place.

Where your current coding expects a camera to be present, drag a diagram disabled structure around this and in the enabled case, put in your coding to read images from file etc. Then once your camera is present again, right-click the structure and "Enable this subdiagram" on the disabled case i.e. your coding that reads from a camera and vice versa for the simulated image code.

 

Hope this helps!

 

Kind regards,

Tori
Student
0 Kudos
Message 2 of 3
(1,702 Views)

Thanks Tori.

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