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.

New Here? Please read this important info!!!


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

Reply
 
Thread Tools Display Modes
Old September 15th, 2020, 02:51 PM   #1
junkerjorg
Member
United States

junkerjorg is offline
 
Join Date: Nov 2007
Location: Wisconsin
Posts: 54
Palletizer PLC conversion

Has anyone converted an SLC to CompactLogix for an Alvey 910 palletizer? The translation went ok but there is some funky code around how they store and retrieve pattern data that has me scratching my head. In the old SLC they used word level indirect addressing, which you can't do in a CLX. I created a two dimensional array to deal with that but data isn't populating. But the way the code is written, it doesn't jump into the pattern routine until a change is made and then it writes the current data into a storage array before it retrieves the same data to write back to the working registers. I'm also a little unclear how the INT to DINT conversion in the SQO and MVM affects the data. I'm in panic mode because I am running out of time to get this complete and installed.
__________________
Democracy is Two Wolves and a Lamb Voting on What to have for Lunch. Liberty is a Well-Armed Lamb Contesting the Vote - Ben Franklin
  Reply With Quote
Old September 16th, 2020, 02:48 AM   #2
harryting
Lifetime Supporting Member
United States

harryting is offline
 
harryting's Avatar
 
Join Date: May 2002
Location: Puget Sound
Posts: 2,237
Those conversion program never works 100%. I hate to say it but there's no short cut sometime, you just have to dig in and sort out the bad conversion one at a time.

You can always convert any DINT back to INT to minimize the confusion. You can post the few rungs of the problem area and we can help but it's not going to be a fun process. We can help but I would ask for someone familiar with Contrologix programming structure locally to give you a hand.
  Reply With Quote
Old September 16th, 2020, 01:34 PM   #3
junkerjorg
Member
United States

junkerjorg is offline
 
Join Date: Nov 2007
Location: Wisconsin
Posts: 54
Quote:
Originally Posted by harryting View Post
Those conversion program never works 100%. I hate to say it but there's no short cut sometime, you just have to dig in and sort out the bad conversion one at a time.

You can always convert any DINT back to INT to minimize the confusion. You can post the few rungs of the problem area and we can help but it's not going to be a fun process. We can help but I would ask for someone familiar with Contrologix programming structure locally to give you a hand.
Thanks man, I actually finally sorted out the pattern data and have it all storing and retrieving properly. My next issue is the actual working data. The INT's are writing to DINT's that are being used in the SQO. The SQO can't use INT's so I need to figure out how to get the data to line up. There an easy way to convert the INT's to DINT's? I've actually never had to do that oddly enough.
__________________
Democracy is Two Wolves and a Lamb Voting on What to have for Lunch. Liberty is a Well-Armed Lamb Contesting the Vote - Ben Franklin
  Reply With Quote
Old September 16th, 2020, 03:09 PM   #4
junkerjorg
Member
United States

junkerjorg is offline
 
Join Date: Nov 2007
Location: Wisconsin
Posts: 54
To be a little more clear, is there a way to get 50 INT's mapped into 50 DINT's and have the DINT match the INT bit for bit on the first 16 bits of the word?
__________________
Democracy is Two Wolves and a Lamb Voting on What to have for Lunch. Liberty is a Well-Armed Lamb Contesting the Vote - Ben Franklin
  Reply With Quote
Old September 16th, 2020, 03:35 PM   #5
Ken Moore
Lifetime Supporting Member
United States

Ken Moore is offline
 
Ken Moore's Avatar
 
Join Date: May 2004
Location: North, West, South Carolina
Posts: 2,847
You can use the MOV instruction to move an INT to a DINT tag. The MOV moves the value so the bit pattern should be the same, except for the sign bit.
__________________
https://azr.com/

Last edited by Ken Moore; September 16th, 2020 at 03:38 PM.
  Reply With Quote
Old September 16th, 2020, 04:46 PM   #6
junkerjorg
Member
United States

