PLC5/80E to ControlLogix Conversion

Christoph

Member
Join Date
Sep 2003
Location
Indiana
Posts
345
Hi All!
I am going over some PLC 5 code in preparation of an
upgrade to a ControlLogix processor.
A rung of code in the 5 has a compute block with the following statement and result. (S:19*100)|S:20=210 S:19=2 S:20=10 how is this possible.
 
I put the same CPT instruction in one of my programs, I came up with 20. Check that your destination word is not being acted upon somewhere else in the program. If something else is changing the value of your destination word you will only see the final result when looking at RSL5. The software will not display the intermediate result to you, if you need to know what that value is then you need to use another word for the destination and then use that word as an input for the rest of the calculations.
 
I have checked to be sure that word is not getting stepped on
by anything else. Not what sure to think at this point.
 
A rung of code in the 5 has a compute block with the following statement and result. (S:19*100)|S:20=210 S:19=2 S:20=10 how is this possible.

Just out of morbid curiosity, what is the point of this compute instruction? S:19 is the month & S:20 is the day.

Since these are status words, you may try buffering them ahead of the CPT and using the buffered data instead just for kicks.
 
Last edited:
Not sure yet what the programmers thinking was. It is part of
a serialized part number generator for product labels
 
Looks like an attempt to do an ordinal day of the year but the vertical bar in the compute statement says to divide (I thought). But in the PL5 maybe it was elsewise.
So bump the month up by multiplying by 100 and make room for the day (where the '00' appears in the 100) and then stick in the day.
But, not sure how the math works out in the original code
 
Not sure yet what the programmers thinking was. It is part of a serialized part number generator for product labels

Funny, but it sounds to me like they'd want to multiply month by 100, then ADD the day of month to get this result.

Looks like an attempt to do an ordinal day of the year but the vertical bar in the compute statement says to divide (I thought). But in the PL5 maybe it was elsewise.

You are correct; the vertical bar does mean divide in RSLogix5.

(S:19*100)|S:20=210 S:19=2 S:20=10

Maybe I'm a bit slow, but you may want to double check that equation as your result and the intended purpose indicate you're adding the day, not dividing by it. Maybe post a screen shot.
 

Similar Topics

All Merging 2 data systems. Need to know the highest value constant I can use in a PLC5/80 and what is the largest value you can have in a...
Replies
11
Views
2,538
All, I have a 5/40E that the memory is full on. For an easy fix i would like to just put a 5/80E in it's place. I know that these are going out...
Replies
6
Views
3,218
Three times now I have had my PLC5-80E have a major fault with program loss while doing things with the connected ethernet network. First time...
Replies
6
Views
5,210
Hi,i am in the process upgrading a PLC5/80E System.Current system is consist of 1 SCADA (Citect) and 6 Panelview 1000 with RIO Protocol. The plan...
Replies
0
Views
2,887
Hi Guys, I'm currently in the middle of a conversion from a PanelView 1400E touch screen to a Panelview Plus 1250. The existing panelview works...
Replies
3
Views
7,160
Back
Top Bottom