Benutzer-Werkzeuge

Webseiten-Werkzeuge


advanced_macro

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
advanced_macro [2018/03/27 13:21] – [Change I/O behaviour of input port] akuhtzadvanced_macro [2023/11/14 09:32] (aktuell) – [Accessory notify - ' Okay, if value = 0 / 1'] akuhtz
Zeile 2: Zeile 2:
  
 In diesem Kapitel werden tiefergehende Erläuterungen zu Makro und Accessory beschrieben. In diesem Kapitel werden tiefergehende Erläuterungen zu Makro und Accessory beschrieben.
 +
 +The following sections describe the options of the ''Port Type'' column. 
 +
 +Some ''Port Type''s have the ''Delay'' column enabled. A delay value is used to wait //before// the step is executed. If you want to add a delay before the step you must use the ''Port Type'' ''Delay''.
 +
 +
 +===== Macro =====
 +
 +The port type ''Macro'' allows to ''start'' or ''stop'' another macro from the selected macro. This is required if more macros are running that control the same ports.
 +
 +===== Input Port =====
 +
 +The port type ''Input Port'' allows to block the current macro execution in this step until the selected option in the ''Action'' column is satisfied.
 +If you choose ''Wait until value=0'' then the macro will be blocked in this step until the selected input port has a value of 0 (off).
 +If you choose ''Wait until value=1'' then the macro will be blocked in this step until the selected input port has a value of 1 (on).
 +
 +===== Other Port Types =====
 +
 +The other //simple// port types like
 +  * ''Light Port'' 
 +  * ''Servo Port''
 +  * ''Switch Port''
 +  * ''SwitchPair Port''
 +allows to perform an action on the selected port.
 +
 +For ''Servo'' ports the ''Destination value'' must be entered in the ''Extra'' column. This value is used as target value for the servo in this step.
 +
 +===== Await servo move =====
 +
 +The type ''Await servo move'' will block the current macro in this step until the selected servo has reached the target value.
 +
 +===== Delays =====
 +
 +The type ''Delay'' allows to wait for the configured delay in this step. 
 +
 +The ''Random Delay'' allows to wait for a random delay with a maximum of the configured delay  in this step.
 +
 +The ''Ticks'' is a time specification for the waiting time before the action is executed. The basic unit is a macro tick and is 20ms.
 +
 +===== Flag =====
 +
 +The type ''Flag'' is used to ''clear'', ''query'' or ''set'' a flag. A flag is a global //marker// in the assembly and is shared between all macros. If you ''set'' or ''clear'' the flag in one macro, the all other macros see the same flag value. \\
 +This can be used to let one macro wait (block in this step) until a flag value gets ''0'' (''Query 0'') or ''1'' (''Query 1'') before the macro continues. 
 +
 +Flags are only available internally in the assembly and the current value cannot be queried or set from outside a macro execution.
 +
 +===== Critical Section =====
 +
 +The type ''Critical Section'' is used to protect the steps between the step ''Critical Section'', Action ''Start'' and step ''Critical Section'', Action ''End'' from being interrupted or aborted.
 +
 +{{ :wizard:macro-critical-section.png |}}
 +
 +:!: The step ''Critical Section'' is an envelope around some steps and therefore you must have a step ''Start'' and a step ''End'' to work correctly.
 +
  
 ===== Accessory notify ===== ===== Accessory notify =====
Zeile 24: Zeile 78:
 ===== Accessory notify - ' Okay, if value = 0 / 1' ===== ===== Accessory notify - ' Okay, if value = 0 / 1' =====
  
-In the macro below the accessory will always be finished with an error because in step 4 the input 'Servo end left reached' waits until it becomes '1' and some ms later the check in step 6 for the same input with a value = '0' is performed.+In the macro below the accessory will always be finished with an error because in step 4 the input 24: 'Servo end left reached' waits until it becomes '1' and some ms later the check in step 6 for the same input with a value = '0' is performed. \\
 So the Action should be interpreted as 'Return result Okay, if value = '0' and error otherwise'. So the Action should be interpreted as 'Return result Okay, if value = '0' and error otherwise'.
  
advanced_macro.1522149694.txt.gz · Zuletzt geändert: 2018/03/27 13:21 von akuhtz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki