in reply to Timing issue while accessing serial port

I'm inclined to blame the OS. You didn't mention what the is, by the way. If it's a unix variant, you could try renicing the program to give it a higher priority. (There is also a way to do this under windows, but I don't know it off the top of my head). I don't know that it would completely solve the problem, but if it makes a difference in your test results, it would imply that your program is not getting enough CPU cycles to do this in real time.

One non-perl solution could be to use a microcontroller (eg arduino) to communicate with the device. It could handle the triggering and also report back to the PC when it has happened.

  • Comment on Re: Timing issue while accessing serial port

Replies are listed 'Best First'.
Re^2: Timing issue while accessing serial port
by Marshall (Canon) on Jan 20, 2011 at 10:57 UTC
    As slow as Windows is, it is hard for me to say that Windows is to blame here. 1,000 ms is one second. 116ms is about 1/10th of a second. There is something wrong with the code or the code that this code calls.