7 or 8 tries to stop simulation

Forum for Flowcode v6 beta users

Moderator: Benj

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

7 or 8 tries to stop simulation

Postby acestu » Thu Aug 29, 2013 10:41 pm

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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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

Re: 7 or 8 tries to stop simulation

Postby Benj » Fri Aug 30, 2013 12:07 am

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.
These users thanked the author Benj for the post:
acestu (Fri Aug 30, 2013 12:10 am)
Rating: 5.26%
 

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 64 times
Been thanked: 306 times
Contact:

Re: 7 or 8 tries to stop simulation

Postby JonnyW » Fri Aug 30, 2013 3:24 pm

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

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: 7 or 8 tries to stop simulation

Postby acestu » Fri Aug 30, 2013 5:59 pm

Hi Jonny,

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

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


Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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

Re: 7 or 8 tries to stop simulation

Postby Benj » Fri Aug 30, 2013 6:22 pm

Hi Stu,

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

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 787 times
Been thanked: 226 times
Contact:

Re: 7 or 8 tries to stop simulation

Postby acestu » Fri Aug 30, 2013 6:35 pm

Hi Benj,

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

thanks
Acestu
These users thanked the author acestu for the post:
Benj (Fri Aug 30, 2013 6:35 pm)
Rating: 5.26%
 
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

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

Re: 7 or 8 tries to stop simulation

Postby Benj » Fri Aug 30, 2013 6:36 pm

Cheers Stu,

The issue is the DLL and not Flowcode, I will try and fix it before the release.
These users thanked the author Benj for the post:
acestu (Fri Aug 30, 2013 7:07 pm)
Rating: 5.26%