Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

triger each line mode doesn't work

SETUP: PCI-1428, ATMEL camera M2CL2014.
ISSUE: I need to trigger external device by External Signal.After that the device sends trigger pulses for each line to camera. Next the image consisting predefined aquisition window is displayed. Next the next frame is performed with trigger device signal on the begining.
PROBLEM:
I cannot find any example with external trigger for each line. I tried to configure trigger in the way:
INIT->CONFIGURE TRIGGER(ExtTr0, TrigEachLine)->GRAB SETUP->ACQUIRE.
This way makes somehow internal triggering, because the image is refreshing (while loop with ACQUIRE) itself.
PROBLEM2:
Aviiva M2CL2014 support trigger and integration time controlled by one input. This would be the best for my app. How to implemen
t this feature with PCI-1428 and LabVIEW?
0 Kudos
Message 1 of 17
(6,141 Views)
Hello,

Have you tried examining one of the triggered acquisition examples that shipped with NI-IMAQ? I suggest looking at either LL Triggered Ring or LL Triggered Snap. These, and other triggering examples, are located at:

C:\Program Files\National Instruments\LabVIEW 7.1\examples\IMAQ\IMAQ Signal IO.llb

You could modify the IMAQ Configure Trigger Vi such that "Trigger Action" input is set to "Trigger Each Line."

If your camera supports the combination of a trigger signal with an integration time signal, then you can set this up by either modifying the camera attributes in MAX or in the ATMEL camera utility ComCam. You could also do this programmatically by using the IMAQ SetAttribute function. To use that function, you have to check the camera file to
find out the attribute name and what values can be used.

Try modifying those examples and let me know if you have any additional questions on this issue.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 2 of 17
(6,137 Views)
I already use example LL Triggered Ring, but with trigger each bufer option since trigger each line still doesn't work. It is strange, because triggered pulses in bufer trigger works fine, in trigger each line mode it takes trigger pulses internally.
I changed the example by inserting "Set Camera Attrb" between Trigger and Start, changed trigger option to "trigger each line". Is there anything else I should change?
0 Kudos
Message 3 of 17
(6,137 Views)
...one more thing: I set the attribute "Synchronization" to "External ITC".
0 Kudos
Message 4 of 17
(6,136 Views)
Hello,

Are you using the Set Camera Attribute function to set the triggering property for the camera? You should change this setting, for this example, by deleting the existing "Trigger Action" input to the IMAQ Configure Trigger and creating a new constant for that input. From the list of possible values, select "Trigger Each Line (linescan)." That should be all that you have to modify for this VI to set up your trigger.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 5 of 17
(6,126 Views)
Hello,

I have problem with PCI-1409 and analog line-scan LC3021-PGN (from PerkinElmer) and LabWindows/CVI.
LabWindows/CVI 7.1, NI-IMAQ 3.1.1.

I have modified the "VHA Ring" example from:
C:\Program Files\National Instruments\CVI71\samples\IMAQ\Signal IO

and I replaced function:
imgSessionTriggerConfigure2 (Sid, triggerType, triggerNumber, IMG_TRIG_POLAR_ACTIVEH, 5000, IMG_TRIG_ACTION_BUFFER);

by the:
imgSessionLineTrigSource2 (Sid, triggerType, triggerNumber, IMG_TRIG_POLAR_ACTIVEH, 1);

But the function imgSessionLineTrigSource2 has no effect.

Has someone some expirience with each line triggering of line-scan camera in LabWindows?

Thanks for any answer

Lukas
0 Kudos
Message 6 of 17
(5,959 Views)
Lukas,

Hello,

The last parameter that you set for that function is a skip count value. That parameter specifies how many triggers will be skipped before acquiring image data for the next line. Therefore, for an image with 480 lines, you would have to have 960 triggers to acquire the entire image. If you want for each trigger to trigger a line, you should set this last parameter to zero. That way, you would only require 480 triggers to acquire a full image.

What type of trigger source are you using for this acquisition? Have you verified that the trigger lines are toggling? Try using a scope or some other measurement tool to verify that the trigger line is actually changing from digital low to digital high.

In the future, please generate a new Discussion Forum thread for new questions.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 7 of 17
(5,947 Views)
Hello Scott,

thank you for your answer.

> The last parameter that you set for that function is a skip count value. That parameter specifies how many
> triggers will be skipped before acquiring image data for the next line. Therefore, for an image with 480 lines,
> you would have to have 960 triggers to acquire the entire image.
I know this. I am sorry I did not expained it more. I tried also the zero parameter, but the problem is that line triggering does not work at all.

> What type of trigger source are you using for this acquisition? Have you verified that the trigger lines are
> toggling? Try using a scope or some other measurement tool to verify that the trigger line is actually changing
> from digital low to digital high.
I use output signal from PCI-6221, the CTR0. This output is going well because the triggering by using of function "imgSessionTriggerConfigure2" is going properly (But triggers all frame of lines configured by MAX). Problem is with function "imgSessionLineTrigSource2".

BTW: I use NI-IMAQ 3.1.1.

I will try to use also older NI-IMAQ (functions without nr. 2) at the end.

Best regards


Lukas M.
0 Kudos
Message 8 of 17
(5,929 Views)
I enclosed also the 2 vi's from LabView 7.1. One is made with NI-IMAQ 3.0.1. (and with old function Trigger) and one is made with newest NI-IMAQ 3.1.1.
If I set first trigger to "Trigger each buffer" the triggering is going OK but if I set it to the "Disabled", the secong tirgger has no efect if set to "Trigger each line (line scan)".

Could you tell me please, if something is wrong on vi's?

Lukas M.

BTW: The CTR0 on PCI-6221 is connected to the TRIG1 on PCI-1409.

Screenshot: http://ldip.kam.vslib.cz/images/trig_each_line.gif
vi with NI-IMAQ 3.0.1. http://ldip.kam.vslib.cz/images/trig_each_line_old.vi
vi with NI-IMAQ 3.1.1. http://ldip.kam.vslib.cz/images/trig_each_line_2.vi
0 Kudos
Message 9 of 17
(5,920 Views)
Lukas,

You should not use the same trigger to trigger individual lines that you use for triggering the buffers of your ring acquisition. Try using a different trigger line for that function. Disabling the trigger line may cause you to miss trigger information. Do you need for the acquisition to be a ring acquisition? If so, are you intentionally trying to trigger each buffer? If this is the case, use a different trigger line for the buffers. Is your application going to be completed in LabVIEW or in CVI?

If you are not specifically trying to perform a ring acquisition and you don't need to trigger the buffers, I would suggest using a triggered grab instead of a triggered ring.

Try that and let me know if you have any additional questions on this issue.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 10 of 17
(5,902 Views)