Autopilot configuration reference: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 414: Line 414:
A monostable flip flop has only one stable state which will be reentered after a well defined time. The stable state in current implementation is the output set 'false' or 0. The Monostable is an extension of the JK flip flop. Additionally to the input values defined there, an InputValue for the definition of the pulse time is mandatory.  
A monostable flip flop has only one stable state which will be reentered after a well defined time. The stable state in current implementation is the output set 'false' or 0. The Monostable is an extension of the JK flip flop. Additionally to the input values defined there, an InputValue for the definition of the pulse time is mandatory.  


The moment the time for the astable state starts counting depends on the input used to set the output. If the output is set from the SET input of the RS flipflop, the output is kept true for the defined time after the SET input enters it's false state. The total time the output is true equals the time, the SET input is true plus the time defined in the <time> element.
The moment the time for the astable state starts counting depends on the input used to set the output. If the output is set from the SET input of the RS flipflop, the output is kept true for the defined time ''after'' the SET input enters it's false state. The total time the output is true equals the time, the SET input is true plus the time defined in the <time> element.
If the output is set from the J and clock inputs of the JK flipflop, the timer starts on the raising edge of the clock input. The output signal will be true for exactly the time defined in the <time> element.  
If the output is set from the J and clock inputs of the JK flipflop, the timer starts on the raising edge of the clock input. The output signal will be true for exactly the time defined in the <time> element.  


Line 433: Line 433:
   </flipflop>
   </flipflop>
</syntaxhighlight>
</syntaxhighlight>
The following example shows how a monostable can be used to enable a certain property (/myflipflop/output) if another property (/myflipflop/s) is true for at least the specified amount of time:
<syntaxhighlight lang="xml">
<flipflop>
    <name>Test mf</name>
    <type>monostable</type>
    <inverted type="bool">true</inverted>
    <S>
        <not>
            <property>/myflipflop/s</property>
        </not>
    </S>
    <time>
        <value>10.0</value>
    </time>
    <output>
        <property>/myflipflop/output</property>
    </output>
</flipflop>
</syntaxhighlight>
In this example the monostable is inverted, which means the stable state is true instead of false. The key idea here is to keep the monostable in its unstable state (false) by keeping the set line true, which is the case when /myflipflop/s is false. Then, when /myflipflop/s becomes true the set line becomes false, which causes the timer to start. When the timer expires (in this case 10 seconds) the monostable will enter its stable state (true). At any time when the set line becomes true (when /myflipflop/s becomes false) the monostable will immediately enter its unstable state (false) again, resulting in /myflipflop/output to become false immediately.


== filter ==
== filter ==
72

edits

Navigation menu