For high-performance control, it is necessary to have a reliable clock (interrupt) source for at least the Servo Control Loop. For example, if a 1 KHz clock is desired, it is not sufficient to get 1000 interrupts over 1 second – it is also important that interrupts occur at 1 millisecond intervals (within a few percent). An unreliable clock source can lead to several problems for a real-time loop:
For now, I assume that RT-Linux (or any other real-time OS) will produce reliable interrupts and that Windows NT (or any other non-real-time OS) will not, but this remains to be seen .
For some applications, synchronization between the Trajectory Control Loop and Servo Control Loop(s) is important. This situation arises, for example, when a trajectory must be followed at a precise speed. When choosing a Master Clock for the system, it is important to consider whether the clock source is reliable and if so, whether it can be efficiently propagated through the system. The following sections outline three possible solutions, corresponding to whether the Master Clock is provided by the Servo Control Loop, the Trajectory Control Loop or neither.
For other applications, synchronization between the real-time loops is not important. In these cases, any solution can be used provided that data transfers between the real-time loops are properly handled (e.g., mutual exclusion for access to shared data).
The Servo Control Loop generates the interrupt for the Trajectory Control Loop. This is best used when there is only one Servo Control Loop and when it has a reliable interrupt source. In addition, this is the most straightforward implementation when the Servo Control Loop and Trajectory Control Loop are on the same computer, even if the interrupt source is unreliable. Example system configurations are:
1. MEI Board under Windows NT or RT-Linux (because we have little control over the MEI software, it may be difficult to guarantee synchronization).
2. Servo To Go (or other passive I/O boards), with Trajectory Control Loop and Servo Control Loop on RT-Linux
3. Servo To Go (or other passive I/O boards), with Trajectory Control Loop and Servo Control Loop on Windows NT (will not be hard real-time performance)
The Trajectory Control Loop generates the interrupt for the Servo Control Loop. There are actually two cases here, depending on whether the interrupt is at the servo rate (S Hz) or the trajectory rate (T Hz). This is best used when there are multiple Servo Control Loops on different hardware and when the Trajectory Control Loop has a reliable interrupt source. Example system configurations are:
1. Trajectory Control Loop on RT-Linux with multiple Servo Control Loops on external hardware.
This is a more general case in which the Trajectory Control Loop and Servo Control Loop have different (unsynchronized) interrupt sources. This can be a simple or complex implementation, depending on whether we try to achieve synchronization in software (especially for multiple Servo Control Loops). This is best used when there is no efficient means of having one loop interrupt the other, either via a direct interrupt request or a fast, reliable message. Example system configurations are:
1. MEI Board with Trajectory Control Loop on Windows NT or RT-Linux, when we desire a different interrupt source for the Trajectory Control Loop.
2. Trajectory Control Loop on Windows NT with a network of distributed Servo Control Loops.