Fi-FIFO-Fum...

Indirect?

Eric,

You may or may not have followed my thread about rejecting parts down line on a flat belt conveyor. We used indirect addressing but I don't know if the 1000 has that option.

Bob

Edit. I just check and the 1000 doesn't support indirect addressing.
 
Last edited:
Hi Eric,

I have done something similar before.

The option I made was the "vision system" outputs another pulse no matter it is either pass or fail. And I used its falling edge to do the shift of the BSL.

Good Luck
 
Eric-- I use FIFOs all the time but I can't "see" what's causing you grief until Monday when I could load a processor and check the program. One thing I noticed is you load the stack with "1" and "0". You're only concerned with rejected parts, which I would label "1". Then when B3/0 goes FALSE, MOV a "0" into the stack. This has the effect of resetting (clearing) stack until the next rejected part. We do this on two lines so I know it works. I can send logic in the morning if you don't get it tonight.
As for the triggering, I use cycle/dwell timers to trigger my FFL/FFUs. I don't know why they are triggering improperly unless the sensors are blocked for a long time.
 
Eric Nelson said:
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.

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:

-Eric [/B]

I stop read everything but for this phrase.

Complementary intrutions, of pairs.
Remember interlook, not work simultany.

They must be interlook. To process not to scan simultany in the two instrutions same SCAN.... Always, interlook in SCAN pair one instrution(FIFO IN) , and SCAN not pair other instrution (FIFO DELETE)


Very good, sunday... you like work, you like automation..and, also I
 
OK, I'll take a shot at it. I will ASSume that the ulogix FIFO is like others in the A-B family and operates on words. I'll further assume that you're doing something like: FIFO/0 = pass/fail output of the camera.

What about this?

1. Since, from your description the camera provides a signal for either result, why couldn't you load FIFO/0 with a '1' if the result is "FAIL" and load FIFO/1 with a "1" if "PASSED"?

2. Load FIFO/2 with a '1' whenever the inspection sensor is triggered?

This way when the unload occurs FIFO/2 tells you a real object is present and if neither of FIFO/0,1 is on then the camera did not read.

Is my understanding correct?
 
Eric,

I'm not familiar with the FFL/FFU instructions. But, I think I get the gist of it. I have one question, though. Like Doug_P, I wondered why you're loading "Source = 2" on rung 5.

You said you are having a problem with the FIFO table retaining the last value, so here is what I thought you could try. I hope this can still be done with FFL instructions.

1. Instead of loading a fixed number into the stack on rung 5, load a serial number. (You may want to use serial numbers for your parts at a later date, anyway). Use a CTU instruction after rung 4 and have it reset itself to 1 after some maximum limit (to avoid an overflow). If the part is good, load the serial number. If it's bad, continue to load a zero.

2. Before rung 10, compare the value taken out of the stack to the previous value unloaded. If the values are the SAME or zero, fail the part. This way, if the last good part is stuck in the que the machine will fail parts (as you suggested).

AK
 
You could build your own FIFO if you used 1 for failed instead of zero. When a part is inspected load it into the highest non-zero address in the stack. When a part is at reject unload the highest address in the stack and shift the rest up.
 
Hope I don't forget anybody...

