Analog scaling in modicon

J

Thread Starter

Jody

Hi

We have a customer with a modicon Micro984 PLC that has a pressure transducer input. Trying to figure out a quick and easy way to scale this value into eng. units. I am kind of spoiled by AB's SCP (scale with parameters) function, and wanted to know if there is an easy way to do this in the modicon Micro PLC? The transducer is scaled 0-25psi, and they want to get their reading in ft. of water. The value in the PLC is 12 bit and is showing 0-4096.

Any help appreciated.

Thanks
Jody
 
K

Kent Limbocker

It's pretty simple. Just use a MUL block to multiply the counts by 25, then use a DIV block to divide by 4096. Use a BLKM to move the result of the DIV to the final destination register (because the result of the DIV is two registers). Designate a couple of adjacent registers as temporary and use them for the interim results. If you want better resolution, multiply by 2500 instead of 25 and the result will be in the format xx.xx psi.
 
J

Jeff Ruszler

Jody, you haven't given much info but since you have an analog input I'll assume you have Micro model 612. These are relatively old and don't have the advantages of the newer IEC functions (like scaling with parameters)that the newer processors have but this processer does at least have floating point math functions.

All you need to do is scale 4095 to 57.73 (25psi = 57.73 ft of H2O) 4095/57.73=70.93 so just divide the AI value (0-4095) by 70.93 to get your answer. OK, that's easy on your calculator but how do you actually do it in modicon 984 integer or floating point math functions?? You can use integer math to first multiply the AI by 100 and then divide by 7093. The result will be in two registers with the integer portion in the first register and the fractional portion in the second register. (There is an option for decimal or fractional remainder - be sure to interpret this second register correctly) The other option is to preload two registers with the floating point equivelent of 70.93 (0100001010001101 1101110000101000) and use the extended math function for integer/FP divide. The result will be a two register floating point value that most HMIs can read and display directly as an engineering value of "feet of water"

Here is a web site with a good utility for converting values to floating point - http://babbage.cs.qc.edu/courses/cs341/IEEE-754.html

How you choose to do the math realy depends on how you intend to display the result to your operator. Is it a BCD display, An HMI, or a DCS? A lot of HMIs and DCSs can read the 0-4095 value and do the scaling themselves.
 
Top