Jump to content
The simFlight Network Forums

Motorized spoiler handle motion and arming


Recommended Posts

FSUIPC 4.836

Phidgets and FS2Phidgets for controlling servos.

Im having real trouble getting the spoiler handle on my motorized throttle quadrant to cooperate with the aircraft.

When the aircraft commands spoilers into a position the spoiler handle on the TQ follows its movement but then starts the problems:

As the TQ handle moves it gives signals to the sim before the handle has reached its destination so when the handle is supposed to go to its UP posision it maybe only reaches half way (depending on a refresh rate setup for giving signal to the servos). If the servos didnt have any delay setup the handle would not get any way.

My wish is that when the aircraft systems gives commands to the spoiler handle, input from the TQ/joystick should be ignored for a while.

Can this be a functionality on FSUIPC or can I get the same result in any other way? Can LINDA help with this?

Im curious how others have set up their spoiler handle functionality.

About arming the spoilers I have set up the spoiler axis with the values -16040,-16040,-15467,16000 and I have also set up "Ranges for action" so that it calls the key press for arming the spoilers when in the range 14932 to 16269. Have to say Im not sure if this command is being sent as the handle immediately moves into the zone where the spoilers start to rise. It wont stay between down and deflection.

Link to comment
Share on other sites

Im having real trouble getting the spoiler handle on my motorized throttle quadrant to cooperate with the aircraft.

This is a motorised spoiler lever, then, just for the auto-action on landing?

When the aircraft commands spoilers into a position the spoiler handle on the TQ follows its movement but then starts the problems:

As the TQ handle moves it gives signals to the sim before the handle has reached its destination so when the handle is supposed to go to its UP posision it maybe only reaches half way (depending on a refresh rate setup for giving signal to the servos). If the servos didnt have any delay setup the handle would not get any way.

My wish is that when the aircraft systems gives commands to the spoiler handle, input from the TQ/joystick should be ignored for a while.

How is the input being made? Normally it would be a function of your quadrant driving software to take care of this.

Can this be a functionality on FSUIPC or can I get the same result in any other way? Can LINDA help with this?

Im curious how others have set up their spoiler handle functionality.

I've never heard from anyone before with a motorised spoiler handle. But if your quadrant software can't deal with it you could have the spoiler input axis assigned to a Lua plug-in which dealt with all this, instead of directly assigning to an FS axis.

About arming the spoilers I have set up the spoiler axis with the values -16040,-16040,-15467,16000 and I have also set up "Ranges for action" so that it calls the key press for arming the spoilers when in the range 14932 to 16269.

Why? The "arm" zone in the calibration delas with the arming. You do not have to use any key press at all. What is the point of that?

Have to say Im not sure if this command is being sent as the handle immediately moves into the zone where the spoilers start to rise. It wont stay between down and deflection.

It sounds like you are testing or claibrating whilst on the ground. FS is flawed in this regard, and when the lever is moved to or even just through the arm detente it reacts as if you had lanfed and deploys full speed brake. always get off the ground to set them up and test them.

Regards

Pete

Link to comment
Share on other sites

I've had the aircraft in slew mode and lifted it off the ground. Forgot to mention this.

With the spoilers armed (keypress on the keyboard) on touchdown the spoiler handle in the sim will not go to the UP position without interruption because the TQ spoiler handle/potmeter continously sends input to the sim about its posision, just like any other joystick. Then the input from the TQ will fight aginst the aircraft logic that tries to get the handle to UP (0BD0 = 16384) because the TQ handle is delayed. If the servo for the TQ handle were not delayed the sim would constantly get interruption from input TQ/joystick/potmeter every millisecond.

If I look at the spoiler handle in the sim on touchdown it goes to UP, but when the delay time (say 200ms) for the TQservo is over and the TQservo starts to move towards UP the potmeter sends a new command to the sim about its position. The handle in the sim (PMDG737NGX) obey the signal and goes back to match the TQhandle position. The sim logic again commands UP and the TQservo moves a little more towards UP then the potmeter sends its command again and so on. It results in "Spoilers do not arm" caution indicator in the cockpit as the spoiler deploy did not go as expected by the aircraft logic.