Sorry guys... Late start for me today (but HEY, it's a S-U-N-D-A-Y!). Last week's installation sucked the life out of me, so I had to catch up on sleep. Anyway, I'm back... :D

Bob O said:
You may or may not have followed my thread about rejecting parts down line on a flat belt conveyor.

Yes, I did. That was very similar to my application
chavak said:
The option I made was the "vision system" outputs another pulse no matter it is either pass or fail. And I used its falling edge to do the shift of the BSL.

I could do that, but IMO, you wind up in the same boat. If the camera fails to give you the "inspection completed" signal, you don't advance the shift register... :(
Rube said:
Eric-- I use FIFOs all the time but I can't "see" what's causing you grief until Monday when I could load a processor and check the program.
Once you do, it will be easy to reproduse. Stick a few "PASSES" into the stack (I:0.0/1), then unload them with the reject input (I:0.0/3). You'll see that the reject output (O:0.0/0) does not fire (as it should), yet once the stack is empty, the reject output CONTINUES to NOT fire with additional reject input signals. This is the heart of my dilemma. Otherwiase, everything works perfect.

Rube said:
One thing I noticed is you load the stack with "1" and "0". You're only concerned with rejected parts, which I would label "1". Then when B3/0 goes FALSE, MOV a "0" into the stack. This has the effect of resetting (clearing) stack until the next rejected part. We do this on two lines so I know it works. I can send logic in the morning if you don't get it tonight.

Wouldn't I wind up with 'extra' data in the stack? You're probably on to something, so please elaborate!

Rube said:
As for the triggering, I use cycle/dwell timers to trigger my FFL/FFUs. I don't know why they are triggering improperly unless the sensors are blocked for a long time.
I tried to stay away from using a timer as a clock because I was comcerned about the starting and stopping of the conveyor. I have no way of knowing if the conveyor is running, or how fast it is travelling at any given time. My fault really, as this project is basically a favo(u)r to one of my vendors. He just asked me to throw this together for one of his customers. I didn't ask enough questions up front, so there are many details I'm not sure about. That is the main reason I'm trying to keep this as simple as possible. He has exactly ONE value to fiddle with. Setting the reject duration timer's preset. I added the debounce timers (which will all be set to zero at shipment) in case he needs the ability to ignore 'noise' from the photoeyes. I honestly feel my 'problem' will not BE a problem, but I just didn't personally like it, so that's why I'm here.
JohnW said:
Have you had a look at this thread?
Yes, and I followed it while the discussion was going on. I will dig into it more later. Thanks.
dandrade said:
They must be interlook. To process not to scan simultany in the two instrutions same SCAN.... Always, interlook in SCAN pair one instrution(FIFO IN) , and SCAN not pair other instrution (FIFO DELETE)
I was going to interlock them, but since load and unload can occur at any time (even concurrently on the same scan), I felt an interlock would PREVENT proper operation. Am I missing something?... :confused:
Doug_P said:
1. Since, from your description the camera provides a signal for either result, why couldn't you load FIFO/0 with a '1' if the result is "FAIL" and load FIFO/1 with a "1" if "PASSED"?

2. Load FIFO/2 with a '1' whenever the inspection sensor is triggered?

This way when the unload occurs FIFO/2 tells you a real object is present and if neither of FIFO/0,1 is on then the camera did not read.
In my first shot at this program, I used the inspection position to advance the FIFO, but the camera result occurs a short time AFTER the trigger, so I was forced to stick the result in the 'current' stack position, which required adding a subroutine to look at the current stack position and place the result in there. Since the ML1000 doesn't have indirect addressing, it started getting overly complex IMO. I didn't continue pursuing this route, though that's probably the direction I should have taken.
akreel said:
Like Doug_P, I wondered why you're loading "Source = 2" on rung 5
Good eyes! You caught my mistake!
That was a leftover from my first program. When I previously fired the FFL off the inspection position sensor, I was loading a "1" for failed, "2" for passed. When it reached the reject, a value less than "2" would be rejected. This included "0". I was planning "0" to mean 'no inspection', which would reject the part.
I have corrected this 'faux pa', but it has no effect on the function on the program. Any value greater than zero is considered 'passed'.

akreel said:
You said you are having a problem with the FIFO table retaining the last value, so here is what I thought you could try. I hope this can still be done with FFL instructions.

1. Instead of loading a fixed number into the stack on rung 5, load a serial number. (You may want to use serial numbers for your parts at a later date, anyway). Use a CTU instruction after rung 4 and have it reset itself to 1 after some maximum limit (to avoid an overflow). If the part is good, load the serial number. If it's bad, continue to load a zero.

2. Before rung 10, compare the value taken out of the stack to the previous value unloaded. If the values are the SAME or zero, fail the part. This way, if the last good part is stuck in the que the machine will fail parts (as you suggested).
This idea I'm REALLY liking! I can simply alternate between two values (like "1" and "2") to use as the 'pass' value. Continous good parts through the systems will produce 1, 2, 1, 2, 1, 2, 1, 2. Unloading two identical numbers in a row means the camera stopped giving results. Elegant solution, AK!

Now to get back to my programming!
Derek McFarland said:
You could build your own FIFO if you used 1 for failed instead of zero. When a part is inspected load it into the highest non-zero address in the stack. When a part is at reject unload the highest address in the stack and shift the rest up.
I appreciate your suggestion, but I think AK has provided a solution that I'm gonna run with. Let's see if I can make it work.

Thanks again to all!... :site:

beerchug

-Eric
 
So coming from a pack ship operation where FIFO is EXTREMELY important, I decided to take a look at your project. Here's what I came up with:

your two conditions are pass & fail inspection. I added a third condition where the camera is only allowed a certain amount of time to give feedback. (i put the preset at a quarter second at a random guess) If no feedback is detected, then the FIFO stack is loaded with a failed condition by default.

then down at the reject sensor i added an examine if open statement for the stack being empty. If it's empty, then the reject sensor is ignored.

this ensures that the camera is working and that the product actually passed through the entire system.

i think this might solve your problem it won't account for human error, but at least it will pick up camera failures.

I'm still pretty new to this whole PLC game, so hopefully i didn't make any glaring mistakes in what i was trying to do.
 
doh... i guess i should have refreshed before i put up my suggestion. looks like something similar was already covered. plus i think the logic i posted there is f@!#ed because i reset the timers.

i re-did it for my own amusement if you would care to see, but i think akreel's serial number suggestion is the way to go.
 
Last edited:
SUCCESS!!!

20.gif


akreel!

Not as strightforward to implement as I expected, but the fact that it now WORKS is all that matters... :cool:

Attached is the final (less cleaning up the docs) program. Again, a PDF version is included for those without RSLogix.

[attachment]
Time to box 'em up so they can ship out in the morning... (y)

Thanks to all, and especially akreel!... :geek:

beerchug

-Eric
 
Glad you got her goin. Just FYI:

Wouldn't I wind up with 'extra' data in the stack? You're probably on to something, so please elaborate!

No. The stack starts with zeros and when you set a 1 in the stack then 0 it's kinda like a one time entry of the 1. This would only work if the rejects were labeled as 1s instead of 0s.

I tried to stay away from using a timer as a clock because I was comcerned about the starting and stopping of the conveyor. I have no way of knowing if the conveyor is running, or how fast it is travelling at any given time.

The FFL/FFU can be programmed to run only when the conveyor is running. The data in the stack is retentive.

Let me know if you want me to post logic to give you an idea on how we do it.
 
Sorry, Rube. I'm still a bit confused with the method you use, but then again, I'm in desperate need of some sleep, so that may be the cause... :D

Even though I'm done with this project, I'd still be interested in seeing your logic. If you can't, or don't want to post it as an attachment, PM me and I'll give you my e-mail address.


A quick rant about "A-B Quality"... :rolleyes:

I was making two of these panels, so once I had the program functional, I dumped it into the second one to make sure all the wiring was correct.

When I connected one of the photoeyes to its quick-disconnect cable, it didn't work. It worked fine if I plugged it into the other cable, so I knew the eye was fine. I checked for power at the terminal block where the cable was connected, and had power. OK, something is wrong with the cable. I figured I must have accidentally broken one of the wires when I stripped off the outer sheathing (wouldn't be the first time), so I disconnected and removed the cable.

