There is a problem in flowcode v5 in loop

Moderator: Benj

Post Reply
bilal
Posts: 19
Joined: Sat Dec 06, 2014 5:15 pm
Has thanked: 1 time
Contact:

There is a problem in flowcode v5 in loop

Post by bilal »

hi
I apologize for the weakness of my English
Process (loop) in the program (flowcode) does not return one of the first . Note the attached file

loop is not work like
for k = 1 to 10
....
......
...
next k

I want it to work from the beginning

can any one fix this file to do that.
Attachments
loop Problem.fcf
(8 KiB) Downloaded 355 times

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

Re: There is a problem in flowcode v5 in loop

Post by Benj »

Hello,

Here is a program that should work as you expect.
loop Problem.fcf
(11.5 KiB) Downloaded 361 times
We noticed you might be using a pirate copy of Flowcode, why not instead use the free version of Flowcode 6?

bilal
Posts: 19
Joined: Sat Dec 06, 2014 5:15 pm
Has thanked: 1 time
Contact:

Re: There is a problem in flowcode v5 in loop

Post by bilal »

yes i use the free version of Flowcode 6 but the problem in loop in flowcode v5 , this problem not in flowcode v6

and i use flowcode v5 like trial and i will removing this softwer.

Note the same file works by (flowcode v6)
Attachments
loop Problem_v6.fcfx
(5.87 KiB) Downloaded 304 times

bilal
Posts: 19
Joined: Sat Dec 06, 2014 5:15 pm
Has thanked: 1 time
Contact:

Re: There is a problem in flowcode v5 in loop

Post by bilal »

the problem in : LOOP COUNT : ONLY IN FLOWCODE V5
NO PROBLEM IN : LOOP COUNT: IN FLOWCODE V6



Make a comparison of the two files FIRST FILE IN FLOWCODE V5
SECOND FILE IN FLOWCODE V6
THIS TWO FILE IS SIME BUT different WORK
Attachments
loop Problem_v6.fcfx
(5.87 KiB) Downloaded 294 times
loop Problem.fcf
(8 KiB) Downloaded 343 times

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

Re: There is a problem in flowcode v5 in loop

Post by Benj »

Hello,

Ok understood.

Can you explain how the v5 program is failing and I will investigate what the problem might be.

bilal
Posts: 19
Joined: Sat Dec 06, 2014 5:15 pm
Has thanked: 1 time
Contact:

Re: There is a problem in flowcode v5 in loop

Post by bilal »

ok I sent the same program code in flowcode v5 and flowcode v6.
now please run this two file and Note the difference between the two filesز

LOOP IN FLOWCODE V5 IS NOT WORK LIKE
FOR K = 1 TO 10
.....
....
....
NEXT K

BUT IN FLOWCODE V6 IS WORK LIKE
FOR K = 1 TO 10
....
....
....
NEXT K

THE PROBLEM IN LOOP COUNT , Continue from the same place that stop. IN FLOWCODE V5.
IN THE FLOWCODE V6 , LOOP COUNT IS Counting starts from the beginning every time

bilal
Posts: 19
Joined: Sat Dec 06, 2014 5:15 pm
Has thanked: 1 time
Contact:

Re: There is a problem in flowcode v5 in loop

Post by bilal »

Well I will give another example

I want to light works for four seconds and then the program ends .
There are key when pressed constantly , will give a delay of four seconds another time .
And so on indefinitely

IN FLOWCODE V5 NOT RESET THE LOOP COUNT
IN FLOWCODE V6 IS MAKE RESET EVERY TIME.

Files the same code , but there is a difference in operating , why and what is the solution?

Press and hold ON THE SWITCH >>>>> THE PROGRAM WELL BE END IN FLOWCODE V5
Press and hold ON THE SWITCH >>>>> THE PROGRAM WELL BE NOT END IN FLOWCODE V6
WAY WHAT IS THE SOLUTION??
Attachments
LOOPCOUNT_FLOWCOD_v6.fcfx
(4.33 KiB) Downloaded 291 times
LOOPCOUNT_FLOWCOD_V5.fcf
(8 KiB) Downloaded 353 times

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

Re: There is a problem in flowcode v5 in loop

Post by Benj »

Hello,

It looks like the problem is only with the v5 simulation. Looking at the C code produced I would expect it to behave as your expecting when running on the hardware. Seems we fixed the bug for the v6 simulation, I know the loop icon got a bit of an overhaul.

You could work around the problem by adding a variable and setting it to 0 after the connection point.

Inside the loop add a calculation to add 1 to the variable.

Inside the loop icon change the statement to var < 80 and this should work in all situations.

bilal
Posts: 19
Joined: Sat Dec 06, 2014 5:15 pm
Has thanked: 1 time
Contact:

Re: There is a problem in flowcode v5 in loop

Post by bilal »

Thank you very much ,
is it possible to put us a file , for example

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

Re: There is a problem in flowcode v5 in loop

Post by Benj »

Here you go.
Attachments
LOOPCOUNT_FLOWCOD_V5-1.fcf
(8.5 KiB) Downloaded 335 times

bilal
Posts: 19
Joined: Sat Dec 06, 2014 5:15 pm
Has thanked: 1 time
Contact:

Re: There is a problem in flowcode v5 in loop

Post by bilal »

Thank you very much.

Post Reply