Re: USBServos Software not working?
change
L0 = &IAS / 128
into
L0 = DIV &IAS 128
and why did you rolled back my IF ELSE construction ?????????????????????
I am not sure this is ok:
USBSERVOS=1,77
should it not be
USBSERVOS=0,77
?
While:
In your script I see that you are using Device 0 for your Servo (if you do not specift Device it's defaulted to 0)
Re: USBServos Software not working?
Quote:
Originally Posted by
kiek
Hi Jim,
I had no intention to write correct code for his application. I was only showing some SIOC constructs.
Note: Your example code (above) is not right i'm afraid, because you already write a too low value (293) to &servo4 before you test the limits in the next statement....
Nico
Nico, that code is not mine. My example was to illustrate why it's not right.
Thanks.
Jim
Re: USBServos Software not working?
Okay Nico, how's about this:
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
{
&Servo4 = 205
}
Var 9000, name Servo4, Link USB_SERVOS, Output 1, PosL 205, PosC 468, PosR 730, Type 2 // ASI gauge
Var 9003, name IAS, Link FSUIPC_IN, Offset $02BC, Length 4 // IAS from Sim
{
L0 = DIV &IAS 128
&Servo4 = L0 + 205
IF L0 < 50
{
&Servo4 = 205
}
ELSE
{
IF L0 > 350
{
&Servo4 = 730
}
}
}
And SIOC.ini:
Code:
[SIOC]
IOCP_port=8092
IOCP_timeout=4000
Minimized=Yes
toggle_delay=20
CONFIG_FILE=ServoT.ssi
[IOCARDS MODULE]
IOCard_disable=No
IOCard_LPT=No
USBSERVOS=0,77
[FSUIPC MODULE]
FSUipcdisable=No
FSUipcRefresh=50
[IOCP CLIENTS MODULES]
IOCPini_delay=3000
IOCPclient0_disable=Yes
IOCPclient0_host=localhost
IOCPclient0_port=8090
IOCPclient1_disable=Yes
IOCPclient1_host=localhost
IOCPclient1_port=8099
[SOUND MODULE]
Sound_disable=Yes
Volume=100
Is that correct?
Also, where is the Device number "not specified"? I have specified it as Servo4 have I not?
Anything else I need to look for?
Re: USBServos Software not working?
FANTASTIC NEWS!!!!!!
After almost a month of questioning, failing, stressing and sweating... The ASI is finally working with FSX and FSUIPC (with SIOC)!!!!!!
Now, there is still a fair bit of SCALING work to do (sometimes it is off by 5Knots, sometimes by 50Knots), however I have managed to get it working with FSX nonetheless.
The problem was, was that I had defined "Output 1" instead of "Output 3" in my SIOC script.
THANK YOU VERY MUCH TO EVERYONE WHO HELPED!!!!!!!!!
Re: USBServos Software not working?
Quote:
Originally Posted by
Boeing 747 Flyer
FANTASTIC NEWS!!!!!!
After almost a month of questioning, failing, stressing and sweating... The ASI is finally working with FSX and FSUIPC (with SIOC)!!!!!!
Now, there is still a fair bit of SCALING work to do (sometimes it is off by 5Knots, sometimes by 50Knots), however I have managed to get it working with FSX nonetheless.
The problem was, was that I had defined "Output 1" instead of "Output 3" in my SIOC script.
THANK YOU VERY MUCH TO EVERYONE WHO HELPED!!!!!!!!!
Great! Is off by the same amount in the same location on the guage or does it vary?
Re: USBServos Software not working?
Quote:
Originally Posted by
Boeing 747 Flyer
Also, where is the Device number "not specified"? I have specified it as Servo4 have I not?
Well,
Code:
Var 9000, name Servo4, Link USB_SERVOS, Output 1, PosL 205, PosC 468, PosR 730, Type 2
is the same as:
Code:
Var 9000, name Servo4, Link USB_SERVOS, Device 0, Output 1, PosL 205, PosC 468, PosR 730, Type 2
Suppose you wanted to define the Servo as Device 1, you had to write
Code:
Var 9000, name Servo4, Link USB_SERVOS, Device 1, Output 1, PosL 205, PosC 468, PosR 730, Type 2
and in sioc.ini:
USBSERVOS=1,77
Nico
Re: USBServos Software not working?
Hi Nico,
I did not need to specify the device, it works without that.
@737NUT: It varys but there is a small pattern. At around 50Knots it is off by 5, and at 200Knots it is displaying 150Knots.
Re: USBServos Software not working?
Quote:
Originally Posted by
Boeing 747 Flyer
I did not need to specify the device, it works without that.
I know...!
That's what I tried to explain: if you leave out Device 0 it will assume Device 0 (being the default value).
Re: USBServos Software not working?
Jack
"It varys but there is a small pattern. At around 50Knots it is off by 5, and at 200Knots it is displaying 150Knots. "
I suggest that you use IOCPConsole, within the SIOC screen to see what is happening to the ASI and Servo values respectively. You can also use the log function to record what is happening. This will help you determine whether you need to reintroduce a scaling factor and/or vary your servo start and finish points
David
Re: USBServos Software not working?
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