Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.naic.edu/~phil/hardware/vertex/jonhagen/timing.pdf
Дата изменения: Mon Feb 4 19:30:38 2008
Дата индексирования: Sun Apr 13 04:44:26 2008
Кодировка:

Поисковые слова: arp 220
To: File \hagen\wpfiles\vertexdoc\timing From: Jon Hagen Date: 6-18-03 Subject: Vertex System Timing and Communications: Timing and data flow between the CPU, CP, OCU, MCS, and PCU. Data Paths All data between the CPU (aka CPU928, aka PLC) and the CP (aka CP581, aka LCU) moves over backplane of the Siemens S5 controller crate, in and out of a dual-port memory located on the CP. These transfers are handled, from the CPU side, by calls to special Function Blocks (FB120 through 127, except 122), and from the CP side by calls to the CPDHB driver ("CP Data Handling Block driver"), which is a DOS TSR (Terminate and Stay Resident) program. The PCU (Portable Control Unit) communicates via an RS232 link to the CP524, another processor on the backplane, which, in turn, communicates with the CPU. This is the only function of the CP524. The OCU communicates with the CP via an RS232 link to the COM2 port of the CP. The MCS (Monitor & Control System, aka Host Computer) communicates with the CP via an ethernet adapter riding piggyback on the CP. Synchronization The CPU-PCU and CPU-CP data paths must be `synchronized'. It is unclear whether this is actually a matter of timing coordination or just filling some designated registers with protocol information for the transfers. Synchronization with the CP is done by the PCU in block FB209, which is called from OB20 (CPU restart) or from OB21 (manual restart). The synchronization is done via a call to the system block FB125, using the following parameteers: Interface No. = 24, frame size 6 (512 Bytes), PAFE 174 (relative address to receive a one-byte transfer status report "00H' indicates no error). CPU to CP Message transmission Communication between the PLC and LCU is done in the PLC's block OB10, which calls PB221 to send data to the CP and PB222 to get data from the CP. Transmission to the CP: The data is assembed into the output buffer by a call to FB230 and then sent via a call to FB126, a Siemens routine "SEND-A" (Send All). The data is written from the PLC, over the backplane, to the dual-port memory in the CP. Question: is this data transfer transparent to the CP or does the PLC operation trigger an interrupt in the C?. Transmission from the CP: The data is read by a call to FB127, a Siemens rountine, "RECA" (Receive All). Question: Is this simply a read by the PLC from the dual-port memory in the CP or does the PLC operation trigger an interrupt in the CP? Note: IRQ15 on the CP is assigned to the STEP5 interface. (CP581 manual, page 3-28) This seems


to be the lowest priority interrupt. See also page 3-71. CPU to CP Message Timing. Communication in both directions between the PLC and LCU is done in interrupt routine, but only if Flag 18.4 ("10 ms interrupt toggle flag") is only at the end of OB11, the 20msec interrupt routine and is reset to low communication, i.e, at the end of OB10. Therefore, the communications msec rather than every 10 msec. the block OB10, the 10ms high. This flag is set high at the end of the will take place every 20