junkerjorg is offline
 
Join Date: Nov 2007
Location: Wisconsin
Posts: 54
Quote:
Originally Posted by Ken Moore View Post
You can use the MOV instruction to move an INT to a DINT tag. The MOV moves the value so the bit pattern should be the same, except for the sign bit.
Thanks Ken. My issue was I needed to copy 50 INTs into 50 DINTs. I ended up creating a loop to MOV all 50 elements with one MOV. But, based on odd or even layer I had to MOV different elements for the right layer. I'm attaching a couple of pics of the code. Anyone see a problem with doing it this way? I assume loop update time shouldn't be an issue.
Attached Images
File Type: png Loop.PNG (29.8 KB, 8 views)
File Type: png copy.PNG (24.7 KB, 6 views)
__________________
Democracy is Two Wolves and a Lamb Voting on What to have for Lunch. Liberty is a Well-Armed Lamb Contesting the Vote - Ben Franklin
  Reply With Quote
Old September 16th, 2020, 05:02 PM   #7
Maxkling
Member
United States

Maxkling is offline
 
Join Date: Mar 2011
Location: Atlanta
Posts: 445
I have done a loop with a label and jump before, it will increase scan time make sure to take note with the program monitor when looping to avoid the watch dog fault.

Can you do this in ST or do a single move per scan?
  Reply With Quote
Old September 16th, 2020, 05:11 PM   #8
junkerjorg
Member
United States

junkerjorg is offline
 
Join Date: Nov 2007
Location: Wisconsin
Posts: 54
Quote:
Originally Posted by Maxkling View Post
Can you do this in ST or do a single move per scan?
Not sure I understand what you mean ST? I might be able to do it in a single scan. I haven't tried that.
__________________
Democracy is Two Wolves and a Lamb Voting on What to have for Lunch. Liberty is a Well-Armed Lamb Contesting the Vote - Ben Franklin
  Reply With Quote
Old September 16th, 2020, 05:21 PM   #9
Ken Moore
Lifetime Supporting Member
United States

Ken Moore is offline
 
Ken Moore's Avatar
 
Join Date: May 2004
Location: North, West, South Carolina
Posts: 2,847
I think you will be fine with your existing logic, since you are moving from a SLC, I assume your max count is 125 or less.
__________________
https://azr.com/
  Reply With Quote
Old September 16th, 2020, 05:23 PM   #10
jkerekes
Member
United States

jkerekes is offline
 
jkerekes's Avatar
 
Join Date: Aug 2007
Location: NJ
Posts: 2,326
ST = Structured Text. Another programming language for Rockwell.
__________________
John
  Reply With Quote
Old September 17th, 2020, 08:28 AM   #11
junkerjorg
Member
United States

junkerjorg is offline
 
Join Date: Nov 2007
Location: Wisconsin
Posts: 54
Quote:
Originally Posted by jkerekes View Post
ST = Structured Text. Another programming language for Rockwell.
Ahh, didn't catch the abbreviation. I don't have any experience writing structured text.
__________________
Democracy is Two Wolves and a Lamb Voting on What to have for Lunch. Liberty is a Well-Armed Lamb Contesting the Vote - Ben Franklin
  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
PLC Update - Back Issues Collection Now Available! Phil Melore LIVE PLC Questions And Answers 11 October 22nd, 2015 03:17 AM
PLC code Conversion tools or SW. Ani LIVE PLC Questions And Answers 7 October 20th, 2014 05:44 PM
Texas PLC Conversion YoungWint LIVE PLC Questions And Answers 3 January 8th, 2014 03:11 PM
Measurement unit conversion, without plc JPINE LIVE PLC Questions And Answers 10 April 12th, 2012 11:50 AM
Allen Bradley To siemens PLC program conversion vinitch LIVE PLC Questions And Answers 2 April 2nd, 2010 02:08 PM


All times are GMT -4. The time now is 08:33 PM.


.