MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
OmniAtlas
Posts: 40
Hello,

I managed to implement the A/P sidestick solenoid lock using MobiFlight and a relay - please see it in action here:

https://www.youtube.com/watch?v=NP-FKekLYHo

Using mask values I have been able to use AND/OR logic for AP1 and AP2 (the solenoid will only lock when AP1 and/or AP2 is turned on).

However the solenoid will also lock when you do a light test in the aircraft.

Jean Luc (developer of FMGS) has told us to monitor the SPD display (I assume this is the speed display of the Flight Control Unit, or the autopilot system); when you perform a light test it will display 888

Is there a way for mobiflight to use a NOT logic, so to exclude turning on the solenoid when light test in the aircraft is being done, and the speed displays 888?

Thank you,

Ben
2017-11-12 11:32
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3726
Supporter
Hi

Here i can only help you with "logic" but i not know the Airbus Systems.... So you have maby to expalne me "how" this should work finaly.....

Please Confirm.....

Your System ( A relais as a output) should be ON aslong AP1 is enabled .... It should be ON if AP2 is enable ..... and it should be ON if Both AP1 and AP2 are eneble same time.

iconOmniAtlas:

I have been able to use AND/OR logic for AP1 and AP2 (the solenoid will only lock when AP1 and/or AP2 is turned on).



Here i think the Double AND and OR Logic is not needed.... a OR will be enough. ...
If you say simply " AP1=ON OR AP2= ON" then the condition is TRUE whatever AP1, AP2 or Both are ON.

*****

iconOmniAtlas:


However the solenoid will also lock when you do a light test in the aircraft.



Looks like you Readout the Status of the AP1 and AP2 LED for your precondition of the Relais..... So if i understand you the "Lighttest" will change the AP1 AP2 LED Offset to "1" whatever they are not realy on and you only do a lighttest !
If Yes then Jean Luc is right..... The Lighttest will change the Speed Display to 888.... So you can use this as Condition to check if the lighttest is ON.

iconOmniAtlas:


Is there a way for mobiflight to use a NOT logic, so to exclude turning on the solenoid when light test in the aircraft is being done, and the speed displays 888?



A NOT Logic is not included.... But you simply can work inverted and implement the "NOT" in the Value itself....
In that Case .... Use "!= Not Equal to"
Readout the Speed Display.... and use in your Preconditions of Relais : Speed Config != 888 ..... Then your Relais only work if Speed is NOT 888 .
Same result is if you work with a "LESS <" operator.... If for example speed can have a maximum of 400kn (Dont know) you can say.... Only work if Config is <401
if Speed now is 888 while Light test then condition is FALSE, too.

Complete Logic now must be.....
Condition 1: AP1 = 1 OR
Condition 2: AP2 =1 AND
Condition 3: SPEED != 888 ( in that Last (3.rd) condition its no mater if you use AND OR.... )

Now Mobiflight do what you need.
But NOT Change Sequence.... If you say 1: Speed AND 2. AP1 OR 3. AP2 .... This will NOT work! The IF Logic with more then 2 indicators is verry advanced in Mobiflight !


****

last note...
Just for interest tell me HOW you make the disconnect function working.....

You say in Youtube:
iconQuote:

Sidestick mechanism is immobile until a certain amount of force is applied to override the solenoid, or when AP is disengaged.



To make this working you need a INPUT here that "see" the manual overdrive ... And it must disable Both autopilot Systems via Mobiflight.
Right ??
Good Luck !
2017-11-13 06:56
Avatar
OmniAtlas
Posts: 40
Thank you for your response pizman82.

I am not too sure what exact logic mobiflight is using, it works as it should be when under the mask values I select 0 and 1 - this matches up with the Read bits for AP1 (readbit 0), and AP2 (readbit 2) under offset 7390 for FMGS.

How would I apply the != logic? Would this be under the 'Compare' tab in the Config Wizard?

It seems SPD/Mach uses 73CC offset, which is a data pipe function -- unfortunately I have never used the datapipe functionality in Mobiflight

