CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

A Math question??

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rr2



Joined: 09 Mar 2009
Posts: 4

View user's profile Send private message

A Math question??
PostPosted: Wed Nov 04, 2009 10:39 am     Reply with quote

Hi,

I facing a "simple" but complicated problem to me.

I need to take some values from a linear graphic where:

5Vdc = 1.0000Mpa
1Vdc = 0.0000Mpa
0,6Vdc = -0.100Mpa

I have the "volts" but i can´t make the formula to get the midle values. Embarassed of Mpa

Mpa = units of a pressure sensor.

Thanks in advance
RR2.
Alberto



Joined: 29 Sep 2009
Posts: 6

View user's profile Send private message

Re: A Math question??
PostPosted: Wed Nov 04, 2009 10:48 am     Reply with quote

rr2 wrote:
Hi,

I facing a "simple" but complicated problem to me.

I need to take some values from a linear graphic where:

5Vdc = 1.0000Mpa
1Vdc = 0.0000Mpa
0,6Vdc = -0.100Mpa

I have the "volts" but i can´t make the formula to get the midle values. Embarassed of Mpa

Mpa = units of a pressure sensor.

Thanks in advance
RR2.


if it is a line the formula is y = x*m + offset, the offset is the value for x=0 so if x is Mpa the offset is 1Vdc, m is the slope, that is (5Vdc-1Vdc)/1Mpa = 4Vdc/Mpa

y = x*4Vdc/Mpa + 1Vdc, with x the value in Mpa and y the result in Vdc

if you have volts, you can do x = (y-1)/4, that is your formula
rr2



Joined: 09 Mar 2009
Posts: 4

View user's profile Send private message

PostPosted: Thu Nov 05, 2009 4:15 am     Reply with quote

Thank´s very much.

It´s really simple Embarassed


Bye
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group