Hi everybody;
I am interested in developping multitasking applications with FLOWCODE V5.
Is there anyone who has some ideas on how to develop multitasking applications with FLOWCODE?
Thank you for your help!
MULTITASKING WITH FLOWCODE
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: MULTITASKING WITH FLOWCODE
Please register for the Flowcode 5 forum if you want help with FC5. See the link in my signature for instructions.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- 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:
Re: MULTITASKING WITH FLOWCODE
A lot of "multitasking" or "real time" processing is done using hardware timers. You basically use the timer to switch between different macros so it appears that the macros are running in parallel. This is often referred to as a round robin approach.
The timer interrupt macro could simply increment a variable named Mode. If mode is greater than say 3 then reset to 0.
In the main routine you could have a switch case icon based on the value of the Mode variable.
If it is 0 then you monitor a keypad for input.
If it is 1 then you output any keypad inputs to a LCD
If it is 2 then you switch outputs on and off based on the keypad inputs
If it is 3 then you flash an LED based on the keypad inputs
The timer interrupt macro could simply increment a variable named Mode. If mode is greater than say 3 then reset to 0.
In the main routine you could have a switch case icon based on the value of the Mode variable.
If it is 0 then you monitor a keypad for input.
If it is 1 then you output any keypad inputs to a LCD
If it is 2 then you switch outputs on and off based on the keypad inputs
If it is 3 then you flash an LED based on the keypad inputs
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