FSUIPC (Peter Dawson) Unnoficial > FSUIPC V4.X (FSX)

737-200 AP trim wheel motor

(1/5) > >>

dc8flightdeck:
Im looking for a way to drive a trim wheel motor. The motor is connected to two relays, one for each direction. Pressing a yoke trim switch activates a relay to drive the motor.

Any ideas for an FSUIPC AP elevator offset I can use as a ON/OFF toggle for the relays? And how would I program it in SIOC for the USB Outputs card?

Thanks!

Here is a video link showing a first test of the FD lights via an Outputs card, SIOC, and FSX.
737 Flight Director Lights

fordgt40:
A broad outline of the logic to convert the trim values into motor direction is roughly

Define a Null zone variable to avoid "hunting"

Trim variable from FSUIPC
If trim value is negative
   If trim value < previous trim value
      Direction = down
   Else direction = up
Trim movement = Trim value minus previous trim value
trim movement = ABS trim movement

If trim value is positive
   If trim value > previous trim value
      Direction = up
   Else direction = down
Trim movement = Trim value minus previous trim value
trim movement = ABS trim movement


Direction variable
If trim movement > null zone
   If direction = up
      Turn on output for up
      turn off output for up after a suitable delay - use the DELAY function
   Else
      Turn on output for down
      turn off output for down after a suitable delay - use the DELAY function

Note you could test the value of trim movement and use a variable argument to the DELAY function to vary the delay in turning off the motor according to the value of the trim movement


The FSUIPC Offset for the elevator trim position is 0BC0

Hope this helps

David

Edit

Justin. I just realised you asked the same question on mycockpit.org last year and got this same reply! Sorry for duplication, however, presumably you did not see the reply as there was no response? Do you need further help?

dc8flightdeck:
I can see the script required is a bit beyond my comprehension of SIOC so I think I will just wait to tackle the AP trim at a later time.

Thanks for the reply David.

fordgt40:
Justin

Why not try some simple parts of the code first and see what happens using the iocpconsole? The logic I have given is almost sioc code anyway, without the brackets and correct syntax.

I can fully understand the reluctance, but honestly, if you start to get your "feet wet", it is quite rewarding.

Regards

David

MLeavy737:
 Just curious, why don't you just run the trim wheels when you press the trim switch? In that way you wouldn't need any code. Press up or down and the circuit runs the wheel accordingly.
I don't think you need to talk to FS at all.  In other words use the trim switches as ON-OFF switches.
 
Mike L

Navigation

[0] Message Index

[#] Next page

Go to full version