Applies To: |
|
Summary: |
Question: My I/O Server slowly looses time. Over a day it will loose about 30 seconds and keep loosing time at this rate causing the clock to be out by a long way after several weeks. If I re-boot the computer the time will be corrected. I am communicating to a GE 90/30 PLC via the local COM port at 19,200. If I stop the PLC from communicating then the computer does not seem to loose time. What is causing this problem? |
Solution: |
When a computer boots up, DOS will read
the hardware clock and save this time in memory. Then while the
computer runs, DOS will keep track of the time by incrementing its
counter off the clock interrupt. This time may become slow when DOS
is missing clock interrupts. This can happen when the computer is
overloaded processing critical code when the clock interrupt needs
to be serviced. Each clock interrupt DOS misses will cause the time
to be slowed by 55 ms.
In your case as you are using the local COM port at 19,200 baud then I would assume that you computer is becoming overloaded with interrupt processing. You could get around this problem by using a Digiboard, using a faster computer, slowing the baud rate or you could try putting the protocol into polled mode. The first two solutions require an upgrade in hardware, before you goto this expense you can try the other solutions. When you put a protocol in polled mode this lessens the amount of code executed under interrupt and will most likely solve the problem. The disadvantage to this solution is that the communications will run slower. You may also reduce the interrupt load by slowing down the baud rate, this will also reduce you communication performance. If you want to maintain your performance then you must upgrade you hardware. A new feature has been added to version 3.00 and later which will resync the windows time with the real time clock. You may enable this feature with the parameter [TIME]RTsync=1. There are know problems with this parameter with versions 3.0 and 3.01 see Q1726 for details and you must upgrade to version 3.10 for correct operation. |
Keywords: |
Related Links
Attachments