Component: Switch (BL0145) (E-blocks 2)

From Flowcode Help
Revision as of 14:25, 24 May 2018 by BenR (talk | contribs) (Created page with "{| width="50%" |- | width="20%" style="color: gray;" | Author | Matrix TSL |- | width="20%" style="color: gray;" | Version | ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Author Matrix TSL
Version 1.0 (Release)
Category E-blocks 2


Image Switch (BL0145) component

A set of 8 push switches that can be connected to an E-blocks 2 upstream board via a port connector. Switches are wired in an active high configuration.

Examples

''<span style="color:red;">No additional examples</span>''


Downloadable macro reference

<span style="font-weight: normal;"><u><tt>ReadState</tt></u></span>

Read the state of the switch at the given index.

'''Parameters'''

BYTE ''Index''
The switch to read the status of.


'''Return value'''

BOOL : Key state - true = on, false = off


<span style="font-weight: normal;"><u><tt>WaitUntilHigh</tt></u></span>

Pause the program until the switch at the given index is turned on.

'''Parameters'''

BYTE ''Index''
Index of the switch to wait for.


'''Return value'''

''This call does not return a value''


<span style="font-weight: normal;"><u><tt>ReadAll</tt></u></span>

Reads all of the switches at once, returning a byte containing one bit per

switch.

'''Parameters'''

''This macro has no parameters''


'''Return value'''

BYTE : One bit per switch in the array.


<span style="font-weight: normal;"><u><tt>WaitUntilLow</tt></u></span>

Pause the program until the switch at the given index is turned on.

'''Parameters'''

BYTE ''Index''
Index of the switch to wait for.


'''Return value'''

''This call does not return a value''


Simulation macro reference

''This component does not contain any simulation macros''


Property reference

<span style="font-weight: normal;"><u>Input Mode</u></span>

This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''port''.

Choose how your switches are connected.

PORT = Single port byte for all switches - pins are allocated in sequence from pin 0 - X

Custom = Individual pin by pin connections

<span style="font-weight: normal;"><u>Port</u></span>

This property is of type ''Digital port byte'' and can be referenced with the variable name ''PortByte''.

''<span style="color:red;">No additional information</span>''