Data Moving Questions

mpaisley91

Member
Join Date
Jul 2014
Location
Ohio
Posts
2
I have run into a wall.

I have one PLC where I have an array of data d_postdetectJobQueue Dint[50]

Under d_postdetectJobQueue[6] is the carrier number I want to move that data to another PLC and save it as the Carrier number.

To make things worse there are over 250 carriers, I need the data to do some inventory later but they are not moving the data down the paint booth. After its painted they fill to 0 and only care about where the carrier is after that not the other data.

I would like to take this data from paint booth like color and part number so that I can use it later. But I cannot seem to remember how to move the data and save it under another bit that will change.

So save carrier 1 to an array for carrier 1 and keep saving data for each carrier like that until I need it and then I fill to zero after I do the counting of it at the end of the system. Would I need 200 other arrays or can I make a DINT [1000] because I only need d_postdetectJobQueue[6], [7], [8], [9] to save elsewhere all other stuff I do not need. But how do I search that array and place in correct spot for that carrier ID?

Move d_postdetectJobQueue dint[50] to another array named after d_postdetectJobQueue[6] in another place holder somewhere.

I am using RSlogix5000 v.20

Thanks
Michael Paisley
 
As I interpret the description of the application, it sounds like a user defined type (UDT) could be helpful both for managing data in the primary PLC as well as with the transfer to other PLCs. This UDT would contain all information about the item in the carrier, such as paint color and part number, and maybe a flag to signal if it is in-use.

Now, if your 250 carriers have unique, mostly contiguous identifying numbers that you can track through the process, it would be reasonable to use these carrier numbers to directly access the UDT as the index into an array of these UDTs. For example, if the carriers are numbered 1, 2, 3, ... 250, and there is a method to get this number into the PLC, such as HMI-entered or barcode, you could access that carrier's data like this for, say, carrier #10:

carrier_data[10].part_number
carrier_data[10].paint_color

But if your carriers are identified by serial numbers that do not lend themselves to a simple arithmetic conversion to values from 0 to 250, then a strategy like this gets somewhat more complicated. One approach is to include the serial number as an item in the UDT. You will have the additional step of locating the carrier in an unordered array before accessing the data. Search this heap with the FSC instruction with an expression like:

serial_to_find = carrier_data[searchFSC.POS].serial_number

the 'searchFSC.POS' value then becomes your index into the UDT array for data on the carrier of interest.

One aspect of the UDT is that it facilitates communication between processors, in that you can cut-and-paste the UDT definition from one program to another. If using MSG instructions for data transfer, you will want to identically name the UDT across processors.
 
yes your are right the carrier numbers are not in sequential order and vary as they go by. So with the job data tag that reads every time the carrier comes in front of the paint booth I want to take that data and store it for later use based on the carrier number. Then when it that carrier number comes down the line to the end I have a camera to take a picture and record what parts are left for scrap. But with the data they do not bring down the paint color and or what parts were on that carrier and I want to count them for an inventory. Different parts and different colors.
 
...the carrier numbers are not in sequential order and vary as they go by.

Two options come to mind:

1. Use a look-up table to translate carrier numbers into array indexes, as described previously, for example.
2. Use a method to physically track the carriers as they move through the process, and then use one or more data structures, such as First-In-First-Out (FIFO) to move information as the carriers move.

Option #1 will tend to be more reliable, especially if carriers can be removed from the process mid-stream, or otherwise disrupted (e.g., undetected at a FIFO position). I think it is arguable which one is "easier" to implement and maintain. Both have Logix instructions to support the respective strategies.
 

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
153
Hello all, I work with internet of things and am not a PLC expert at all - that's why I need your help. I have a customer who's running a mix of...
Replies
31
Views
14,288
Hey guys!! I have never used ANY-pointers or configured larger areas to be moved. As you see, i want to copy whats inside DB1, 256 byte long and...
Replies
16
Views
4,485
Need a little help with a better way to copy data. I am saving data in an array and I want to move the data from the second oldest to the oldest...
Replies
5
Views
1,492
Hi, Does anyone know how to do this on an S5 115U PLC? It doesn't seem as straight forward as S7. For example, I want to move DB1 with 255...
Replies
4
Views
1,306
Back
Top Bottom