02-12-2008 11:58 AM
02-13-2008 07:01 PM - edited 02-13-2008 07:01 PM
If you are using Windows XP, the files for Camera Info, Camera Support, Data and text-based Examples (MSVB.NET, MSVC, and VB) are installed to
x:\Documents and Settings\All Users\Documents\
National Instruments\NI-IMAQ\, where x is the letter of the drive where NI-IMAQ is installed.
· If you are using Windows Vista, the files for Camera Info, Camera Support, Data and text-based Examples (MSVB.NET, MSVC, and VB) are installed to
x:\Users\Public\Documents\National Instruments\NI-IMAQ\, where x is the letter of the drive where NI-IMAQ is installed.
· The files for MSVC include, 32-bit MSVC library, and 64-bit MSVC library are installed to
x:\Program Files\National Instruments\Shared\ExternalCompilerSupport\C\, where x is the letter of the drive where NI-IMAQ is installed.
02-13-2008 10:30 PM
Ok, that helps, but leads to another problem. Appearantly the code is expecting specific answers from the camera. I've created a camera file and it shows up in max so that I can select it. However in the example code it requires a name (the one in the example code is cam0) and I'm not sure how that is selected. I've tried using the name of the camera that I saved, but all I get from the open camera (the first one in the sample programs showing a simple grab) is that the camera is not found. Our camera is very dumb, it is commanded over the serial port and sends up 3d images. There is no auto configuratoin information from the camera. What I need to do is set up some buffers and send commands to the camera that will cause it to send up images.
Is there some information on exactly how to configure the card to accept images from the camera by triggering on fval and grabbing an image.
Thanks,
Larry
02-14-2008 07:15 PM
02-14-2008 08:50 PM
02-15-2008 01:38 PM
02-19-2008 11:36 AM
I've looked at the ll type programs and still have basic problems.I have defined a camera file and assigned it to "img0" in max, but if I try to open that camera in a c file it gives me a "camera not found". Then if I go back to max it says there is no camera file and shows an x. The only way to get it back is to reboot, then max is pointing back to a cohu camera.
I've also two other major problems. I can't find a way to assign the serial port on the frame grabber card to a com port, nor can I find code to allow me to program the serial ports on the card. How do I program the serial channels on the 1428 card.
The other problem is the 4 discrete lines. I can't find any code to allow me control of those lines. We use them to control various aspects of our camera and I need individual control of the 4 lines. Is there code for this.
Is there some documentation that tells how the code expects a frame link camera to work. All I want is low level control of the camera link interface and as far as I can tell all of the code is only working with high level commands. Is there some lower level code that I can work with?
Thanks,
Larry
02-21-2008
06:34 AM
- last edited on
04-23-2025
04:57 PM
by
Content Cleaner
Hi Larry,
The low-level function listed in the IMAQ function reference help (which can be found in Start » Programs » National Instruments » Vision » Documentation » NI-IMAQ) may be what you are looking for. They are as low-level as our frame grabber boards allow you to get. But fundamentally it sounds as though the camera is not configured properly for the Camera Link interface - are you sure it is fully compliant with the interface standard? You said it was a custom 3D camera, so I suppose there is no model information for the camera system?
Also, are you sure that the camera file you have created is properly set up? You might want to try basing your file off of the default file for the 1428, and/or by using the Camera File Generator tool. What kind of format is the 3D camera expected to return, 2D "depth" images (monochrome heightmap)? If it is supposed to return 2D-type images when it acquires, you should still be able to perform test acquisitions in MAX with it. If a test acquisition in MAX does not work, you likely will not get it to work in your programming environment, either.
For the serial lines, if your camera accepts the serial commands sent over the camera link bus (on pins 6, 19, 7, and 20 in the 26-pin MDR connector as shown in the PXI-1428 manual), the commands such as imgSessionSerialWrite() and ...SerialRead() directly access the frame grabber's serial interface and do not require remapping the device to a virtual COM port on the system. These functions are fully documented in the IMAQ function reference help, listed under Low-Level Functions » Serial Communications Functions
If your camera, however, requires you to use a separate 9-pin RS232 connector for serial communication and you need to use your computer's onboard parts, that is a different implementation. You could then use our NI-VISA drivers or other 3rd party drivers that allow you to access your onboard serial ports directly.
For the digital I/O lines, again the IMAQ function reference help file is your best bet. If you browse under High-Level Functions » Signal I/O Functions, you will see all the functions related to operating those digital I/O lines. In particular, the function imgSessionTriggerDrive2() is probably what you want, with the constants IMG_TRIG_DRIVE_ASSERTED and IMG_TRIG_DRIVE_UNASSERTED used as constants for the "source" parameter to drive the lines active or inactive at your discretion. Your IMAQ examples directory also has a subfolder called "Signal IO" which solely deals with the digital IO lines (also often called trigger lines, though you can assert them high and low whenever you want).
02-21-2008 11:50 AM
Unfortunately there is no "standard" format for our camera. It sends back some very complicated information which can be transformed into a 3d image. The information bears absolutely no relationship to an "image" in any framegrabber vocabulary. That is why I need the low level functions. The only function for the frame grabber is to bring the information into the computer in a timely manner. All of the imaging is done with special software once the information is acquired.
As for being framelink complient, the signals are completely complient. As I said we have it working with two framelink grabbers already (imperx and bitflow). I did use the camera file generator to create the camera file, but as I said, since the information bears no relationship to an image. I just need to establish a buffer, set up the grabber to trigger on Field, pay attention to Data valid and bring the data in when an image goes by.
Before we went to the framelink interface we used your NI PCI-6433 for the transfers. What I really want is the equivalent low lever interface I used for that card. I really want to be in charge of the buffer sizes and the acquisition of the images. As I said, I've had no real trouble finding low level routines for imperx and bitflow.
However bitflow did have to create a camera file since their camera editor program didn't have low level assignments (like assigning the trigger function to the rise of Field).
Yes we use the serial ports on the framegrabber interface for the communication. Imperx turns it into a virtual com port, bitflow uses routines like yours (I just couldn't find yours until you pointed me in the right direction).
Thanks,
Larry
02-24-2008 12:12 PM - edited 02-24-2008 12:14 PM