To figure out which wire I broke, I checked the cable with my ohmmeter, using a paper clip to make contact with the connector on the cable (a 4-pole 'micro-change' style connector). All 4 wires were fine. I reconnected the power wires to 24VDC and plugged in the eye, and it still didn't work.

Since all 4 wires read fine with my meter, I thought perhaps the wire colors got onto the wrong pins, so I checked. Brown to pin 1? OK. White to Pin 2? OK. Blue to pin 3? OK. And yes, Black to pin 4? Yup!

STILL, the sensor wouldn't work... banghead

Upon further investigation, I found that the female pins in the connector were WAY DOWN inside the connector. Therefore, the male pins on the photoeye couldn't reach them, yet my paper clip WAS able to reach them. I'm guessing the pins weren't properly positioned when the end was molded.

By the way, the photoeye was also A-B, so it's not that the male pins were some 'incompatible length'. I guess their 'cable tester' has really long pins?... :unsure:

A-B's lack of quality control cost me a half-hour of debugging. You think I can bill them for my time?... :mad:

A-B probably doesn't manufacture these cables. I'm sure they're just 'brand-labeled' with a higher price tag... :rolleyes:

beerchug

-Eric
 
Re: SUCCESS!!!

Eric Nelson said:
Not as strightforward to implement as I expected, but the fact that it now WORKS is all that matters...

Do I win a T-Shirt? beerchug

I imagined that you should only have to add about 6 rungs, max. I'll have to look and see what you ended up with.

I'm glad I could help!

AK
 

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
222
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
966
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,881
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,122
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,678
Back
Top Bottom