PDA

View Full Version : Trends in SIOC



737NUT
02-22-2008, 05:07 PM
Has anyone figured out how to program trends using SIOC? I am trying to make so when the trim is going up, it activates a relay and vice versa for teim going down.
Thanks

danieln62f
02-24-2008, 07:13 PM
Hi:

Could you give me more information of what you need, for example, at what point of the trend do you need to switch on the relay, as soon as the trend start, when the variable value is doble than the start position.



Best wishes, Daniel Otero

737NUT
02-24-2008, 08:52 PM
Hi,
I would say around a 5 count would activate, say trim at 4600, when it hits 4605 it triggers the up output, if it goes to 4595 it would trigger a down input. I logged the offset while flying and noticed the AP moves it 1-3 steps up and down constantly. I want to ignore those small movements hence the 5 for the trigger. Make sense?
Thanks!

danieln62f
02-27-2008, 05:13 AM
Hi:

Normally there is several ways for doing something with SIOC, may be this way fits what you need.

Var 1= trim value
Var 2= up outpout
Var 3= down outpout

Var 1
If var 1 >= 4605
Var 2=1

if var 1<= 4595
Var 3 =1

Regards
Daniel Otero

danieln62f
02-27-2008, 04:34 PM
// *****************************************************************************
// * Config_SIOC ver 3.5 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : trim trend.txt
// * Date : 27/02/2008



Var 0001, Link FSUIPC_IN, Offset $0BC2, Length 2 // pitch trim indicator
{
IF V0001 >= 5
{
V0002 = 1
}
ELSE
{
V0002 = 0
}
IF V0001 <= 65531
{
V0003 = 1
}
ELSE
{
V0003 = 0
}
}

Var 0002, Link IOCARD_OUT, Output 1 // up output

Var 0003, Link IOCARD_OUT, Output 2 // down output


Hi:

The above example use the position on pitch trim indicator values, for up, values goes from 0 to 16383, for down values goes from 65536 to 49153(full down), the scrip create a nule zone from 65531 to 5, obove 5 up output is on and for values below 65531 down output is on.

Hope it helps
regards
Daniel Otero

737NUT
02-27-2008, 04:37 PM
You forgot an important detail, you could be in the range you are calling 'down' and the trim could be moving up. Hence the term "trend" You set-up a 'range' which is easy to do. I do appreciate the help though. :)

danieln62f
02-27-2008, 04:54 PM
:(ooops ... sorry for misunderstanding, may be at this link there is what you need, an script for a motorized throttle. www.simhard.eu.tt.

737NUT
02-27-2008, 06:57 PM
They use a pot for position feedback. Still won't work.
I found an offset in PM suite that will control the trim motors.
Thanks again,
ROb

NicD
08-16-2008, 02:38 AM
Just wondering if anyone has had further success with this?

I'm also using the PM offset for trim wheel movement but I find that it's too fickle.. it's always making movements and so the trim wheels are constantly adjusting back and forth. This gets irritating, plus it puts a strain on the relay switch and motor.

Some sort of delay or trend dampening in code (I'm using SIOC) might be the go, but I'm wondering what others have discovered so far?

thanks

737NUT
08-16-2008, 09:09 AM
What i did for now is disable the trim motor when in the air so as not to have all that movement back and forth unrealistically. My trim wheels only move when i manually trim via the switches on the yoke.

NicD
08-16-2008, 07:38 PM
Thanks. I'm doing something similar - trim wheels don't move when A/P is engaged, they do when I'm hand-flying / trimming.