Fi-FIFO-Fum...

Eric Nelson

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Randolph, NJ
Posts
4,346
I'm working on a quickie program for a camera inspection system. Product traveling down a conveyor is inspected with a vision system. If the product fails inspection, it is pushed off the conveyor by a cylinder. Let's see how well I can 'draw' the layout.

+---+ +-+
| | VISION | | REJECT
| | SYSTEM | | PUSHER
+---+ +-+
/_\ __|__
----------------------------------------------------------------------
+---+ +---+ +---+ +---+ +---+
| | | | | | | | | |
+---+ +---+ +---+ +---+ +---+
----------------------------------------------------------------------
FLOW -----> ^ ^
INSPECTION REJECT
POSITION POSITION


Hey, that turned out pretty good!... :)

The camera gives either a "PASS' or "FAIL" signal, which gets placed in a FIFO stack (1=PASS, 0=FAIL) each time I receive a signal from the camera. The sensor at the reject position unloads the FIFO stack, and if the value is "0", the reject cylinder fires. Simple enough.

Everything works as planned, except one thing that bugs me. The 'unload location' from the FIFO stack retains the final value when the stack position reaches zero (nothing in the stack). I realize this is how it's supposed to work, but it's not how I want it to work. IOW, if the last part through the system is a failure, sucessive triggering of the reject position sensor fires the reject cylinder. The LOUSY part is, if the last part through the system was ACCEPTED, sucessive triggering of the reject position sensor DOESN'T fire the reject pusher... banghead

My concern is that I'm relying on the "PASS" and "FAIL" signals to load the FIFO stack. If I get NEITHER, and the FIFO stack empties with an accepted part as the final 'inspected' part, failed parts have the ability to get through. I would rather reject everything if the camera fails to give a result.

Keep in mind this is a VERY low-end system, so I don't have options like 'stop the conveyor', 'sound an alarm', etc...

I have tried using the inspection position sensor to advance the FIFO, then sticking the PASS/FAIL results in the correct location within the stack (the camera results come AFTER the trigger signal), but had weird results.

I also tried forcing the reject to fire every time whenever the stack position = zero, but that caused it to reject the last part through the system, even when it was flagged as good. This happened even when I placed the FIFO Unload (FFU) instruction AFTER the reject sequence... :confused:

One other 'odd' thing...

The FIFO Load (FFL) instruction is supposed to execute only on a false-to-true transition. Any idea why I had to use one-shots? Without them, it fires every scan. Something to do with using inputs rather than internal bits?... :unsure:

Attached is the (tiny) program, including a PDF version for Casey!... ;)

[attachment]

beerchug

-Eric
 
And Here's a Picture...

Proof of how 'low-end' this system is. I built 2 of 'em last night in a few hours... :nodi:

[attachment]

These were all customer supplied components, so i didn't have choice of brands. If you ask me, that Phoenix power supply is friggin' HUGE for only a 60W supply. The DVT breakout board ain't too 'compact' neither... :rolleyes:

beerchug

-Eric

dsc00075.jpg
 
Inspection system

Eric,

If all you want to do is accept/reject then you would be better off using a shift register, load a 1 for accept and a 0 for reject. Then if a 0 is detected at the regect position then it rejects it.


John.
 
There is no 'shift' pulse from say, an encoder on the conveyor (the RIGHT way to do this), so I don't see how a shift register would be easier.