When you apply enough force on the sidestick Jeehell FMGS detects an axis deviation and will immediately disconnect AP1 or AP2 - this shutsdown the LED outputs and sequentially turns off the solenoid.

Thank you.
2017-11-13 07:30
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3726
Supporter
iconOmniAtlas:


When you apply enough force on the sidestick Jeehell FMGS detects an axis deviation and will immediately disconnect AP1 or AP2 - this shutsdown the LED outputs and sequentially turns off the solenoid.
Thank you.



Ah ok..... That means the solenoid is moveable enough ( when it´s on) so you be able to push ith wide enough so Jeehell can " see" the moving.... I was not shure if you completly "block" the Stick.

About the Technic.....

The Indicator Bits for AP1 and AP2 are correct ..... I can´t test but as you said.... It look like they still "1" when lighttest is active and autopilot is not on.

Your 73CC for Speed is WRONG..... this Datapipe is for INPUT !
You need Offset 73C1 2 Byte INT ( thats the Output value)
Simply make a readout Config for that ( Without Display.... Just for precondition) OR Use the Config you make for the 7 Segement SPD Display if you already build.


About the != ..... this is a Part of the "Precondition Tab" ( And in compare... but we need precondition here)
So get in Your RELAIS Output Config.... there you already create the condition for AP1 OR AP2.....
Simply make a 3.rd line ( Like i explane last posting)
Again... Please make same sequence i show you..... not different like SPD before AP1 and AP2.
Good Luck !
2017-11-13 09:16
Avatar
OmniAtlas
Posts: 40
Thank you pizman,

My apologies if I am not understanding you correctly. This is what I have so far:



When I do the light test the solenoid still locks, and I get an ! mark next to the line.

The precondition I used for Speed FCU readout is !=888 (AND)
2017-11-13 10:56
Avatar
OmniAtlas
Posts: 40
iconQuote:

Ah ok..... That means the solenoid is moveable enough ( when it´s on) so you be able to push ith wide enough so Jeehell can " see" the moving.... I was not shure if you completly "block" the Stick.



The sidestickis locked, however you need to apply a certain force between it can override the solenoid. I can't remember the FCOM reference.
2017-11-13 11:13
Avatar
OmniAtlas
Posts: 40
I have tried the following conditions also with no such luck -

2017-11-13 11:38
Avatar
OmniAtlas
Posts: 40
Okay, FINALLY got it to work, thank you for the help.

I forgot to tick the 0 and 1 box under Mask value for the 'Autopilot Solenoid Lock'

I'm happy to learn Mobiflight is so flexible, I will do a write up and put up a tutorial for other users to follow on http://www.soarbywire.com

Regards,

Ben
2017-11-13 11:43
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3726
Supporter
Please wait with that.....

i see a Issue in the Config. Must rethink that and test 1 part..... Will do that when im out of work tonight or the next days.....

The System seem to work fine but there are some situations your current logic get broke .... Please give me 1-2days for that !
Good Luck !
2017-11-13 17:37
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3726
Supporter
Ok....

Summary THIS is a verry tricky situation....

1. We use 2 not needed Preconditions here....
We Say... "If AP1 =1 OR AP2=1" ..... But we can already do this via the Readout Value.
I see your Relais Config workes with Offset 7390 ( Bitmask for Bit 0 and Bit1) ....
That mean the Readouit Value is....
0 if Both AP are OFF
1 if AP1 is ON
2 if AP2 is ON
3 if Both AP are ON
That means we can say.... Value 0 = AP OFF ..... Value 1 (or bigger) = 1 or both AP are ON.

So we not longer need this Both Preconditions and can simply use the Readout Value now.... Only the last Precondition " Only Work if Speedconfig !=888" is needed.
(Additional we solve a issue that can happen if you "overdrive" the Stick manualy that the solenoid not get OFF.... So THIS is high recommend)


But now the Problem:

