String in a FIFO setup - SLC5/05

monkeyhead

Member
Join Date
Sep 2004
Location
I'm right here
Posts
656
I'm new to the world of Ladder Logic, so please be gentle.

Here's the scenerio:

We have a barcode duplication application (a very small part of what the SLC5/05 is handling). The process goes: Package passes barcode scanner. printer prints duplicate barcode and it's applied to the outside of the package. package passes second scanner to verify the correct label was applied.

So right now the logic as it stands (not written by me, so i can't in good concience post it) is pretty convoluted. The guy basically sets up a buffer that can hold up to five strings.

The buffer fills up from there. So if the first string is occupied, the next string goes into the second position. Then as each string is verified, it is deleted from the first position and all the strings after it are moved so the second package now occupies the first spot and so on and so forth.

it's a basic FIFO operation, but it's built COMPLETELY from scratch using a ton of timers (because he used one photo eye to time the whole operation), a bunch of poorly named bits and what seems like an overly complex process. (or at least from first site of the gigantic ladder he created).

Anyway, finally to the question: Is there a better way to handle this? It seems like re-inventing the wheel to have to create a stack from scratch like this but after reading through the String section of the SLC-500 instruction set, I'm not really seeing any simpler solutions (well, other than add a second photo eye and get rid of half the annoying timers he used.)

I looked at the FIFO Load/Unload combo, but you can only load in one word at a time, so my string won't fit that stack.

The other controllers that I normally work with are Opto22 based, so i'm used to having indexed string tables to use for these sorts of situations and was surprised that i couldn't find similar functionality in the SLC5/05.

thanks in advance to anyone who made it through all that crippity ****.
 
Good Morning monkeyhead,

1st of all, what is crippity ****?

2nd I think that the most obvious improvement would be to use pointers instead of a FIFO for string operations. In addition to being easier to understand it's also much faster.

To make it simple you should set up a counter (ADD) that counts from 1 to 5 (or 0 to 4... whatever...) The counter would equal the number of the last string to be loaded. For example if you're using STx:0-4 and the last string read was 3 then the counter would = 3 and you could access the string as STx:[counter].

Anyway, to make matters short, this would eliminate the string copying and deletion. It would also be faster.

Hope this helps.

Good Luck,

(8{}) ( .)

(Yosi)
 
heh... crippity **** is just my random nonsene way of implying that this is a problem that i'm interested in only for the sake of learning. i mean the system wasn't designed by me and it already does it's job... so it's really not somethign i need to worry about. I'm just curious if there's a better way.

anyway, thanks for the suggestion. I might play around with it. That would also make it much easier if and when the controls engineer figures out how to speed up the process prior to it and we suddenly have to have an extra spot or two in the buffer to handle the packages coming down the line faster. it would be an absolute headache to add even one more string into the buffer the way it stands now.

thanks. you're help is much appreciated.
 

Similar Topics

I tried posting this on one of the other boards but not getting much input so I thought I would try here. I have a project that I would like to...
Replies
1
Views
3,574
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
72
As the title says, I'm using CCW with a PV800 (and Micro850). I've made a scheduler in which a user can choose a month, day (1-31), hour (0-23)...
Replies
15
Views
453
Hello, So i managed to read the string coming from control logix and put a string display in PanelView 800. Now I am struggling to do the other...
Replies
1
Views
115
Does anyone know why my one string is displaying this way? It is causing issues with my HMI displaying it.
Replies
4
Views
239
Back
Top Bottom