Dear raph.yyz,
You won't be able to fully emulate the functionality of MAX in LabVIEW, but it is possible to do some camera enumeration and configuration in LabVIEW. Writing a VI that will use both Camera Link and FireWire cameras will require the use of 2 different drivers: NI-IMAQ to interface with the Camera Link Framegrabber/camera, and NI-IMAQdx or NI-IMAQ for IEEE 1394 to interface with the FireWire camera.
1) FireWire
Both the NI-IMAQ for IEEE 1394 and the NI-IMAQdx drivers contain a VI to enumerate cameras. In NI-IMAQdx this VI is called
IMAQdx Enumerate Cameras and in NI-IMAQ for IEEE 1394 this VI is called
IMAQ1394 Get Interface Files. These two VIs have a significant difference in functionality which is explained here:
Programmatically Finding Attached IEEE-1394 Cameras
http://digital.ni.com/public.nsf/allkb/AD1041C9B4B27240862570DD0068605B?OpenDocument
Though you can use these VIs and the methods contained in the above KnowledgeBase articles and it's related links, you still must configure a camera in the Measurement & Automation Explorer (MAX) before calling these VIs. Configuration in MAX creates an
interface file on the system, and this file is read by the enumeration VIs. Also, By default, the driver is not associated with an IEEE 1394 camera the
first time it is plugged in. The camera will show up as a "Generic IEEE 1394 Camera", and you will need to right click on
the camera and manually assign the NI-IMAQ for IEEE 1394 driver or the NI-IMAQdx driver in MAX. You cannot, as far as I know, programatically associate a driver with a camera. Unless you manually delete a camera file,
you will need to repeat this procedure only one time for each unique
camera connected to your system.
Once you enumerate the FireWire cameras connected to your system, you can use the functionality of the NI-IMAQdx or the NI-IMAQ for IEEE 1394 driver to enumerate and set camera attributes. With the IMAQdx driver, you can save a set of attributes to file using the
Write Attributes VI and then read this file at the start of your VI using the
Read Attributes VI to load a set of pre-configured camera settings.
2) Camera Link
You must use the NI-IMAQ driver with the Camera Link framegrabber and camera. The NI-IMAQ driver does not contain a way directly query the camera name programmatically, but there are ways to do so by parsing the iid and icd files used by the driver:
Programmatically Changing the Camera File for an IMAQ Interface
http://digital.ni.com/public.nsf/allkb/CCC5BB5990AA416786256C23006E687C?OpenDocument
How Can I Programmatically Query the Name of My Camera?
http://digital.ni.com/public.nsf/allkb/A3C14737B1A08C7786256B98006DCB5E?OpenDocument
You may be able to define a preset list of possible cameras, and the ports on your framegrabber that they must be connected to, and then create a session in LabVIEW based on this information. If that is possible, then you can use the functionality included in the NI-IMAQ driver to change and set camera attributes.
So in summary, I don't believe that you could completely emulate the functionality of MAX in your LabVIEW VI, but you can take care of most of the camera configuration and all of the camera attribute settings.
Best Regards,
~Nate