Msg#: 4505594 posted 7:57 pm on Oct 8, 2012 (gmt 0)
Hi there People,
I've got a math probelm, and I can't fathom it out; Id be greatful if I could bounce it here to see if there is anyone who can shed light on this issue.
I have two textbox's that get populated via ethernet to development PCB, and read voltages that are scaled to 250.00V (32767 (16BIT)), and the other textbox is the requested value ie 125.00V (16383 scaled).
As this is a website driven PCB - from webserver, I would like to know how I can present the maths so that I can detect when the read value is +/- 1% of request.
To be honest it's just the maths side of this I can't fathom.
Msg#: 4505594 posted 11:21 pm on Oct 8, 2012 (gmt 0)
do you need the formula to calculate the percentage? it's the difference between read and requested divided by requested. multiply that by 100 to get percentage. use an absolute value function too capture +/-. compare the result to 1.0