Re: USBServos Software not working?
Quote:
Originally Posted by
737NUT
Every gauge i have built has needed a scaling factor with some needing multiple scaling factors. You need to verify that the servo goes to the same spot EVERY time you command it to. Put 555 in IOCP to command the servo to that position, then another number. It should go to the same spot each time. If not, get a better servo. Here is a link on how to do the scaling calcs the right way. Works perfect!
http://www.baron58.com/Servo_Calc.htm
I did, during extensive testing using the USBServos Software, notice small error margins. I accepted these, and also accepted that I would allow a leighway of 10. EG: "70Knots" = 553, sometimes "70Knots" = 560, a small error margin. It's only off by a few Knots any so not that much of a deal. Regardless, I'm happy that I've gotten it to work with SIOC and surely over time I willget it fully up to speed.
I will do further testing to see if it returns.
Also David, thanks for the advice. I will use IOCPConsole with the Log to test, but I'm not overly confident on this. Could you explain a tiny little bit more in-depth what I must do?
Re: USBServos Software not working?
Really no need to log as there is not a software issue, just a mechanical or scaling issue.
Re: USBServos Software not working?
Jack
737NUT says not to bother
David
Re: USBServos Software not working?
Okay, well focusing on that Servo calc...
I got these values:
Code:
210 = a 50 + b
735 = a 350 + b
I used his equation exactly and substituted in my own correct values. Now... This is where it gets hard. How the heck do you get values a & b?
Also, what's strange is, is that when the Aircraft is >100Knots, the ASI gauge speed is too fast, at 116Knots it is perfect, and >116 Knots it is too slow. The gauge is linear, but it seems the Servo isn't *quite* so.
However, there's definitely progress being made!
Re: USBServos Software not working?
Algebra,
Servo range is 735 - 210 = 525 Gauge range is 350-50 = 300 525/300= 1.75 A=1.75 210= 1.75x50+122 735=1.75x350+122
A=1.75
B=122
Re: USBServos Software not working?
Okay, it'll probably be wrong (because it's me), but I've had a go at making a new SIOC script based on that Scaling principle...
Take a look:
Code:
// *****************************************************************************
// * Config_SIOC ver 3.7B1 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : ASIgauge.txt
// * Date : 7/3/2010
Var 0000, Value 0, name Intialization // Set servo positions
{
&Servo3 = 210
}
Var 9003, name IAS, Link FSUIPC_IN, Offset $02BC, Length 4 // IAS from Sim
{
L0 = DIV &IAS 128
L1 = L0 * 1.75 // Calculate Servo Slope
L2 = 122 - L1 // Calculate Servo Intercept
V9000 = L2
}
Var 9000, name Servo3, Link USB_SERVOS, Output 3, PosL 210, PosC 473, PosR 735, Type 2 // ASI gauge
As I said, I've probably gone wrong, so please tell me where.
Re: USBServos Software not working?
Looks ok, try it and see what happens. Like i said also, you need to ck the servo and its repeatability on going to the same commanded spot every time. :)
Re: USBServos Software not working?
737NUT
I am probably having a senior moment!
With the code above at an asi of 100knots then L1 will equal 175
L2 will then equal 122 - 175 which is -53
The value of -53 is then sent to the servo
Is this correct?
Like Jack says "I've probably gone wrong"
David
Re: USBServos Software not working?
Should be L2= L1 + 122 sorry, got in to big a hurry. Kids were bugging me to go swimming. LOL
Re: USBServos Software not working?
Oh well, that is corrected now. Still one small mistake for me is actually pretty impressive!;)
I wil lgive the Servo a clean as that might explain why it is "sticking" at some points.
Just out of interest, 737NUT, which EXACT servo do you use? Someone mentioned the Hitec HS-55 and Servocity, but what do you use?
Jack
PS: Just to confirm, with changes applied, is this now correct:
Are we sure it is L1 PLUS 122, or L1 MINUS 122?
Code:
// *****************************************************************************
// * Config_SIOC ver 3.7B1 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : ASIgauge.txt
// * Date : 7/3/2010
Var 0000, Value 0, name Intialization // Set servo positions
{
&Servo3 = 210
}
Var 9003, name IAS, Link FSUIPC_IN, Offset $02BC, Length 4 // IAS from Sim
{
L0 = DIV &IAS 128
L1 = L0 * 1.75 // Calculate Servo Slope
L2 = L1 + 122 // Calculate Servo Intercept
V9000 = L2
}
Var 9000, name Servo3, Link USB_SERVOS, Output 3, PosL 210, PosC 473, PosR 735, Type 2 // ASI gauge