PDA

View Full Version : OpenCockpits 737 Flap Gauge Problems



bussgarfield
06-19-2011, 12:31 PM
Hi all.

I need some help and/or advice please.

I am not sure if anyone else here runs the OC 737 flaps gauge but having had it sitting in the box for ages, I thought it was about time to start getting some movement on the MIP.
To cut to the end of the story first, I can't get the gauge to work with FSX.

Testing the servo, it works fine using the test.exe programme. I have noted the values required at the appropriate flap settings and I have modified the script (which was copied from the OC site) by changing the values of the variables, imported the script into the config_sioc.exe programme and saved as sioc.ssi

I will attach a copy of my script but the only things I have changed are the value of the variables.

One thing to note how ever is that unlike the installation manual, my values when the flaps are 'up' are high and start at 1008 (as oppsed to 153 in the manual) and at flaps '40', the value is 200 (as oppsed to 709 in the manual). I can't find a way to reverse the servo. Whether the higher settings at the flaps up in the script have any bearing on the issue I don't know.

Any help would be greatly appreciated.

Script is below.

Gary

**************************************************************Var 0000, Value 0
{
&ind_le_extend = 0
&ind_le_trans = 0
}
Var 0001, name servo_flaps, Link USB_SERVOS, Output 1, PosL 0, PosC 511, PosR 1023
Var 0002, name flaps_fsuipc, Link FSUIPC_IN, Offset $0BE0, Length 4
{
L0 = &flaps_fsuipc
L0 = ABS L0
IF L0 = 0
{
&ind_le_extend = 0
&ind_le_trans = 0
}
ELSE
{
L1 = 0
&ind_le_trans = 1
IF L0 = 409
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 819
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 2047
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 4095
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 6143
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 10239
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 12287
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 16383
{
L1 = 1
&ind_le_trans = 0
}
&ind_le_extend = L1
}
L2 = L0
C0 = L0 >= 0
C1 = L0 <= 409
IF C0 AND C1
{
&flaps_low_val = 0
&flaps_high_val = 409
&servo_high_val = 1008
&servo_low_val = 891 // 0 and 1
}
C0 = L0 >= 409
C1 = L0 <= 819
IF C0 AND C1
{
&flaps_low_val = 409
&flaps_high_val = 819
&servo_high_val = 891
&servo_low_val = 775 // 1 and 2
}
C0 = L0 >= 819
C1 = L0 <= 2047
IF C0 AND C1
{
&flaps_low_val = 819
&flaps_high_val = 2047
&servo_high_val = 775
&servo_low_val = 618 // 2 and 5
}
C0 = L0 >= 2047
C1 = L0 <= 4095
IF C0 AND C1
{
&flaps_low_val = 2047
&flaps_high_val = 4095
&servo_high_val = 618
&servo_low_val = 481 // 5 and 10
}
C0 = L0 >= 4095
C1 = L0 <= 6143
IF C0 AND C1
{
&flaps_low_val = 4095
&flaps_high_val = 6143
&servo_high_val = 481
&servo_low_val = 390 // 10 and 15
}
C0 = L0 >= 6143
C1 = L0 <= 10239
IF C0 AND C1
{
&flaps_low_val = 6143
&flaps_high_val = 10239
&servo_high_val = 390
&servo_low_val = 289 // 15 and 25
}
C0 = L0 >= 10239
C1 = L0 <= 12287
IF C0 AND C1
{
&flaps_low_val = 10239
&flaps_high_val = 12287
&servo_high_val = 289
&servo_low_val = 213 // 25 and 30
}
C0 = L0 >= 12287
C1 = L0 <= 16383
IF C0 AND C1
{
&flaps_low_val = 12287
&flaps_high_val = 16383
&servo_high_val = 213
&servo_low_val = 200 // 30 and 40
}
&servo_calc = &servo_low_val - &servo_high_val
&flaps_calc = &flaps_high_val - &flaps_low_val
&flaps_val = L0 - &flaps_low_val
&servo_val = &servo_calc * &flaps_val
&servo_val = &servo_val / &flaps_calc
L1 = &servo_high_val + &servo_val
&servo_flaps = L1
}
Var 0003, name servo_val
Var 0004, name flaps_calc
Var 0005, name servo_calc
Var 0006, name flaps_val
Var 0007, name flaps_low_val
Var 0008, name flaps_high_val
Var 0009, name servo_high_val
Var 0010, name servo_low_val
Var 0011, name ind_le_extend, Link IOCARD_OUT, Output 22
Var 0012, name ind_le_trans, Link IOCARD_OUT, Output 21