Sign in to follow this  
Followers 0
mhowasso

Analog Output Formula

12 posts in this topic

Hi All.... I dont know if this is possible, and I might be making this harder than it seems. Generally I find that I am the problem, but here is the question... =) I am using a MicroLogix 1400 with a 1762-OF4 output module. Using an SCP instruction using 4-20ma output scaled in Raw Proportional. SCP Settings Input Min: 70 Input Max: 400 Scaled Min: 6241 Scaled Max: 31206 Without connecting my laptop to the processor, and only using paper and pencil, Is there a formula that I can use to figure out what the "mA output" value and the "counts" value will be by just entering in the desired temp (70-400)..??? Known... Min Temp is: 70 Max Temp is: 400 mA range is: 16 Count range is: 24965 Thanks, Mark

Share this post


Link to post
Share on other sites
Yep... if the forum would allow me to upload the XLSX file I would have just sent that. Basically it's just % of range ((value / 400-70) * ma range) + offset or % of range ((value / 400-70) * count range) + offset Offset is your 0% value. For 4-20ma that is 4 ma Way back in school they taught it as y=Mx +b (slope of a line). It's probably the most used formula that I know. I use it for air/fuel ration controllers, surge margin calculations, all kinds of stuff

Share this post


Link to post
Share on other sites
Hi Michael... Well, I have figured out that there is 75.6515 Counts per Degree, and 0.0484849 mA per Degree Could you email me the item if possible. Thanks, Mark

Share this post


Link to post
Share on other sites
Try zipping it first (right click, send to -> compressed folder)...

Share this post


Link to post
Share on other sites
Here is a scaling tool for you. scaling chart.xls

Share this post


Link to post
Share on other sites
Mark you have the scaling backwards. You will need to plug it in this way: Input Min: 6241 Input Max: 31206 Scaled Min: 70 Scaled Max: 400

Share this post


Link to post
Share on other sites
I disagree, he's got it right. He wants the output from his output card (4 to 20ma) to represent a temperature range of 70 to 400 deg.

Share this post


Link to post
Share on other sites
All I know is that my 4-20mA output is working perfect. I was just trying to figure out a way to predict the output so if the operator said he asked (for example) 175 degree's, I could tell the maint tech to check for this many mA so I would know if the problem was command related. Thanks

Share this post


Link to post
Share on other sites
try this approach ... expected milliamp reading = temperature * 0.048484848 + 0.606060606 so ... for the 175 temperature in your example ... 9.09 milliamps would be the expected reading on the meter ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
Doh! I saw temperature and immediately thought input. Right with the OF4 we are talking output... Teach me to post quickly.

Share this post


Link to post
Share on other sites
Sorry for the delay in responding. I was on the road and replying via cell phone yesterday. Mickey's spreadsheet is a tad different than mine but the net result is the same. I would change the zero and span headings to min / max. Technically speaking the span is calculated from min / max so it's not an input. I didn't calculate a table. I just calculate the result of the input data. The slope intercept form of a straight-line equation is always going to give you the correct answer (assuming that your card is linear. If it's not there are bigger issues) Y=mX + B Y is the desired value m (slope) is the slope (either counts or mA) which in your case is either 31206-6241=24965 or 20-4=16 X is the percentage of the value that you desire. For 175 degrees and your range it's simply 175/(400-70)= .5303 B (y-intercept) is the offset which in your case is either 6241 if you're trying to calc counts or 4 if you want mA. In long form it looks like this: Counts= ((175/(400-70) * (31206 - 6241)) + 6241 Counts= (.5303 * 24965) + 6241 Counts= 19480.02 (obviously the decimal won't be valid for an integer) mA= ((175/(400-70) * (20 - 4)) + 4 mA= (.5303 * 16) + 4 mA= 12.48485 Order of precedence is important so mind the parenthesis. Add the offset back AFTER the stuff inside the parenthesis is performed. If you ever need to fit a curve to a line (like for surge control or air/fuel ratio control) break it into segments and apply the equation to each segment...

Share this post


Link to post
Share on other sites
Thanks for all the info....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0