Difference between revisions of "Component: Reed Switch (Magnetic)"

From Flowcode Help
Jump to navigationJump to search
Line 20: Line 20:
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 26: Line 28:
  
 
==Examples==
 
==Examples==
 +
 +
  
  

Revision as of 14:42, 16 January 2023

Author Matrix Ltd
Version 1.2
Category Magnetic


Reed Switch component

Simple on off switch triggered by the proximity of another object.

Component Source Code

Please click here for the component source code: FC_Comp_Source_Reed_Switch.fcfx

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 receive the switch status. 
Fc9-type-16-icon.png Polarity
Select the pin state that will indicate that an object has been detected. 
Fc9-conn-icon.png Simulation
Fc9-type-17-icon.png Magnet Object
Select an object from the panel to act as the magnet that triggers the reed switch. 
Fc9-type-15-icon.png Range
Distance within which the switch is activated. NB) This is measured between the centre of the proximity switch and the centre of the target object. 
Fc9-type-21-icon.png Timer Interval (ms)
Time in milliseconds between testing for proximity. Small time = Greater CPU load Large time = More like to miss activation if it is very brief.