And on the ground with spoilers in UP and if you increase throttle the spoilers should go to the DOWN position and they do, but not without interruption from the input from TQ/joystick as potmeter and sim logic gets their wish fullfilled in turns. (Sorry my english is not the best). To explain better first the sim gets its wish fullfilled then the potmeter gets its wish then comes the sim again and then the potmeter. There is no winner in the fight before I manually move the handle the last part of the trip to DOWN :).

Connection is spoiler handle -> potmeter -> BU0836 -> FSUIPC. No other software in between. The servos are controlled by Phidgets Servo Controller card and FS2Phidgets but no input to the simulator from here.

I know about nothing about LUA-scripting yet. But if I can remove the spoiler assignment from FSUIPC and LUA can do the whole job with the spoiler axis with calibration, arming, ignore input if the sim sends a command for spoiler movement. If it can do all this I will certainly look into this scripting.

Edited by flygutt
Link to comment
Share on other sites

With the spoilers armed (keypress on the keyboard) on touchdown the spoiler handle in the sim will not go to the UP position without interruption because ...

....

...To explain better first the sim gets its wish fullfilled then the potmeter gets its wish then comes the sim again and then the potmeter. There is no winner in the fight before I manually move the handle the last part of the trip to DOWN :).

I'm afraid my mind is boggling over all this, and I am not understanding the intimate details. So I'm simply assuming the problem is to do with a loop of control, due to the lack of a disconnection of the axis input whilst moving the lever automatically.

If this is what you mean then it is the same problem as with auto-throttles when the A/T is in control. FSUIPC's offsets do provide ways of dealing with this. I'm surprised you haven't mentioned similar problems with your throttle levers -- or aren't they motorised?

If you check the FSUIPC offsets lists you'll find that, as with throttles, you can dsconnect the spoiler axis from the spoiler controls via a bit in offset 341A whilst stil reading the axis value at offset 3412. Normally drivers for moroised quadrants make use of these as well as those for throttles in order to get things working correctly.

Connection is spoiler handle -> potmeter -> BU0836 -> FSUIPC. No other software in between.

I'm amazed in that case that you don't have much worse problems with motorised throttle levers - or don't you have such, or never use Auto-Throttle?

If you don't want to write a driver you still need to contrive to break the feedback loop which is presumably what is causing your problems. You can do this with a Lua plug-in and that is probably the easiest. Alternatively you could simply have a switch which sets the bit in the offset to disconnect the spoiler axis. The problem then is two fold -- the bit needs re-setting at intervals (unless you only set it less than 10 seconds before it is needed), and you'd need to have it switched on by touch-down. A Lua plug-in could do this easily enough and be triggered by the arm range on your lever assignment, or simply be looping checking for the arming action in any case (or using an event on an offset).

I know about nothing about LUA-scripting yet. But if I can remove the spoiler assignment from FSUIPC and LUA can do the whole job with the spoiler axis with calibration, arming, ignore input if the sim sends a command for spoiler movement. If it can do all this I will certainly look into this scripting.

There are several (multitudinous in fact) ways of doing it with a Lua plug-in, some more ambitious than others.

I still don't understand how you've arrived at the spoiler being a problem without finding the auto-throttle problem first, if you have no driver for your motorised quadrant. Yours is the first such implementation I've heard of which uses no driver software.

Regards

Pete

Link to comment
Share on other sites

  • 2 weeks later...

Hi Pete,

I have the same problem , this is the problem: When the autothrottle is ON, FSX ignores any inputs from the throttle potentiometers. You can move the throttle handles all you want & nothing happens. But unlike the throttles, FSX never ignores the input from the spoilers potentiometers. So, any physical movement of the spoilers sends signals to FSX and FSX itself is trying to activate the spoilers and they get into a tug of war.

