Jnelson
Member
Alright guys, I could use some help on this so when you are done throwing things at the monitor.......Read on.
I have searched AB's database and also this one, just letting ya'll know so you don't think i am lazy or somthing.
Anyway,
I started my first venture today in the world of Allen Bradley and ran into one slight problem. No problems necessarily using the software or anything but I learned on Automation Direct.
What I have is a Micrologix 1000 with analog inputs (not sure of part number as it is at work). RSL 500, Bla,Bla,Bla. I am using a 0-10 vdc input signal to indicate the level of a tank. I need to scale the input into engineering units. I know, I know you guys are sick and tired of repeating yourselves, but anyway. The 1000 doesnt have the SCP unfortunatly so I gotta do it longhand. The problem I am having is with the scaling of the input 0-32767 = 0-100% full. I am used to working with 0-4095 for the analog and the ML is giving me math overflow errors and all kinds of jargon. My standard calculation will not work for some reason (the operator).
Raw analog input * High - Low / Span
Everything turns out 32767 in the end it seems no matter what I do.
I was reading something about the double divide and was wondering if this is what i'm missing. Here is what I did.
Mov
source a I0.5
Dest N7:0
MUL
source a N7.0
source b 100
Dest N7:1
DIV
source a N7:1
source b 32767
Dest N7:2
Ok so help me out... What am I doing wrong? N7:2 is always 32767?
If I missed any info that will help let me know.
Thanks
I have searched AB's database and also this one, just letting ya'll know so you don't think i am lazy or somthing.
Anyway,
I started my first venture today in the world of Allen Bradley and ran into one slight problem. No problems necessarily using the software or anything but I learned on Automation Direct.
What I have is a Micrologix 1000 with analog inputs (not sure of part number as it is at work). RSL 500, Bla,Bla,Bla. I am using a 0-10 vdc input signal to indicate the level of a tank. I need to scale the input into engineering units. I know, I know you guys are sick and tired of repeating yourselves, but anyway. The 1000 doesnt have the SCP unfortunatly so I gotta do it longhand. The problem I am having is with the scaling of the input 0-32767 = 0-100% full. I am used to working with 0-4095 for the analog and the ML is giving me math overflow errors and all kinds of jargon. My standard calculation will not work for some reason (the operator).
Raw analog input * High - Low / Span
Everything turns out 32767 in the end it seems no matter what I do.
I was reading something about the double divide and was wondering if this is what i'm missing. Here is what I did.
Mov
source a I0.5
Dest N7:0
MUL
source a N7.0
source b 100
Dest N7:1
DIV
source a N7:1
source b 32767
Dest N7:2
Ok so help me out... What am I doing wrong? N7:2 is always 32767?
If I missed any info that will help let me know.
Thanks