Logix5000 WORD SHIFT

bluenoser337

Member
Join Date
Apr 2003
Location
Nova Scotia
Posts
391
Can't find any "word shift" instructions in A-B (Siemens and others have them). I want to shift words left (256 elements), to work just like a BSL. Been trying to accomplish this with FFL and FFU, but no luck. Any suggestions? Many thanks!!
 
Last edited:
Why does the FFU not work for your case?

If there is some valid reason FFL and FFU will not work, then you could use a BSL along WITH Indexed Addressing to create your own Word Shifter. The data would be saved in Word addresses, which are indexed to the BSL bits.
 
If you are unsuccessful with FFU and FFL, it may be because of its use of the POS register.

http://www.plctalk.net/qanda/showthread.php?t=18344

Note in the example I posted in the thread above, that no data is shifted until the DoNe bit is set. The POS starts at the beginning of the file and moves upward until it reaches the LENgth. You must use indexed addressing (the control.POS) to access the most recent entry, or pre-fill the stack by setting the control.pos = control.len.

If you don't need or want a variable length stack, try the simpler alternative:

Try a COPy with the desired length and offest the destination by one element.

In a SLC, the direction you are shifting will affect whether or not this can be done without an interim storage location. If you try to copy in the downward direction, the destination range will be filled with the first element of the source, so, apparently, the words are copied one at a time by the CPU.

I am not sure about a CLX processor, and don't have one to test this on.

Paul
 
see if this approach will get you started ... this is based on the idea suggested by my distinguished colleague OkiePC ...

word_shift.JPG


notice (as he said) you need to shift from HIGHER addresses to LOWER addresses ... and remember "LEFT-TO-RIGHT" and "HIGH-TO-LOW" are conventions which are pretty much up to your personal (human) viewpoint ... the PLC won't be confused - but if you ABSOLUTELY must shift in the other direction, just post again and we'll work on it some more ... it just takes about twice as much memory - and about twice as much scan time ...
 
Thanks for the suggestions. I guess my main issue is the right-to-left thing. I am tracking various properties of a part travelling along as assembly line, with station #1 having the lowest address number in the register, station 2, 3, etc moving higher. It just makes it easier for setting up where to "pluck out" the required numbers at the required times. I may give that BSL indirect addressing thing a try. Not that I'm praising Siemens, but I have used the word shifts in even their smallest models (bits, bytes, words, double words, right or left)...so kind of disappointed that "the best" falls a bit short in this area.:cry:
 
I have done it both ways also but I would suggest going back one more time to the ffl and ffu instructions. After you figure them out they are very easy to load up and to follow.
 
bluenoser337 said:
Thanks for the suggestions. I guess my main issue is the right-to-left thing. I am tracking various properties of a part travelling along as assembly line, with station #1 having the lowest address number in the register, station 2, 3, etc moving higher. It just makes it easier for setting up where to "pluck out" the required numbers at the required times. I may give that BSL indirect addressing thing a try. Not that I'm praising Siemens, but I have used the word shifts in even their smallest models (bits, bytes, words, double words, right or left)...so kind of disappointed that "the best" falls a bit short in this area.:cry:

To do that in RSLogix, I would jsut use a rolling index, and indexed addresing on the properties files:

N10 = Property 1
N11 = Property 2
N12 = Property 3
N13 = Property 4
N14 = Property 5


Make each file longer than the largest number of assemblies to be tracked and use the appropriate file type for each property.

Then you will have a pointer for each station:

n7:1 Station 1
n7:2 Station 2
n7:3 Station 3
n7:4 Station 4

The pointers can be indexed to match the assembly as it progresses through the system.

Use wrap-around logic on the pointers, so that when you hit the end (or beginning) of the file, the pointer moves to the opposite end.

Then, for example, you can look at the first 3 properties of the assembly at station 2 with:

N10:[n7:2]
N11:[n7:2]
N12:[n7:2]

I am doing this with barcode box tracking logic, and my first property is the position of the carton. I calculate it as inches from a single measuring/barcode trigger photocell. Then it is quite simple to use compare instructions to activate diverters and send the cartons to the correct lane. I did this to remove an old FIFO system that was too sensitive to a variety of sensor and actuator problems and could get out of sequence, sending boxes to the wrong lanes.

My other "properties" are string files holding redundant barcode reader text strings.

There is no data shuffling, so it is very efficient for tracking hundreds of products.

I would still bet that we can get the FFU/FFL pair to work as you expect. We would need more information about how you programmed them, and the details of what you want to do.

Hope this helps,
Paul

Paul
 
Thanks everyone...I've settled on a solution. I have used the "COP" for shifting in the SLCs, so I guess I'll use that here...and as Ron suggests...I'll try not to think too much that I'm going in "the wrong direction":unsure: . If therapy can't get me past this, I'll go to the indirect addressing method. Thanks again!!
 

Similar Topics

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,075
Anyone had this before? Rslogix5000 on WindowsXP ran fine yesterday when I shut my computer down. Today whne I launch RSlogix5000, it begins...
Replies
17
Views
82,655
First off I am new to this site so please let me know if I am posting anything improperly or if there is anything I need to do differently. I have...
Replies
6
Views
8,132
Hi all- I had a question about adding in a word with a value of 15 (1111 binary). Can I just define it in my AOI somehow? Or does it have to be...
Replies
1
Views
3,183
Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
83
Back
Top Bottom