Page 1 of 1

Reset, abort or exit from anywhere in a flow hart

Posted: Sun Dec 07, 2014 11:26 am
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

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

Posted: Sun Dec 07, 2014 12:28 pm
by medelec35
Hi Manie,
Are you referring to just flowchart, or both flowchart and hardware, or just hardware?

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

Posted: Sun Dec 07, 2014 6:36 pm
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

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

Posted: Tue Dec 09, 2014 2:08 pm
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

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

Posted: Tue Dec 09, 2014 2:30 pm
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.

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

Posted: Tue Jun 16, 2015 9:29 am
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

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

Posted: Tue Jun 16, 2015 9:55 am
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();

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

Posted: Tue Jun 16, 2015 10:00 am
by jollybv
Hi Ben

Thanks i will try it