Help - Search - Members - Calendar
Full Version: Random Access Database in a 1100
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
pabeader
We have a project where the operator is going to assemble a widget and then scan the PN/SN to "prove" it was completed. We would like to "store" this information in the PLC so that when that widget gets used on the line we can verify that is was correctly built and capture the PN/SN information.

There would need to be room for 25 widgets in the database. We don't know which widget will be used when. The PN/SN has both Letters and numbers.

I thought to use a string to hold the PN/SN information but no indirect addressing of strings.

Any help would be greatly appriciated.
Alaric
With only 25 entries a brute force comparison against all 25 will take less system overhead and time than any kind of indexed search. Using cut and paste you can probably program it all in under five minutes. You can use a subroutine and RETurn when found so that you only check until a match is found.
pabeader
QUOTE (Alaric @ Sep 14 2009, 09:17 AM) *
With only 25 entries a brute force comparison against all 25 will take less system overhead and time than any kind of indexed search. Using cut and paste you can probably program it all in under five minutes. You can use a subroutine and RETurn when found so that you only check until a match is found.


That's what I was afraid of. Thanks for the info!!!

So then I would setup a group of B's to track which 'slot' is available. Brute force it again to MOV a newly created widget PN/SN into the available slot and reset the slot available bit.
Alaric
QUOTE (pabeader @ Sep 14 2009, 08:25 AM) *
QUOTE (Alaric @ Sep 14 2009, 09:17 AM) *
With only 25 entries a brute force comparison against all 25 will take less system overhead and time than any kind of indexed search. Using cut and paste you can probably program it all in under five minutes. You can use a subroutine and RETurn when found so that you only check until a match is found.


That's what I was afraid of. Thanks for the info!!!

So then I would setup a group of B's to track which 'slot' is available. Brute force it again to MOV a newly created widget PN/SN into the available slot and reset the slot available bit.



If you use a subroutine again with conditional RETurns then you can pretty easily set it up to always use the first available slot and then return.

If it is any consolation, one plus to brute force is that someone else can come along and pretty easily decipher what you were intending. That tends to minimize 3:00 am phone calls from Bubba. Its a little more work for the programmer, but the PLC often executes brute force repetitive rungs better than loops. Given the chance however, I myself would still prefer to use a loop and indirect addressing. Unfortunately AB seems to have an obsessive/compulsive need to dumb down its bricks in ways that make little sense and make life difficult for their customers.


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.