Supposedly (I haven't seen where this is being installed), the conveyor runs slow, and there's plenty of gap between products. BUT, the number of products between the inspection and reject positions will vary, so a FIFO fits the application well.

I use shift registers all the time (and rarely use a FIFO) so I would naturally think shift register first. In this application, a shift register seemed like the wrong approach, but I've been wrong before... :confused:

What you see in my 'drawing' is what I have to work with. No chance of adding additional sensors. The program as it exists functions fine, I just didn't like the "what if the camera gives NO result" scenario I explained.

beerchug

-Eric
 
being ive seen your posts before,,i figured you werent using the bit shift for a good reason,,so i was kind of replying to your post more for my education than anything else,,(though i did have it in the back of my head the vision of being the hero of the day with a simple solution!!LOL,,)

on that note,,is there a way to determine the situation you dont want to happen,(and if im understanding what your problem is),,just load the stack to force it to be in the state you want it to be in,,i know it sounds kind of fixing a symptom,,instead finding a cure,,but is that viable?

in the meantime,,im going to go look up FIFO and see if i can completely understand your dilemna,,

in the meantime im going to make my first question post and hopefully ill be clear enough to see how make what i want to work,,work,,

Fred Raud

ps,,i just figured out what you meant by shift pulse to trigger the bitshift!
 
Eric,

What happens if you invert the pass/fail values? 0=pass, 1=fail.

Or, can you increase your stack by one position and place your reject pusher up one bit in the stack? Then who cares what the last bit is?
 
Fred Raud said:
(though i did have it in the back of my head the vision of being the hero of the day with a simple solution!!LOL,,)

I'm fully expecting to have a 🙃 moment when someone solves this, but a shift register wasn't it. I appreciate your suggestion though. You never know, that could very well have been it!. Then you'd have been my hero!... :cool:

Fred Raud said:
on that note,,is there a way to determine the situation you dont want to happen,(and if im understanding what your problem is),,just load the stack to force it to be in the state you want it to be in,,i know it sounds kind of fixing a symptom,,instead finding a cure,,but is that viable?

My stuffing a zero into the unload location when position = 0 was my 'quick fix'. Too bad it didn't work... :(

beerchug

-Eric
 
elevmike said:
What happens if you invert the pass/fail values? 0=pass, 1=fail.

Then I keep the bad parts and throw away the good ones... :eek:

Only kiddin', Mike. I think I know what you're getting at, but I don't see how it would make a difference in this case

elevmike said:
Or, can you increase your stack by one position and place your reject pusher up one bit in the stack? Then who cares what the last bit is?

Yup, that would be a piece of cake in DirectSOFT. A-B's FFL and FFU instructions are much simpler to set up, but it looks more difficult to stray from their 'intended' use. I did try screwing around with the stack, but I'm not as fluent with RSLogix, plus I'd rather not make this program more complex than necessary.

By the way, what the heck are you doing up at 3:30 in the morning????... :oops:

beerchug

-Eric
 
Hi Eric !

I have done something similar on a rotary indexing machine to
skip particular operations if fault is detected at one station. I had used SET/RST FLAGS & counters for this purpose. I will now try the same with shift register.( PLC - FX1N )
I have seen the pic. you posted on site. Just for curiosity sake

-- What is that DVT board ? I see some RS232 also ?
Pl. let me know about this equip.
Thanking you in advance!

regards

asp
 
elevmike said:
Ok so I'm not familliar with AB. So what's EN, DN, and EM to the left of the FIFO instructions mean?

EN - Enable Bit is set on false-to-true transition of the rung and indicates the instruction is enabled.
DN - Done Bit, when set, indicates that the stack is full.
EM - Empty Bit, when set, indicates FIFO is empty.

I did try to make use of these, but found nothing useful.

elevmike said:
I'm thinking along the lines of changing LENGTH to 10, and POSITION to 1. ????

Again, I know where you're headed. Always keep 1 item in the stack, and never let it go empty. Now, I'm wondering how I can do that... :unsure:
Hi reachasp

Again, a bit shift needs something to shift it. I don't see that 'something'.

The DVT board is simply a breakout board for the camera I/O. More info HERE. The "RS232" is not an RS-232 connection. That's the connector for the camera. This board is just a "DB-15HD to terminals". It has provisions for opto-isolators on the I/O, making it HUGE. They used to sell a nice, small board that was non-isolated... :(

beerchug

-Eric
 

Similar Topics

I am not sure if this is possible but if there is a way, you guys would be the ones to know. I am currently working on a project where we are...
Replies
7
Views
184
Hello all, I'm using a 5069-L330ER in a project and I need to essentially capture some data that will be shown as a trend on a screen. The data...
Replies
9
Views
942
Hello! I have a network of conveyors bringing raw product to 4 machines. A sensor in the hopper of each machine calls for more product. I'm...
Replies
15
Views
5,689
Hello everyone, has anyone out there ever made a FIFO using an FFL and FFU instructions on a Micro800? I have tried setting it up just as I would...
Replies
9
Views
3,063
I have a bottle capper that is using an encoder and FIFO logic to track the free standing bottles passing through a bottle capper. I have checked...
Replies
31
Views
11,603
Back
Top Bottom