Timing issue while writing from a serial port -


this question going bit vague , apologize that.

i have system connected serial port , python script communicates it. script runs system, reads data outputs, writes file data, stops system , repeats previous series of functions defined number of iterations. apart writing data system file, scripts logs system time. ideally, every "run" of system should generate evenly spaced out (in time) data. looked @ time stamps , plotted difference between each of data points , got (y-axis time in mm:ss) rate variation iteration want somehow profile section of code each iteration figure out why blips exist. possible background process causing these anomalies? if so, how hone in what's going on @ points?

i'll try give tips on how home in on it. don't know if @ least work with. first try sort out if it's python script or connected system hicks occationally. portmon sysinternals of here. if on windows is. can see sent , received on serial port. either have request response type protocol , script requests chunks system. if se request go out , no response 2seconds device our problem, not script or os. if wrong cabling or serial port see here well.

if script problem can anything. hickups seams regular. can use advantage. if run @ half frequency. hickups occur half often? if it's related how many runs make. perhaps leak of sort. close when start over? how schedule it? how precise scheduler? 2sec isn't long time. don't know profiling python write log file timestamp each step you're doing find code halts. few pointers. hope helps


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -