Hi all, I have a previously tested and run an built a project with V5.
I have now transferred to V6.1.1.0 but the program no longer loops continuously.
I have 3 toggle switches providing an input counting 1,2 4 giving me 7 options above zero.
With version 5, if i set for example switch 2 to on (count 2) the system runs, switches on output 1, pauses then loops for the second time switches on output 2 pauses then returns to the start, clears all ports, re reads the switch inputs again an carries on like this until powered off. (basically a battery charger with up to 7 selectable outputs (the final delay in this test code is set to zero rather than 12 hours for testing purposes).
Hovever with V6.1.1.0, the system runs fine but when it returns to the start and commences again it seems to ignore the switch settings on the simulation panel and loops continuously waiting for switch inputs. It will only continue if I turn switches off then on again, but once through the cycle where it should start over again it just loops round waiting for a switch input.
Is it a bug or am I being exceedingly stupid here??? Any helpers?
Project attached. (note I have only re added the switches and led indicators as they did not seen to transfer across from v5
V6.1.1.0
Moderator: Benj
-
- Posts: 3
- Joined: Thu Oct 04, 2012 3:15 pm
- Has thanked: 3 times
V6.1.1.0
- Attachments
-
- Battery charger with dip switch setting for 16F84A_v6.fcfx
- Originally created in V5 and opened in V6.1.1.0
- (15.5 KiB) Downloaded 192 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: V6.1.1.0
Hi Stagdriver,
There is a bug with Flowcode V6 that will set switch banks and LED arrays) to port F when importing from Flowcode V5
I have changed switch bank back to port A
Also when changing switch bank back to a different port, you may need to select refresh before simulation will work correctly.
Martin
There is a bug with Flowcode V6 that will set switch banks and LED arrays) to port F when importing from Flowcode V5
I have changed switch bank back to port A
Also when changing switch bank back to a different port, you may need to select refresh before simulation will work correctly.
Martin
- Attachments
-
- Battery charger with dip switch setting for 16F84A_v6.fcfx
- (15.6 KiB) Downloaded 189 times
Martin
-
- Posts: 3
- Joined: Thu Oct 04, 2012 3:15 pm
- Has thanked: 3 times
Re: V6.1.1.0
Thank you for the info Martin. As a test I "rebuilt" the project from scratch today in V6 and it was perfect. Strange bug. It carried through to most of my projects as most of them use switch banks.
Appreciate your time to help.
Appreciate your time to help.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: V6.1.1.0
Your welcome.
At least your up and running now.
Thanks for letting us know.
Martin
At least your up and running now.
Thanks for letting us know.

