Analog Scaling in RSLogix 5000 for 1769-IF8

I think that I answered that specific question in my earlier post ... but now I've had a few more minutes to look at your problem ... I'm wondering about those values that you gave ... did you intend those to be just "examples" or as valid data ranges? ...

Ron,

The numbers I gave you were approximately what I was reading in the tag value when I was applying 4mA and 20mA respectively to the input channel. I have the module configured for Raw data which, according to the manual, is -32767 to +32767. However this covers 3.2mA to 21mA.

I found this in the Instruction Help for the FB SCL instruction.

scaling2.JPG




I tried it and it actually worked. Here tis.

scaling1.JPG



In this CPT I was seeking to scale at 0 to 1000 and I was applying 12mA to my input. Is this an ok way to do it?
 
Oakley said:
see AB Application Note A40660113

I laughed when I finally checked out this tech note. This was the very thing I had just spent the last 30 mins working on. Now why couldn't they have put something like this in the manual instead of making you hunt for it and making you bother all the friendly gentlemen on plcs.net.đź“š

OK, here is one that's more as it should. I changed my Input Data format to Engineering Units and changed my CPT instruction to match. Here is what I get at 20mA using this method.

scaling3.JPG
 
Last edited:
would the same apply to a type K thermocouple? connected of course to a 1769-IT6?

the type K range is -269 to +1260
??

D
 
novice said:
This sounds stupid, but where can I find this document?

Have you used the Rockwell Knowledgebase? If so you can search for A40660113 by selecting Search by Prev. TN#.
 
Thanks. Found it already.

I'm working on a project that requires CompactLogix. So far, this is the ladder logic I've got for Scaling on 1769-IF8.



4000 = 4mA; 16000 = 20mA - 4mA. The MAX and MIN scales will be added later.

Am I on the right track?
 
Here is the way that I prefer to do the conversion to Engineering Units. If the raw signal is 4 - 20 mA, I first shift it to 0 - 16. So a 0 - 32767 raw analog input value has 6553 subtracted from it. Next, I multiply by the full scale Engineering Value, in your case, 150. Lastly, I divide by 80% of 32767 or 26214.
This boils down to % Input x Full Range Value. Now to do this in a Compute Statement: ((Raw - 6553)*150/26214)

If your input is truely bipolar,as you stated, then you would have to refigure the 20% and 80% values and it would become:
((Raw - 13106)*150/52427). I never use bipolar for 4-20, but I think that you will need to shift it to get 0 - 65534, by adding 32767 to the raw value first to get rid of negative values.

Note: When dealing with this conversion in integer registers, it is necessary to multiply before dividing to keep the rounding from messing up the calculation. Also, in some PLC systems, you can enable 32 bit math so I do that before this calculation and send the result of the multiplication portion to the 32 bit result register, then in a second step, you would do the division from the 32 bit result register, back to an integer register. This will prevent large numbers from getting clipped off do to limitations in head room in the integer registers.

If it was me, I would make sure the the analog input was scaled 0 - 32767 first (not -32768 to 32767)because more resolution is not going to get you anything useful. Then with 4-20, the actual range would be 6553 - 32767.

The reason that I like to do it this way, is because you can watch it work and catch errors. There are a number of ways that will result in the same performance. Also, I would always model it first in Excel so that you are certain to get the factors right.
 
Last edited:
Thanks. Question: how did you arrive at '150'?

For pressure and level measurements, there won't be any bipolar figures. Hopefully not for temperature either.

So don't use 4000 to 20000. Understood.

Do I have to be concerned about the full scale range (3.2mA - 21mA) that requires modifying the 6553 to 32767 range?
 
Last edited:
Perhaps a simple y=mx+b for a linear scaling will work.
Y = Scaled Value
m = slope = (Scaled Max - Scaled Min) / (Raw Max - Raw Min)
x = Raw Input Value
b = Offset = Scaled Min * m
 
I also have written add-on instructions to do this. For the 1769 analog input modules, I use "Analog_Input_mA_Scaling_Percent", and configure the input for 4-20mA in the "Percent Range" data format. For the 1794 (Flex I/O) analog input modules, I use "Analog_Input_mA_Scaling_Flex".
 
moz-screenshot.png
I use a 2pt interpolator..just plug in the values of the raw counts from the alg card and the Units of measure and your done.
Made a UDT to make things quick.
see the attached jpg.

Cheers..

Interp_001.jpg
 
Jac I think you interpolator is just an expansion of mine, which I took from SLC 500 Instruction set (Pub. 1747-RM001D-EN-P) page 4-18 concerning scaling an Analog Input to Control an Analog Output
 

Similar Topics

Hi all! I have a question about RSLOGIX and Analog input/output scaling So we have an existing controller with an IF8I and OF81 card. My...
Replies
3
Views
942
Hello there! I am just a few minutes into this and here is my first post. Hopefully this works out! I am very new to Allen Bradley programming...
Replies
3
Views
2,056
I need to scale analog input. I'm using software RSLogix 5000 and analog card 1769-IF4XOF2. So I want to make scaling for current sensor...
Replies
4
Views
5,060
Hello all, First I'd like to say thank you for viewing my post. I need to learn how to scale an analog input on the RSLogix 5000 without doing so...
Replies
4
Views
6,250
Rslogix 5000, standard version (can only use ladder) analog scaling block does not exist, need to know of any tips and/or tricks to accomplish...
Replies
12
Views
9,794
CheezyMane13
C
Back
Top Bottom