Word Shift In SLC

10dulkar

Member
Join Date
Apr 2004
Posts
31
I am fairly familiar with BSL/BSR instructions in RSL500 but am looking for help on shifting words. Specifically I have a few parts tracking along a dial and would hate to use an individual shift register for each part.

Thanks in advance for your help!
 
You can use a COP command to shift words backwards (lower in memory). Unforturnatly, if you try to use this to shift forewards, it overwrites itself, leaving you with a whole block filled with the first word's value.

If I need to shift words foreward (i.e. for trending screens on a panelview) I usually copy the whole block to a temporary location, then copy it back to the original location, shifted up by one word.

I hope this answers your question.
 
If you are talking about shifting words and not bits you don't want the BSL and BSR instructions.

Look into the FFL FFU and/or COP commands. These can accomodate shifting whole words.

We would need a more specific idea of what you are trying to do if you want a more specific response.


Jimbo - You beat me to it, barely...
 
Last edited:
OK.. I have 3 parts which are placed in a nest and they go around a circular dial. There are several stations and tests which are performed on these parts and they are subsequently marked bad/good etc. For just 1 part I can use a BSL/BSR but for 3 parts I'd like to shift a word e.g. 110 instead of using 3 registers shifting a bit at a time..

Thanks.
 
word shift in slc?

OK, I understand the BSL and BSR but what is the idea behind wanting to shift an entire word while tracking a 'product' position?

Waggs

Due to econominc conditions, the light at the end of the tunnel has been turned off.
 
Word shifting is used when you need to track more than just one bit of infomation.

Simple example: Let's say you read a bar code on a product in the nest and put that in a word. By shifting the word, you move the bar code info with the product.

beerchug

-Eric
 
10dulkar,

I am confused, or you may be a little fuzzy on how the BSL/BSR functions are most commonly used. You said:

"For just 1 part I can use a BSL/BSR but for 3 parts I'd like to shift a word e.g. 110 instead of using 3 registers shifting a bit at a time.."

Actually the shift-register instructions are mostly used to track MANY parts, not just one part. The key is to use a shift register for each variable associated with each part. For example, if there are three different parts, that would take 3 individual registers to keep up with the part Type. Then if each part is tested for 4 variables, say Length (OK/not OK), Diameter (OK/not OK), Color (OK/not OK), Label Applied (OK/not OK); this would take 4 more shift registers, for a total of 7. Think that is too many? Why?, because the PLC does not have any emotions and doesn't care how many you use!

Just make sure that each bit shifts in each of the 7 registers each time a part moves from one position to the next, and you are 90% finished with the program! :oops:

Now about the word shifts: The FIFO/LIFO word shifts do not work exactly the same as the BSL/BSR... They are more of a STACK command. They shift words into and out of a stack, so it is harder to tie the words to a physical position. However you might find a way that works in your particular case, because your number of positions seems to be small. You might have enough memory to set up a word location representing each test position, and then shift it each time the dial rotates. Probably the FIFO would best represent your real-world situation.
 
I am assuming one thing, you are moving "items" through a series of processes and need to keep track of "a File"! O.K. you call it a word or what ever. Indirect addressing is the easiest way to keep a file and also have "random" access. The file load/unload feature used in conjunction with indexed indirect addressing will do what you need to keep track of a "zone" of processes and the sequential "internal processes" of each zone.

Hope that this has spurred some ideas!

bitmore
 
Word Shifting

You can use a COP command to shift words backwards (lower in memory). Unforturnatly, if you try to use this to shift forewards, it overwrites itself, leaving you with a whole block filled with the first word's value.

This is true. I use the COP and relate to the last word in the file as the 1st word of my queue. Then the COP does what you want it to.

Furthermore, I prefer the COP because it's so simple. There are no control structures to deal with.

Good Luck,

(8{)} ( .)
 
I have used the COP/MOV command very sucsessfully in the past on large converor systems. Each Bail/Part was given a traking ID and group of words pertaing to the qaulity control data. Then you just move the data from zone to zone, and write the info requred for that zone. As the part moves from zone 1, to zone 2, move the data.
 
Thanks a lot for the tips all.

Lancie, yep you are right I could have used 12 registers but was just trying to find a better way to do it.

I am finally settled on just using just the simple COP, though I realized for a copy forward (i.e. ~ N7:1 -> N7:2) I need to use a temp register. For backward copy (i.e. 7:2 -> N7:1) it works just fine. Maybe I was doing something wrong there.

Nonetheless it works...so far :). Thanks again...
 

Similar Topics

I have an array of 10 words. I would like to shift them down for tracking purposes, entering the new value into let's call it "Location[0]". And...
Replies
9
Views
2,570
Hello everyone, I am trying to do a word shift in a bin collection system in CLX 5000. The problem is there are 17 bins in each word. There is a...
Replies
2
Views
1,661
I've got three INT words in RSLogix 5000 Version 12.06. They are Sawset, Sawset1, and Sawset 3. I have three momentary pushbuttons set to assign a...
Replies
11
Views
2,153
I am trying to track product as it advances through a rotary indexing table. Been playing about for the past hour but not making much progress...
Replies
12
Views
3,086
Hello, I am using compactlogix L43's on v20 and L27's on v21. I use a MAVE in a periodic routine to bring in and average raw data, sample rate...
Replies
6
Views
2,170
Back
Top Bottom