Remeber the Basic Rule for all Outputs.... a Device ( LED, Display, Releais, Motor) SHOULD be controlled every time by a ACTIVE Config.
If you Disable a Config via Precondition ( Like you do) then this config NOT Controll the Device (Relais) while its Disabled .... (Show by the !!! mark left of Config)
BUT: That NOT means it deactivate the Device.... It means the Device stay in it´s last status as before the config was disabled.


Example in your situation....
Both AP are OFF .... And you now Push LightTest Button.....
As you describe the Lighttest will set Speeddisplay to "888" AND it will set Both AP Indicator Offsetbits to "1" ( Whatever they are off in reality)

NOW the question is WHAT happend first.... Or if its complete same time.... What does Mobiflight see first ??
If Speed is first 888 THEN our Config will be disabled BEFORE the AP1/AP2 Bits gets "High" and run your solenoid. ( Thats what we like)
BUT otherwise: If AP1/AP2 will be first at "1" before Speed is "888" then our config Set solenoid to ON milliseconds before it get disabled by the 888 Precondition.
Aslong it´s disabled the Device is then still ON ( Cause no other Config tell it it should be OFF like we need at the moment)

PLEASE: check this out.... Test with light test button multiple times.... Does it happen that it work wrong sometimes ??
( I just get the idea that it is important that READOUT SpeedOffset Config MUST be IN FRONT of the Relais Config (In Mobiflight Sequence) ...... Then the Precondition should work BEFORE the other Change is happend)

***

If it not work 100% fine we need a additional "OFF Config", too..... A config ( At Same Relais) that work inverted and always is active when the original Config is disabled..... Precondition there is "Only work if SpeedConfig =888" And with a fixed Value of 0 ZERO.... So Your relais is always OFF when it should be OFF.
BUT: THEN we got a new Problem.... If you then Push then Lighttest while AP is realy on ( While Flight) then the solenoid get OFF now..... Without this condition it will stay ON in that situation !

If you like please try out and think about that !
Good Luck !
2017-11-13 23:14
Avatar
OmniAtlas
Posts: 40
Thank you -- I will test again --

Last night it seemed to work fine, but I did not perform a lighttest while in flight with AP engaged --

https://www.youtube.com/watch?v=jR2BFn_clM0
2017-11-14 02:45
Avatar
OmniAtlas
Posts: 40
Hello,

I am trying to setup the second solenoid (FO sidestick) - is it possible to output to one Pin (Display tab on ConfigWizard) on a trigger event?

Thank you.

Ben
2017-11-14 11:19
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3726
Supporter
iconOmniAtlas:

is it possible to output to one Pin (Display tab on ConfigWizard) on a trigger event?



Sorry i not understand !
Please explane more detailed.

Do you mean the FO Stick should be blocked always same time when CPT Stick is blocked ?? Then simply set your FO solenoid to the same Releais....
If it´s 100% simmular then you need no second config and the first can controll both elements same time.

If i understand wrong and you need another system please explane me.
Good Luck !
2017-11-14 12:03
Avatar
OmniAtlas
Posts: 40
Hi Pizman, yes you are correct, I will just use one relay switch to control both solenoids.

There is no need to use two relay switches as one is sufficient.

I will report back when it is complete.
2017-11-14 12:22
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3726
Supporter
Ok.... Just one last thing.... I already think about a better way for the main system finaly....

If you find time you can check one fact.....
Please Observe offset 07BC 4 Byte INT
(Simply create a output config without Device and activate it....)
Then Set your AP to ON.... Test AP1 Only... AP2 Only .... AP1+AP2 and NO AP...... Please report how this Offset work while you test this.

THAT is the FSX/P3D original Offset for the AP Master Controll.
IF we are lucky then Jeehell controll this offset, too.... So Whatever One or both AP are ON then this offset is 1 .... AP OFFmeans that offset is 0....
If this work then please make a Lighttest while AP is OFF...... Normaly Then this offset should NOT change.

Not shure if Jeehell use this offset .....If possible then you can use it for your solenoid finaly.... No Precondition needed.... no problems in the future.... Much more easy.
Good Luck !
2017-11-14 12:29
Go to page 1Go to page 012Go to page 2Go to page 2