You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old November 4th, 2017, 02:07 PM   #1
mpaisley91
Member
United States

mpaisley91 is offline
 
Join Date: Jul 2014
Location: Ohio
Posts: 2
Data Moving Questions

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
  Reply With Quote
Old November 5th, 2017, 07:35 AM   #2
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 290
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.
  Reply With Quote
Old November 5th, 2017, 05:57 PM   #3
mpaisley91
Member
United States

mpaisley91 is offline
 
Join Date: Jul 2014
Location: Ohio
Posts: 2
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.
  Reply With Quote
Old November 6th, 2017, 08:45 AM   #4
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 290
Quote:
Originally Posted by mpaisley91 View Post
...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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Getting data out of a Micrologix 1100 - newbie questions Autonomic LIVE PLC Questions And Answers 1 June 1st, 2017 02:02 AM
AIC converter/Redlion data logger communication questions matthew1 LIVE PLC Questions And Answers 4 October 7th, 2011 05:51 AM
PLC that uses labview as language umlphysics LIVE PLC Questions And Answers 5 September 15th, 2009 12:14 PM
Confused "again" S7 indirect Thim LIVE PLC Questions And Answers 17 July 22nd, 2008 04:47 PM
Moving data into a bit shift josepa LIVE PLC Questions And Answers 2 October 17th, 2006 08:37 AM


All times are GMT -5. The time now is 03:26 AM.


.