Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I count parts with a fiber optic sensor using the NI-1772 and VBAI 2011?

I'm inspecting parts using the NI-1772.  Just after the camera, bad parts are ejected when they pass by a fiberoptic sensor.  I want to use another sensor after that to verify the number of good parts, so that I can be sure the bad parts have been ejected? 

I've tried using the READ/WRITE I/O step to read falling edges in sequence with a calculator step to increment the counts for each inspection iteration.  I get a few counts at start up, and then the counts stop.  It's as if the inspection has looped back to the Acquire Image step before or after the cap is present at the sensor.  

Once this is figured out, I want to reset the count when a preset is reached.  

Thanks,

Rob

0 Kudos
Message 1 of 4
(3,663 Views)

I tried this out, but didn't seem to have any problems with a simple setup after a few hundred triggers. Could you send a small portion of your inspection that illustrates the problem? Are you sure your trigger signal meets the minimum electrical requirements of the ISO Input lines of the Smart camera? How long does your trigger signal stay low before it goes high again?

 

Thanks,

Brad

0 Kudos
Message 2 of 4
(3,652 Views)

Hi Brad,

It seems that the ISO Input is reading all of the falling and rising edges based on the LED, and that the Read/Write I/O step counts all of the falling edges when in configuration mode.  I believe the signal stays low for about 10ms. (It might be important to clarify that I'm not using the camera trigger input for this.  It is a subsequent sensor downstream of the camera.)  I've attempted to attach a section of my inspection. 

Thanks,

Rob

0 Kudos
Message 3 of 4
(3,649 Views)

After looking at your inspection, it looks like you use a variable to keep track of the cumulative count, but you never update the value of this variable. Make sure to use a Set Variable step to update the value of the variable with the result of the Calculator step.

 

Hope this helps,

Brad

0 Kudos
Message 4 of 4
(3,624 Views)