What was happening to me was that the spoiler handle would just go crazy & move back & forth wildly under certain conditions (I'm using a servo & Phidgets software & hardware to activate the servo. How can I remove input from the spoiler pot on the ground when the spoiler is Armed?

Phil

Link to comment
Share on other sites

How can I remove input from the spoiler pot on the ground when the spoiler is Armed?

Only when armed? What about when it deploys automatically. Isn't that more the problem? The auto-operation by the motors surely isn't relevant till then?

You can disconnect the spoiler axis, if assigned in FSUIPc, by using an offset. Search for spoiler in the offsets list. How you determine when to disconnect it is another matter. You could either do so manually, by a button press, or by an event, such as lowering the gear. This is assuming you'd never want to use the speed braking effect after lowering the gear. If this is not viable, then probably you'd use something like radar altitude being less than 100 feet or so, so the disconnection occurs by the time you touch down and the automatic deployment operates.

Pete

Link to comment
Share on other sites

I tried to assign offset 32F8 2^1 to a button in FSUIPC to inhibit the spoilers axis, but I having no luck. Is there another offset that I can use?

That one works as far as I know. At least it always did. Can you shown me what you've done, and tell me what version of FSUIPC you are using, and also how the spoiler axis is assigned?

Pete

Link to comment
Share on other sites

Pete,

I've assign a joystick button via FSUIPC button and switches tab to control sent when button is pressed "Offset Word set" into the drop down window, and entered x32F8 into the offset window and set the Parameter to 2^1 and pressed OK. I also tried the same procedures with "Offset Word Set Bits" with no luck. The spoilers are assigned and calibrated via FSUIPC. Ultimately, I like to use the radar altitude being less than 100 feet or so instead of the joystick button.

Phil

FSUIPC Ver 4.745

Link to comment
Share on other sites

I've assign a joystick button via FSUIPC button and switches tab to control sent when button is pressed "Offset Word set" into the drop down window, and entered x32F8 into the offset window and set the Parameter to 2^1 and pressed OK. I also tried the same procedures with "Offset Word Set Bits" with no luck.

When you say you "set the Parameter to 2^1" you don't mean, I hope, that you entrered those three characters? The value of 2 to the power 1 is 2. The parameter you need is 2, and you should use the set bits or toggle bits control so the other bits aren't changed. How do you turn it off? Another button? If the same button then use toggle, not set.

Ultimately, I like to use the radar altitude being less than 100 feet or so instead of the joystick button.

A small Lua plug in would do that quite easily.

FSUIPC Ver 4.745

That older version has not been supported fdor a while now. You need at least the current main version, 4.827, and the latest incremental release is 4.839b (see the Download Links subforum).

Regards

Pete

Link to comment
Share on other sites

Hello guys, I am having a similar problem here with motorised Spoiler handle.

I think the easiest way to solve that would be to make the spoiler axis value in FSUIPC readable as well: this way you can base your motor logic on the input signal and not the spoiler position in the panel which lot of times jumps in up position before the phisical lever reaches the same position causing the motor to stop at a middle point as the logic reads the lever position in FS is already in the deployed position while the lever is not. Would it be possible to do Peter?

Link to comment
Share on other sites

Hi Pete,

No, I was inputting 2 as parameter on the old FSUIPC Ver too, but the inhibit function was not working with either "Word Set bits" or "ToggleBits". As per your instruction I updated my FSUIPC Ver to 4.80 and my issue with the joystick button was solved instantly :razz: now with a push of a button I can inhibit the speed brake axis completely using toggleBits. Can you please help with the LUA script so I don't have to physicality press a button to inhibit the speed brake? 100 radar altimeter or aircraft on the ground (squat switch) would be ideal for what I'm trying to do.

Thank you kindly.

Best regards

Phil

Link to comment
Share on other sites

Can you please help with the LUA script so I don't have to physicality press a button to inhibit the speed brake? 100 radar altimeter or aircraft on the ground (squat switch) would be ideal for what I'm trying to do.

Didn't you take a look at the Lua documents in your FSUIPC documents folder?

Try this. It checks the radio altitude every half second (should be ample?) and if below, stops the axis, if above enables it.


function checkalt()
radioalt = ipc.readUW(0x31E6) -- gets radio altitude in metres
if radioalt < 30 then
ipc.setbitsUB(0x32F8, 2) --set inhibit
else
ipc.clearbitsUB(0x32F8, 2) -- release inhibit
end
end

event.timer(500, "checkalt")[/CODE]

Save it as[b] ipcReady.lua [/b]in your Modules folder (or, if you are already using [b]ipcReady.lua[/b] for something else, like LINDA or whatever), save it as, say [b]"autospoil.lua[/b]" then add a line to the existingipcReady.lua like this:

[CODE]
ipc.runlua("autospoil")[/CODE]

I've not tested it here, mind. But it looks right.

Regards

Pete

Link to comment
Share on other sites

Hi Pete,

I copied the LUA script that you provided and then open my notepad and paste the content onto the notepad and saved it as ipcReady.LUA into the module folder of FSX as per your instructions . I'm not running any other .LUA files or LINDA files in the module folder. Do I need any other .LUA file to launch the ipcReady.lua file?

I tried several flight with the ipcReady.LUA in the module folder, but I still have full control of the the spoiler axis under 30 or 100 radar altimeter or even on the ground.

Any suggestions.

Best regards

Phil

Link to comment
Share on other sites

I copied the LUA script that you provided and then open my notepad and paste the content onto the notepad and saved it as ipcReady.LUA into the module folder of FSX as per your instructions . I'm not running any other .LUA files or LINDA files in the module folder. Do I need any other .LUA file to launch the ipcReady.lua file?

No, but I just spotted an error, which I've now corrected -- the last line should be

event.timer(500, "checkalt")

Please, when running any plug-ins, if they don't work check the FSUIPC log file -- also in the Modules folder. There would have been an error logged there because of my mistake.

Pete

Link to comment
Share on other sites

is this correct:

function checkalt()

radioalt = ipc.readUW(0x31E6) -- gets radio altitude in metres

if radioalt < 30 then

ipc.setbitsUB(0x32F8, 2) --set inhibit

else

ipc.clearbitsUB(0x32F8, 2) -- release inhibit

end

end

event.timer(500, "checkalt")

Link to comment
Share on other sites

Here's a copy of the log file in my FSX module folder:

31 System time = 09/07/2012 12:04:26

31 FLT path = "C:\Documents and Settings\Administrator\My Documents\Flight Simulator X Files\"

47 Trying to connect to SimConnect Acc/SP2 Oct07 ...

47 FS path = "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\"

765 LogOptions=00000000 00000001

765 Wind smoothing fix is fully installed

765 G3D.DLL fix attempt installed ok

765 SimConnect_Open succeeded: waiting to check version okay

765 Trying to use SimConnect Acc/SP2 Oct07

6843 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0)

6843 Initialising SimConnect data requests now

6843 FSUIPC Menu entry added

6875 C:\Documents and Settings\Administrator\My Documents\Flight Simulator X Files\Old Hong Kong.FLT

6875 C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\B737_800\Boeing737-800.AIR

63359 System time = 09/07/2012 12:05:30, Simulator time = 12:04:35 (05:04Z)

63359 Aircraft="Boeing 737-800 Paint2"

64453 Starting everything now ...

64453 LUA.0: beginning "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules\ipcReady.lua"

64453 LUA.0: ended "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules\ipcReady.lua"

65531 Advanced Weather Interface Enabled

83672 Sim stopped: average frame rate for last 20 secs = 15.6 fps

392187 Sim stopped: average frame rate for last 225 secs = 16.4 fps

399906 Weather Mode now = Theme

399906 C:\Documents and Settings\Administrator\Application Data\Microsoft\FSX\Previous flight.FLT

410578 System time = 09/07/2012 12:11:17, Simulator time = 12:04:33 (05:04Z)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.