Reset, abort or exit from anywhere in a flow hart

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Manie Serrao
Flowcode V4 User
Posts: 26
Joined: Mon Nov 28, 2011 3:19 pm
Location: Cape Town South Afica
Contact:

Reset, abort or exit from anywhere in a flow hart

Post by Manie Serrao »

How can I reset my flowchart to the beginning if I am not in the main but two macros away. ie I called macro A from main and called macro B from macro A. Is it possible to go directly to main from B.
Basically it's an option to be able to reset from any macro anywhere in the flowchart. Cheers for now. Manie

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Reset, abort or exit from anywhere in a flow hart

Post by medelec35 »

Hi Manie,
Are you referring to just flowchart, or both flowchart and hardware, or just hardware?
Martin

Manie Serrao
Flowcode V4 User
Posts: 26
Joined: Mon Nov 28, 2011 3:19 pm
Location: Cape Town South Afica
Contact:

Re: Reset, abort or exit from anywhere in a flow hart

Post by Manie Serrao »

Thanks for reply. It is still in development and have not hooked up any hardware just in flowchart at the moment. Thanks

Manie Serrao
Flowcode V4 User
Posts: 26
Joined: Mon Nov 28, 2011 3:19 pm
Location: Cape Town South Afica
Contact:

Re: Reset, abort or exit from anywhere in a flow hart

Post by Manie Serrao »

OK got the answer.....eventually, I simply used variable called "reset", checked it's value in Main : IF decision : connection point : to beginning and we start all over again.......so simple but a "light bulb" moment.
Thanks anyway
Cheers

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Reset, abort or exit from anywhere in a flow hart

Post by Benj »

Hello,

There are ways to reset the hardware, e.g.

Outputting a 0 to a pin connected to the MCLR - Might be problems with MCLR VPP voltage unless you protect the I/O pin.

Doing a software reset - setting the watchdog timer to run and waiting for it to time out.

But neither will work in simulation and I would say it's better to have a software approach really so it sounds like your on the right track.

User avatar
jollybv
Flowcode v5 User
Posts: 362
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Contact:

Re: Reset, abort or exit from anywhere in a flow hart

Post by jollybv »

Hi Guys

I'm using the PIC18F46K80 and would like to do a hardware reset after setting up the chip is this possible I looked in the Data sheet but that does not make any sense to me

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Reset, abort or exit from anywhere in a flow hart

Post by Benj »

Hello,

You can use this in a C code icon with the following code to do a software reset.

Code: Select all

reset();

User avatar
jollybv
Flowcode v5 User
Posts: 362
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Contact:

Re: Reset, abort or exit from anywhere in a flow hart

Post by jollybv »

Hi Ben

Thanks i will try it

Post Reply