Hello All
I'm trying to find if there is a method or procedure to clear the Macro Call Lists
I have 3 steps in my project and I really would like to remove the "Main" Call Macro.
When I power up I run
Main --- Start ----Wait
In Main I establish the componets and parameters.
In Start I write the values into the LCD
In Wait I wait for a Interrupt and them call Macro's to resopnd to the Interrupt.
I don't need the Maco "Main" or "Start" to remain in the Macro listing ?
When I program runs it loops back to Main and clears my LCD values ?
After I do the Action Call to display values on the LCD I would loop back to "Wait" for another interrupt.
John
Clear Macro Calls
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Clear Macro Calls
Hi John,
What you are looking at it the Macro stack.
Since Main is the Main macro it will always be shown.
When a call macro is encountered, the Main macro will drop down the list by one.
When a another call macro is encountered, Main will drop down the list by another one place.
the two call macros are sub routines of Main.
Only when you exit both subroutines you will be back in Main.
So no you can never remove Main as that is part of C structure.
Flowcode converts flowchart symbols to C so Main will always play a part.
Don't forget the only macro that's currently active is the one that's at the top of the list.
All the others are just stored on the 'stack'
Martin
What you are looking at it the Macro stack.
Since Main is the Main macro it will always be shown.
When a call macro is encountered, the Main macro will drop down the list by one.
When a another call macro is encountered, Main will drop down the list by another one place.
the two call macros are sub routines of Main.
Only when you exit both subroutines you will be back in Main.
So no you can never remove Main as that is part of C structure.
Flowcode converts flowchart symbols to C so Main will always play a part.
Don't forget the only macro that's currently active is the one that's at the top of the list.
All the others are just stored on the 'stack'
Martin
Martin
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Clear Macro Calls
You can not remove main as it is where your program starts and which calls the other macros. If your code returns to main while it should stay in Wait there is an error in your flowchart or logic. I would personally move the code from the Wait macro to main if that is the main code (where your code spends most time) of your program.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: Clear Macro Calls
Thank you Martin & Kersing
I thought that was the fact that Main is always a fall back.
I will try and move my code around.
John
I thought that was the fact that Main is always a fall back.
I will try and move my code around.
John
-
- Posts: 54
- Joined: Mon Dec 30, 2013 2:09 am
- Has thanked: 15 times
- Been thanked: 10 times
- Contact:
Re: Clear Macro Calls
Main call => To do list value =0
if todo list value =0 ?
Yes = do something. then make value 1
No= Do nothing.
Can be help to you.
if todo list value =0 ?
Yes = do something. then make value 1
No= Do nothing.
Can be help to you.