MULTITASKING WITH FLOWCODE

Moderator: Benj

Post Reply
bigman
Posts: 1
Joined: Tue Feb 17, 2015 4:46 pm
Contact:

MULTITASKING WITH FLOWCODE

Post by bigman »

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!

kersing
Valued Contributor
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

Post by kersing »

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

User avatar
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

Post by Benj »

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

Post Reply