PDA

View Full Version : Help required programing sioc



bindook
08-12-2011, 11:26 PM
Hi guy's,
i need some help getting my sioc in2 order. Firstly i have absolutely NO idea on how to read sioc i would have more success reading chinese!!. My last sim was programmed by a wiz who could do it with his eyes closed. Since then i have moved so he is unavailable. I was hoping there would be some1 in Perth WA who could help or any1 via email. I have only bout 30 buttons to do as the rest is done by fds sys card.


Thanks

kiek
08-13-2011, 03:41 AM
Study this site carefully howto program in SIOC (http://www.lekseecon.nl/howto.html)

bindook
08-13-2011, 05:43 AM
Hi Kiek, i did look at it thanks.

But 1 thing is bugging me, below is the throttle code. I have put in the L C & R positions of the pots, but i cant workout how the 215 in the * 76.20 // 16384 / 215 part of the code came from 0r the -4096 ????
The throttles at the moment are just sitting above idle in FS.

//-------------------------------------------------------------------------------------------------------
// Engine 1 Throttle lever Var 0400 - 0401
//-------------------------------------------------------------------------------------------------------

Var 0400, Link IOCARD_ANALOGIC, Input 03, PosL 28, PosC 127, PosR 255 // Throttle 1
{
IF V0400 <= 2
{
V0401 = -4096 // Idle
}
ELSE
{
L0 = v0400 * 76.20 // 16384 / 215
IF L0 > 16384
{
L0 = 16384
}
V0401 = L0
}
}
Var 0401, Link FSUIPC_OUT, Offset $088c, Length 2 // Engine 1 Throttle lever, –4096 to +16384 = 20480 range

//-------------------------------------------------------------------------------------------------------
// Engine 2 Throttle lever Var 0402 - 0403
//-------------------------------------------------------------------------------------------------------

Var 0402, Link IOCARD_ANALOGIC, Input 04, PosL 6, PosC 122, PosR 233 // Throttle 2
{
IF V0402 <= 2
{
V0403 = -4096 // Idle
}
ELSE
{
L0 = V0402 // - 40 off-set
L1 = L0 * 76.20 // 77.28 16384 / 212
IF L1 > 16384
{
L1 = 16384
}
V0403 = L1
}
}
Var 0403, Link FSUIPC_OUT, Offset $0924, Length 2 // Engine 2 Throttle lever, –4096 to +16384

kiek
08-13-2011, 01:55 PM
Hi
The 215 in the * 76.20 // 16384 / 215

is in the commentary part of the line. I guess the programmer explains where 76.20 came from: 16384 / 215 ...

Nico

bindook
08-13-2011, 07:28 PM
i understand where the 76.20 came from but dont understand why the 215 is 40 less then the full range????? And where the -4096 or the idle came from???


Michael

CanberraACT
08-17-2011, 07:34 PM
Hello Bindook,
I'm no expert, but I see you have been waiting a couple of days so i will give you a type of reply. (Once you get your Throttles working it is not something you change too often so I would have to go back and check the code that is in my SIOC).

Just off the top of my head and it might confuse things: -4096 is for reverse thrust? It is the Throttle lower limit and is set in offset 333A. I think -4096 is for 25% reverse thrust. That makes idle at zero and 16384 maximum. I think the calculations then translate your physical throttle movements into the forward thrust area of zero to +16384. You then use separate two pots again, for your reverse thrust levers, and with appropriate calculations place their position into the -4096 to zero range for reverse thrust. Does that make sense?

I use two 10k pots deep within my home made throttle quadrant. Even with gearing, swinging my throttles fore-and-aft does not use all of the 270 degree rotation on the pot. That is why you need to calculate your own PosL PosC and PosR numbers to use all of the 255 increments.

I'll have a look at my code tonight and get back to you.