Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ESP8266 debug, Variable change slows everything down (Read 4911 times)
dob
Newbies
*
Offline


Posts: 5
Joined: May 31st, 2017
ESP8266 debug, Variable change slows everything down
May 31st, 2017 at 5:54pm
Print Post  
I'm a newbie in Visual micro and have been testing the debug function that i think is great. But when I change a variable ({MyVar=?}) the variable changes, but suddenly my charts seems to update very slow and data seems to buffer up. If I disconnect and connect again it seems to "reset" and work better again for a short while. If I don't change any variable after fresh download it work ok, and over time also.
Am I missing something or doing something wrong?
I'm on my way to buy the pro version, but I want this to work before.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 debug, Variable change slows everything down
Reply #1 - Jun 1st, 2017 at 10:10pm
Print Post  
Hi,

Some initial questions ...

When you say charts have you used the @plot command or are you using built in analog/digital/memory charts?

How many charts have you got?

Is your Arduino code also sending serial to the serial port?

Have you tried with or without "vMicro->Debugger->Full Speed Debugging"?

Please zip and email the files from the "\_vm" folder below your project to info@visualmicro.com?

Thanks
« Last Edit: Jun 1st, 2017 at 10:10pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
dob
Newbies
*
Offline


Posts: 5
Joined: May 31st, 2017
Re: ESP8266 debug, Variable change slows everything down
Reply #2 - Jun 2nd, 2017 at 10:31am
Print Post  
I'm using the @plot command. How many charts I have doesn't seem to make any difference, It's just when I have changed one variable it starts to slow down to finally become useless.
I have tried to minimize the "traffic" by sending charts every 200 ms, and the changeable parameters to 1 s (I'm tuning a PID controller), but it doesn't make any difference. As soon As I got this debug functions to work I removed all my Serial.print. I have also tried theĀ  "vMicro->Debugger->Full Speed Debugging" (It's was a recommendation from your website). I'm not at home no, so I cannot provide you with any files now.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 debug, Variable change slows everything down
Reply #3 - Jun 2nd, 2017 at 11:01am
Print Post  
Ok thanks that's enough info for now. Couple of last questions/info...

1) Is the {myvar=?} in a different breakpoint of the same as a @plot command?

2) The speed control on the chart is just a "user interface refresh" thing. The data is still sent from the arduino at the same rate. The way to slow the data rate is to use the hitCounter (or condition) facility of the breakpoint.  By default hitCount is millis so a hit count of 250 would slow to 4 per second.

I will try to replicate but also interested to know if the hit count helps 

  
Back to top
WWW  
IP Logged
 
dob
Newbies
*
Offline


Posts: 5
Joined: May 31st, 2017
Re: ESP8266 debug, Variable change slows everything down
Reply #4 - Jun 2nd, 2017 at 12:06pm
Print Post  
The {myvar=?} is placed under the "1 s" breakpoint, just to save bandwith. The breakpoints are put on delayMicroseconds(1); and SendDebug = 0; 
The task is called every 10 ms.

     //Every 200 ms
     if (!(SendDebug % 20)) {
           delayMicroseconds(1);
           delayMicroseconds(1);
     }

     //Every second
     if (SendDebug++==99) {
           SendDebug = 0;
           
     }
I'm at home now for a short while so I can send you the files you requested.

I have no time to try the hitcount right now, but it seems that I have done the same with my solution, right?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
dob
Newbies
*
Offline


Posts: 5
Joined: May 31st, 2017
Re: ESP8266 debug, Variable change slows everything down
Reply #5 - Jun 2nd, 2017 at 12:20pm
Print Post  
I cannot understand why, but i used hitcount instead and now it seems to work! Thank you for that! How far away is an update so I can change variable over udp with ESP8266? 
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 debug, Variable change slows everything down
Reply #6 - Jun 2nd, 2017 at 1:39pm
Print Post  
Hi,

Thanks, that tells me what to look for.

Point to note: 10ms is too fast to a non-breaking trace point. The pc can't work that fast especially when graphics are involved and I also suspect the Arduino serial buffer is overfilling and only part of the packets are arriving at the server/pc. So the refresh appears to slow but actually it's just waiting for a non corrupted packet. I will try to replicate and then find a workaround or show some hint on the screen that will explain what is happening.

The udp var update isn't far off. Hopefully a few weeks.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint