Difference between revisions of "Component: Switch (Microswitch) (Switch)"

From Flowcode Help
Jump to navigationJump to search
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.2 |- | width="20%" style="color:gray...")
 
 
Line 20: Line 20:
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
Line 96: Line 100:
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" | Notify
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
|-
 
| colspan="2" | Whether to send a notification event to the component's parent. When enabled, set a message ID below to aid identification of events. Data will be one or zero, representing the microswitch state.&nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
 
|-
 
|-
 
|-
 
|-
Line 115: Line 114:
 
| colspan="2" | The state that the pin should take when the switch is pressed.&nbsp;
 
| colspan="2" | The state that the pin should take when the switch is pressed.&nbsp;
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
|-
 
|-
Line 128: Line 127:
 
|-
 
|-
 
| colspan="2" | Time in milliseconds between collision scans. Small time = Greater CPU load Large time = More like to miss brief collisions.&nbsp;
 
| colspan="2" | Time in milliseconds between collision scans. Small time = Greater CPU load Large time = More like to miss brief collisions.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Notification
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Notify
 +
|-
 +
| colspan="2" | Whether to send a notification event to the component's parent. When enabled, set a message ID below to aid identification of events. Data will be one or zero, representing the microswitch state.&nbsp;
 
|}
 
|}

Latest revision as of 17:19, 9 November 2022

Author Matrix Ltd
Version 1.2
Category Switch


Switch (Microswitch) component

Industry standard V3 size microswitch fitter with a roller arm - activated by other panel objects coming into contact with the roller. Changes the state of a chip pin, and sends a simulation notification message when its state changes.

Component Pack

SENSORS

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Downloadable macro reference

Fc9-comp-macro.png ReadState
Get the current collision state. The 'Polarity' property will affect whether a collision is represented by a high or low state. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SetTarget
Set the object that you want to test for collision with. If this is not called, or is called with handle = 0, collisions will be tested against every panel object that has 'Solid' status. NB) Specifying an object will save CPU power!! 
Fc9-h32-icon.png - HANDLE Target
The object to test for collision with. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WaitUntilHigh
Pause the program until the detector goes high. 'Polarity' will affect whether high value represents a collision or separation. NB) In simulation, only use this macro if testing for collision with animated or timer driven objects!! 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WaitUntilLow
Pause the program until the detector goes low. 'Polarity' will affect whether low value represents a collision or separation. NB) In simulation, only use this macro if testing for collision with animated or timer driven objects!! 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-5-icon.png Pin
The chip pin that will change state when the switch is activated. 
Fc9-type-16-icon.png Polarity
The state that the pin should take when the switch is pressed. 
Fc9-conn-icon.png Simulation
Fc9-type-17-icon.png Target Object
Choose a specific other object to test for collision with. If left unconnected, the test object will be tested against every object on the panel. Choose a specific object to check against wherever possible - checking all objects requires much more time and computing power! 
Fc9-type-21-icon.png Timer Interval (ms)
Time in milliseconds between collision scans. Small time = Greater CPU load Large time = More like to miss brief collisions. 
Fc9-conn-icon.png Notification
Fc9-type-7-icon.png Notify
Whether to send a notification event to the component's parent. When enabled, set a message ID below to aid identification of events. Data will be one or zero, representing the microswitch state.