Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

I am throwing down my gauntlet!

Dear Robert-

Would you be willing to post a small example?  I have had an equal lack of success using either LabVIEW or MAX.  But I have exactly your frame grabber and camera, so I have learned what I wanted from this thread:  that it is possible and therefore I am doing something wrong!  (Letting the experts straighten you out is what these discussion groups are all about...)

Thanks in advance,
-Geoff


0 Kudos
Message 11 of 22
(3,702 Views)
In case anyone is still reading this thread....I believe I have an "ah ha", although definitely not a "eureka"

I am still attempting to self-diagnose my linescan triggering problems.  I modified my VI (essentially the LabVIEW example called LL Grab) so that it would read the external trigger input (using IMAQ Trigger Read2) instead of copying an image buffer.  I sent the result of this to a strip chart, just to verify that the received trigger signal changes as I change the frequency of my signal generator.  And it does.  Disconnect the generator, and the chart flat lines.  All as it is supposed to do.

Next test:  I set up for image acquisition in camera Exposure Mode 6, which is supposed to be the mode in which the external trigger triggers a line, but the exposure time is fixed.  After the IMAQ Start command, but before the while loop containing the IMAQ Copy Acquired Buffer command, I stuck in a serial write and read pair to query all the cameras settings and parameters.

What I found:  IMAQ did indeed put the camera into Exposure Mode 6.  But the SYNC frequency (the trigger frequency) is ALWAYS 9900 Hz!! (Well, 9900 +/- 20) Even if I disconnect the signal generator, the lines are still being triggered at 9900 Hz!  If I look at the frame rate I get and do the math, everything matches up.  I am NOT external triggering, and who knows where that trigger rate comes from!

Is this a bug?  Or am I still doing something wrong?  Maybe I am not setting up the trigger correctly???

I am attaching my test VI, but please don't take it at as any example of good diagram layout!  It's just my test VI.

-GN
0 Kudos
Message 12 of 22
(3,690 Views)

I have worked with Dalsa Linescan cameras before and gotten them to work with some nonstandard tricks. I don't know if they changed how their trigger modes work since we released some of the older camera files, or if they have always behaved like this, but the camera requires pulses BEFORE NI-IMAQ sends the serial command to put the camera in a trigger mode. This is a problem because NI-IMAQ sends all the serial commands and then sends pulses, and if you look at the serial response from the camera after sending the Mode 6 command (or some other trigger mode command), it's an error about no trigger signals available.  We are working on updating Camera Advisor to contain this information for Dalsa Linescan cameras, but here are some workarounds:

1 - Don't send serial commands through the camera file. If you unselect the checkbox in MAX to Send Serial commands, this will avoid the error that is usually generated when trying to put the camera in a triggered mode when sending serial commands. Keep mode 6 selected in the camera file though so pulses will still be generated, the camera just won't be in a triggered mode yet since the serial command won't be sent. Then in your application, after starting the acquisition, while triggers are going to the camera, use the low level IMAQ Serial Write to send the command that puts the camera in trigger mode 6. It's important that pulses are already going to the camera at a valid rate. Now the camera will be triggered.

2 - For framegrabbers that allow to route external pulses to the Control Lines (1426, 1427, 1429, 1430), you can configure one of the external lines to route it's signal to CC1. As long as this signal is pulsing before you start the acquisition, you can leave the serial commands from the camera file enabled. You could even generate a pulse train or rearmed pulse on the external line from an application and then you don't even need to wire up anything (jut make sure you configure an immeditate pulse train before trying to configure the acquisition since this is when the serial commands are sent).

Hope this helps and sorry for all the confusion. The Dalsa Linescan cameras make it a little difficult to work with in triggered mode. Let me know if you need more details on how to use the Dalsa camera in eihter of these ways.

Thanks,

Brad 

Message 13 of 22
(3,644 Views)
Brad-

I will try your suggestion.  One clarification please:  configuring the 1429 to send the pulses from the SMB connector to CC1---this is done in MAX?

-Geoff
0 Kudos
Message 14 of 22
(3,628 Views)
Yes. You can configure your Ext. Trigger to be routed to CC1 in MAX for the 1429 by going to the Camera Attributes Tab, unselecting "Use Default Source" and choosing Ext. Trigger 0 for CC1s source.
Message 15 of 22
(3,619 Views)
Brad-

Where do they hide you?  You are the man!  My acquisition rate now goes with the signal generator!  Finally.

-Geoff
0 Kudos
Message 16 of 22
(3,603 Views)

Glad to hear it worked. Haven't been hiding, just don't read these forums as often as I'd like to. Let me know if anything else comes up related to camera files/NI-IMAQ that doesn't get supported well.

Thanks,

Brad

0 Kudos
Message 17 of 22
(3,591 Views)
Brad,

Thanks for some very useful information.

My issue is that I want to set up the camera in triggered mode BEFORE any triggers are obtained so that it has the right exposure time etc. When the camera is started and set up, but before it times out, the triggers will then start (when the stage reaches a set position it enables the trigger signal) so that I have a reliable starting position.

I note that when setting many of the parameters on the camera that I get a return error message that the sync pulse is not detected. This does not impair the correct operation of the camera.

I understand from your post that unchecking the Send Serial checkbox in MAX means that the serial commands in the camera icd file are not sent to the camera when the icd file is read on the camera start command. Is this correct?

When I was developing a line scan camera application under ver 7 I had great difficulty editing the icd file without causing the application to lose control of the camera entirely. This seems to now be resolved in 8.5.1. I have edited the icd file and the application has accepted the new settings. One less thing to stress about.

Cheers,

Peter
0 Kudos
Message 18 of 22
(3,584 Views)
I second Peter's request.  Now that I can trigger the camera, I can move on to the next problem:  setting it up so that it can wait for trigger pulses from the motion system without timing out.

Peter:  Are you using a Dalsa camera?  I get the timeout if no pulses arrive, but I don't get any of these other error messages you mention.

-Geoff
0 Kudos
Message 19 of 22
(3,563 Views)
I'm having the exact same problem using a Basler line scan camera, I'm pretty sure there is something wrong with how MAX is triggering the cameras.
0 Kudos
Message 20 of 22
(3,552 Views)