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

Manie Serrao
Flowcode V4 User
Posts: 26
Joined: Mon Nov 28, 2011 3:19 pm
Location: Cape Town South Afica
Has thanked: 10 times
Been thanked: 2 times
Contact:

Reset, abort or exit from anywhere in a flow hart

Postby Manie Serrao » Sun Dec 07, 2014 11:26 am

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: 8475
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2433 times
Been thanked: 3485 times
Contact:

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

Postby medelec35 » Sun Dec 07, 2014 12:28 pm

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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Manie Serrao
Flowcode V4 User
Posts: 26
Joined: Mon Nov 28, 2011 3:19 pm
Location: Cape Town South Afica
Has thanked: 10 times
Been thanked: 2 times
Contact:

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

Postby Manie Serrao » Sun Dec 07, 2014 6:36 pm

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
Has thanked: 10 times
Been thanked: 2 times
Contact:

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

Postby Manie Serrao » Tue Dec 09, 2014 2:08 pm

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
These users thanked the author Manie Serrao for the post:
Benj (Tue Dec 09, 2014 2:27 pm)
Rating: 5.26%
 

User avatar
Benj
Matrix Staff
Posts: 14422
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4495 times
Been thanked: 4179 times
Contact:

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

Postby Benj » Tue Dec 09, 2014 2:30 pm

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: 342
Joined: Thu Feb 12, 2009 5:20 am
Has thanked: 77 times
Been thanked: 24 times
Contact:

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

Postby jollybv » Tue Jun 16, 2015 9:29 am

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: 14422
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4495 times
Been thanked: 4179 times
Contact:

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

Postby Benj » Tue Jun 16, 2015 9:55 am

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: 342
Joined: Thu Feb 12, 2009 5:20 am
Has thanked: 77 times
Been thanked: 24 times
Contact:

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

Postby jollybv » Tue Jun 16, 2015 10:00 am

Hi Ben

Thanks i will try it