PDA

View Full Version : is there SIOC variable or something to make servo faster?



AndyCYXU
02-15-2013, 06:15 PM
is there SIOC variable or something to make servo turn faster?

I wanted to speed up my FLAPS gauge i already change gears it made it little bit faster mainly help with servo limits originally from OC the flaps 30 and 40 were near the limit of 180 i had to set up value 0 for 40 flaps not to brake the servo...

anyways it is however kinda slow say if i test flaps from 0-40 in sim its already at 40 and my gauge is just passing 15.. slooooooooow.. lol

Thanks
Andy

fordgt40
02-16-2013, 05:06 AM
Andy

Not aware of any way to alter speed of servos with OC. It may be that the sim speed is too fast :-( The only thing I can suggest is to look at the coding to see if it can be optimised, or change the servo to a faster one.

David

Perik
02-16-2013, 09:00 AM
Look next...how do I delete a post ;-)

Perik
02-16-2013, 09:04 AM
Andy,

A few question:


What kind of A/C?
Do you know the real time the flaps should take 0 to 40? (737-500 : 38.5 ±5 seconds)
Could you show us the SIOC code?
Have you tested the setup using SIOC monitor?


The servo should be more than fast enough:

HS55:

Operating Speed (4.8V): 0.17 sec/60° at no load
Operating Speed (6.0V): 0.14 sec/60° at no load

And combination SIOC / USB Servo card I know is like a rocket so
there must be some trouble with your coding or mechancal configuration.

AndyCYXU
02-16-2013, 12:04 PM
PMDG737NGX
No i do not know the real time just comparing it to the movement on PMDG737NGX VC
CODE is below its not written by me but works good as far as position. I only eddied what was required the stop values where the needle should stop to indicate whatever flap position
hmmm not sure how to answer this,,, well no... not really it stops where it should and works overall very good its just a lot slower to getting there comparing to needle on the VC



I agree with you Perik servo by itself when i test it with the servo testing program from OC or even the ServoCard program (forgot the name) where i send position is VERY FAST. it will move to position i send in a blink of an eye from flap 0 - 40 probably in a second or less....
servo value for flap up=1020
servo value for flap 40=360
so if i direct send these values to servo it will travel there almost instantly (very fast) like servo should so.

overall its not a big deal servo moves in a nice steady fashion just slower then on VC
I just though maybe there is some variable/statement not sure what to call it to get it to move faster like for example Aceleration 2 used to speed up digits when used with encoder when you move turn encoder fast

here is the flaps SCRIPT


// *****************************************************************************
// * Config_SIOC ver 4.2 - By Bahadir Tubay - www.opencockpits.com
// ****************************************************************************
// * FileName : flaps_script_pmdg_ngx.txt
// * Date : 26/11/2012



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 = 3640
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 7509
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 10239
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 12742
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 13652
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 14335
{
L1 = 1
&ind_le_trans = 0
}
IF L0 = 15017
{
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 <= 3640
IF C0 AND C1
{
&flaps_low_val = 0
&flaps_high_val = 3640
&servo_high_val = 1020
&servo_low_val = 937 // 0 and 1
}
C0 = L0 >= 3640
C1 = L0 <= 7509
IF C0 AND C1
{
&flaps_low_val = 3640
&flaps_high_val = 7509
&servo_high_val = 937
&servo_low_val = 841 // 1 and 2
}
C0 = L0 >= 7509
C1 = L0 <= 10239
IF C0 AND C1
{
&flaps_low_val = 7509
&flaps_high_val = 10239
&servo_high_val = 841
&servo_low_val = 735 // 2 and 5
}
C0 = L0 >= 10239
C1 = L0 <= 12742
IF C0 AND C1
{
&flaps_low_val = 10239
&flaps_high_val = 12742
&servo_high_val = 735
&servo_low_val = 635 // 5 and 10
}
C0 = L0 >= 12742
C1 = L0 <= 13652
IF C0 AND C1
{
&flaps_low_val = 12742
&flaps_high_val = 13652
&servo_high_val = 635
&servo_low_val = 565 // 10 and 15
}
C0 = L0 >= 13652
C1 = L0 <= 14335
IF C0 AND C1
{
&flaps_low_val = 13652
&flaps_high_val = 14335
&servo_high_val = 565
&servo_low_val = 500 // 15 and 25
}
C0 = L0 >= 14335
C1 = L0 <= 15017
IF C0 AND C1
{
&flaps_low_val = 14335
&flaps_high_val = 15017
&servo_high_val = 500
&servo_low_val = 435 // 25 and 30
}
C0 = L0 >= 15017
C1 = L0 <= 16383
IF C0 AND C1
{
&flaps_low_val = 15017
&flaps_high_val = 16383
&servo_high_val = 435
&servo_low_val = 360 // 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 11

Perik
02-17-2013, 07:18 AM
Andy,

I don't know the PMDG 737 so I can't do a relevant
test of your code though it looks OK.

Have you tried to run FSInterrogate to see how the Flap Offset ($0BE4 or $0BE0) behaves?
Do the speed and position values correspond to the VC gauge and or your own Servo?

Use these Offset values (one for each flap position) to get correct
scaling in your SIOC code. I think they should correspond to the flap angle deflection.

Just some thoughts ;-)