Page 1 of 1

7 or 8 tries to stop simulation

Posted: Thu Aug 29, 2013 10:41 pm
by acestu
Hi,

I am putting togethor a chart to read the data from knob0 on the 4D display then output the data to an lcd and meter0 on the 4D display, when I run a simulation It takes 7 or 8 clicks of the stop button to end, as if you are waiting for something to end..?..

Meter&Knob.fcfx
(10.46 KiB) Downloaded 176 times


thanks
Acestu

P.S. The meter on the 4D display is not responding properly

Re: 7 or 8 tries to stop simulation

Posted: Fri Aug 30, 2013 12:07 am
by Benj
Hi Stu,

In Simulation try adding a delay. Continually polling the COM port in a tight loop was causing me some problems too so I'm hoping this is the cause. Adding say 100ms to the loop helped a great deal. You should remove this delay for an embedded target. In the mean time I will investigate the DLL to see if I can work around the issue there so others won't have to.

Re: 7 or 8 tries to stop simulation

Posted: Fri Aug 30, 2013 3:24 pm
by JonnyW
Hello. Is the simulation speed 'as fast as possible' or 'normal'? With 'as fast as possible' simulation will be pretty greedy and hog the CPU, and this will have varying results on different CPUs. Normal should allow things to update smoothly, so long as there is no DLL call that is holding things up.

Jonny

Re: 7 or 8 tries to stop simulation

Posted: Fri Aug 30, 2013 5:59 pm
by acestu
Hi Jonny,

this happens on the normal setting as per pic enclosed...

normal.png
normal.png (10.78 KiB) Viewed 4518 times


Thanks
Acestu

Re: 7 or 8 tries to stop simulation

Posted: Fri Aug 30, 2013 6:22 pm
by Benj
Hi Stu,

Do things improve if you add say a 100ms delay into the loop?

Re: 7 or 8 tries to stop simulation

Posted: Fri Aug 30, 2013 6:35 pm
by acestu
Hi Benj,

I have just put the delay in the loop and the simulation now stops first try ...

thanks
Acestu

Re: 7 or 8 tries to stop simulation

Posted: Fri Aug 30, 2013 6:36 pm
by Benj
Cheers Stu,

The issue is the DLL and not Flowcode, I will try and fix it before the release.