I have a switch (a toggle component) connected to PORT_A bit5.
Now I want to "FlowCode" and If the switch is CLOSED I want to do macroA and if not do macroB.
The DECISION-icon can only test on VARIABLES (not directly on PORT_A.5 !) and the switch component does NOT allow me to define a variable for CLOSED and OPEN !
How does this "peace of cake" work ? - I can't get it !
Switches in the FlowCode
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Hello
What you need is a hardware macro icon.
This can be used to read the state of the switch into a variable.
If you have only one switch in your switch component then the parameter for the hardware macro would be 0.
The returned value can be placed into a variable and then this can be used by the decision icon.
What you need is a hardware macro icon.
This can be used to read the state of the switch into a variable.
If you have only one switch in your switch component then the parameter for the hardware macro would be 0.
The returned value can be placed into a variable and then this can be used by the decision icon.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel