Logix5000 Data shifting Question

koti

Member
Join Date
Mar 2005
Posts
16
Hi!

I have an array of 300 part numbers (each is an ascii string of 2 DINT in size). I need to display the top part number at the first station. After the operator loads the part and hits the cycle start I need to index the entire array up 4 words so I can display the next part number. I'd like to fill the end of the array with zeros as I shift it up.

Any recommendations as to the cleanest way to do this.

Thanks!
 
Just make a UDT of your data items, then make an array of the UDT, and use FFL/FFU to shift them.

Use a one-shot pulse to shift records in, with FFL. When the ".DN" bit of the FIFO control block is set, you shift out a record.

I use this to maintain several types of data records, shifted up to 1500 times between input and output with no problems.
 
Thanks rdrast! Just so I understand...I'm going to create a UDT, call it PartNum, whose only member will be PartNum which will be an array of DINT's 600 in size (300 part numbers, each with a size of 2 DINTs) and I'll use this UDT in my FFL/FFU.

In regards to using the FFL/FFU, I don't understand what you mean when you say 'shift records in... shift records out...' I'll pull up the description of the instructions, but if you could put it in layman's terms I'd appreciate it.
 
Heres an example:
Say you get 10 books and put the first one that you want to read on the shelf. Then you place the next book next to book #1 and so on. The is an FFL.

Then when you are ready to read the first one, you remove it from the bookshelf and slide the rest over. What was the second book is now in position #1 and so forth. This is an FFU.

As you get new books in you again place then next to the very last book and so on.

This is an example of using what is called First In/First Out.
 
Another option is to create a custom string type and make an array of that string.

In the project tree expand Data Types. Expand Strings. Right click on Strings and select New String Type. Name the new string type, in this example I called it MyString. Assign maximum characters of four. Click OK.

attachment.php


Now create an array of type MyString 300 elements long. Instead of shifting all the data in the array around, which takes a lot of processor resources and could be interrupted by higher priority tasks with undesirable results (refer to RSL5K online help under COP and CPS instructions), use a pointer and index the pointer. Program the pointer to wrap around at the end to make the array "circular" To clear any string simply write a 0 to the .LEN word (no need to worry about the contents of .DATA then).

See attached for some simple examples of how you might do this by programming pointers to that the array is indexed in a circular manner.

A110917-1.jpg
 

Attachments

  • koti.zip
    92.5 KB · Views: 19
koti, I think you misread rdast's help.

1. Create a UDT. Actually you could make it 4 SINT's to make loading of the characters easier.

2. Next create a tag of the type defined in the UDT. Make it an array as long as you need.

[Edit - you may want to take Alaric's advice instead of creating the UDT]

UDT.jpg PartNumArray1.jpg PartNumArray2.jpg
 
Awesome! Thanks everyone!

If my part number array is filled each morning via an OPC connection from an Excel spreadsheet in the office, that would act as my FFL correct (I'm actually planning on moving this data into a 'working array' and leaving the original reception array alone)? And then all I need to do is use the FFU to unloading that queue...right?
 
koti, I think you misread rdast's help.

1. Create a UDT. Actually you could make it 4 SINT's to make loading of the characters easier.

2. Next create a tag of the type defined in the UDT. Make it an array as long as you need.

Thanks Bernie...I gathered that after I replied. I actually implemented it just as rdast had recommended.
 

Similar Topics

I'm a Siemens person, and this is one of my first AB programs. The customer wants everything programmed in Ladder. I have a lot of data (3...
Replies
14
Views
213
What's the best practice for storing data in a RSLogix5000 PLC and then logging it to a IA DB? I want to accumulate data if the DB isn't available...
Replies
19
Views
4,752
I currently have a REAL type data tag 'Roll_Yards' that gives me the yardage count of a roll of fabric. Each time the operator loads a new roll...
Replies
3
Views
1,188
Hi, I am looking for a user manual or instructions on how to setup the Tag Data Monitor tool on RSLogix5000
Replies
0
Views
2,149
I'm trying to display the concentration of a solution on an HMI. I want to do the calculation in the PLC (ControlLogix). The problem is that it...
Replies
2
Views
1,510
Back
Top Bottom