7 or 8 tries to stop simulation

Forum for Flowcode v6 beta users

Moderator: Benj

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

7 or 8 tries to stop simulation

Post 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 389 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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 7 or 8 tries to stop simulation

Post 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.

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

Re: 7 or 8 tries to stop simulation

Post 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

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

Re: 7 or 8 tries to stop simulation

Post by acestu »

Hi Jonny,

this happens on the normal setting as per pic enclosed...
normal.png
(10.78 KiB) Downloaded 5291 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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 7 or 8 tries to stop simulation

Post by Benj »

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: 783 times
Been thanked: 223 times
Contact:

Re: 7 or 8 tries to stop simulation

Post by acestu »

Hi Benj,

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

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 7 or 8 tries to stop simulation

Post by Benj »

Cheers Stu,

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

Locked