ControlLogix (RSLogix 5000) Scaling Mystery

Join Date
Dec 2016
Location
Southeast
Posts
134
OK, the "Janitor" here with more dumb questions:

I've got an Analog I/O point (AT-13) on a 1756-IF8 module which is configured as a 4-20 ma input signal and 0-10,000 Engineering Units (ppm, by the way).

However, when I watch this AT-13 tag Online (aliased to the I/O point R3S3:4:I.Ch2Data), I see -25.55127 as the value, which I presume is the raw % number for 0 mA.

1st question: WHY am I seeing this? Shouldn't I be seeing the converted/scaled value in engineering units??? Shouldn't the tag be showing ZERO?

2nd question:

This value is being MOVed into another tag (holding area for the "sample" of this transmitter), and THAT value shows up as 239.6343. So just via a MOV instruction, -25 becomes 239.6. How does THIS magically occur?

The sample tag and the AT-13 tag are both defined as REAL. BTW.
 
Last edited:
Yeah, but I THOUGHT the engineering units would clip it for the logic, no? That's not how it works?

Or ... am I just seeing that -25 because the current is below 4 mA (and once it gets up to 4 mA I'll start see the engineering unit value)?

Do I need to be manually scaling these inputs?? It looked to me in the I/O Configuration tab that this was done for you.
 
Last edited:
This value is being MOVed into another tag (holding area for the "sample" of this transmitter), and THAT value shows up as 239.6343. So just via a MOV instruction, -25 becomes 239.6. How does THIS magically occur?

just GUESSING - but chances are that there is SOME OTHER instruction (CPT, etc.) which is also working on the "sample" of the transmitter ... so ... the MOV probably isn't changing the value - but when you see/monitor the value using the RSLogix5000 software, you're witnessing the "downstream" value - which has been modified by other logic ...

TIP: do a Right-Click on the address holding the 239.6 value - and select Go To Cross Reference ... look for an entry that has a "Y" for Yes in the Destructive column ... you'll probably find the answer to the "magic" there ...
 
Last edited:
No, it doesn't limit it to the range you give it. You have a signal that's below 4mA. If it did limit it, how would you know if it was below the normal range?
 
I've got an Analog I/O point (AT-13) on a 1756-IF8 module which is configured as a 4-20 ma input signal and 0-10,000 Engineering Units (ppm, by the way).

However, when I watch this AT-13 tag Online (aliased to the I/O point R3S3:4:I.Ch2Data), I see -25.55127 as the value, which I presume is the raw % number for 0 mA.
So you're reading -25.55127 ppm, something like 3.96mA.

If you open the fuse/disconnect the instrument for that channel, you will read the equivalent value for 0 mA, expressed in ppm.
 
jkerekes:

I would know when the transmitter told me via some "out-of-range" or "open circuit" error bit.

I thought the engineering unit range in the configuration tab would guarantee I would only see a value within that range (for the purposes of the program logic). If the number is below that scale, it's ZERO as far as the program is concerned. I don't *want* to see illogical numbers in the program. But I would want to know (through an error bit) if the number was out of range, because that might need to be looked at too...

Ron Beaufort:

LOL! I'm sitting here thinking to myself "stupid me - of course ... the value I'm seeing 'live' in that MOV block is just the CURRENT value; it's not necessarily the result of the MOV instruction".

But I did the cross reference and there's (3) total references: The MOV I've mentioned, another MOV, because it's shifting 4 readings of the AT-13 through 4 "sample" tags, and a CPT instruction (as you mentioned). However - the CPT is only adding these 4 samples, dividing by 4, and storing the result in another tag called AVERAGE, so there is no other instruction changing this Sample1 tag. It IS in fact, getting its value directly from the AT-13 I/O point which is showing -25.55127.

For complete disclosure: this rung executes every time a 15-second timer goes DONE. Sample3 is copied to 4, Sample2 is copied to 3, Sample1 is copied to 2, and lastly, AT-13 I/O (-25.55127) is MOVed to Sample1. Then the CPT block executes to compute the average once the 15-sec timer goes DONE 4 times (sample counter reaches 4).

Pretty simple.

So if the only instruction writing into Sample1 is the MOV instruction from the AT-13 I/O point, there must be a rogue write somewhere else which is writing over these sample tags?

If the two tags were defined differently, would a MOV instruction cause the value to be re-scaled?
 
If you don't want to see illogical numbers, use a compare & Mov a zero in the register when below zero.

I scale via cpt, but also watch for low/high & correct the value when needed.
 
jkerekes:

I would know when the transmitter told me via some "out-of-range" or "open circuit" error bit.

I thought the engineering unit range in the configuration tab would guarantee I would only see a value within that range (for the purposes of the program logic). If the number is below that scale, it's ZERO as far as the program is concerned. I don't *want* to see illogical numbers in the program. But I would want to know (through an error bit) if the number was out of range, because that might need to be looked at too...

Ron Beaufort:

LOL! I'm sitting here thinking to myself "stupid me - of course ... the value I'm seeing 'live' in that MOV block is just the CURRENT value; it's not necessarily the result of the MOV instruction".

But I did the cross reference and there's (3) total references: The MOV I've mentioned, another MOV, because it's shifting 4 readings of the AT-13 through 4 "sample" tags, and a CPT instruction (as you mentioned). However - the CPT is only adding these 4 samples, dividing by 4, and storing the result in another tag called AVERAGE, so there is no other instruction changing this Sample1 tag. It IS in fact, getting its value directly from the AT-13 I/O point which is showing -25.55127.

For complete disclosure: this rung executes every time a 15-second timer goes DONE. Sample3 is copied to 4, Sample2 is copied to 3, Sample1 is copied to 2, and lastly, AT-13 I/O (-25.55127) is MOVed to Sample1. Then the CPT block executes to compute the average once the 15-sec timer goes DONE 4 times (sample counter reaches 4).

Pretty simple.

So if the only instruction writing into Sample1 is the MOV instruction from the AT-13 I/O point, there must be a rogue write somewhere else which is writing over these sample tags?

If the two tags were defined differently, would a MOV instruction cause the value to be re-scaled?

Well, it will be nice if one could sniff the Logix firmware on this...
However, just for the sake of it, try doing this the Logix way...Logix Timers are not quite what they claim to be...Especially when placed in a Continuous Task...

1.Set said Analog Input module connection RPI to 250ms.

2.Create a 15 seconds Periodic Task and put your MOVEs logic in there.

3.Create a 60 seconds (4*15) Periodic Task and put your Average CPT in there.

Monitor and let us know about the outcome.
 
Scott.Lawrence:

I'm a novice with these PLCs, but I *thought* with ControlLogix PLCs, you have that Scaling Configuration Tab within the I/O Card definition. And so you set it up to essentially say: "When the I/O card sees 4 mA, send the program a "0", when the card sees 20 mA, send the program a "10,000", and proportionally map all other current input values in-between onto the 0-to-10,000 engineering units span. I *thought* it did this conversion for you automatically. If it's just going to pass me the percent number of the current span (0% for 4 mA, 50% for 12 mA, 100% for 20 mA, and some goofy negative percent value for current input *below* 4 mA, what's the point in setting up the engineering ranges??

It's as if there's another checkbox somewhere to "activate" the engineering units, but I don't see it. Something is not working properly here. Could the original coder have mis-defined the I/O card? Could he have picked a card with I/O scaling, but then the physical card itself does not support that? You would think it wouldn't communicate if there was a mismatch, right?

dmargineau:

Unfortunately, I cannot load this application 'just for the sake of it'. It takes an Act of Congress to do it. It's an app for a site pollution-control device that is coupled to another pollution-control device, and reloading *this* app affects the flow of fumes to the *other* (currently primary) device, which requires technicians getting up on lifts to decouple valves so the other device is not affected. Plus there is a third Controller which receives inputs from *this* PLC which requires that *those* inputs be temporarily disabled (which requires QA signatures). It's a nightmare! And there's no testing environment, either. The 'live' system IS the test environment! Once you get all this stuff in place, in theory you could load as many times as you want, but that's not really true either because this device runs at 1800 deg F and you don't want to be resetting it repeatedly. Plus, they don't like it being 'locked out' like this for very long.

As I said - it's a nightmare.

Think I need to find out if there's a 'rogue write' over these Sample tags (from data above it).

Are the tags in these things stored in memory as they appear in the app's list ... alphabetically?

And there is no write-protection capability, OR any ability to set an operand write breakpoint, correct?
 
Last edited:
DISCLAIMER: I haven't been following this thread very closely - so I might have missed this question and answer ... sorry if this has already been covered ...

are you allowed to post the ENTIRE project file (ACD extension) to the forum? ... if you can - maybe we could help you spot something going on that you haven't been able to find yet ...
 
Scott.Lawrence:

I'm a novice with these PLCs, but I *thought* with ControlLogix PLCs, you have that Scaling Configuration Tab within the I/O Card definition. And so you set it up to essentially say: "When the I/O card sees 4 mA, send the program a "0", when the card sees 20 mA, send the program a "10,000", and proportionally map all other current input values in-between onto the 0-to-10,000 engineering units span. I *thought* it did this conversion for you automatically. If it's just going to pass me the percent number of the current span (0% for 4 mA, 50% for 12 mA, 100% for 20 mA, and some goofy negative percent value for current input *below* 4 mA, what's the point in setting up the engineering ranges??

That is the point of setting up engineering ranges.

The "problem" is, you aren't giving the PLC a signal that is in range. Do the instrumentation job correctly, send the PLC a signal in range and the "problem" is gone.

But obviously, sometimes the signal is not in the 'proper' range. What would you want the PLC to do when your transmitter is scaled -40 to 120? Do you want it to read 0, when the input is 3.96 ma, or would -39.6 be better? The PLC is gives you a reading corresponds to the best to the signal. ** It is your job to figure out how best to handle the bad input signal **! If having a signal that is a little out of range is OK to use (which is commonly done in many processes, but apparently not for your project), then use it. If it should be treated as the minimum of the range (which is probably uncommon, but apparently is what you want to do) , then you need to write your code to do that. If it shouldn't be used at all, and the process goes to a failure mode (which is probably not the most common for general processes, that involve safety), then you need to write your code to do that.
 
Ron Beaufort:

I don't think I can post the app.

Proof:

If the transmitter was scaled -40 to 120, then at 4 mA, I would want to see -40. And at 20 mA, I would want to see 120.

But if the transmitter was out of range, I don't want to see those garbage numbers. Isn't there just a bit on the card I can test to see if the value is garbage? Then I'll just put it on a Maintenance Display of some kind to tell a tech to check it out during his normal routine maintenance work.

So I guess we'll have to check out this instrument (and maybe one or two others) for improper wiring or calibration. This stuff is brand-spankin' new and allegedly worked at one point, but I guess anything's possible.
 
Most people want to see the out of range numbers. If you don't write code to force the value to either limit. Some I/O cards have alarms to tell you there out of range.
 
But if the transmitter was out of range, I don't want to see those garbage numbers. Isn't there just a bit on the card I can test to see if the value is garbage? Then I'll just put it on a Maintenance Display of some kind to tell a tech to check it out during his normal routine maintenance work.

On the ControlLogix there is Overrange and Underrange bits for the analog inputs.
 

Similar Topics

I have installed rs logix 5000 v 20, and I have a project file (.acd) ehere the controller is 1756-L71..... my software does not contains 1756...
Replies
3
Views
3,791
I have a friend/customer that has a old program, they say its version 8.... anyone have anything they can open it with and print a PDF I can go...
Replies
6
Views
2,675
... more PLC101 questions for you experience Ladder lovers: Do these PLCs boot up with junk values in memory, and if so how do you typically...
Replies
12
Views
7,537
More dumb questions from the 'Janitor: In this program I've been looking through (that I didn't write), I see hard-coded constants which are...
Replies
5
Views
2,782
Hi, I wish to verify the CPS instruction using RSLogix 5000 v20 on Controllogix PLC. Is there any method i could do this and generate a...
Replies
1
Views
4,232
Back
Top Bottom