Martin
Martin
-
- Posts: 3
- Joined: Thu Oct 04, 2012 3:15 pm
- Has thanked: 3 times
Re: V6.1.1.0
Oops. I was Kidding myself here.
Even after completely recreating and inputting from scratch in V6.1.1.0, it all seems to work, but once it loops back round after going through its iterations to collect the state of my 3 dip switches again it ignores the state of the simulator switches and just loops round at this point as if waiting for waiting for Inputs.
If I toggle switches off then on again it carries on through its cycle correctly until it returns to this same point where it just loops waiting for switch inputs even though the switches are set.
I compiled and loaded to a 16f84a PIC and added leds and switches to run as a "real life" simulation and the process cycles through the iterations correctly, then starts all over as it should accepting the switch settings and continues over and over again until powered off as it should.
Looks possibly like a problem with the push-button (latched) or switch (latched) with the sim. (or could my code so exceptionally bad that V6.1.1.0 stops in pure disgust?).
went back to my old laptop with V5 on it, recreated the exact same project from scratch, identical settings and the simulator runs as it should.
Would Love to get to the bottom of this one.
Even after completely recreating and inputting from scratch in V6.1.1.0, it all seems to work, but once it loops back round after going through its iterations to collect the state of my 3 dip switches again it ignores the state of the simulator switches and just loops round at this point as if waiting for waiting for Inputs.
If I toggle switches off then on again it carries on through its cycle correctly until it returns to this same point where it just loops waiting for switch inputs even though the switches are set.
I compiled and loaded to a 16f84a PIC and added leds and switches to run as a "real life" simulation and the process cycles through the iterations correctly, then starts all over as it should accepting the switch settings and continues over and over again until powered off as it should.
Looks possibly like a problem with the push-button (latched) or switch (latched) with the sim. (or could my code so exceptionally bad that V6.1.1.0 stops in pure disgust?).
went back to my old laptop with V5 on it, recreated the exact same project from scratch, identical settings and the simulator runs as it should.
Would Love to get to the bottom of this one.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: V6.1.1.0
Hi Stagdriver,
Looks like Clear PortA output icon is causing switch i/p to be wrong within simulation.
If you disable 0>portA then simulation should work.
Look to me like it's still apart of the switch array bug?
Did you also realise you also have switches on both Dashboard and system panel connected to the same port pins?
Looks like Clear PortA output icon is causing switch i/p to be wrong within simulation.
If you disable 0>portA then simulation should work.
Look to me like it's still apart of the switch array bug?
Did you also realise you also have switches on both Dashboard and system panel connected to the same port pins?
Martin
-
- Posts: 3
- Joined: Thu Oct 04, 2012 3:15 pm
- Has thanked: 3 times
Re: V6.1.1.0
Thanks again Martin. You are indeed right. Once I removed he Clear Port A it runs in Simulator mode as it should.
Strange how V5 and A real PIC work ok.
Looks like it may well be a bug ??
in your opinion, do you think the clear port A is necessary anyway in this particular case, or just a case of overdoing the housework?
My thinking is that even if the Pic were to start up with some level of data stored in port A, it would be overwritten by the loop that looks for a switch input anyway or even completely cleared if the switches were all in the off position. So even without the Clear port A command it would effectively never be "wrong" anyway. I can see the potential for A4 to start up in the on position, whick would switch the charger on but that doesn't really matter in this case. To be tidy I could swap it over to the un-used B7 which would be cleared just to keep things tidy and ensure everything starts up in the correct order.
I was completely unaware that I had a duplication of the switches and led's within the system panel. This would explain why I thought they had not transferred across from V5. Well done for spotting that. I removed the duplication and retested just to make sure this was not causing the error.
When I rebuilt the Project, I put it straight onto a PIC and replace the one on my original project to test it. Bit silly I guess As this did not test the Simulator.
Strange how V5 and A real PIC work ok.
Looks like it may well be a bug ??
in your opinion, do you think the clear port A is necessary anyway in this particular case, or just a case of overdoing the housework?
My thinking is that even if the Pic were to start up with some level of data stored in port A, it would be overwritten by the loop that looks for a switch input anyway or even completely cleared if the switches were all in the off position. So even without the Clear port A command it would effectively never be "wrong" anyway. I can see the potential for A4 to start up in the on position, whick would switch the charger on but that doesn't really matter in this case. To be tidy I could swap it over to the un-used B7 which would be cleared just to keep things tidy and ensure everything starts up in the correct order.
I was completely unaware that I had a duplication of the switches and led's within the system panel. This would explain why I thought they had not transferred across from V5. Well done for spotting that. I removed the duplication and retested just to make sure this was not causing the error.
When I rebuilt the Project, I put it straight onto a PIC and replace the one on my original project to test it. Bit silly I guess As this did not test the Simulator.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: V6.1.1.0
hi Stagdriver,
It does look like the issue is with simulation and switch array bug.
I Don't belive hardware will be affected at all.
Martin
No I don't think it's necessary.Stagdriver wrote:in your opinion, do you think the clear port A is necessary anyway in this particular case, or just a case of overdoing the housework?
That sounds correct to me.Stagdriver wrote: it would be overwritten by the loop that looks for a switch input anyway or even completely cleared if the switches were all in the off position.
Your welcome.Stagdriver wrote: was completely unaware that I had a duplication of the switches and led's within the system panel. This would explain why I thought they had not transferred across from V5. Well done for spotting that. I removed the duplication and retested just to make sure this was not causing the error.
It does look like the issue is with simulation and switch array bug.
I Don't belive hardware will be affected at all.
Martin
Martin
-
- Posts: 3
- Joined: Thu Oct 04, 2012 3:15 pm
- Has thanked: 3 times
Re: V6.1.1.0
Many thanks again Martin. After a break of a couple of years I am getting back into things. I like the fact that V6 works with arduino too. I appreciate your assistance.
best regards
best regards