Difference between revisions of "Drive (LogiX node)"

From Neos Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
<translate>
 
<translate>
 
<!--T:1-->
 
<!--T:1-->
The '''Drive''' value node will start driving the referenced DriveTarget value with the input Source value when an impulse is received at StartDrive. It will stop driving the DriveTarget if an impulse is received at StopDriving.
+
{{Infobox Logix Node
 +
| Name = Drive
 +
| Image =[[File: DriveValueNode`1Node.png | noframe | 128px | 'Drive' LogiX node ]]
 +
| Input0Type = Impulse | Input0Name = StartDrive
 +
| Input1Type = Impulse | Input1Name = StopDrive
 +
| Input2Type = dummy | Input2Name = Source
 +
| Output0Type = IField`1 | Output0Name = DriveTarget
 +
| Output1Type = Impulse | Output1Name = OnStartDrive
 +
| Output2Type = Impulse | Output2Name = OnStopDrive
 +
| Output3Type = Impulse | Output3Name = OnHook
 +
| Output4Type = Bool | Output4Name = IsDriving
 +
| Output5Type = dummy | Output5Name = HookedValue
 +
}}
  
 
<!--T:2-->
 
<!--T:2-->
<!--[[File:|border|256px|right]]-->
+
The '''Drive''' node will start [[Drive|driving]] the referenced <code>DriveTarget</code> with the input <code>Source</code> value when an impulse is received at <code>StartDrive</code>. The drive can be stopped by an impulse received at <code>StopDrive</code>.
  
== Inputs & Outputs == <!--T:3-->
+
== Usage == <!--T:3-->
{| class="wikitable"
+
The <code>Source</code> input has a 'dummy' datatype when the node is spawned from the node browser. However, the node will overload to the correct value type when a suitable wire is connected.
|+Inputs
 
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| StartDrive
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| StopDrive
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Dummy-color}}" |
 
| Source
 
| [[:Category:Types:Dummy|(dummy)]]
 
|}
 
  
<!--T:4-->
 
{| class="wikitable"
 
|+Outputs
 
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{IField-color}}" |
 
| DriveTarget
 
| [[:Category:Types:IField`1|IField<nowiki><T></nowiki>]]
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| OnStartDrive
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| OnStopDrive
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| OnHook
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Boolean-color}}" |
 
| IsDriving
 
| [[:Category:Types:Bool|Boolean]]
 
|-
 
| style="background-color:{{Dummy-color}}" |
 
| HookedValue
 
| [[:Category:Types:Dummy|(dummy)]]
 
|}
 
{{:LogiX:Driving{{#translation:}}|Driving}}
 
  
== Usage == <!--T:5-->
+
<!--T:10-->
The Source input and HookedValue outputs start with an unset dummy type, the node will recast to the appropriate type when either of these, or the DriveTarget, is set. If the value referenced by TargetValue is being driven by another source, including another Drive node, when an impulse is received at StartDrive the previous drive will be overridden by the new drive Source. Driven values cannot be written to, however, if a Drive node has set up an active drive on the DriveTarget and an attempt is made to write to that value, an impulse is fired from OnHook and the HookedValue output provides the value which would have been written to the target (available for the duration of the impulse chain from OnHook). OnStartDrive and OnStopDrive fire impulses when a drive is successfully started or stopped as a result of impulses at StartDrive or StopDrive respectively.
+
The <code>OnStartDrive</code> output fires an impulse whenever an impulse arrives at the <code>StartDrive</code> input. This continues the impulse chain which arrived at <code>StartDrive</code>.
  
== Examples == <!--T:6-->
 
  
 +
<!--T:11-->
 +
The <code>OnStopDrive</code> output fires an impulse whenever an impulse arrives at the <code>StopDrive</code> input. This continues the impulse chain which arrived at <code>StopDrive</code>.
  
== Node Menu == <!--T:7-->
+
 
 +
<!--T:12-->
 +
The <code>OnHook</code> fires an impulse whenever the <code>DriveTarget</code> is driven with the <code>Source</code> value and another source (e.g. a [[Write (LogiX node)|Write]] node or [[ButtonValueSet (Component)|ButtonValueSet]] component) attempts (but is not able) to overwrite the value.
 +
 
 +
 
 +
<!--T:13-->
 +
The <code>IsDriving</code> output is True while the <code>DriveTarget</code> is driven with the <code>Source</code> value, otherwise False.
 +
 
 +
 
 +
<!--T:14-->
 +
The <code>HookedValue</code> output provides the value which another source attempted to set the <code>DriveTarget</code> to when an impulse is fired from <code>OnHook</code>. The value is only available for the duration of the impulse chain started from <code>OnHook</code>.
 +
 
 +
 
 +
<!--T:15-->
 +
Note that, when an impulse is received at <code>StartDrive</code> the drive target will become driven by the <code>Source</code> value regardless of whether it was already driven by some other source i.e. control of the target value is overridden.
 +
 
 +
== Examples == <!--T:4-->
 +
[[File:LogiX.Actions.Drive.Sample.jpg|900px|Drive example]]
 +
 
 +
== Node Menu == <!--T:5-->
 
</translate>
 
</translate>
  
 
[[Category:LogiX{{#translation:}}|Drive]]
 
[[Category:LogiX{{#translation:}}|Drive]]
[[Category:LogiX: Actions{{#translation:}}|Drive]]
+
[[Category:LogiX{{#translation:}}:Actions{{#translation:}}|Drive]]
{{:NodeMenu-Actions{{#translation:}}}}
+
{{NodeMenu-Actions}}

Latest revision as of 04:10, 19 February 2022

Other languages:
English • ‎日本語 • ‎한국어
Drive
'Drive' LogiX node
Inputs
  Impulse StartDrive
  Impulse StopDrive
  dummy Source
Outputs
  IField`1 DriveTarget
  Impulse OnStartDrive
  Impulse OnStopDrive
  Impulse OnHook
  Bool IsDriving
  dummy HookedValue

The Drive node will start driving the referenced DriveTarget with the input Source value when an impulse is received at StartDrive. The drive can be stopped by an impulse received at StopDrive.

Usage

The Source input has a 'dummy' datatype when the node is spawned from the node browser. However, the node will overload to the correct value type when a suitable wire is connected.


The OnStartDrive output fires an impulse whenever an impulse arrives at the StartDrive input. This continues the impulse chain which arrived at StartDrive.


The OnStopDrive output fires an impulse whenever an impulse arrives at the StopDrive input. This continues the impulse chain which arrived at StopDrive.


The OnHook fires an impulse whenever the DriveTarget is driven with the Source value and another source (e.g. a Write node or ButtonValueSet component) attempts (but is not able) to overwrite the value.


The IsDriving output is True while the DriveTarget is driven with the Source value, otherwise False.


The HookedValue output provides the value which another source attempted to set the DriveTarget to when an impulse is fired from OnHook. The value is only available for the duration of the impulse chain started from OnHook.


Note that, when an impulse is received at StartDrive the drive target will become driven by the Source value regardless of whether it was already driven by some other source i.e. control of the target value is overridden.

Examples

Drive example

Node Menu

Actions
Back -- ++ Drive Drive Playback Tween Write
Write Latch Write Ref Write Ref Latch