Re: Interfacing a Basic ASI Gauge
Hmmm... Not sure what the problem is, when I use the compiler it says a green "OK" at the bottom, surely this is correct?
EDIT: Found the problem. When I pasted it into the MyCockpit forums it chopped the bottom lines off. This is what it actually looks like:
Code:
Var 6 Link IOCARD_ENCODER Input 40 Aceleration 2 Type 2
{
L0 = v6 * +1
v7 = ROTATE 0 999 L0
}
Var 7
Nico, I'd rather keep the discussion going, I'm learning an awful lot more than I would if just reading manuals. People learn in different ways, for me it is using practical examples and actually performing things that allows me to learn.
Re: Interfacing a Basic ASI Gauge
I have further good news!
Just had a crack at making my own Servo Script, and hey presto! It complied sucessfully!
Take a look:
Code:
var 9000, name Servo4, Link USB_SERVOS, Output 1, PosL 3, PosC 517, PosR 1007, Type 2 // Servo Motor
Var 9003, name IAS, Link FSUIPC_INOUT, Offset $02BC, Length 4 // Indicated Air Speed * 128
{
L0 = &IAS / 1.5
&Servo4 = L0 + 213
}
Re: Interfacing a Basic ASI Gauge
Quote:
Originally Posted by
Boeing 747 Flyer
I have further good news!
Just had a crack at making my own Servo Script, and hey presto! It complied sucessfully!
Take a look:
Code:
var 9000, name Servo4, Link USB_SERVOS, Output 1, PosL 3, PosC 517, PosR 1007, Type 2 // Servo Motor
Var 9003, name IAS, Link FSUIPC_INOUT, Offset $02BC, Length 4 // Indicated Air Speed * 128
{
L0 = &IAS / 1.5
&Servo4 = L0 + 213
}
Congrats! But you need to put limiter's in the script as not to overdrive the servo. Example, If LO + 213 > 900 &servo4=900
Re: Interfacing a Basic ASI Gauge
Thanks for the help everyone, I've learnt an awesome amonut this week, thread can be closed now.
Just one final question... I want to "test" my SIOC skills. I own the O/C Transponder, which I might have a go at making a SIOC script to interface with maybe a default FSX aircraft. However, I do not have a wiring diagram of which switch/knob/button is connected to wish, and the O/C users manual yields no results. Any ideas how I can find out what's wired to what on the card?
Re: Interfacing a Basic ASI Gauge
Jack
I would expect the ready built OC Transponder to come with a script to suit FSX. In which case examination of the script should show which inputs/outputs are connected to their respective switches/leds. Else, when running the script under SIOC, you can use IOCPCONOLE and its log function to trace and work out assignments
David
Re: Interfacing a Basic ASI Gauge
Hi David,
A SIOC script is required to let it run with specific aircraft, as per Opencockpits support.
It will provide a default root for the Transponder Code, however buttons like the IDENT button and mode knob required a script to get working.
If, as you say, it comes with a script... I cannot find it within the installation files.
Re: Interfacing a Basic ASI Gauge
Jack
Quote from the manual
USING SIOC WITH THE MODULES:
Actually it is possible to accede to the programming of the modules by means of our SIOC programming language,
for that purpose the 3.7 version includes the definition of the variables of each module, se we can program the
module to our liking.
Albeit technically the programming of the module under IOCModules is correct, with this SIOC option details like
controlling the brightness with the hardware, or maybe the COLD&DARK option, etc…, can be added.
So it must be somewhere:)
David
Re: Interfacing a Basic ASI Gauge
I believe it is in the SIOC directory, it comes with 3.7 beta 1.
And otherwise, have a look at my SIOC script for the OC transponder to be used with lekseecon and the Level-D. I am using the same in- and outputs.
It is a file in this zip http://www.mycockpit.org/forums/down...do=file&id=393
I will not tell you the name of the file. It is a nice test to check your skills in reading and understanding SIOC files ;-)
Nico
Re: Interfacing a Basic ASI Gauge
Bingo!
I *think* the file is called "ATC_Definicion"... It lists all the inputs on the card.
Re: Interfacing a Basic ASI Gauge
Indeed, that's the one. For every OC module there is such a definition file. You see, it's all there, you only have to find it. :-)