Quantcast
Channel: DIAdem topics
Viewing all articles
Browse latest Browse all 3197

DIAdem DAC Script - High CPU and slow

$
0
0

Thanks to this board I now have a working serial port reader script.

 

But now 2 issues have become apparent. 

 

1) the oUDIM.Read function appears to take, minimum, 0.1 seconds to execute. Sometimes a bit longer. It is reading a response that is <25 characters long with a CRLF at the end. I am asking it to read the whole line, up to the CRLF.

I can't see how I can make that any faster? I am trying to shoot for 10Hz so with it taking minimum 0.1, its not really achieving that.

 

2) if I run the script, via DAC, asynchronously I get a horrible looking data trace with steps in it. If I run synchronously, I get a nice data trace that is smooth.  Issue is the later eats 25% CPU and this script has to run on a laptop, on battery, for 2-3 hours. I am just in the process of seeing how bad the battery drain is. The asynchronous option is only polling the CPU 2% of the time!!


Viewing all articles
Browse latest Browse all 3197

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>