8117 Groton Lane
Servo I/O technical topics of interest:
How long do the servo calculations take?On a commodity grade computer such as one having a 486 processor running at 66MHz and also running Windows 95, the time required to perform the PID calculations for eight axis of motion is 100 microseconds, give or take a few micoseconds. With a sample period set at 1 millisecond, 90% of the processor resource is left over for other processing. All of the encoders can be latched simultaneously in hardware at the beginning of the sample period by the occurrence of the interrupt event, and all of the DACs can be simultaneously latched at the end of the sample period as well. This means that the 100 microseconds of PID calculations can occur at any time during the 1 millisecond window.
Interrupt latency is the time between when the interrupt occurs and the time that the ISR begins to run. We found that the interrupt latency for the same hardware, also running Windows 95, to be between 15 and 30 microseconds.
DeterminismAn extremely relevant article has appeared in the October 1996 issue of Byte magazine. The article on page 88, "NT In Real Time" , says that "clever modifications of Windows NT make it a compelling OS choice for some embedded applications.". And also: "Tasks running in RTX (real-time extension) run at priorities higher than those of NT interrupt handlers. Consequently, RTX tasks cannot be preempted by NT tasks. Thus, NT's normal functions run unimpaired so that real-time software can execute on an NT system side-by-side with standard, off-the-shelf software. Also, because tasks in the real-time extension execute at a higher priority than NT process and threads, NT tasks won't destroy the determinism of the real-time extension. Finally, developers can use RTX for SMP (symmetric Multi processing). On a dual-processor system, one processor can run the real-time extension, and the other one can run NT with no degradation in performance." Venturcom, Inc. is one company that offers a product in this area. Others are from Phar Lap Software, Inc and Nematron.
Our Windows 95 VxD, utilizes an interrupt generated by the card to initiate the servo calculations. This method gives reliable performance as long as interrupts are not disabled for more than about 500 or so microseconds every 1 millisecond. So obviously, the execution of the interrupt service routine is not guaranteed. Just as obviously, then in order for the ISR to be executed without fail, interrupt hogging software must not be installed in the system. After testing with a large number of various hardware and software configurations, we found only two common programs which disable interrupts significantly enough to interfere with the servo calculations. One program, used for playing ".wav" (sound) files through the PC speaker, can be configured to not take over interrupts with a click in its control panel. The other driver (which deals with hardware acceleration on some video cards) can also be configured similarly. On the system control panel under the performance...graphics...hardware acceleration area, a setting of "None" will disable hardware acceleration thus keeping the particular hardware from disabling interrupts for long periods of time.
With DOS you have more direct control over what is executed in the system. Our DOS code example (with source) contains all the low level functionality you need to write your own servo algorithm, including an example ISR.