Component: Simulation Switch Template (Controls): Difference between revisions
Appearance
No edit summary |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (16 intermediate revisions by 2 users not shown) | |||
| Line 14: | Line 14: | ||
==Simulation Switch Template component== | ==Simulation Switch Template component== | ||
A base for building switches that do not download to chip. Mouse interaction can send 'System.User' events with the following data... ID = The handle of the switch component sending the message Message = 1 (on) or 0 (off) Current state can also be read via simulation macros. | A base for building switches that do not download to chip. Mouse interaction can send 'System.User' events with the following data... ID = The handle of the switch component sending the message Message = 1 (on) or 0 (off) Current state can also be read via simulation macros. | ||
==Component Source Code== | |||
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_sim_switch_base.fcfx FC_Comp_Source_sim_switch_base.fcfx] | |||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_sim_switch_base.fcfx FC_Comp_Source_sim_switch_base.fcfx] | |||
==Detailed description== | ==Detailed description== | ||
| Line 28: | Line 50: | ||
==Examples== | ==Examples== | ||
| Line 41: | Line 79: | ||
{| class="wikitable | |||
==Macro reference== | |||
===GetState=== | |||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetState''' | ||
|- | |- | ||
| colspan="2" | Read the current state of the switch. Returns BOOL true when the switch is on, or BOOL false when off. | | colspan="2" | Read the current state of the switch. Returns BOOL true when the switch is on, or BOOL false when off. | ||
| Line 56: | Line 107: | ||
{| class="wikitable | ===SetState=== | ||
{| class="mtx-class-macrotable wikitable" | |||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetState''' | ||
|- | |- | ||
| colspan="2" | Sets the current state of the switch. BOOL true when the switch is on, or BOOL false when off. | | colspan="2" | Sets the current state of the switch. BOOL true when the switch is on, or BOOL false when off. | ||
| Line 72: | Line 124: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 128: | Line 178: | ||
|- | |- | ||
| colspan="2" | Default state of the indicator when loading the project or starting the simulation runtime. | | colspan="2" | Default state of the indicator when loading the project or starting the simulation runtime. | ||
|} | |} | ||
Latest revision as of 14:23, 13 July 2026
| Author | Matrix Ltd |
| Version | 1.3 |
| Category | Controls |
Simulation Switch Template component
A base for building switches that do not download to chip. Mouse interaction can send 'System.User' events with the following data... ID = The handle of the switch component sending the message Message = 1 (on) or 0 (off) Current state can also be read via simulation macros.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_sim_switch_base.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_sim_switch_base.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetState
| GetState | |
| Read the current state of the switch. Returns BOOL true when the switch is on, or BOOL false when off. | |
| Return | |
SetState
| SetState | |
| Sets the current state of the switch. BOOL true when the switch is on, or BOOL false when off. | |
| SwitchState | |
| Sets the state of the switch | |
| Return | |