in reply to Re^2: Serial Port timing and write blocking?
in thread Serial Port timing and write blocking?

How much out of sync are you getting? 1 ms, 100ms or 10s? How much drift is acceptable?

What exactly should the timing look like? Consider the timing diagram below:

A. Start sending command C. Wait period ends / / ---+------+--------------------+-----------+---- \ \ B. Command finish transmission D. Send next command.

If I understand correctly, you want to have the time between A and C be X milliseconds as determined by input from the file. The time between C and D should be as close to zero as possible.

Are you reading in all of the commands in the command set at once, and operating from memory? Or, are you reading each command from a file? The second approach could add time between C and D.

My next step in trouble shooting this would be to try and figure out which part of the process we are at when the time is being lost/gained.


TGI says moo