SIMATIC S5 CP 544 Manual Order No.: 6ES5 998-2DB21 Release 01 C79000-H8576-C191-01 What is the CP 544 and How do you Use it? 1 How do you Fit the Hardware Components? 2 How do you Transmit Data with the RK 512 Computer Link? 3 How do you Transmit Data with the 3964/3964R Procedures? 4 How do you Transmit Data with the Open Driver? 5 How do you Program the STEP 5 Program? 6 How do you work with the COM PP Parameter Assignment Software? 7 What must you do if the CP 544 or COM PP Outputs Error Messages? 8 What is a Typical Application of the CP 544? 9 Reference Section 10 Appendix 11 Copyright (c) Siemens AG 1993 All rights reserved The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved. Disclaimer of Liability We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement.However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcomed. Technical data subject to change. Safety-related guidelines This manual contains notices which you should observe to ensure your own personal safety, as well as to protect the product and connected equipment. These notices are highlighted in the manual by a warning triangle and marked as follows: Note indicates that minor personal injury or property damage can res ult if proper precautions are not taken. Only qualified personnel should be allowed to install and work on this equipment. Qualified persons as referred to in the Safety-Related Guidelines for the User in this manual are defined as persons who are authorized to commission, to ground and to tag equipment, systems and circuits in accordance with established safety practices and standards. Siemens Aktiengesellschaft 6ES5 998-2DB21 EWK Elektronikwerk Karlsruhe Printed in the Federal Republic of Germany 1 What is the CP 544 and How do you Use it? Contents of Chapter 1 1 What is the CP 544 and How do you Use it? . . . . . . . . . . . . . . . . . 1-3 1.1 Which Components do you Require for the Point-to-point Link with the CP 544? . . . . . . . . . . . . . . . . . . . . . . . . 1-7 1.1.1 CP 544 Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 1.1.2 Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 10 1.1.3 COM PP Parameterization Software . . . . . . . . . . . . . . . . . . . . . . . . 1 - 10 1.1.4 Interface Submodules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 11 1.1.5 Connecting Cables for the Coupling Partners . . . . . . . . . . . . . . . . . 1 - 15 1.1.6 User Memory Submodules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 15 C79000-B8576-C191-01 1-1 CP 544 1 Use What is the CP 544 and How do you Use it? The CP 544 communications processor enables data to be transferred between your programmable controller (PLC) and other programmable controllers or computers via a point-to-point coupling. The CP 544 is the top-of-the-range communications processor in the range of coupling modules for the SIMATIC S5-115U, S5-135U and S5-155U programmable controllers. It can be used wherever the current coupling modules have reached their limits with respect to transmission speeds and protocol requirements. The CP 544 offers: * * * * * * * * C79000-B8576-C191-01 Two flexible, serial device interfaces which can be matched to the coupling partners via plug-in interface submodules Transmission speed up to 76800 baud Use of a powerful interface chip for implementation of protocols for data transmission and telecommunication Integration of the most important transmission protocols into the module firmware (RK 512 computer link, 3964/3964R procedure, open driver) Omission of additional user memory submodule when using the integrated transmission protocols: the parameters are stored in the internal RAM or in the user memory submodule of the CPU Use of introduced transmission protocols of the point-topoint coupling of the CPU 928B Better adaptation of transmission protocols through extended parameterization facilities Onboard PG interface 1-3 1 Use CP 544 * * * 1-4 Uniform parameterization interface for the point-to-point coupling of the CP 544 and CPU 928B using the COM PP parameterization software Information functions integrated in the COM PP to enable fast startup of module: error messages are output in plain text Complete parameterization and startup also possible via the backplane bus without the COM PP when using the data handling blocks. C79000-B8576-C191-01 CP 544 Use The most important areas of application of the CP 544 are: * * Coupling of SIMATIC S5 devices to one another and to other systems (e.g. SICOMP) Logging. . .. CP 544 in the S5-115U/H S5-135U S5-155U/H SIMATIC S5 Non-S5 computers e.g. e.g. programmable SICOMP, TELEPERM, controller SINUMERIK, non-Siemens computers, PC Non-S5 devices e.g. scanners . . . . Coupling Fig. 1-1 C79000-B8576-C191-01 Printers e.g. DR 210, DR 211, DR 230, DR 231, . . . Logging Possible coupling partners of the CP 544 1-5 1 Use CP 544 In order to use the CP 544, you must use a programmer * * to generate the STEP 5 program for the CPUs and to assign parameters to the CP 544 communications processor. The jobs to the CP 544 are programmed in the STEP 5 program in the CPU memory by calling data handling blocks. You can generate the interface parameters for the point-to-point linking to the CP 544 using the COM PP parameterization software. A point-to-point connection with an asynchronous, bit-serial data transmission procedure is possible via each of the two device interfaces. Three link types can be implemented depending on the communication partner: * * * 1-6 Data transmission with RK 512 computer link Data transmission with 3964/3964R procedure Data transmission with open driver. C79000-B8576-C191-01 CP 544 1.1 Use Which Components do you Require for the Point-to-point Link with the CP 544? You require the following components for a point-to-point link with the CP 544 communications processor: * * * * * * * The CP 544 module A programmer with connecting cable and adapter The COM PP parameterization software Data handling blocks of the respective programmable controller Interface submodules Connecting cables for the coupling partners User memory submodules (operation without these is also possible, see Section 1.1.6). Refer to Chapter 11 for ordering information on components not included in the delivery of the CP 544. 1.1.1 CP 544 Module Design The electronics of the CP 544 communications processor is located on a single-width PCB of double Eurocard format which establishes the connection to the S5 bus via two backplane connectors. The CP 544 is delivered without an interface submodule and without a user memory submodule. The openings on the front panel for fitting the interface submodules and the user memory submodules are closed by covers. Only remove these covers if you insert a submodule. Otherwise you may experience interference problems. C79000-B8576-C191-01 1-7 1 Use CP 544 The control on the front panel is a mode selector with three positions. Statuses are indicated by two module-specific LEDs and four interface-specific LEDs ( LED displays). You can insert a user memory submodule (EPROM or RAM card) into the opening next to the LEDs. There are three independent interfaces on the CP 544: * * - - - A PG interface to which you can connect programmers Two device interfaces (SI 1 and SI 2) which you can equip as required to use the interface for the RK 512 computer link, data transmission with the 3964/3964R procedures and data transmission with the open driver. The PG interface is integrated in the CP 544. You require one of the following interface submodules for the two device interfaces: * * * V.24 submodule (RS 232C) TTY submodule RS422-A/485 submodule. You must not use the RS422-A/485 submodule when operating the CP 544 without a fan subassembly. 1-8 C79000-B8576-C191-01 CP 544 Use Front panel RUN TEST STOP RUN STOP TXD 1 1 Mode selector User memory submodule (memory card) LEDs RXD 1 TXD 2 RXD 2 PG interface Interface SI 1 Interface SI 2 Fig. 1-2 C79000-B8576-C191-01 Front panel of CP 544 1-9 Use 1.1.2 CP 544 Programmer Connect the programmer to the PG interface of the CP 544 (see Section 2.7 for more details). If you have inserted a 923C coordinator module into the same subrack as the CP 544, you can also connect the PG to the coordinator. Load the COM PP parameterization software, with which you assign the parameters to the two serial device interfaces of the CP 544, into the programmer. Generate your user program by calling the required data handling blocks by means of the STEP 5 basic package on the programmer, transfer your user program to the CPU, and then test it. 1.1.3 COM PP Parameterization Software The COM PP parameterization software is delivered with two different floppy disk formats (3.5" and 5.25") for the PCP/M operating system, and comprises: * * * * The command file S5PXCPPX.CMD (command file) The text file S5PDCPPX.DAT for German texts The text file S5PECPPX.DAT for English texts The text file S5PFCPPX.DAT for French texts. By using the PCP/M emulator, you can also run the COM PP software with the MS-DOS operating system. Function Using COM PP you can: * * * 1 - 10 Assign parameters to the two serial device interfaces of the CP 544 Transmit parameter sets to the CP 544 Call information functions on the CP 544. C79000-B8576-C191-01 CP 544 1.1.4 Use Interface Submodules The device interfaces SI 1 and SI 2 of the CP 544 can be modified. You can establish a point-to-point link to different communication partners using different interface submodules. You can use the following interface submodules: * * * RS422-A/485 submodule TTY submodule V.24 submodule. RS422-A/485 submodule You can use the RS422-A/485 submodule in the RS422-A mode for the following: * * * Data transmission with the RK 512 computer link Data transmission with the 3964/3964R procedures Data transmission with the open driver. In the links listed above, you can only use the RS422-A/485 submodule in full-duplex mode (with respect to hardware). The electrical characteristics are based on the EIA standard RS422-A (CCITT recommendation V.11). The following Fig. shows how the interface is connected (transmit and receive lines). Device 1 GND GND T(A) T(A) T(B) T(B) R(A) R(A) R(B) R(B) Shield Fig. 1-3 C79000-B8576-C191-01 Device 2 Shield RS422/485 submodule: full-duplex mode 1 - 11 1 Use CP 544 Apart from the transmit and receive lines, the RS422-A/485 submodule has a number of control and status signals complying with the CCITT recommendation X.24 and ISO 8481. These control and status signals are not required for the links listed above, however, and need not be connected. The RS422-A/485 is a differential voltage interface and therefore has better noise immunity than a TTY or V.24 interface. The following applies to the signals according to the EIA standard RS422-A (V.11): Logical 0 (ON) corresponds to: VA > VB Logical 1 (OFF) corresponds to: VA < VB. With the RS422-A/485 submodule, the interface signals are electrically isolated from the power supply of the PLC. Please note that you must not use the RS422-A/485 submodule in the CP 544 without a fan subassembly. TTY submodule You can use the TTY submodule for the following: * * * RK 512 computer link Data transmission with the 3964/3964R procedures Data transmission with the open driver. The TTY submodule is equipped with a transmitter and a receiver for 20-mA current loop signals. 1 - 12 C79000-B8576-C191-01 CP 544 Use The following Fig. illustrates the typical connections of the current loop signals: - + + + - - + - + Transmitter 1 Receiver Transmitter Receiver - + Direction of current Fig. 1-4 TTY submodule: direction of loop current The loop current can be supplied both by the TTY submodule and by the communications partner. Only the end supplying the current is non-floating. If you use longer transmission lines, you should make sure that the transmitter always supplies the current. The TTY submodule supplies the current (20 mA) via jumpers in the connector of the standard cable. The 24 V required to generate the current is obtained from the power supply of the PLC. With a correct current loop, 20 mA must flow in the quiescent state (logical 1). A logical 0 is present if the current is interrupted. The following applies to the TTL signals: Logical 0 is represented by: no current Logical 1 is represented by: current (20 mA). The TTY submodule corresponds to DIN 66258, Part 1. C79000-B8576-C191-01 1 - 13 Use V.24 submodule CP 544 You can use the V.24 submodule for the following: * * * RK 512 computer link Data transmission with the 3964/3964R procedures Data transmission with the open driver. The following Fig. illustrates how the V.24 interface is connected (transmit and receive lines): Device 1 GND GND TxD TxD RxD RxD Shield Fig. 1-5 Device 2 Shield V.24 interface Apart from the transmit and receive lines, the V.24 submodule has a number of control and status signals complying with the CCITT recommendation V.24/V.28. These control signals are not required with the standard procedures of the RK 512, 3964/3964R and open driver, however, and are not used (exception: RTS/CTS with open driver). The V.24 signals are differentiated as follows: Logical 0 is represented by a voltage +3 V Logical 1 is represented by a voltage -3 V. 1 - 14 C79000-B8576-C191-01 CP 544 1.1.5 Use Connecting Cables for the Coupling Partners There are standard connecting cables to link the various interface submodules to the partner. Table 1.1 1 Connecting cables for the coupling partners Interface submodule RS422/485 submodule Standard CP 524 connecting CP 544 cable between CP 544 and ... TTY submodule V.24 submodule CP 524/525 CP 544 CPU 928B CP 524/525 CP 544 CPU 928B DR 210/DR 211 DR 230/DR 231 DR 210/DR 211 DR 230/DR 231 No standard connecting cables are available for the link to the 521SI and 523 CPs. You can find more details on the connecting cables (e.g. lengths) and the pin assignments of the sub-D plugs in the interface submodule in the reference section, Chapter 10, under the description of the three submodules. 1.1.6 User Memory Submodules You can use SIMATIC memory cards (full credit card format only) with a capacity up to 256 x 210 bytes in the CP 544. Two different types of memory submodules are available: * * EPROM submodules RAM submodules. You do not usually require a RAM submodule for the CP 544 since this already contains an internal RAM whose 32 x 210 bytes provide sufficient space to accommodate the C79000-B8576-C191-01 1 - 15 Use CP 544 parameters of the various protocols. EPROM submodules You can program EPROM submodules offline on the SIMATIC S5 programmers 7xx using the STEP 5 basic package (version 6 and later). The front of the PG contains a special plug to which the submodule is connected. Refer to the STEP 5 manual for a description of the EPROM submodule programming. The submodule can be inserted into the CP 544 once it has been programmed. The power supply to the programmable controller must be switched off in the process. EPROM submodules are available for the CP 544 with the following capacity: * RAM submodules 256 x 210 bytes. RAM submodules are programmed online in the CP 544. The PG must be connected to the PG interface. A RAM submodule is only required if the parameters require more than 32 Kbytes of memory. This may be significant for later configurations. Note that the user program stored in the RAM submodule is lost if you pull the submodule out of the CP 544 or pull the CP 544 out of the programmable controller. RAM submodules are available for the CP 544 with the following capacity: * 256 x 210 bytes. A RAM submodule is only required if the parameters exceed 32 x 210 bytes. 1 - 16 C79000-B8576-C191-01 CP 544 Without user memory submodule Use You can also work without a user memory submodule. The parameters are then stored in the internal RAM (capacity 32 x 210 bytes) of the CP 544. Note that the data stored in the internal RAM are lost when you remove the module. If you wish to prevent this, you can also store the parameters for the static parameter set and the dynamic parameter sets in a DB/DX on the user memory submodule of the CPU. You must then ensure that the parameters are transferred to the CP 544 during the startup using a special job. You can find more details in the description of the data handling blocks in Section 6.3.8. C79000-B8576-C191-01 1 - 17 1 22 How do you Fit the Hardware Components? Contents of Chapter 2 2 How do you Fit the Hardware Components? . . . . . . . . 2.1 Which Settings must you Make on the CP 544?. . . . . . . . . . . . . . . 2 - 4 2.2 What are the Jumper Settings on the Interface Submodule? . . . . . 2 - 13 2.3 How are the Interface Submodules Installed?. . . . . . . . . . . . . . . . . 2 - 13 2.4 How do you Insert a SIMATIC Memory Card? . . . . . . . . . . . . . . . . 2 - 14 2.5 How is the CP 544 Installed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 15 2.6 How are the Coupling Partners Connected?. . . . . . . . . . . . . . . . . . 2 - 17 2.7 How is a PG Connected? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 19 2.8 How can you Determine Whether you have Correctly Fitted all Hardware Components? . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 20 C79000-B8576-C191-01 2-3 2-1 Contents 2.9 How does the CP 544 Respond Following Power-up? . . . . . . . . . . 2 - 21 2.10 How does the CP 544 Respond During Operation? . . . . . . . . . . . . 2 - 22 2.10.1 Mode Selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 22 2.10.2 LED Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 23 2.10.3 Status Transitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 26 2-2 C79000-B8576-C191-01 CP 544 2 Hardware Components How do you Fit the Hardware Components? This chapter describes how you fit and start the hardware components for your point-to-point coupling. The following table summarizes the steps you must take: Table 2.1 C79000-B8576-C191-01 2 Fitting of hardware components step-by-step 1. Make the required switch settings on the CP 544 and check the jumper settings. 2. Check the jumper setting on the interface submodule and fit the submodule into the CP 544. 3. Insert a programmed EPROM or RAM submodule into the CP 544 slot if required. 4. Switch off the power supply to your PLC. 5. Insert the CP 544 into a provided slot of your PLC. 6. Establish the connection between the partner device and the CP 544. 7. Check the setting of the mode selector switch on the CP 544. The switch must be in the RUN position to enable transmission to the partner. 8. Make the required settings on the partner. 9. Switch on the power supply to your PLC. 2-3 Hardware Components 2.1 CP 544 Which Settings must you Make on the CP 544? The data transfer between the CPU and the CP 544 takes place via the page area of the dual-port RAM. A base page number must be assigned to each CP if several CPs are fitted in one PLC so that the CPU can specifically address the individual CPs. Starting with the base interface number, the further page numbers are assigned automatically depending on the number of pages per CP. The following Fig. illustrates the distribution of the page numbers in the case of three CPs with different numbers of pages. Page number 0 : CP1 : Page number 7 CP1 CP2 CP3 Page number 0 8 16 Number of pages per device interface 4 4 2 Page number 8 : CP2 : Page number 15 Page number 16 CP3 : Page number 19 Fig. 2-1 2-4 Page numbers C79000-B8576-C191-01 CP 544 Hardware Components You must therefore make or check the switch settings and jumper settings described below before you fit a CP 544 into your programmable controller: * * * * Set page frame number (interface number) (S2) Set number of pages (S5) Set coordination flag area (S4) Check jumper settings. 2 The following Fig. shows the positions of the switches on the module. 7 6 5 4 3 2 1 0 S2 Page number No. pages 7 6 5 4 3 2 1 0 IPC flag Mode S5 1 0 3 2 1 0 Fig. 2-2 C79000-B8576-C191-01 S4 S3 Positions of switches on the module, and delivered state 2-5 Hardware Components Switch position CP 544 The following illustration shows the side view of the switches and explains the meanings of the switch positions. Switch positioned upwards means 1 Switch positioned downwards means 0 Setting the page number To enable the CPU to address the CP, you must enter a page number (interface number, parameter SSNR) when assigning parameters to the data handling blocks. The page number must be present in the area which you have set on the CP. Up to four pages are available for each of the two device interfaces of the CP 544. To ensure that only the desired page is addressed during data transfer, each page is assigned its own number. The even page numbers address device interface 1, the odd page numbers address device interface 2. Page number 0 Page number 1 Page number 2 SI1 Page number 3 SI2 Page number 4 Page number 5 Page number 6 Page number 7 Fig. 2-3 2-6 Assignment of page numbers to device interfaces C79000-B8576-C191-01 CP 544 Hardware Components You need only set the lowest page number in each case, the following numbers result from the number of pages. To set the number, position the associated switch in assembly S2 upwards. When delivered, all switches are pressed downwards. The following example shows the setting of page number 16. S2 2 7 2 6 2 5 2 4 2 3 2 2 2 1 20 Significance 7 6 5 4 3 2 1 0 Position Page number Page number 16 results from the equation 7 6 5 4 3 2 1 0 16 = 0 x 2 + 0 x 2 + 0 x 2 + 1 x 2 + 0 x 2 + 0 x 2 + 0 x 2 + 0 x 2 Setting the number of pages Set the number of pages using the first two switches of assembly S5. When delivered, the switch for the number of pages with position 1 is pressed, and the switch with position 0 is in the upwards position, i.e. one page per device interface is set. The other switches of assembly S5 are positioned upwards and must not be changed since the module would otherwise respond in an undefined manner. S5 No. pages Mode 1 0 3 2 1 0 Position 1, 2 or 4 pages are possible per device interface. Number of pages Switch in position 1 per device interface Switch in position 0 1 page 2 pages 4 pages Down or up Down Up Down Up Up Four pages are set per interface if both switches are C79000-B8576-C191-01 2-7 2 Hardware Components CP 544 positioned upwards. This would result in the following distribution of page numbers, for example: Page number 16, 18, 20, 22 Device interface SI 1 Page number 17, 19, 21, 23 Device interface SI 2 Note that the switches in assembly S2 with a lower significance may be unimportant depending on the number of pages you have set per device interface. Set on S5 Switch insignificant on S2 1 page per device interface Position 0 2 pages per device interface Positions 1 and 0 4 pages per device interface Positions 2, 1 and 0 Example: 4 pages are set per device interface. S5 No. Mode pages 1 0 3 2 1 0 Position Switch assembly S2 is as follows: 2 7 2 6 2 5 2 4 2 3 2 2 2 1 20 S2 Significance 7 6 5 4 3 2 1 0 Position Page number The switches at positions 2, 1 and 0 with significances 22, 21 and 20 are unimportant. Only the page numbers 0, 8, 16, 24, 32, 40 ... can be set. 2-8 C79000-B8576-C191-01 CP 544 Hardware Components Page number 24 is set in this example. The assignment of all 8 page numbers to the two device interfaces is thus as follows: Setting the coordination flag area Page number 24, 26, 28, 30 Device interface SI 1 Page number 25, 27, 29, 31 Device interface SI 2 2 You can enable or disable the data transfer between the CPU and CP 544 using coordination flags (interprocessor communication flags). This is necessary to protect areas on the partner which are occupied by transmitted data from being overwritten by new data. You must identify the coordination flags as output flag bytes. They are stored in a memory area of 256 bytes which can be addressed by all modules (coordination flag/communication flag area). If several CP 544s or several CPUs are used in the programmable controller, the coordination flag area must be divided between the various communications processors and the various CPUs. Also note that you must disable the used coordination flag areas on an applied coordinator. The coordination flag area is divided into 8 fields with 32 bytes each. You can disable one or more of these fields on the CP 544 using switch S4 by setting the associated switch upwards. When delivered, all switches are positioned upwards, i.e. all coordination flags are disabled. C79000-B8576-C191-01 2-9 Hardware Components CP 544 Switch upwards = disabled Switch downwards = enabled Communication flag bytes 7 6 5 4 3 2 1 0 Communication flags S4 Address 224 - 255 F2E0 - F2FF 192 - 223 F2C0 - F2DF 160 - 191 F2A0 - F2BF 128 - 159 F280 - F29F 96 - 127 F260 - F27F 64 - 95 F240 - F25F 32 - 63 F220 - F23F 0 - 31 F200 - F21F You must additionally enter the corresponding coordination flag bytes in the DB1 of the CPUs! They can then be addressed in the STEP 5 program. Example of the distribution of the coordination flags between two CP 544s, two CPUs and a coordinator in the S5-135U. Coordinator Coordination flag bytes 96 to 255 2 - 10 1st CPU 2nd CPU 1st CP 544 DB1 Output coordination flag bytes 8, 12, 70 DB1 Output coordination flag bytes 32, 35, 61 Coordination flag bytes 0 to 31 2nd CP 544 Coordination flag bytes 32 to 63 Coordination flag bytes 64 to 95 C79000-B8576-C191-01 CP 544 Hardware Components The first CPU is to coordinate the data transfer with the first CP 544 via the bits of the coordination flag bytes 8, 12 and 70. * * Therefore enable the coordination flag areas 0 to 31 and 64 to 95 on the first CP 544 (you can only enable or disable areas of 32 consecutive coordination flag bytes) and Enter bytes 8 and 12 as output communication flag bytes in the DB1 of the first CPU. The second CPU is to coordinate the data transfer with the second CP 544 via the bits of the coordination flag bytes 32, 35 and 61. * * Enable the coordination flag area 32 to 63 on the second CP 544 and Enter bytes 32, 35 and 61 as output coordination flag bytes in the DB1 of the second CPU. Since the coordination flag area only exists once in each PLC, it is now only possible to use the coordination flags 96 to 255 for other purposes. Switch assembly S3 C79000-B8576-C191-01 Switch assembly S3 is reserved for further applications. All switches must be positioned upwards when delivered. 2 - 11 2 Hardware Components Checking the jumper settings CP 544 The jumpers are set on the CP 544 when delivered such that it can be used immediately without modifications. Use the following Fig. to check the jumper settings on your CP 544. X14 1 2 X9 12 2 11 9 7 5 3 1 X16 2 10 X17 12 3 135 79 SI 1 SI 2 X15 3 2 1 Jumper inserted Fig. 2-4 2 - 12 Jumper settings on the CP 544 when delivered C79000-B8576-C191-01 CP 544 2.2 Hardware Components What are the Jumper Settings on the Interface Submodule? The jumpers are set on the interface submodules when delivered such that the submodules can be used immediately without modifications. The reference section of this manual describes the jumper settings for the various submodules ( RS422-A/485 submodule, TTY submodule, V.24 submodule). 2.3 How are the Interface Submodules Installed? You must install an interface submodule in the CP 544 outside the central controller. Installation Proceed as follows: * * * * * * * * C79000-B8576-C191-01 Check the jumper settings on your interface submodule (see reference section) Switch off the power supply to your PLC Remove the CP 544 Loosen the two screws which secure the receptacle cover on the CP 544, and remove the cover Insert the interface submodule through the front panel into the plug connection (components in same direction as CP 544) Secure the submodule using the two screws with which the cover was secured Insert the CP 544 into the central controller Switch the power supply to your PLC back on. 2 - 13 2 Hardware Components CP 544 Note For interference reasons it is absolutely essential to firmly tighten the two screws with which the interface submodule is secured. Only then can the EMC values (electromagnetic compatibility) be observed. Proceed as follows to remove the interface submodule: Removal * * * 2.4 Switch off the power supply to your PLC Remove the CP 544 from the central controller Loosen the two securing screws of the submodule and pull the submodule out of the receptacle. How do you Insert a SIMATIC Memory Card? You can insert a SIMATIC memory card with a full credit card format (EPROM or RAM submodule) into the CP 544 module from the front. The parameters for your CP 544 user program are stored on the submodule. Parameterization of the standard communication processes which are stored in the EPROM of the CP 544 is also possible without the memory card. The parameters are stored in the internal RAM in this case and are lost when the module is removed. Insertion and removal 2 - 14 The memory card must only be inserted and removed with the power supply switched off. C79000-B8576-C191-01 CP 544 2.5 Hardware Components How is the CP 544 Installed? Installation The CP 544 must not be inserted or removed under power! * * * * * * C79000-B8576-C191-01 Switch off the power supply to your PLC Insert the CP 544 into the PLC subrack. Observe the permissible slots for the various programmable controllers (see below) Ensure that you do not tilt the module and that the contact springs of the guides in the subrack are not bent Lock the CP 544 in the subrack Switch the power supply to your PLC back on again Check the position of the mode selector on the CP 544. The switch must be in the RUN position to enable the transmission to the partner. 2 - 15 2 Hardware Components CP 544 The CP 544 can be inserted into the following slots of the various programmable controllers: Table 2.2 Permissible slots for the CP 544 Subrack/device Slot No. for CP 544 S5-115U/H CR 700-21) ER 701-31) 2) CR 700-3 0, 1, 2, 3, 4, 5 0, 1, 2, 3, 4, 5, 6 0a, 0b, 1a, 1b, 2a, 2b, 3, 4, 5 S5-135U CC 135U 11, 19, 27, 35, 43, 51, 59, 67 (75, 83, 91, 99, 107, 115, 123, 131)3) S5-155U CC 155U 19, 35, 43, 51, 59, 75, 83, 91, 99, 107, 115, 123, 131, (139, 147)4) S5-155H CC 155U 35, 43, 51, 59, 67, 75, 83, 91, 99, 107, 115, 123, (139, 147)4) EU 185U 19, 27, 35, 43, 51, 59, 67, 75, 83, 91, 99, 107, 115, 123, 131, 139 1) Adapter casing required. One module per adapter casing. Not with interface module 311. 3) Not for CC 135-3UA.. 4) Only possible following modification to jumpers on wiring backplane. 2) Removal Proceed as follows to remove the CP 544: * * * 2 - 16 Set the mode selector on the CP 544 to STOP Switch off the power supply to your PLC Remove the CP 544 from the central controller. C79000-B8576-C191-01 CP 544 2.6 Hardware Components How are the Coupling Partners Connected? The connection line between the CP 544 and the partner must have a shield grounded at both ends and metal plugs. Standard connecting cables satisfy these requirements. 2 The following standard connecting cables are available: Table 2.3 Standard connecting cables CP 544 connected to Submodule in CP 544 Connection in CP 544: power supply with transmitter, receiver CP 544 TTY submodule Active, passive CP 524, CP 525 TTY submodule Active, passive CP 544 V.24 submodule CP 524 V.24 submodule DR 210/DR 211 TTY submodule DR 230/DR 231 Active, passive DR 210/DR 211 V.24 submodule DR 230/DR 231 CP 544 RS422-A/485 submodule CP 524 RS422-A/485 submodule You can obtain the order nos. from the ordering information in Chapter 11. No standard connecting cables are available for the connections to the CPs 521SI and 523. You can find more details on the connecting cables (e.g. permissible lengths) in the reference section, Chapter 10, under the description of the three submodules. Connect the shield at both ends with a large-area contact to the housing of the metal plug. In addition, the cable shield must always be connected to a shielding rail with a large-area contact. C79000-B8576-C191-01 2 - 17 Hardware Components CP 544 An equipotential bonding conductor must be provided if there are large differences in ground potential between the CP 544 and the partner. Signal cables and power cables up to 1 kV must be spaced at least 10 cm apart. The spacing must be increased proportionally in the case of higher voltages. You can find further information on installation in the reference section under the term installation guidelines. If you do not wish to use the standard connecting cables, please refer to the pin assignments of the interface submodules in the reference section. Refer to the respective manual on how to fit your partner device and to start it up. 2 - 18 C79000-B8576-C191-01 CP 544 2.7 Hardware Components How is a PG Connected? The connection line between the CP 544 and the programmer must have a shield grounded at both ends and metal plugs. The cable shield must be connected at both ends to the plug housing and the shielding rail with a large-area contact. PG connection on CP 544 Since the PG interface on the front panel of the CP 544 is provided with a screw lock, an adapter cable for the connection to the PG has been provided for the CP 544 (see ordering information for order no.). PG connection on coordinator If you have inserted a coordinator module 923C in your programmable controller, you can also connect the PG to the coordinator. C79000-B8576-C191-01 2 - 19 2 Hardware Components 2.8 CP 544 How can you Determine Whether you have Correctly Fitted all Hardware Components? Using the following checklist you can check whether you have installed all hardware components of the CP 544 correctly. Table 2.4 Checklist for installation of hardware components 1. Is the correct page number (interface number) set on the CP 544? 2. Is the number of pages set correctly on the CP 544? 3. Is the coordination flag area set correctly on the CP 544? 4. Do the jumper settings on the CP 544 agree with the delivery state? 5. Do the jumper settings on the interface submodule agree with the delivery state? 6. Is the interface submodule inserted correctly into the connector? 7. Is the interface submodule screwed tightly to the front panel? 8. If you are using a user memory submodule: is a permissible user memory submodule inserted? 9. Is the CP 544 inserted into a slot permissible for your programmable controller? 10. Is the CP 544 correctly inserted and locked in the subrack? 11. Is your programmer correctly connected on the CP 544? 12. Is the cable between the coupling partners an approved cable and correctly fitted? 2 - 20 C79000-B8576-C191-01 CP 544 2.9 Hardware Components How does the CP 544 Respond Following Power-up? Switching on of power supply Once you have switched on the power supply to your programmable controller, * * * * Synchronization of CPU and CP 544 the STOP LED ( LED displays) lights up on the front panel of the CP 544, the operating system carries out a self-test, the STOP LED goes out after approx. 10 seconds and the RUN LED lights up if no errors have been detected and if the parameters for the device interfaces are complete and the TXD LEDs flash until the CP 544 receives the SYNCHRON jobs from the CPU. You must insert the SYNCHRON data handling block into the restart organization blocks of the CPU for each page frame you use. This block synchronizes the CPU and CP 544 and defines the maximum frame size for data transfer between the CPU and CP 544 (see Section 6.3.1, SYNCHRON). Once the SYNCHRON job has been executed without errors, the CP 544 is ready to process jobs from the CPU (SEND, FETCH, RECEIVE etc) and from the partner. C79000-B8576-C191-01 2 - 21 2 Hardware Components 2.10 CP 544 How does the CP 544 Respond During Operation? Once you have switched on the power supply, you can * set the operating mode of the CP 544 using the mode selector and * recognize the module status on the LED displays. 2.10.1 Mode Selector The control element on the front panel of the CP 544 is a mode selector switch with the three positions RUN/TEST/STOP. RUN If the mode selector is set to RUN (and if a SYNCHRON job has been executed without errors), the CP 544 processes jobs coming from the CPU and the partner. TEST The TEST position does not currently have a special meaning. The CP 544 responds as in the switch position RUN. STOP If the mode selector is set to STOP, the transfer of useful data on the transmission link between the CPU and CP is interrupted. Jobs arriving from the CPU are rejected with an error message (see also Chapter 8). Jobs from the partner are no longer routed on to the CPU. The data of the partner job are lost if you are working with the 3964/3964R procedure or with the open driver. If you wish to prevent this, you must either use the RK 512 computer link or make a provision for protection of the useful data yourself. 2 - 22 C79000-B8576-C191-01 CP 544 2.10.2 Hardware Components LED Displays The LED displays provide you with information on the CP 544. The following must be differentiated: * * Module-specific displays The module-specific displays RUN and STOP The interface-specific displays TXD and RXD. The status of the complete CP is indicated on the module-specific displays RUN and STOP. Table 2.5 C79000-B8576-C191-01 2 LED displays (module-specific) LED RUN LED STOP Meaning On (green) Off - CP is in RUN status - The CP can process jobs arriving from the CPU and the partner Slow flashing Off - CP is in TEST status - The CP can process jobs arriving from the CPU and the partner Off On (red) - CP is in STOP status - Module is in operation, but data transfer to the CPU via the S5 interface is no longer taking place Off Slow flashing - CP is in "Error" status - An error has occurred which no longer enables reliable processing. This status can only be left by switching off the power. 2 - 23 Hardware Components Green interface-specific displays CP 544 The interface-specific displays TXD and RXD (green) indicate who has triggered the job (TXD) and who receives the job (RXD). The TXD LED lights up when a job is transferred to the protocol software (RK 512, 3964/3964R procedures or open driver). The TXD LED is switched off as soon as the protocol software has terminated the transmission procedure with a positive or negative result. The RXD LED is switched on when a job has been received by the CP. The RXD LED is switched off as soon as the job has been transferred to the CPU. The LEDs do not indicate the activity on the line. For example, the TXD LED is switched on in the case of protocol errors, but no data are transmitted via the link. Furthermore, the LEDs do not necessarily provide information on the data transmission direction. For example, the TXD LED is switched on on the CP which triggered the job in the case of a FETCH job with the RK 512 computer link, but the data are transmitted in the opposite direction. Red interface-specific displays The interface-specific displays TXD1 and TXD2 (red) indicate the status of the device interface. The displays and their meanings are listed in the following table. 2 - 24 C79000-B8576-C191-01 CP 544 Hardware Components Table 2.6 LED displays (module-specific) TXD 1, TXD 2 On (red), permanently Interface submodule inserted but no interface parameters present On (red), fast flashing Incorrect/incomplete parameter or incorrect interface submodule inserted On (red), slow flashing Parameter correct but synchronization has not yet taken place via backplane bus On (green) Job has been triggered Off Interface is in operation, active and passive jobs can be executed, or no interface submodule inserted RXD 1, RXD 2 On (green) C79000-B8576-C191-01 Job has been received 2 - 25 2 Hardware Components 2.10.3 CP 544 Status Transitions Each change in CP status has an effect on the data transmission. The most important transitions are described in this section. Module-specific status transitions These are status transitions which have an effect on the complete module. They can be triggered by: * * The mode selector Switching off the power supply IF... THEN... the mode selector is switched from RUN or TEST to STOP the currently processed job (job from CPU or from partner) will be processed completely (with continuation frames and timeout monitoring). the job queue will be deleted. further jobs from the CPU will be rejected, jobs from the partner will no longer be routed on to the CPU. the module will enter the STOP status. the module changes from RUN, TEST or STOP to the ERROR status all jobs will be aborted immediately. the power supply fails during operation the data stored in the internal RAM and in the user memory are buffered, i.e. the protocol parameters and the job list will be retained. the STOP LED will flash. the data transmission will be aborted and must be restarted by the user. The jobs stored on the CP in the queue will be lost. 2 - 26 C79000-B8576-C191-01 CP 544 Interface-specific status transitions Hardware Components These are status transitions which have an effect on the individual device interface. They can be triggered by: * * Operator inputs via COM PP Calling of special jobs (data handling blocks) in the STEP 5 program. 2 IF... THEN... the device interface is switched to passive by the STOP job (data handling block job) the currently processed job (job from CPU or from partner) will be processed completely (with continuation fields and timeout monitoring). the job queue will be deleted. further jobs from the CPU will be rejected, jobs from the partner will no longer be processed. the device interface is the currently processed job from the synchronized in the cycle* CPU or the partner is aborted. by a SYNCHRON job the job queue will be deleted. (data handling block job) further jobs from the CPU will be rejected, jobs from the partner will no longer be processed. jobs can be handled again via the device interface provided the synchronization was carried out successfully. * C79000-B8576-C191-01 Note: A SYNCHRON job should be avoided in the cycle since secondary faults may always occur in this case. If it is impossible to avoid the SYNCHRON in the cycle, all current jobs should first be terminated on the CPU. 2 - 27 Hardware Components IF... CP 544 THEN... the parameterization job will be added the device interface is reparameterized using the to the queue. All previously added jobs special job "Parameterize are also processed. device interface" the job queue will be deleted as soon as the parameterization job has been processed. further jobs are rejected by the CPU, jobs from the partner will no longer be processed. the device interface will be switched to passive and the parameterization carried out. the device interface can be restarted following successful parameterization. the device interface is reparameterized using COM PP the currently processed job (job from CPU or from partner) will be processed completely (with continuation fields and timeout monitoring). the job queue will be deleted. further jobs from the CPU will be rejected, jobs from the partner will no longer be processed. the device interface will be switched to passive and the parameterization carried out. the device interface can be restarted following successful parameterization. 2 - 28 C79000-B8576-C191-01 3 How do you Transmit Data with the RK 512 Computer Link? Contents of Chapter 3 3 How do you Transmit Data with the RK 512 Computer Link? 3.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 3 3.2 Data Exchange Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 7 3.3 Program Elements for RK 512. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 9 3.3.1 3.3.1.1 3.3.1.2 3.3.1.3 3.3.1.4 3.3.1.5 3.3.1.6 STEP 5 Program with Data Handling Blocks . . . . . . . . . . . . . . . . . SYNCHRON. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FETCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RECEIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coordination Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3333333- 3.3.2 3.3.2.1 3.3.2.2 3.3.2.3 Assignment of Parameters to RK 512 Computer Link in CP 544 . . Static Parameter Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dynamic Parameter Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transmission of Parameters to the CP 544 User Memory . . . . . . . 3 - 18 3 - 18 3 - 22 3 - 25 3.4 Job Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 27 C79000-B8576-C191-01 . 3-3 9 9 10 12 13 14 15 3-1 Contents 3.4.1 Send Data (SEND). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 27 3.4.2 Fetch Data (FETCH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 33 3.5 Example of Complete Parameter Settings . . . . . . . . . . . . . . . . . . . 3 - 38 3.6 Protocol Definition of RK 512 Computer Link . . . . . . . . . . . . . . . . . 3 - 44 3.6.1 Format of Command Message Header . . . . . . . . . . . . . . . . . . . . . . 3 - 46 3.6.2 Send Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 49 3.6.3 Fetch Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 53 3.6.4 Quasi Full-Duplex Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 57 3.6.5 3964/3964R Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 58 3-2 C79000-B8576-C191-01 CP 544 3 RK 512 Computer Link How do you Transmit Data with the RK 512 Computer Link? Chapter 3 describes the functions of the RK 512 computer link and acquaints you with the generation of the STEP 5 program and the parameter sets for the CP 544. 3.1 Introduction 3 Using the RK 512 computer link, data can be exchanged between two communications partners connected via a point-to-point link. Interface submodules Various interface submodules are available for the RK 512 computer link: * * * Transmission speed V.24 submodule TTY submodule RS422-A/485 submodule (only in the RS422-A mode). Set the transmission speed for the data exchange as suitable for the communications partner. The following transmission speeds are permissible: * * * 300 bps to 76800 bps with the RS422-A/485 submodule 300 bps to 19200 bps with the V.24 submodule 300 bps to 9600 bps with the TTY submodule. The total baud rate of 76800 bps must not be exceeded, however. C79000-B8576-C191-01 3-3 RK 512 Computer Link CP 544 Transmission reliability The SIMATIC S5 RK 512 computer link ensures the highest possible transmission reliability since the RK 512 protocol includes several layers of the ISO/OSI layer model (ISO IS 7498): * * * * 3-4 The physical layer (layer 1): This layer stipulates the physical transmission of the data bytes (physical characteristics of the connection, transmission speed, ...) The data link layer (layer 2): The data bytes are transmitted using the 3964 or 3964R transmission procedure. This adds start and end characters to the data bytes and initiates repetitions if errors occur. The network layer (layer 3): This does not exist in the RK 512 since it is a pure point-to-point link. The transport layer (layer 4): The RK 512 replies to every correctly received command message with a reply message. This allows the sender to check that its data have arrived completely at the partner or whether the requested data are available at the partner. C79000-B8576-C191-01 CP 544 RK 512 Computer Link Coupling partners 1st coupling partner 2nd coupling partner SIMATIC S5 SIMATIC S5 S5-115U/H S5-135U (without S processor) S5-155U/H CP 544 CP 544 CP 525 CP 524 CPU 928B CP 544 CP 525 CP 524 CP 525 CP 524 S5-135U (without S processor) S5-155U S5-115U/H S5-155H 3 S5-150U Non-SIMATIC computer Fig. 3-1 Possible coupling partners with RK 512 data transmission The RK 512 computer link implements the direct data exchange between the CP 544 in an S5-115U/H, S5-135U (without S processor), S5-155U/H and: * another CP 544 in the S5-115U/H, S5-135U (without S processor) and S5-155U/H programmable controllers * a CPU 928B in the S5-135U and S5-155U programmable controllers * a CP 525 or CP 524 in the S5-115U/H, S5-135U, S5-150U and S5-155U/H programmable controllers * a non-SIMATIC computer capable of handling the RK 512 (e.g. SICOMP M, SICOMP R). C79000-B8576-C191-01 3-5 RK 512 Computer Link Transmitted data CP 544 You can transmit the following data stored in a PLC using the RK 512 computer link: * * * * * * * * Data blocks, extended data blocks Flag bytes Input/output bytes I/O bytes Timers Counters System data Absolute addresses. Transmission direction You can implement the following jobs with the SIMATIC S5 RK 512 standard computer link: 3-6 * Send data (SEND job): The PLC 1 sends data to the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2 * Fetch data (FETCH job): The PLC 1 fetches data from the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2 * Receive data (RECEIVE-ALL job): The PLC 1 receives data from the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2 * Prepare data to be fetched (SEND-ALL job): The PLC 1 prepares data for the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2. C79000-B8576-C191-01 CP 544 3.2 RK 512 Computer Link Data Exchange Sequence The following Fig. shows the data exchange sequence between two programmable controllers, each of which is fitted with a CP 544. PLC 2 PLC 1 CPU CP 544 CP 544 CPU 3 Data handling blocks Data Fig. 3-2 C79000-B8576-C191-01 S5 bus RK 512 computer link Dynamic parameter set RK 512 computer link S5 bus Dynamic parameter set Data handling blocks Data Data exchange between two programmable controllers 3-7 RK 512 Computer Link Data handling blocks The data handling blocks in the STEP 5 program of the CPU are used: * * RK 512 computer link CP 544 to trigger and execute data exchange, to receive the transmitted data. The RK 512 computer link in the CP 544 modules of the 2 PLCs * * is provided with the parameters for the coupling partner via the dynamic parameter set, passes the data on to the CP in the other PLC. The data exchange sequence described means that you have two important tasks: * * 3-8 You must generate your STEP 5 program with the calls of the data handling blocks for the two CPUs You must assign parameters to the RK 512 computer link in the CP 544. C79000-B8576-C191-01 CP 544 3.3 RK 512 Computer Link Program Elements for RK 512 The programming of the RK 512 computer link is based on only a few fundamental points - the STEP 5 program with the calls of the data handling blocks and the static and dynamic parameter sets on the CP. 3.3.1 STEP 5 Program with Data Handling Blocks 3 Incorporate the data handling blocks described below into your STEP 5 program to enable data transmission with the RK 512 computer link according to the particular task. Once you have read this description, you will be able to generate a concept for the STEP 5 program for your particular task. You can find a detailed description of the individual data handling blocks in Chapter 6. 3.3.1.1 SYNCHRON Synchronizing CPU and CP The data handling block SYNCHRON synchronizes the interface between the CPU and CP. SYNCHRON must be called in the restart organization blocks of the CPU for every page frame used by you in the two device interfaces of the CP. C79000-B8576-C191-01 3-9 RK 512 Computer Link 3.3.1.2 Send data CP 544 SEND The data handling block SEND transmits data from the CPU to the CP 544. The job is triggered by the SEND-DIRECT. In order to transmit data, a SEND-ALL job must be additionally programmed in the user program and called cyclically. The matching partner job RECEIVE-ALL must be programmed in the STEP 5 program of the partner CPU to enable the data to be received by it. PLC 1 PLC 2 CPU CP 544 CP 544 RK 512 computer link RK 512 computer link CPU SENDDIRECT n T R I G G E R SENDALL Data source RECEIVEALL Dynamic parameter set Data destination n = job number Fig. 3-3 3 - 10 SEND job C79000-B8576-C191-01 CP 544 RK 512 Computer Link When transmitting data with the CP 544, the SEND-DIRECT data handling block is used for the following special jobs: Parameterize device interface You can use this special job to assign parameters to the two device interfaces of the CP 544 without the COM PP parameterization software in that you store the parameters in a data block. Execute PSEUDO-WRITE function You can use this special job to transmit data. All parameters on the source and destination are stored in a DB/DX. The special job enables you * * to modify the source and/or destination data of a job during execution of the program, to program this job without COM PP. Start device interface You can use this special job to start a device interface from the STEP 5 program. Set date and time You can use this special job to set the clock on the CP 544 from the CPU and to define whether the CP is to be the time master or slave. C79000-B8576-C191-01 3 - 11 3 RK 512 Computer Link 3.3.1.3 CP 544 FETCH Fetch data The data handling block FETCH only triggers the data transmission, the data are transmitted with the data handling block RECEIVE-ALL (must be additionally programmed in the STEP 5 program and called cyclically). The matching partner job SEND-ALL must be programmed in the STEP 5 program of the partner CPU to enable the data to be sent by it. PLC 1 CPU PLC 2 CP 544 CP 544 RK 512 computer link RK 512 computer link CPU FETCHDIRECT n T R I G G E R SENDALL RECEIVEALL Data destination Fig. 3-4 3 - 12 Dynamic parameter set Data source FETCH job C79000-B8576-C191-01 CP 544 RK 512 Computer Link When transmitting data with the CP 544, the FETCH-DIRECT data handling block is used for the following special jobs: Execute PSEUDO-READ function You can use this special job to fetch data. All parameters on the source and destination are stored in a DB/DX. The special job enables you * * 3.3.1.4 to modify the source and/or destination data of a job during execution of the program, to program this job without COM PP. RECEIVE Receive data The data handling block RECEIVE transmits data from the CP to the CPU. The data handling block RECEIVE-DIRECT is only used for the following special jobs in the data transmission with the CP 544: Read parameters of a device interface You can use this special job to scan the parameters of a device interface independent of the COM PP parameterization software. The parameters are written into a defined data block. Read error message area of SYSTAT You can use this special job to read up to 3 error messages of the SYSTAT specific to the interface. Read status You can use this special job to scan the status of the CP 544 and the addressed device interface. C79000-B8576-C191-01 3 - 13 3 RK 512 Computer Link CP 544 Read hardware parameters You can use this special job to scan the hardware parameters which you have set using switches on the module (page frame number, number of pages, released coordination flag area) without having to remove the module. Read complete SYSTAT status area You can use this special job to read the complete SYSTAT, i.e. the error messages of both device interfaces of the CP 544. Read SYSID identification area You can use this special job to read data on the module, the memory submodule, the interface assignments and the output statuses of the loaded software from the SYSID. Read date and time You can use this special job to read the time on the CP 544 using the CPU. 3.3.1.5 CONTROL Check job status 3 - 14 The data handling block CONTROL copies a job status into the defined status word. The job status provides information on the processing state of the job. C79000-B8576-C191-01 CP 544 3.3.1.6 RK 512 Computer Link Coordination Flags You can use the coordination flags to inhibit or release the transfer of data between the CPU and CP 544. The coordination flags must be released using switches on the CP 544 module (see Section 2.1). The coordination flags must be defined in the PLC as output communication flags in the DB 1. 3 RK 512 computer link Byte and bit numbers of the coordination flag are defined in the dynamic parameter set and transmitted to the partner in the SEND or FETCH message. If the partner CP receives a message with the byte and bit numbers of the coordination flag, it checks whether the coordination flag with this number is already set. If this is the case, it rejects the data exchange with the active CP and sends a reply message with an error number to the partner. This prevents data which have not yet been processed from being overwritten or read. You can program the STEP 5 program in the CPU of the active CP 544 such that the received error number is evaluated and that the SEND or FETCH message is transmitted again at a later point in time. C79000-B8576-C191-01 3 - 15 RK 512 Computer Link Coordination flags with a SEND job CP 544 The coordination flag is defined in the SEND job. The byte and bit numbers of this flag are transmitted together with the data to the partner. The byte number of the coordination flag appears in the status word of RECEIVE-ALL in the destination PLC in the last transmission cycle. Using this byte number you can recognize the job from which the data have arrived completely in the destination CPU. You can inhibit the repeated acceptance of this job if you set the coordination flag associated with the job in the STEP 5 program. A corresponding message is output on the COM PP, and the partner informed by means of a reply message. You can reset the coordination flag by the STEP 5 program as soon as the data have been saved from the destination area or processed further; the job is then accepted again. Coordination flag with a FETCH job 3 - 16 A coordination flag is defined in the FETCH job of the CP 544. The byte and bit numbers of this flag are transferred to the partner in the request message. The byte number of the coordination flag appears in the status word of SEND-ALL in the last transmission cycle in the PLC in which the data source is present. Using this byte number you can recognize the job from which the data have been requested completely. You can prevent reading of the source data area of this job if you set the coordination flag associated with the job in the STEP 5 program. A corresponding message is output on the COM PP, and the partner informed by means of a reply message. You can reset the coordination flag as soon as the data are available in the source area; data are then transmitted again following request messages of the job. C79000-B8576-C191-01 CP 544 RK 512 Computer Link Note that only the byte number of the coordination flag appears in the status word of SEND-ALL or RECEIVE-ALL, and not the bit number as well. You must therefore ensure that there is an unequivocal assignment between the byte number and coordination flag if you wish to evaluate the information of the status word in the program. You can use every flag apart from flag 222 (DE hexadecimal) as a coordination flag, but only byte numbers from 1 to 223 can be indicated in the status word. Flag 222 is reserved to indicate the complete transmission of a job if no coordination flags are transmitted. C79000-B8576-C191-01 3 - 17 3 RK 512 Computer Link 3.3.2 CP 544 Assignment of Parameters to RK 512 Computer Link in CP 544 The COM PP parameterization software (see Chapter 7) supports you when assigning parameters to the RK 512 computer link in the CP 544. If you do not have this software package, you must assign parameters to the RK 512 computer link in the CP 544 by means of the special job SEND-DIRECT 189 (see Section 6.3.8). You generate a static parameter set and a dynamic parameter set. Static parameter set In the static parameter set, you specify the parameters for the physical layer and the data link layer of the RK 512 computer link. Dynamic parameter set In the dynamic parameter set, you enter the job parameters associated with the partner. Once you have read this section, you will be able to produce a concept for the parameter sets of the RK 512 computer link for your special requirements. The following pages provide you with a summary of possible parameter settings. 3.3.2.1 Static Parameter Set The static parameter set contains the parameters of the RK 512 computer link. The following table shows you which values you can enter for the static parameter set. 3 - 18 C79000-B8576-C191-01 CP 544 RK 512 Computer Link Table 3.1 Static parameter set (RK 512) Parameter Input Mode 1 Mode 2 Mode 3 Mode 4 Baud rate1) RK 512 with 3964 procedure with default values RK 512 with 3964R procedure with default values RK 512 with 3964 procedure and selectable values RK 512 with 3964R procedure and selectable values Parity Bits per character Stop bits Priority Character delay time Acknowledgement delay time 300 600 1200 2400 4800 9600 19200 38400 76800 bps bps bps bps bps bps bps 2) bps 3) bps 3) 3 No Odd Even 8 bits per character 1 stop bit 2 stop bits Low High Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Number of Number (range of values 1 to 255) connection attempts Number of Number (range of values 1 to 255) repetitions 1) The total baud rate of 76800 bps must not be exceeded Only with V.24 submodule and RS422-A/485 submodule 3) Only with RS422-A/485 submodule 2) C79000-B8576-C191-01 3 - 19 RK 512 Computer Link CP 544 The default values for mode 1 and mode 2 are: Mode 1 Mode 2 Character delay time 220 ms 220 ms Acknowledgement delay time 550 ms 2000 ms Number of connection attempts 6 6 Number of repetitions 6 6 Meaning of parameters Mode Version of the two possible transmission procedures, 3964 or 3964R, either with default values or with selectable values. Baud rate Data transmission speed in bps. Parity The parity is even or odd depending on the value. This sequence of information bits is extended by one bit, the parity bit, which supplements the value of all bits to an agreed status by means of its added value (0 or 1). The parity bit is set to 1 if "No" is set, but not evaluated by the receiver/transmitter. Bits per character Number of data bits used to form a character. Stop bits Duration of stop bits relative to the time required to transmit an information bit. The stop bits follow each character transmitted in a start/stop transmission. Priority A partner has high priority if its transmission request has priority over the transmission request of the partner. A partner has low priority if its transmission request must be deferred with respect to the transmission request of the partner. You must assign different priorities to the two coupling partners when using the computer link, i.e. one PLC is assigned a high priority, the other a low priority. 3 - 20 C79000-B8576-C191-01 CP 544 Character delay time RK 512 Computer Link The maximum permissible interval between two received characters (also refer to table below). n-th character (n+1)-th character Character delay time t Acknowledgement delay time The maximum permissible time up to acknowledgement from the partner when establishing a connection (time between STX and acknowledgement DLE from partner) or clearing a connection (time between DLE ETX and acknowledgement DLE from partner) Also refer to table below. Baud rate 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps 38400 bps 76800 bps Smallest permissible Smallest permissible character delay time acknowledgement delay time 60 40 30 20 20 20 20 20 20 ms ms ms ms ms ms ms ms ms 60 40 30 20 20 20 20 20 20 ms ms ms ms ms ms ms ms ms Number of connection attempts The maximum number of attempts made by the CP 544 to establish a connection. Number of repetitions Maximum number of repetitions of a message (including the first message) in the event of faults. C79000-B8576-C191-01 3 - 21 3 RK 512 Computer Link 3.3.2.2 CP 544 Dynamic Parameter Set The dynamic parameter set contains the job parameters which are relevant to the partner. A job number is assigned to each dynamic parameter set. The job number must agree with the job number in the associated data handling block. The first dynamic parameter set has the job number 1, the second the job number 2 etc. You must assign values to the corresponding dynamic parameter set before you trigger a SEND or FETCH job. When you specify a job number, the desired dynamic parameter set is selected for each SEND or FETCH job. The following table shows the values you can select for the dynamic parameter set. 3 - 22 C79000-B8576-C191-01 CP 544 RK 512 Computer Link Table 3.2 Dynamic parameter set (RK 512) Job No. Parameter Meaning 1 Job SEND job or FETCH job Data destination (SEND) or Data block, extended data block, system data, absolute addresses Data source (FETCH) Data block, extended data block, flag bytes, input bytes, output bytes, I/O bytes, timers, counters, system data, absolute addresses CPU number Range of values 1 to 4, or no data DB number See job tables for range of values Destination See job tables for range of values address (SEND) or Source address (FETCH) See job tables for range of values Coordination flags Range of values 0 to 233 for byte nos. Range of values 0 to 7 for bit nos. or no data 2 188 Meaning of the parameters Job number Each job has a number between 1 and 188; it must agree with the job number (parameter A-NR) which you have entered on the data handling block (SEND-DIRECT or FETCH-DIRECT). Job The job is either a SEND or FETCH job. C79000-B8576-C191-01 3 - 23 3 RK 512 Computer Link CP 544 Data destination Data source The following destination types are permitted with a SEND job: Data blocks, extended data blocks, system data or absolute addresses. With a FETCH job, data can be fetched from the following source types: data block, extended data block, flag bytes, input bytes, output bytes, I/O bytes, timers, counters, system data, absolute addresses. CPU number You must enter the CPU number (range of values 1 to 4) if a particular CPU in the partner PLC is to be addressed by this job. The number of the partner CPU is only relevant if you exchange data with a multi-processor PLC (S5-135U, S5-155U) with several CPUs via a CP 544, CP 525 or CP 524. It is not necessary to enter a CPU number if the partner only has one CPU. The data are stored in the lowest page frame on the receiving interface. DB number The DB number must be entered if "Data block" or "Extended data block" is specified as the data destination or source. Destination address Source address You must enter the destination address here for a SEND job, and the source address for a FETCH job. The permissible limits depend on the data type. Coordination flag You can enter a coordination flag if necessary if the source or destination is a data block or an extended data block. The coordination flag prevents the overwriting of transmitted data which have not yet been processed. The coordination flag must first have been released using switches on the module (see Section 2.1). Chapter 7 describes how you can load the COM PP parameterization software and enter its parameter sets. 3 - 24 C79000-B8576-C191-01 CP 544 3.3.2.3 RK 512 Computer Link Transmission of Parameters to the CP 544 User Memory Once you have assigned parameters to the RK 512 computer link using COM PP, transfer the parameters which are stored in a file ......ST.S5D into the user memory (internal RAM or RAM submodule) of the CP 544. Proceed as follows: * * * Select the transmission direction in the COM PP screen form "TRANSFER" and enter the CP interface. Transmit the parameters by pressing the function key "TRANSFER". Restart the CP 544 by pressing the function key "RESTART SI1" or "RESTART SI2". The LED TXD 1 must not subsequently light up red permanently on the front panel of the CP 544. The parameterization is not correct or not complete if this is the case. C79000-B8576-C191-01 3 - 25 3 CP 544 3.4 RK 512 Computer Link Job Tables All data types which can be transmitted are shown in the following tables together with their possible parameter settings in the data handling block and the dynamic parameter set. Data with respect to the addresses are PLC-dependent and do not always agree in the case of different types of PLC. In particular, you should use the documentation specific to the PLCs in the case of absolute addresses. 3.4.1 Send Data (SEND) All data types which are generally stored in the partner in a destination DB or destination DX are permissible as the source (apart from absolute addresses AS and system data RS, see table). The parameter QLAE (source length) is the number of bytes if the source is organized in bytes (the number of words if not). No message transfer is carried out if 0 is entered. Caution with an odd number of bytes: since the destination is a DB or DX, only complete words can be stored there. If the partner is a CP 544, this will assign a 0 to the right data byte (DR) if it receives an odd number! C79000-B8576-C191-01 3 - 27 3 RK 512 Computer Link Table 3.3 CP 544 Job table "Send data with RK 512" Destination, Source, send from PLC to PLC 2 1 Parameter settings on DHB in PLC 1 (source) QTYP DBNR QANF QLAE Data block Data block DB 3-255 0-2047 1-2048 Extended DB Data block DX 3-255 0-2047 1-2048 Flags Data block FA Irrelevant 0-255 1-256 Inputs Data block IA Irrelevant 0-127 1-128 Data block QA Irrelevant 0-127 1-128 Data block CA Irrelevant 0-255 1-256 Data block TA Irrelevant 0-255 1-256 Data block PY Irrelevant 0-255 1-256 System address RS Irrelevant 0-511 1-512 Absolute address Irrelevant 0- +32767 1-2048 -32768 Outputs Counters Timers 1) 1) I/O Sys addr. 1) Absolute addresses 1) 1) AS These ranges are CPU-dependent. Explanation of abbreviations QTYP DBNR QANF QLAE 3 - 28 Source type Data block number Initial source address Source length C79000-B8576-C191-01 CP 544 RK 512 Computer Link 2) Parameter settings in the COM PP in PLC 1 (destination) Message header, bytes ZTYP Z-DB Z-addr CF permissible 3/4 Command mode 5/6 Z-DB/ Z-addr 7/8 Number in DB 3-255 0-255 Yes AD DB/DW words DB 3-255 0-255 Yes AX DB/DW words DB 3-255 0-255 Yes AM DB/DW bytes DB 3-255 0-255 Yes AE DB/DW bytes DB 3-255 0-255 Yes AA DB/DW bytes DB 3-255 0-255 Yes AZ DB/DW words DB 3-255 0-255 Yes AT DB/DW words DB 3-255 0-255 Yes AP DB/DW bytes No AB Address words No AS Address words RS AS ----- 0-511 1) 0-65535 1) Explanation of abbreviations ZTYP Z-DB Z-addr CF permissible Message header, bytes C79000-B8576-C191-01 Destination type Data block number of destination Initial destination address Coordination flag permissible? Message header of data transmission on the line 1) These ranges are CPU-dependent. 2) You need only observe these data for the message header if you use a non-SIMATIC device as a partner where you wish to implement its communication software yourself or if you monitor the data traffic on the line using an interface test unit (FOXPG). 3 - 29 3 RK 512 Computer Link CP 544 Source, Destination, Parameter settings on DHB in PLC 1 (source) send from PLC 1 to PLC 2 QTYP DBNR QANF QLAE Data block Extended data block DB 3-255 0-2047 1-2048 Extended data block Extended data block DX 3-255 0-2047 1-2048 Flags Extended data block FA Irrelevant 0-255 1-256 Inputs Extended data block IA Irrelevant 0-127 1-128 Outputs Extended data block QA Irrelevant 0-127 1-128 Extended data block CA Irrelevant 0-255 1-256 Extended data block TA Irrelevant 0-255 1-256 Extended data block PY Irrelevant 0-255 1-256 Counters Timers I/O 1) 1) 1) These ranges are CPU-dependent. Explanation of abbreviations QTYP DBNR QANF QLAE 3 - 30 Source type Data block number Initial source address Source length C79000-B8576-C191-01 CP 544 RK 512 Computer Link Parameter settings in the COM PP in PLC 1 (destination) Message header, bytes 1) ZTYP Z-DB Z-addr CF permissible 5/6 3/4 Command Z-DB/ Z-addr mode 7/8 Number in DX 3-255 0-255 Yes OD DX/DW words DX 3-255 0-255 Yes OX DX/DW words DX 3-255 0-255 Yes OM DX/DW bytes DX 3-255 0-255 Yes OE DX/DW bytes DX 3-255 0-255 Yes OA DX/DW bytes DX 3-255 0-255 Yes OZ DX/DW words DX 3-255 0-255 Yes OT DX/DW words DX 3-255 0-255 Yes OP DX/DW bytes Explanation of abbreviations ZTYP Z-DB Z-addr CF permissible Message header, bytes C79000-B8576-C191-01 Destination type Data block number of destination Initial destination address Coordination flag permissible? Message header of data transmission on the line 1) You need only observe these data for the message header if you use a non-SIMATIC device as a partner where you wish to implement its communication software yourself or if you monitor the data traffic on the line using an interface test unit (FOXPG). 3 - 31 3 CP 544 3.4.2 RK 512 Computer Link Fetch Data (FETCH) All data types listed in the table can be specified as the source in the partner PLC. The destination on the DHB can only be a data block or an extended data block (RS/AS are exceptions). The destination length (ZLAE) can only be specified in words. If 5 input bytes are to be fetched, for example, "3" = 3 words = 6 bytes must be parameterized on the DHB. No message transfer is carried out if 0 is entered. C79000-B8576-C191-01 3 - 33 3 RK 512 Computer Link Table 3.4 CP 544 Job table "Fetch data with RK 512" Source, Destination, fetch from PLC 2 in PLC 1 Parameter settings on DHB in PLC 1 (destination) ZTYP DBNR ZANF ZLAE Data block Data block DB 3-255 0-2047 1-2048 Extended DB Data block DB 3-255 0-2047 1-2048 Flags Data block DB 3-255 0-2047 1-128 Inputs Data block DB 3-255 0-2047 1-64 Data block DB 3-255 0-2047 1-64 Data block DB 3-255 0-2047 1-256 Data block DB 3-255 0-2047 1-256 Data block DB 3-255 0-2047 1-128 System address RS Irrelevant 0-511 1-512 Absolute address Irrelevant 0- +32767 -32768 1-2048 Outputs Counters Timers 1) 1) I/O Sys. addr. 1) Absolute addresses 1) 1) AS These ranges are CPU-dependent. Explanation of abbreviations ZTYP DBNR ZANF ZLAE 3 - 34 Destination type Data block number Initial destination address Destination length C79000-B8576-C191-01 CP 544 RK 512 Computer Link Parameter settings in the COM PP in PLC 1 (source) Message header, bytes 2) QTYP Q-DB Q-addr CF permissible 5/6 3/4 Command Q-DB/ Q-addr mode 7/8 Number in Data block 0-255 0-255 Yes ED DB/DW words Extended DB 0-255 0-255 Yes EX DX/DW words Flag --- 0-254 No EM Byte address bytes Input --- 0-126 No EE Byte address bytes --- 0-126 No EA Byte address bytes --- 0-255 No EZ Counter no. words --- 0-255 No ET Timer no. words --- 0-254 No EP Peripheral address bytes Sys. addr 1) --- 0-511 No EB System address words Abs. addr. 1) --- 0-65535 No ES Absolute address words Output Counter Timer 1) 1) I/O Explanation of abbreviations QTYP Q-DB Q-addr CF permissible Message header, bytes C79000-B8576-C191-01 Source type Data block number of source Initial source address Coordination flag permissible? Message header of data transmission on the line 1) These ranges are CPU-dependent. 2) You need only observe these data for the message header if you use a non-SIMATIC device as a partner where you wish to implement its communication software yourself or if you monitor the data traffic on the line using an interface test unit (FOXPG). 3 - 35 3 RK 512 Computer Link Source, Destination, fetch from PLC 2 in PLC 1 CP 544 Parameter settings on DHB in PLC 1 (destination) ZTYP DBNR ZANF ZLAE Data block Extended DB DX 3-255 0-2047 1-2048 Extended DB Extended DB DX 3-255 0-2047 1-2048 Flags Extended DB DX 3-255 0-2047 1-128 Inputs Extended DB DX 3-255 0-2047 1-64 Extended DB DX 3-255 0-2047 1-64 Extended DB DX 3-255 0-2047 1-256 Extended DB DX 3-255 0-2047 1-256 xtended DB DX 3-255 0-2047 1-128 Outputs Counters Timers I/O 1) 1) 1) These ranges are CPU-dependent. Explanation of abbreviations ZTYP DBNR ZANF ZLAE 3 - 36 Destination type Data block number Initial destination address Destination length C79000-B8576-C191-01 CP 544 RK 512 Computer Link Parameter settings in the COM PP in PLC 1 (source) Message header, bytes 2) QTYP Q-DB Q-addr CF permissible 5/6 3/4 Command Q-DB/ Q-addr mode 7/8 Number in Data block 0-255 0-255 Yes ED DB/DW words Extended DB 0-255 0-255 Yes EX DX/DW words Flag --- 0-254 No EM Byte address bytes Input --- 0-126 No EE Byte address bytes --- 0-126 No EA Byte address bytes --- 0-255 No EZ Counter no. words --- 0-255 No ET Timer no. words --- 0-254 No EP Peripheral address bytes Output Counter Timer 1) 1) I/O Explanation of abbreviations QTYP Q-DB Q-addr CF permissible Message header, bytes C79000-B8576-C191-01 Source type Data block number of source Initial source address Coordination flag permissible? Message header of data transmission on the line 1) These ranges are CPU-dependent. 2) You need only observe these data for the message header if you use a non-SIMATIC device as a partner where you wish to implement its communication software yourself or if you monitor the data traffic on the line using an interface test unit (FOXPG). 3 - 37 3 RK 512 Computer Link 3.5 CP 544 Example of Complete Parameter Settings Job I: SEND job 100 data words from data block 20 (DB 20) starting at data word 10 (DW 10) are to be transmitted from a PLC 1 to data block 5 (DB 5) starting at data word 1 (DW 1) in PLC 2. PLC 1 and PLC 2 are each equipped with a CP 544. You require the following for the CPU in PLC 1: * The DHB SEND-DIRECT which triggers the job. The following parameter settings must be made in it: SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE * 0 1 FW12 DB 20 10 100 FY11 The interface number is 0 The job number is 1 The status word is flag word 12 The source is a data block with the no. 20 and initial address 10 100 data words are sent FY 11 is selected for parameterization errors The DHB SEND-ALL which transfers the data from the PLC to the CP. This requires the following parameter settings: SSNR A-NR ANZW PAFE 0 0 FW16 FY19 The interface number is 0 The job number is 0, thus the ALL function is selected The status word is FW 16 FY 19 is selected for parameterization errors The status word of the ALL job must be different from that with SEND-DIRECT since other information is displayed. 3 - 38 C79000-B8576-C191-01 CP 544 RK 512 Computer Link You require the following for the CP in PLC 1: * A job in the dynamic parameter set: Job number Job Data destination CPU number DB No. Destination word address Coordination flag * 1 SEND DB 5 1 - Number as for DHB parameters Send is selected Destination is a data block Only one CPU is present The destination DB number is 5 with the initial address 1 Coordination flag not used You must also enter the following parameters in the static parameter set: Mode 2 RK 512 with 3964R procedure with default values Baud rate 9600 bps Parity Even Bits per character 8 Stop bits 1 Priority Low Character delay time 220 ms These parameters are Acknowledgement 2000 ms entered automatically in delay time mode 2 Number of 6 (RK 512 with 3964R connection attempts procedure with default values). Number of repetitions 6 C79000-B8576-C191-01 3 - 39 3 RK 512 Computer Link CP 544 You require the following for the CPU in PLC 2: * The DHB RECEIVE-ALL which receives the data and enters them in the destination DB: SSNR A-NR 0 0 ANZW PAFE FW6 FY4 The interface number is 0 The job number is 0, thus the ALL function is selected The status word is FW 6 FY 4 is selected for parameterization errors You require the following for the CP in PLC 2: * No dynamic parameter set as long as no active jobs (SEND-DIRECT, FETCH-DIRECT) are called in the PLC 2. * However, you must enter the following parameters in the static parameter set for this CP: Mode 2 RK 512 with 3964R procedure with default values Baud rate 9600 bps Parity Even Bits per character 8 Stop bits 1 Priority High Character delay time 220 ms These parameters are entered Acknowledgement 2000 ms automatically in mode 2 delay time (RK 512 with 3964R procedure Number of 6 with default values). connection attempts Number of 6 repetitions 3 - 40 C79000-B8576-C191-01 CP 544 RK 512 Computer Link Job II: FETCH job 6 flag bytes are to be fetched from PLC 2 starting at FY 7. They are to be stored in data block 20 in PLC 1 starting at data word 30. A FETCH job is programmed in PLC 1 for this purpose. You require the following for the CPU in PLC 1: * The call of the DHB FETCH-DIRECT to trigger the job: SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE * C79000-B8576-C191-01 0 1 FW34 DB 20 30 3 FY33 As with job I Job number is 2 in this case Status words in FW 34 Destination is a DB with no. 20 and initial address 30 Fetch 6 bytes = 3 words Parameterization errors in FY 33 You subsequently receive the fetched data with the DHB RECEIVE-ALL: SSNR A-NR 0 0 ANZW PAFE FW27 FY26 The interface number is 0 The job number is 0, thus the ALL function is selected Status word in FW 27 Parameterization errors in FY 26 3 - 41 3 RK 512 Computer Link CP 544 You require the following for the CP in PLC 1: * The job with number 2: Job number Job Data source CPU number DB No. Source byte address Coordination flag * 2 FETCH Flag 7 - Source is the flag area Only one CPU present No data necessary Starting at byte 7 Coordination flag not used If you have carried out job I, the following parameters are already set in the static parameter set: Mode 2 RK 512 with 3964R procedure with default values 9600 bps Even 8 1 Low 220 ms Baud rate Parity Bits per character Stop bits Priority Character delay time Acknowledgement 2000 ms delay time Number of 6 connection attempts Number of 6 repetitions 3 - 42 Number as for DHB These parameters are entered automatically in mode 2 (RK 512 with 3964R procedure with default values). C79000-B8576-C191-01 CP 544 RK 512 Computer Link You require the following for the CPU in PLC 2: * A DHB SEND-ALL which transmits the flag bytes to its CP: SSNR A-NR ANZW PAFE 0 0 FW40 FY39 The interface number is 0 The job number is 0, thus the ALL function is selected Status word in FW 40 Parameterization errors in FY 39 3 You require the following for the CP in PLC 2: * No dynamic parameter set, but the following parameters in the static parameter set (if not already present from job I): Mode 2 RK 512 with 3964R procedure with default values 9600 bps Even 8 1 High 220 ms Baud rate Parity Bits per character Stop bits Priority Character delay time Acknowledgement 2000 ms delay time Number of 6 connection attempts Number of 6 repetitions C79000-B8576-C191-01 These parameters are entered automatically in mode 2 (RK 512 with 3964R procedure with default values). 3 - 43 RK 512 Computer Link 3.6 CP 544 Protocol Definition of RK 512 Computer Link The following section explains how the data transmission is executed with the RK 512 computer link. The data transmission takes place at three levels: * * * The hardware level The procedure level The message level. Hardware level The hardware level comprises the physical conditions of the data transmission. The CP 544 can be used either with TTY (20-mA current loop), with V.24 voltage level (RS232 C) or with the RS422-A/485 submodule. Procedure level All RK 512 messages (command and reply messages) are transmitted by the procedure level of the computer link, i.e. transmitted or received with the 3964 or 3964R procedure. The procedure provides the messages with start and end sequences, assigns a block check character to the resulting data blocks (only with the 3964R procedure) and automatically repeats the message if the acknowledgement from the receiver is faulty (see also Section 4.6). Message level The message level corresponds to the transport layer of the ISO/OSI layer model. The CP 544 sends a command message to the partner which returns a reply message to the CP. Partner CP 544 Command message Reply message Fig. 3-5 3 - 44 Command message with reply message C79000-B8576-C191-01 CP 544 RK 512 Computer Link Command messages are either SEND messages (SEND job) or FETCH messages (FETCH job). The SEND message consists of the message header and data. In the case of a SEND message, the partner sends a reply message without data. Partner CP 544 SEND message Message header and data 3 Reply message without data Fig. 3-6 SEND job The FETCH message only consists of a message header. In the case of a FETCH message, the partner sends a reply message with data. Partner CP 544 FETCH message Message header Reply message with data Fig. 3-7 C79000-B8576-C191-01 FETCH job 3 - 45 RK 512 Computer Link CP 544 Continuation messages are sent for all types of message if the data quantity exceeds 128 bytes. Partner CP 544 Command message Reply message Continuation command message Continuation reply message Fig. 3-8 3.6.1 Messages and continuation messages Format of Command Message Header A SEND message consists of the message header and data. A FETCH message only consists of the message header. The message header comprises 10 bytes and contains information on the data destination in the case of a SEND message and information on the data source in the case of a FETCH message. Byte 1 2 00H 00H (FFH) 3 - 46 3 4 Command 5 6 7 8 High Low High Low Destination/ source Number 9 10 CF/CPU No. C79000-B8576-C191-01 CP 544 RK 512 Computer Link Format of message header Table 3.5 Format of message header Byte Meaning 1 Message identification with command messages (00H), with continuation command messages (FFH) 2 Message identification (00H) 3 'A'(41H)- for SEND job with destination DB or 'O'(4FH)- for SEND job with destination DX or 'E'(45H)- for FETCH job 4 Data to be transmitted are from: 'D' 'E' 'M' 'Z' 'S' 5 3 (44H) (45H) (4DH) (5AH) (53H) = = = = = data block input bytes flag bytes counters absolute adresses 'X' 'A' 'P' 'T' 'B' (58H) (41H) (50H) (54H) (42H) = extended data block = output bytes =I/O bytes = timers = system addresses 6 Data destination with SEND job or data source with FETCH job, e.g. byte 5 = DB no., byte 6 = DW no. 7 Length of high byte 8 Length of low byte 9 Byte number of coordination flag; FFH is present here if you have not specified any coordination flags 10 Bits 0 to 3: Bit number of the coordination flag; FH is present here if you have not specified any coordination flags Bits 4 to 7: CPU number (1 to 4); 0H is present here if you have not specified a CPU no. but have specified a coordination flag; FH is present here if you have specified neither a CPU no. nor a coordination flag Length of data to be transmitted; in bytes or words depending on type The letters in bytes 3 and 4 are ASCII characters. The message header of the continuation command message only consists of the bytes 1 to 4. C79000-B8576-C191-01 3 - 47 RK 512 Computer Link CP 544 Once the command message has been transmitted, the RK 512 expects a reply message from the partner within the monitoring time. The length of the monitoring time depends on the transmission speed (baud rate). 5s 7s 10 s 1200-76800 bps 600 bps 300 bps Since the data are already transmitted with the reply message in a FETCH job, you must ensure that all data are available on the partner CP within the monitoring time. You achieve this is that you * define a large frame size in SYNCHRON for the partner, * select a small message length, * strive towards a short cycle time or program several SEND-ALL calls in one cycle. Format and contents of the reply message: The reply message comprises 4 bytes and contains information on the execution of the job. Byte 3 - 48 1 2 3 4 00H (FFH) 00H 00H Error number Byte Meaning 1 Message identification with reply messages (00H), with continuation reply messages (FFH) 2 Message identification (00H) 3 Contains 00H 4 Error number of partner (see Chapter 8): 00H if no errors have occurred during the transmission >00H error number C79000-B8576-C191-01 CP 544 3.6.2 RK 512 Computer Link Send Data SEND job: CP 544 sends data to partner Partner CP 544 SEND message Reply message Continuation SEND message 3 Continuation reply message Fig. 3-9 SEND job The SEND job is executed in the following order: Active partner Sends a SEND message which contains the message header and data. Passive partner Receives the message, checks the message header and the data, and acknowledges with a reply message. Active partner Receives the reply message. If the quantity of useful data exceeds 128 bytes, it sends a continuation SEND message. Passive partner Receives the continuation SEND message, checks the message header and the data, and acknowledges with a continuation reply message. The partner enters an error number in the 4th byte of the reply message if the SEND message was not received without errors. C79000-B8576-C191-01 3 - 49 RK 512 Computer Link CP 544 CP 544 Partner Meaning Contents SEND message Start character Pos. acknowledgement STX 02H DLE 10H SEND job Data block Data destin. DB10 DW01 Length 50 DW No CF All CPUs 1st byte 00H 2nd byte 00H 3rd byte 41H 4th byte 44H 5th byte 0AH 6th byte 01H 7th byte 00H 8th byte 32H 9th byte FFH 10th byte FFH 1st data byte 2nd data byte 11th byte 12th byte n-th data byte x-th byte .. End identifier End identifier Pos. acknowledgement Message header Useful data .. DLE 10H ETX 03H DLE 10H Reply message Start character Pos. acknowledgement Error number End identifier End identifier Pos. acknowledgement Fig. 3-10 3 - 50 STX 02H DLE 10H 1st byte 00H 2nd byte 00H 3rd byte 00H 4th byte 00H DLE 10H ETX 03H DLE 10H Sequence of a SEND message with reply message C79000-B8576-C191-01 CP 544 RK 512 Computer Link This SEND message has a maximum useful data length of 128 bytes and has been executed without faults (the 4th byte in the reply message does not contain an error number). Continuation SEND messages A continuation SEND message is started if the quantity of data exceeds 128 bytes. The sequence corresponds to that of the SEND message. A further continuation SEND message is started if more than 256 bytes are to be transmitted. The next page shows the detailed sequence of a continuation SEND message with continuation reply message. The continuation SEND message has a maximum useful data length of 128 bytes and has been executed without faults (the 4th byte in the continuation reply message does not contain an error number). C79000-B8576-C191-01 3 - 51 3 RK 512 Computer Link CP 544 Partner CP 544 Meaning Contents Continuation SEND message Start character Pos. acknowledgement Continuation message SEND job Data block 129th data byte 130th data byte . . STX 02H DLE 10H 1st byte FFH 2nd byte 00H 3rd byte 41H 4th byte 44H Message header 5th byte 6th byte Useful data . . n-th data byte End identifier End identifier Pos. acknowledgement x-th byte DLE 10H ETX 03H DLE 10H Continuation reply message Start character Pos. acknowledgement Continuation reply message Error number End identifier End identifier Pos. acknowledgment Fig. 3-11 3 - 52 STX 02H DLE 10H 1st byte 2nd byte 3rd byte 4th byte FFH 00H 00H 00H DLE 10H ETX 03H DLE 10H Sequence of a continuation SEND message with continuation reply message C79000-B8576-C191-01 CP 544 3.6.3 RK 512 Computer Link Fetch Data FETCH job: CP 544 requests data from partner Partner CP 544 FETCH message Reply message with data Continuation FETCH message Continuation reply message with data Fig. 3-12 3 FETCH job The FETCH job is executed in the following order: Active partner Sends a FETCH message which contains the message header. Passive partner Receives the message, checks the message header and acknowledges with a reply message. This contains data. Active partner Receives the reply message. If the quantity of useful data exceeds 128 bytes, it sends a continuation FETCH message. This contains bytes 1 to 4 of the message header. Passive partner Receives the continuation FETCH message, checks the message header and acknowledges with a continuation reply message with further data. No data are added in the case of an error number which is not equal to 0 in the 4th byte of the reply message. C79000-B8576-C191-01 3 - 53 RK 512 Computer Link CP 544 CP 544 Partner Contents Meaning FETCH message Start character Pos. acknowledgement FETCH job Data block Data source DB100 DW100 Length 50 DW CF = F 10.7 CPU 1 only End identifier End identifier Pos. acknowledgement STX 02H DLE 10H 1st byte 00H 2nd byte 00H 3rd byte 45H 4th byte 44H 5th byte 64H 6th byte 64H 7th byte 00H 8th byte 32H 9th byte 0AH 10th byte 17H Message header DLE 10H ETX 03H DLE 10H Reply message with data Start character Pos. acknowledgement Error number 1st byte 2nd byte 3rd byte 4th byte 1st data byte 2nd data byte 5th byte 6th byte n-th data byte x-th byte .. End identifier End identifier Pos. acknowledgement Fig. 3-13 3 - 54 STX 02H DLE 10H 00H 00H 00H 00H Useful data .. DLE 10H ETX 03H DLE 10H Sequence of a FETCH message with reply message C79000-B8576-C191-01 CP 544 RK 512 Computer Link This FETCH message has a maximum useful data length of 128 bytes and has been executed without faults (the 4th byte in the reply message does not contain an error number). If more than 128 bytes are requested, these are automatically fetched in one or more continuation messages. 3 C79000-B8576-C191-01 3 - 55 RK 512 Computer Link CP 544 CP 544 Partner Meaning Contents Continuation FETCH message Start character Pos. acknowledgement Continuation message STX DLE 1st byte 2nd byte 3rd byte 4th byte FETCH job Data block End identifier End identifier Pos. acknowledgement 02H 10H FFH 00H 45H 44H DLE ETX DLE 10H 03H 10H STX DLE 02H 10H Message header Continuation reply message Start character Pos. acknowledgement Continuation reply message 1st byte FFH 2nd byte 00H 3rd byte 00H Error number 4th byte 00H 129th data byte 130th data byte .. n-th data byte End identifier End identifier Pos. acknowledgement Fig. 3-14 3 - 56 5th byte 6th byte Useful data .. xth byte DLE ETX DLE 10H 03H 10H Sequence of a continuation FETCH message with continuation reply message C79000-B8576-C191-01 CP 544 3.6.4 RK 512 Computer Link Quasi Full-Duplex Mode Quasis full-duplex means that the partners can send messages at any point in time except when the partner is currently transmitting. If both CPs wish to transmit simultaneously, a SEND message of the partner may be transmitted prior to the reply message. This may be the case, for example, if a SEND message of the partner has been entered into the output buffer of the CP 544 prior to the reply message. In the following example, the continuation reply message (*) for the first SEND message is only sent after the SEND message of the partner. Partner CP 544 SEND message Reply message 1st continuation SEND message SEND message of partner 1st continuation reply message * 2nd continuation SEND message Reply message 2nd continuation reply message Fig. 3-15 C79000-B8576-C191-01 Quasi full-duplex mode 3 - 57 3 RK 512 Computer Link 3.6.5 CP 544 3964/3964R Procedure You can find more information on the 3964 and 3964R procedures which control the data flow between your programmable controller and a partner with the RK 512 computer link in Chapter 4 "3964/3964R Procedures". 3 - 58 C79000-B8576-C191-01 4 How do you Transmit Data with the 3964/3964R Procedures? Contents of Chapter 4 4 How do you Transmit Data with the 3964/3964R Procedures? . . 4 - 3 4.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 3 4.2 Data Exchange Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 7 4.3 Program Elements for the 3964/3964R Procedures . . . . . . . . . . . 4 - 9 4.3.1 4.3.1.1 4.3.1.2 4.3.1.3 4.3.1.4 4.3.1.5 STEP 5 Program with Data Handling Blocks . . . . . . . . . . . . . . . . . SYNCHRON. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RECEIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coordination Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444444- 4.3.2 4.3.2.1 4.3.2.2 4.3.2.3 Assignment of Parameters to 3964/3964R Procedures in CP 544. . . Static Parameter Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Receive Mailbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transmission of Parameters to the CP 544 User Memory . . . . . . . 4 - 15 4 - 15 4 - 19 4 - 21 4.4 Job Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 23 4.5 Example of Complete Parameter Settings . . . . . . . . . . . . . . . . . . . 4 - 28 C79000-B8576-C191-01 9 9 10 12 13 13 4-1 Contents 4.6 Protocol Definition of the 3964/3964R Procedures . . . . . . . . . . . . . 4 - 31 4.6.1 Transmitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 32 4.6.2 Receiving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 34 4.6.3 Initialization Conflict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 37 4.6.4 Procedure Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 38 4-2 C79000-B8576-C191-01 CP 544 4 3964/3964R Procedures How do you Transmit Data with the 3964/3964R Procedures? Chapter 4 describes the data transmission functions with the 3964/3964R procedures and acquaints you with generating the STEP 5 program and the static parameter set as well as defining the receive mailbox for the CP 544. 4.1 Introduction Using the 3964/3964R procedures, data can be exchanged between two communications partners connected via a point-to-point link. Interface submodules Various interface submodules are available for data transmission with the 3964/3964R procedures: * * * Transmission speed V.24 submodule TTY submodule RS422-A/485 submodule (only in the RS422-A mode). Set the transmission speed for the data exchange as suitable for the communications partner. The following transmission speeds are permissible: * * * 300 bps to 76800 bps with the RS422-A/485 submodule 300 bps to 19200 bps with the V.24 submodule 300 bps to 9600 bps with the TTY submodule. The total baud rate of 76800 bps must not be exceeded, however. C79000-B8576-C191-01 4-3 4 3964/3964R Procedures CP 544 Transmission reliability Data transmission with the 3964/3964R procedures ensures large transmission reliability since it includes the following layers of the ISO/OSI layer model (ISO IS 7498): * * The physical layer (layer 1): This layer stipulates the physical transmission of the data bytes (physical characteristics of the connection, transmission speed, ...) The data link layer (layer 2): The 3964 or 3964R transmission procedure adds start and end characters to the data bytes and initiates repetitions if errors occur. The protocol of the procedures only ensures the reliable transmission of the data but not, however, the processing or evaluation of the transmitted data. The 3964/3964R procedures are also used for the reliable transmission of data with the RK 512 computer link. If a message is acknowledged positively by the partner (received/accepted), the message has been correctly received. This does not mean that the message is processed by the receiver (e.g. the data cannot be processed further by the CP if this is in the STOP status or received by the CPU if this is in the STOP status). If you wish to make sure that the message is also processed, you must: * * 4-4 either use the RK 512 computer link or take your own steps to ensure data protection. C79000-B8576-C191-01 CP 544 3964/3964R Procedures Coupling partners 1st coupling partner 2nd coupling partner SIMATIC S5 SIMATIC S5 S5-115U/H S5-135U (without S processor) S5-155U/H CP 544 S5-135U CP 544 CPU 928B (without S processor) S5-155U CP 544 S5-115U/H S5-155H CP 523 S5-115U/F/H S5-135U S5-150U S5-155U/H CP 521 SI S5-90 with IM 90 S5-95 S5-100U Non-SIMATIC computer Fig. 4-1 Possible coupling partners for data transmission with the 3964/3964R procedures Data transmission with the 3964/3964R procedures implements the data exchange between the CP 544 in an S5-115U/H, S5-135U (without S processor), S5-155U/H and: * * * * * C79000-B8576-C191-01 another CP 544 in the S5-115U/H, S5-135U (without S processor) and S5-155U/H programmable controllers a CPU 928B in the S5-135U and S5-155U programmable controllers a CP 523 in the S5-115U/F/H, S5-135U, S5-150U and S5-155U/H programmable controllers a CP 521 SI in the S5-90, S5-95, S5-100U programmable controllers a non-SIMATIC computer capable of handling the 3964/3964R procedures (e.g. SICOMP M, SICOMP R). 4-5 4 3964/3964R Procedures Transmitted data CP 544 You can transmit the following data stored in a PLC using the 3964/3964R procedures: * * * * * * Data blocks, extended data blocks Flag bytes Input/output bytes I/O bytes Timers Counters. Transmission direction You can implement the following jobs with the 3964/3964R procedures: 4-6 * Send data (SEND job): The PLC 1 sends data to the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2 * Receive data (RECEIVE-ALL job): The PLC 1 receives data from the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2. C79000-B8576-C191-01 CP 544 4.2 3964/3964R Procedures Data Exchange Sequence The following Fig. shows the data exchange sequence between two programmable controllers, each of which is fitted with a CP 544. PLC 2 PLC 1 CPU CP 544 CP 544 CPU 4 3964/ 3964R procedures Data handling blocks S5 bus 3964/ 3964R procedures S5 bus Data Fig. 4-2 C79000-B8576-C191-01 Data handling blocks Data Data exchange between two programmable controllers 4-7 3964/3964R Procedures Data handling blocks The data handling blocks in the STEP 5 program of the CPU are used: * * 3964/3964R procedures CP 544 to trigger and execute data exchange, to receive the transmitted data. The 3964/3964R procedures in the CP 544 module of the coupling partner * are provided with the required information on the data destination by the definition in the receive mailbox. The 3964/3964R procedures in the CP 544 modules of the two PLCs * pass the data on to the CP in the other PLC. The data exchange sequence described means that you have three important tasks for the data transmission with the 3964/3964R procedures: * * * 4-8 You must generate your STEP 5 program with the calls of the data handling blocks for the two CPUs. You must assign parameters to the 3964/3964R procedures in the two CP 544 modules. You must define a receive mailbox in the CP 544 of the coupling partner. C79000-B8576-C191-01 CP 544 4.3 3964/3964R Procedures Program Elements for the 3964/3964R Procedures The programming of the 3964/3964R procedures is based on only a few fundamental points - the STEP 5 program with the data handling blocks, the establishment of the receiver data block (receive mailbox) in the CPU, the static parameter set on the CP and the definition of the receive mailbox. 4.3.1 STEP 5 Program with Data Handling Blocks Incorporate the data handling blocks described below into your STEP 5 program to enable data transmission with the 3964/3964R procedures according to the particular task. 4 Once you have read this description, you will be able to generate a concept for the STEP 5 program for your particular task. You can find a detailed description of the individual data handling blocks in Chapter 6. 4.3.1.1 SYNCHRON Synchronizing CPU and CP The data handling block SYNCHRON synchronizes the interface between the CPU and CP. SYNCHRON must be called in the restart organization blocks of the CPU for every page frame used by you in the two device interfaces of the CP. C79000-B8576-C191-01 4-9 3964/3964R Procedures 4.3.1.2 Send data CP 544 SEND The data handling block SEND transmits data from the CPU to the CP 544. The job is triggered by the SEND-DIRECT. In order to transmit data, a SEND-ALL job must be additionally programmed in the user program and called cyclically. The matching partner job RECEIVE-ALL must be programmed in the STEP 5 program of the partner CPU to enable the data to be received by it. PLC 1 CPU PLC 2 CP 544 CP 544 CPU SENDDIRECT n T R I G G E R 3964/ 3964R procedures 3964/ 3964R procedures SENDALL RECEIVEALL Data source Data destination n = job number Fig. 4-3 4 - 10 SEND job C79000-B8576-C191-01 CP 544 3964/3964R Procedures When transmitting data with the CP 544, the SEND-DIRECT data handling block is used for the following special jobs: Parameterize device interface You can use this special job to assign parameters to the two device interfaces of the CP 544 without the COM PP parameterization software in that you store the parameters in a data block. Start device interface You can use this special job to start a device interface from the STEP 5 program. Execute PSEUDOWRITE function You can use this special job to transmit data. All parameters on the source and destination are stored in a DB/DX. The special job enables you * to modify the source and/or destination data of a job during execution of the program, * to program this job without COM PP. Set date and time C79000-B8576-C191-01 You can use this special job to set the clock on the CP 544 from the CPU and to define whether the CP is to be the time master or slave. 4 - 11 4 3964/3964R Procedures 4.3.1.3 CP 544 RECEIVE Receive data The data handling block RECEIVE transmits data from the CP to the CPU. The data handling block RECEIVE-DIRECT is only used for the following special jobs in the data transmission with the CP 544: Read parameters of a device interface You can use this special job to scan the parameters of a device interface independent of the COM PP parameterization software. The parameters are written into a defined data block. Read error message area of SYSTAT You can use this special job to read up to 3 error messages of the SYSTAT specific to the interface. Read status You can use this special job to scan the status of the CP 544 and the addressed device interface. Read hardware parameters You can use this special job to scan the hardware parameters which you have set using switches on the module (page frame number, number of pages, released coordination flag area) without having to remove the module. Read complete SYSTAT status area You can use this special job to read the complete SYSTAT, i.e. the error messages of both device interfaces of the CP 544. Read SYSID identification area You can use this special job to read data on the module, the memory submodule, the interface assignments and the output statuses of the loaded software from the SYSID. Read date and time You can use this special job to read the time on the CP 544 using the CPU. 4 - 12 C79000-B8576-C191-01 CP 544 4.3.1.4 3964/3964R Procedures CONTROL Check job status 4.3.1.5 The data handling block CONTROL copies a job status into the defined status word. The job status provides information on the processing state of the job. Coordination Flags You can use the coordination flags to inhibit or release the transfer of data between the CPU and CP 544. The coordination flags must be released using switches on the CP 544 module (see Section 2.1). The coordination flags must be defined in the PLC as output communication flags in the DB 1. The coordination flag is defined in the definition of the receive mailbox of the partner CP. The byte number of the coordination flag appears in the status word of RECEIVE-ALL in the destination PLC in the last transmission cycle. Using this byte number you can recognize in the destination CPU that the data have arrived completely. You can inhibit the repeated acceptance of data if you set the coordination flag in the STEP 5 program of the destination CPU. You can reset the coordination flag by the user program as soon as the data have been saved from the destination area or processed further; the job is then accepted again. Note that only the byte number of the coordination flag appears in the status word of SEND-ALL or RECEIVE-ALL, and not the bit number as well. You must therefore ensure that there is an unequivocal assignment between the byte number and coordination flag if you wish to evaluate the information of the status word in the program. C79000-B8576-C191-01 4 - 13 4 3964/3964R Procedures CP 544 You can use every flag apart from flag 222 (DE hexadecimal) as a coordination flag, but only byte numbers from 1 to 223 can be indicated in the status word. Flag 222 is reserved to indicate the complete transmission of a job if no coordination flags are transmitted. 4 - 14 C79000-B8576-C191-01 CP 544 4.3.2 3964/3964R Procedures Assignment of Parameters to 3964/3964R Procedures in CP 544 The COM PP parameterization software (see Chapter 7) supports you when assigning parameters to the 3964/3964R procedures in the CP 544. If you do not have this software package, you must assign parameters to the 3964/3964R procedures in the CP 544 by means of the special job SEND-DIRECT 189 (see Section 6.3.8). You generate a static parameter set and, if you receive data with the CP 544, you must define the position of the receive mailbox on the CPU. Static parameter set In the static parameter set, you specify the parameters for the physical layer and the data link layer of the 3964/3964R procedures. Receive mailbox The receive mailbox is a data block on the receiving CPU. You must create it on the receiving CPU and define the position of the receive mailbox on the receiving CP. Once you have read this section, you will be able to produce a concept for the static parameter set and the receive mailbox of the 3964/3964R procedures for your special requirements. The following pages provide you with a summary of possible parameter settings. 4.3.2.1 Static Parameter Set The static parameter set contains the parameters of the 3964/3964R procedures. C79000-B8576-C191-01 4 - 15 4 3964/3964R Procedures CP 544 The following table shows you which values you can enter for the static parameter set. Table 4.1 Static parameter set (3964/3964R procedures) Parameter Input Mode 1 Mode 2 Mode 3 Mode 4 Baud rate1) RK 512 with 3964 procedure with default values RK 512 with 3964R procedure with default values RK 512 with 3964 procedure and selectable values RK 512 with 3964R procedure and selectable values 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps 2) 38400 bps 3) 76800 bps 3) No Odd Even 6 bits per character 7 bits per character 8 bits per character 1 stop bit 2 stop bits Low High Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Monitoring time 0.01 s You need only enter these to 655.35 s parameters in modes 3 and (steps: 10 ms) 4. The default values apply Number (range of to modes 1 and 2. values 1 to 255) Parity Bits per character Stop bits Priority Character delay time Acknowledgement delay time Number of connection attempts Number of repetitions Number (range of values 1 to 255) 1) The total baud rate of 76800 bps must not be exceeded Only with V.24 submodule and RS422-A/485 submodule 3) Only with RS422-A/485 submodule 2) 4 - 16 C79000-B8576-C191-01 CP 544 3964/3964R Procedures The default values for mode 1 and mode 2 are: Mode 1 Mode 2 Character delay time 220 ms 220 ms Acknowledgement delay time 550 ms 2000 ms Number of connection attempts 6 6 Number of repetitions 6 6 Meaning of parameters Mode Version of the two possible transmission procedures, 3964 or 3964R, either with default values or with selected values. Baud rate Data transmission speed in bit/s (bps). Parity The parity is even or odd depending on the value. This sequence of information bits is extended by one bit, the parity bit, which supplements the value of all bits to an agreed status by means of its added value (0 or 1). The parity bit is set to 1 if "No" is set, but not evaluated by the receiver/transmitter. Bits per character Number of data bits used to form a character. Stop bits Duration of stop bits relative to the time required to transmit an information bit. The stop bits follow each character transmitted in a start/stop transmission. Priority A partner has high priority if its transmission request has priority over the transmission request of the partner. A partner has low priority if its transmission request must be deferred with respect to the transmission request of the partner. You must assign different priorities to the two coupling partners when using the 3964/3964R procedures, i.e. one PLC is assigned a high priority, the other a low priority. C79000-B8576-C191-01 4 - 17 4 3964/3964R Procedures Character delay time CP 544 The maximum permissible interval between two received characters (also refer to table below). n-th character (n+1)-th character Character delay time t Acknowledgement delay time The maximum permissible time up to acknowledgement from the partner when establishing a connection (time between STX and acknowledgement DLE from partner) or clearing a connection (time between DLE ETX and acknowledgement DLE from partner). Also refer to table below. Baud rate 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps 38400 bps 76800 bps Smallest permissible Smallest permissible character delay time acknowledgement delay time 60 40 30 20 20 20 20 20 20 ms ms ms ms ms ms ms ms ms 60 40 30 20 20 20 20 20 20 ms ms ms ms ms ms ms ms ms Number of connection attempts The maximum number of attempts made by the CP 544 to establish a connection. Number of repetitions Maximum number of repetitions of a message (including the first message) in the event of faults. 4 - 18 C79000-B8576-C191-01 CP 544 4.3.2.2 3964/3964R Procedures Receive Mailbox The receive mailbox is located in a data block (DB) or extended data block (DX) on the CPU. The receive mailbox contains the received data and, in the first word, the length data (in bytes) of the received data. This is entered by the system program so that you can recognize how much data has been received. The length data does not count the word with the length data itself. Length The max. length of the receive mailbox is 2049 words (4098 bytes). The receive mailbox must always be one word larger than the data to be received. 4 Length of receive mailbox = net data + 1 word Example: Receive mailbox The example shows the format of a receive mailbox in data block 8 starting at data word 1 and with a length of 6 words. 7 bytes have been received. DB 8 0: KH = xxxx; does not belong to receive mailbox, any contents 1: KH = 0007; length data in bytes, start of receive mailbox 2: KH = 0102; received data: 0102 3: KH = 0304; received data: 0304 4: KH = 0506; received data: 0506 5: KH = 07yy; received data: 07, yy was no longer received 6: KH = yyyy; contents of receive mailbox, was not received 7: KH = xxxx; does not belong to receive mailbox, any contents, need not exist : : C79000-B8576-C191-01 4 - 19 3964/3964R Procedures Receive mailbox CP 544 The following table shows the values you can select for the receive mailbox. Parameter Meaning CPU No. Range of values 1 to 4, or no data Receive mailbox Data type DB or DX number starting from DW Length Coordination flags DB or DX Range of values 3 to 255 Range of values 2 to 2049 words Range of values 0 to 233 for byte no. Range of values 0 to 7 for bit no. or no data Meaning of the parameters CPU number The CPU number defines the CPU for the received data. Only this CPU can receive the data from the CP. The data are stored in the lowest page frame on the receiving device interface. It is not necessary to enter a CPU number if only 1 CPU is inserted in the PLC. Receive mailbox A data block or extended data block can be entered as the receive mailbox. Further parameters to be entered are the data block number, the initial address in the data block and the length. Coordination flag You can enter a coordination flag to prevent the overwriting of transmitted data which have not yet been processed. The coordination flag must first have been released using switches on the module (see Section 2.1). Chapter 7 describes how you can load the COM PP parameterization software and enter its parameter sets. 4 - 20 C79000-B8576-C191-01 CP 544 4.3.2.3 3964/3964R Procedures Transmission of Parameters to the CP 544 User Memory Once you have assigned parameters to the 3964/3964R procedures using COM PP, transfer the parameters which are stored in a file ......ST.S5D into the user memory (internal RAM or RAM submodule) of the CP 544. Proceed as follows: * * * Select the transmission direction in the COM PP screen form "TRANSFER" and enter the CP interface. Transmit the parameters by pressing the function key "TRANSFER". Restart the CP 544 by pressing the function key "RESTART SI1" or "RESTART SI2". The LED TXD 1 (interface 1) must not subsequently light up red permanently on the front panel of the CP 544. The parameterization is not correct or not complete if this is the case. C79000-B8576-C191-01 4 - 21 4 CP 544 4.4 3964/3964R Procedures Job Tables All data types which can be transmitted are shown in the following tables together with their possible parameter settings in the data handling block and the receive mailbox. Data with respect to the addresses are PLC-dependent and do not always agree in the case of different types of PLC. In particular, you should use the documentation specific to the PLCs in the case of absolute addresses. All data types which are generally stored in the partner in a destination DB or destination DX are permissible as the source. The parameter QLAE (source length) is the number of bytes if the source is organized in bytes (the number of words if not). No message transfer is carried out if 0 is entered. Caution with an odd number of bytes: since the destination is a DB or DX, only complete words can be stored there. If the partner is a CP 544, this will assign a 0 to the right data byte (DR) if it receives an odd number! C79000-B8576-C191-01 4 - 23 4 3964/3964R Procedures Table 4.2 CP 544 Job table "Send data with 3964/3964R procedures" Source, send from PLC 1 Destination, to PLC 2, Data block Parameter settings on DHB in PLC 1 (source) QTYP DBNR QANF QLAE Data block DB 3-255 0-2047 1-2048 Extended DB Data block DX 3-255 0-2047 1-2048 Flags Data block FA Irrelevant 0-255 1-256 Inputs Data block IA Irrelevant 0-127 1-128 Data block QA Irrelevant 0-127 1-128 Data block CA Irrelevant 0-255 1-256 Data block TA Irrelevant 0-255 1-256 Data block PY Irrelevant 0-255 1-256 Outputs Counters Timers I/O 1) 1) 1) These ranges are CPU-dependent. Explanation of abbreviations QTYP DBNR QANF QLAE 4 - 24 Source type Data block number Initial source address Source length C79000-B8576-C191-01 CP 544 3964/3964R Procedures Parameter settings in the COM PP in PLC 2 (destination) ZTYP Z-DB Z-addr CF permissible DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes 4 Explanation of abbreviations ZTYP Z-DB Z-addr CF permissible C79000-B8576-C191-01 Destination type Data block number of destination Initial destination address Coordination flag permissible? 4 - 25 3964/3964R Procedures Source, send from PLC 1 Destination, to PLC 2 Data block CP 544 Parameter settings on DHB in PLC 1 (source) QTYP DBNR QANF QLAE Extended data block DB 3-255 0-2047 1-2048 Extended data block Extended data block DX 3-255 0-2047 1-2048 Flags Extended data block FA Irrelevant 0-255 1-256 Inputs Extended data block IA Irrelevant 0-127 1-128 Outputs Extended data block QA Irrelevant 0-127 1-128 Counters 1) Extended data block CA Irrelevant 0-255 1-256 Timers 1) Extended data block TA Irrelevant 0-255 1-256 I/O Extended data block PY Irrelevant 0-255 1-256 1) These ranges are CPU-dependent. Explanation of abbreviations QTYP DBNR QANF QLAE 4 - 26 Source type Data block number Initial source address Source length C79000-B8576-C191-01 CP 544 3964/3964R Procedures Parameter settings in the COM PP in PLC 2 (destination) ZTYP Z-DB Z-addr CF permissible DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes 4 Explanation of abbreviations ZTYP Z-DB Z-addr CF permissible C79000-B8576-C191-01 Destination type Data block number of destination Initial destination address Coordination flag permissible? 4 - 27 3964/3964R Procedures 4.5 CP 544 Example of Complete Parameter Settings 100 data words from data block 20 (DB 20) starting at data word 10 (DW 10) are to be transmitted from a PLC 1 to data block 5 (DB 5) starting at data word 1 (DW 1) in PLC 2. PLC 1 and PLC 2 are each equipped with a CP 544. You require the following for the CPU in PLC 1: * The DHB SEND-DIRECT which triggers the job. The following parameter settings must be made in it: SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE * 0 1 FW12 DB 20 10 100 FY11 The interface number is 0 The job number is 1 The status word is flag word 12 The source is a data block with the no. 20 and initial address 10 100 data words are sent FY 11 is selected for parameterization errors The DHB SEND-ALL which transfers the data from the PLC to the CP. This requires the following parameter settings: SSNR A-NR ANZW PAFE 0 0 FW16 FY19 The interface number is 0 The job number is 0, thus the ALL function is selected The status word is FW 16 FY 19 is selected for parameterization errors The status word of the ALL job must be different from that with SEND-DIRECT since other information is displayed. 4 - 28 C79000-B8576-C191-01 CP 544 3964/3964R Procedures You require the following for the CP in PLC 1: * A static parameter set with the following parameters: Mode 2 Baud rate Parity Bits per character Stop bits Priority Character delay time Acknowledgement delay time Number of connection attempts Number of repetitions 3964R procedure with default values 9600 bps Even 8 1 Low 220 ms 2000 ms These parameters are entered automatically in mode 2 6 (3964R procedure with default values). 6 You require the following for the CPU in PLC 2: * C79000-B8576-C191-01 The DHB RECEIVE-ALL which receives the data and enters them in the destination DB: SSNR A-NR 0 0 ANZW PAFE FW6 FY4 The interface number is 0 The job number is 0, thus the ALL function is selected The status word is FW 6 FY 4 is selected for parameterization errors 4 - 29 4 3964/3964R Procedures CP 544 You require the following for the CP in PLC 2: * The following parameters in the static parameter set: Mode 2 Baud rate Parity Bits per character Stop bits Priority Character delay time Acknowledgement delay time Number of connection attempts Number of repetitions * 6 Data for the receive mailbox: CPU No. Receive mailbox Coordination flag 4 - 30 3964R procedure with default values 9600 bps Even 8 1 High 220 ms 2000 ms These parameters are entered automatically in mode 2 (3964R 6 procedure with default values). 1 DB 5 starting at DX 1, length 100 data words Not used C79000-B8576-C191-01 CP 544 4.6 3964/3964R Procedures Protocol Definition of the 3964/3964R Procedures The 3964/3964R procedures allow simple data transmission in quasi full-duplex mode with a good transmission quality. Partners can be SIMATIC modules with a serial interface, units and computers from other manufacturers as well as the CP 544. The procedures control the data flow between your CP 544 and the partner. They are asynchronous, bit-serial transmission procedures. The transmission and reception parameters (baud rate, parity, ...) must be the same in the CP 544 and the partner, the priority must be different in the CP 544 and the partner. Both procedures add control characters to the information characters when data are transmitted. The partner can check with these control characters whether the data have been transmitted completely and without errors. The CP 544 or the partner transmits the characters in bit-serial form as follows: SA I0 SA I0-7 PA SO = = = = I1 I2 I3 I4 I5 I6 1) I7 2) PA SO start bit information bits nos. 0 to 7 parity bit (if selected in the static parameter set) stop bit (length: 1 or 2 bits) 1) Only exists if 7 or 8 bits per character are selected in the static parameter set 2) Only exists if 8 bits per character are selected in the static parameter set C79000-B8576-C191-01 4 - 31 4 3964/3964R Procedures CP 544 The control characters for the procedures apply with the DIN standard 66003 for the 7-bit code. The character length (6, 7 or 8 bits) is used for the transmission, however. If the character DLE is transmitted as an information character, it is sent twice on the transmission line to distinguish it from the control character DLE used when establishing and clearing the connection (double DLE). The receiver cancels the doubling of the DLE. No code is prescribed for the other information characters (code transparency). 4.6.1 Transmitting The procedure sends the control character STX to establish the connection. If the partner replies with the DLE character before the acknowledgement delay time has expired (QVZ, see Section 4.3.2.1 for default values), the procedure moves on to the transmission. If the partner replies with NAK, any other character (except DLE) or does not reply within the acknowledgement delay time, the procedure repeats the establishment of the connection. The procedure stops attempting to establish the connection after the number of unsuccessful attempts as specified in the static parameter set, and sends the NAK character to the partner. The system program signals an error in establishment of the connection (error number in SYSTAT). If the connection is established successfully, the useful data contained in the current output buffer are transmitted to the partner using the selected transmission parameters. The partner monitors the intervals between the incoming characters. The interval between two characters must not exceed the character delay time (ZVZ, see Section 4.3.2.1 for default values). 4 - 32 C79000-B8576-C191-01 CP 544 3964/3964R Procedures Each DLE character in the buffer is transmitted as two DLE characters (double DLE), i.e. each character \10H\ is sent twice. The receiver cancels the DLE doubling. After transmitting the contents of the buffer, the procedure adds the DLE and ETX characters and - only with the 3964R the block check character BCC as the end identifier, and waits for an acknowledgement character. The block check character BCC is a byte. It is formed from the even longitudinal parity of all characters (EXOR operation) commencing with the first character following establishment of the connection and finishing after the DLE ETX characters for clearance of the connection. The checksum is formed after the DLE doubling. If the partner sends the DLE character within the acknowledgement delay time (QVZ), this indicates that the data frame has been received correctly. If the partner replies with NAK, any other character (apart from DLE), a faulty character, or if the acknowledgement delay time expires without a reaction, the procedure repeats the transmission with the STX character for establishment of the connection. Once the sequence has attempted to transmit the data frame for the number specified in the static parameter set (number of repetitions), the procedure terminates the process and sends NAK to the partner. The system program signals the error (error number in SYSTAT). If the partner sends the NAK character during a transmission, the procedure terminates the frame and repeats it in the manner described above. If any other character is transmitted, the procedure first waits until the character delay time ZVZ has expired and then sends NAK to set the partner to the idle state. The procedure then commences again with the STX character for establishment of the connection. C79000-B8576-C191-01 4 - 33 4 3964/3964R Procedures CP 544 Example of an error-free data transmission: Partner CP 544 Meaning Start character Pos. acknowledgement STX 02H DLE 10H 1st data byte 2nd data byte 1st byte 2nd byte n-th data byte n-th byte . . 4.6.2 Contents . . End identifier End identifier 3964R only DLE 10H ETX 03H BCC Pos. acknowledgement DLE 10H Useful data Receiving In the idle state, when there is no send job to be processed, the procedure waits for the connection to be established by the partner. If the procedure receives any character in the idle state (apart from STX or NAK), it waits until the character delay time (ZVZ) has expired and then sends an NAK character. The system program signals the error (error number in SYSTAT). If the procedure receives the STX character and has an empty receive buffer available, it replies with DLE. Incoming characters are now written into the receive buffer. If two consecutive DLE characters are received, only one is entered into the receive buffer. The connection is terminated 4 - 34 C79000-B8576-C191-01 CP 544 3964/3964R Procedures with NAK if the receive buffer is full before the partner initiates the procedure for clearing the connection. Following each received character, the procedure waits for the next character within the character delay time (ZVZ). If this delay time expires without another character being received, the NAK character is sent to the partner. The system program signals the error (error number in SYSTAT). The 3964 procedure terminates reception if it recognizes the DLE ETX character string and sends DLE to the partner if the frame was received free of errors or NAK if errors were detected. The procedure returns to the idle state. The 3964R procedure terminates reception if it recognizes the DLE ETX BCC character string. It compares the received block check character BCC with the internally generated longitudinal parity. If the block check character is correct and if no other errors have occurred, the 3964R procedure sends DLE to the partner and returns to the idle state. If the BCC indicates an error or if there is any other error in reception, NAK is sent to the partner. The procedure then expects a repetition. If an empty receive buffer is not available when the connection is established with STX, a wait time of 400 ms is initiated. If an empty receive buffer is still not available after this time, the system program signals the error (error number in SYSTAT). The procedure sends an NAK character and returns to the idle state. The procedure otherwise sends the DLE character and receives the data as described above. C79000-B8576-C191-01 4 - 35 4 3964/3964R Procedures CP 544 If transmission errors occur during the reception (lost character, frame error, parity error etc.), the procedure continues to receive until the connection is cleared, and then sends NAK to the partner. A repetition is then expected. If the frame still cannot be received correctly following the number of repetitions specified in the static parameter set or if the partner does not repeat the transmission within a wait time of 4 seconds, the procedure terminates reception. The system program signals the error (with error number in SYSTAT). Example of error-free reception of data: Partner CP 544 Meaning Start character Pos. acknowledgement Contents STX 02H DLE 10H 1st data byte 2nd data byte 1st byte 2nd byte n-th data byte n-th byte . . . . End identifier End identifier 3964R only DLE 10H ETX 03H BCC Pos. acknowledgement DLE 10H Useful data Note: The 3964/3964R procedures send the NAK character to the partner following initialization or resetting in order to set the partner to the idle state. 4 - 36 C79000-B8576-C191-01 CP 544 4.6.3 3964/3964R Procedures Initialization Conflict There is an initialization conflict if a device does not reply to the transmit request (STX character) of a partner within the acknowlegement delay time QVZ with the acknowledgement DLE or NAK but with the STX character. Both devices wish to execute their own transmit job. The device with the lower priority retracts its transmit job and replies with the DLE character. The device with the higher priority sends its data as described above. Following clearance of the connection, the device with the lower priority can execute its transmit job. You can set the priority of the CP 544 (static parameter set, see Section 4.3.2.1) in order to prevent initialization conflicts. You must set the opposite priority on the partner. Example of handling an initialization conflict: Partner CP 544 Lower priority Higher priority Meaning Contents Start character Start character Pos. acknowledgement STX 02H STX 02H DLE 10H 1st data byte 2nd data byte 1st byte 2nd byte n-th data byte n-th byte . . End identifier End identifier 3964R only Pos. acknowledgement Start character Pos. acknowledgement C79000-B8576-C191-01 Useful daten . . DLE 10H ETX 03H BCC . . . DLE 10H STX 02H DLE 10H . . . 4 - 37 4 3964/3964R Procedures 4.6.4 CP 544 Procedure Errors The procedure detects errors resulting from the incorrect response of the partner and also errors caused by interferences on the transmission line. In both cases, the procedure first attempts to repeat the transmission or reception of the data. If the data cannot be transmitted or received free of errors by the time the maximum number of repetitions (as specified in the static parameter set) has been reached (or if a different error occurs), the procedure terminates the transmission or reception. It then signals the error number of the first detected error and enters the idle state. The system program signals the error (error number in SYSTAT). If the system program frequently signals the error number in the SYSTAT for transmission and reception repetitions, you can assume that the data traffic is sporadically impaired. The large number of repetitions compensates this, however. In such a case we recommend that you examine the transmission line for interferences since the useful data rate and the reliability of the transmission are reduced with a large number of repetitions. The cause of the problem may also be the incorrect response of the partner. If BREAK is detected on the receive line, the system program signals the BREAK state (SYSTAT). No repetitions are started. This status is retained until the BREAK state is eliminated. The same number is signalled for all detected transmission errors (lost character, frame/parity error) regardless of whether the error was detected when transmitting or receiving a frame. The error is only signalled, however, if the previous repetitions were unsuccessful. If the faulty character is received while the procedure is in the idle state, the system program signals the error (error number in SYSTAT) to inform you of serious interferences on the transmission line. 4 - 38 C79000-B8576-C191-01 5 How do you Transmit Data with the Open Driver? Contents of Chapter 5 5 How do you Transmit Data with the Open Driver? . . . . . . 5-3 5.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 5.2 Data Exchange Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 11 5.3 Program Elements for the Open Driver . . . . . . . . . . . . . . . . . . . . . . 5 - 13 5.3.1 5.3.1.1 5.3.1.2 5.3.1.3 5.3.1.4 5.3.1.5 STEP 5 Program with Data Handling Blocks . . . . . . . . . . . . . . . . . SYNCHRON. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RECEIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coordination Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555555- 5.3.2 5.3.2.1 Assignment of Parameters to Open Driver in CP 544 . . . . . . . . . . Mode 1 - Fixed Useful Data Length (ZVZ) . . . . . . . . . . . . . . . . . . Static parameter set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Receive mailbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protocol definition of open driver in mode 1 . . . . . . . . . . . . . . . . . . Mode 2 - Variable Useful Data Length (End Character) . . . . . . . Static parameter set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Receive mailbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protocol definition of open driver in mode 2 . . . . . . . . . . . . . . . . . . 5 - 19 5 - 20 5 - 20 5 - 24 5 - 26 5 - 27 5 - 27 5 - 31 5 - 34 5.3.2.2 C79000-B8576-C191-01 13 13 14 16 17 17 5-1 Contents 5.3.2.5 Mode 3 - Fixed Useful Data Length, Unsymmetrical . . . . . . . . . . Static parameter set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Receive mailbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protocol definition of open driver in mode 3 . . . . . . . . . . . . . . . . . . Mode 4 - Printer Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Static parameter set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protocol definition of open driver in mode 4 . . . . . . . . . . . . . . . . . . Transmission of Parameters into CP 544 User Memory. . . . . . . . . 5.4 Job Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 61 5.5 Example of a Complete Parameter Set. . . . . . . . . . . . . . . . . . . . . . 5 - 66 5.3.2.3 5.3.2.4 5-2 5 - 40 5 - 40 5 - 44 5 - 47 5 - 51 5 - 51 5 - 58 5 - 60 C79000-B8576-C191-01 CP 544 5 Open Driver How do you Transmit Data with the Open Driver? Chapter 5 describes the data transmission functions with the open driver and acquaints you with the generation of the STEP 5 program and the static parameter set as well as the definition of the receive mailbox for the CP 544. 5.1 Introduction Using the open driver, data can be exchanged between two communications partners connected via a point-to-point link in half-duplex mode (simultaneous transmission and reception is not possible) or in full-duplex mode (simultaneous transmission and reception is possible). In full-duplex mode, the data transmission always takes place in both transmission directions up to the user program independent of the data terminal. A mode with an automatic echo of incoming characters as in half-duplex mode is not provided. Interface submodules Various interface submodules are available for data transmission with the open driver: * * * C79000-B8576-C191-01 V.24 submodule TTY submodule RS422-A/485 submodule (only in the RS422-A mode). 5-3 5 Open Driver Transmission speed CP 544 Set the transmission speed for the data exchange as suitable for the communications partner. The following transmission speeds are permissible: * * * 300 bps to 76 800 bps with the RS422-A/485 submodule 300 bps to 19 200 bps with the V.24 submodule 300 bps to 9 600 bps with the TTY submodule Note that the total baud rate of 76800 bps must not be exceeded in half-duplex mode, and the total baud rate of 38400 in full-duplex mode. You can work on one device interface in half-duplex mode and on the other in full-duplex mode, but you must double the set baud rate on the device interface with full-duplex mode in order to retain the total baud rate. Example If you work on one device interface in half-duplex mode with a baud rate of 38400 bps, you can still work on the second device interface in full-duplex mode with 19200 bps. The permissible transmission speed is calculated in this case according to the equation: Baud rate SI1 + 2 x Baud rate SI2 76800 bps Flow control 5-4 Flow control is a mechanism which synchronizes the transmission (CPU or partner) and reception (partner or CPU) of data if the data source operates faster than the data sink. Control of the data flow using this flow control function is transparent for the user (apart from the required parameter settings). When using the flow control XON/XOFF (control characters XON = DC1 = 11H and XOFF = DC3 = 13H), this means that the useful data must not contain these control characters. C79000-B8576-C191-01 CP 544 Open Driver If you use the V.24 submodule and wish to parameterize RTS/CTS for the flow control (hardware flow control), it is essential to carry out complete wiring of the used interface signals in the plug connector. Messages which are received incorrectly are always rejected. Special features when transmitting: If the CP receives an XON/XOFF control character whilst receiving data, this character is not taken into consideration when monitoring the character delay time (ZVZ). In this case the interval between the character before XON/XOFF and the character after XON/XOFF is doubled. You must take this into account if you have set a short character delay time. Special features when transmitting: If the CP generates a control character between two messages which it is transmitting, this character has no influence on the time between the messages. You must take this into account if you have set a short character delay time on your partner and detect the end of the message by means of expiration of the ZVZ (mode 1). Control signals The data transmission with open driver does not completely comply with DIN 66021 or the CCITT V.24 specifications. Please note the following exceptions: * * C79000-B8576-C191-01 The M1/S1.1 control signals (107/108.1 of V.24 specification, DTR/DSR with RS 232) are not generated or evaluated. The M2/S2 control signals (106/105 with V.24, RTS/CTS with RS 232) are only generated or evaluated as the flow control with corresponding parameter settings. 5-5 5 Open Driver CP 544 Transmission reliability The transmission with the open driver comprises the following layer of the ISO/OSI layer model (ISO IS 7498): * The physical layer (layer 1): This layer stipulates the physical transmission of the data bytes (physical characteristics of the connection, transmission speed, etc.). You must handle the data protection yourself for the open driver. The open driver does not guarantee that a message * * is received without errors or is processed by the partner. For example, the data are not processed further by the CP if the CP is in the STOP state, and are not received by the CPU if the CPU is in the STOP state. Note You should provide the flow control function to prevent data being lost when internal buffers overflow. This particularly applies to high data transfer rates or if you are working with coordination flags. If you want to be sure that a message is received without errors, you must * carry out the data transmission with the 3964/3964R procedures. If you want to be sure that a message is received without errors and processed by the partner, you must * * 5-6 either user the RK 512 computer link or provide data protection for the useful data yourself. C79000-B8576-C191-01 CP 544 Coupling partners Open Driver 1st coupling partner 2nd coupling partner SIMATIC S5 SIMATIC S5 S5-115U/H S5-135U (without S processor) S5- 155U/H CP 544 S5-135U CP 544 CPU 928B (without S processor) S5-155U CP 544 S5-115U/H S5-155H CP 523 S5-115U/F/H S5-135U S5-150U S5-155U/H CP 521 SI S5- 90 with IM 90 S5-95 S5-100U Printer Non-SIMATIC computer Fig. 5-1 5 Possible coupling partners for data transmission with open driver The data transmission with open driver implements the direct data exchange between the CP 544 in an S5-115U/H, S5-135U (without S processor), S5-155U/H and one of the following partners: * * * * * * C79000-B8576-C191-01 another CP 544 in the S5-115U/H, S5-135U (without S processor), S5-155U/H programmable controllers a CPU 928B in the S5-135U and S5-155U programmable controllers a CP 523 in the S5-115U/F/H, S5-135U, S5-150U and S5-155U/H programmable controllers, a CP 521 SI in the S5-90, S5-95, S5-100U programmable controllers an input/output device which operates with the same transmission mode, for example a printer a non-SIMATIC computer which operates with the same procedure. 5-7 Open Driver Transmitted data CP 544 You can transmit the following data stored in a PLC using the data transmission with open driver: * * * * * * Data blocks, extended data blocks Flag bytes Input/output bytes I/O bytes Timers Counters. Transmission direction You can implement the following jobs with the SIMATIC S5 standard procedures for the open driver: 5-8 * Send data (SEND job): The PLC 1 sends data to the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2 * Send data to an output device (SEND job in mode 4): The PLC sends data to an output device (printer) via the CP 544 in the PLC * Receive data (RECEIVE-ALL job in modes 1 to 3): The PLC 1 receives data from the PLC 2 via the CP 544 in the PLC 1 and the CP 544 in the PLC 2. C79000-B8576-C191-01 CP 544 Open Driver Transmission mode You can select one of four modes for the data transmission with the open driver. The transmission mode is defined in the static parameter set. Mode 1 Fixed useful data length (end identifier: expired character delay time) When transmitting n bytes of useful data, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND. When receiving n bytes of useful data, the system program enters the number n of received useful data bytes into the first word of the receive mailbox. This length information does not include the word with the length data itself. The end of the message is detected when the character delay time has expired. Mode 2 Variable useful data length (end identifier: defined end character) When transmitting n bytes of useful data, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND. The useful data are transmitted up to and including the end identifier (as defined in the static parameter set). When receiving, the useful data up to and including the end identifier (as defined in the static parameter set) are transferred to the receive mailbox. The system program enters the number n (data in bytes) of the received useful data bytes (including the end identifier) into the first word of the receive mailbox. This length information does not include the word with the length data itself. If the character delay time expires during reception of the useful data, the reception is terminated. The message is discarded. C79000-B8576-C191-01 5-9 5 Open Driver Mode 3 Fixed useful data length, unsymmetrical (end identifier: defined message length) CP 544 When transmitting n bytes of useful data, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND When receiving, the useful data are transferred to the receive mailbox up to the fixed message length parameterized for the mailbox. The system program enters the number n of received useful data bytes into the first word of the receive mailbox (must correspond to "fixed message length when receiving"). This length information does not include the word with the length data itself. If the character delay time expires during reception of the useful data, the reception is terminated. The message is discarded. Mode 4 Printer output For the output of n bytes of useful data on the printer, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND. The useful data are transmitted up to and including the end identifier (as you have programmed in the static parameter set). The data are prepared for printing during the output. Printing is terminated following transmission of the end identifier, the line counter and other values used for preparing printing remain valid, however. The reception of characters does not take place in this mode. The only exceptions are control characters for flow control if these have been parameterized accordingly. Any other characters which may appear are not transferred. 5 - 10 C79000-B8576-C191-01 CP 544 5.2 Open Driver Data Exchange Sequence The following Fig. shows the data exchange sequence between two programmable controllers. PLC 2 PLC 1 CPU CP 544 Open driver Data handling blocks Data Fig. 5-2 C79000-B8576-C191-01 S5 bus CP 544 CPU 5 Open driver S5 bus Data handling blocks Data Data exchange between two programmable controllers 5 - 11 Open Driver Data handling blocks CP 544 The data handling blocks in the STEP 5 program of the CPU are used: * * Open driver (modes 1 to 3) The open driver in the CP 544 modules of the two PLCs * * Open driver (mode 4) to trigger and execute data exchange, to receive the transmitted data in modes 1 to 3. receives the required information on the data destination from the definition in the receive mailbox, passes on the data to the CP in the other PLC. The open driver in the CP 544 module of the PLC * sends the data to the output device. The data exchange sequence described means that you have the following important tasks for data transmission with the open driver: * * * 5 - 12 You must generate your STEP 5 program with the calls of the data handling blocks for the two CPUs You must assign parameters to the open drivers in the two CP 544 modules You must define a receive mailbox in the CP 544 of the partner if you use modes 1 to 3. C79000-B8576-C191-01 CP 544 5.3 Open Driver Program Elements for the Open Driver The programming of the open driver is based on only a few fundamental points - the STEP 5 program with the data handling blocks, the functions of the receive data block (receive mailbox) in the CPU, the static parameter set on the CPU and the definition of the receive mailbox. 5.3.1 STEP 5 Program with Data Handling Blocks Incorporate the data handling blocks described below into your STEP 5 program to enable data transmission with the open driver according to the particular task. Once you have read this description, you will be able to generate a concept for the STEP 5 program for your particular task. 5 You can find a detailed description of the individual data handling blocks and their parameters in Chapter 6. 5.3.1.1 SYNCHRON Synchronizing CPU and CP The data handling block SYNCHRON synchronizes the device interface between the CPU and CP. SYNCHRON must be called in the restart organization blocks of the CPU for every page frame used by you in the two device interfaces of the CP. C79000-B8576-C191-01 5 - 13 Open Driver 5.3.1.2 Send data CP 544 SEND The data handling block SEND transmits data from the CPU to the CP 544. The job is triggered by the SEND-DIRECT. In order to transmit data, a SEND-ALL job must be additionally programmed in the user program and called cyclically. The matching partner job RECEIVE-ALL must be programmed in the STEP 5 program of the partner CPU to enable the data to be received by it. PLC 1 CPU PLC 2 CP 544 CP 544 Open driver Open driver CPU SENDDIRECT n T R I G G E R SENDALL RECEIVEALL Data source Data destination n = job number Fig. 5-3 5 - 14 SEND job C79000-B8576-C191-01 CP 544 Open Driver When transmitting data with the CP 544, the SEND-DIRECT data handling block is used for the following special jobs: Parameterize device interface You can use this special job to assign parameters to the two device interfaces of the CP 544 without the COM PP parameterization software in that you store the parameters in a data block. Import mode-specific static parameters You can use this special job e.g. in mode 4 to modify the static parameters starting at DW 35 (print parameter) without having to reset the device interface. Start device interface You can use this special job to start a device interface from the STEP 5 program. Set date and time You can use this special job to set the clock on the CP 544 from the CPU and to define whether the CP is to be a time master or slave. Execute PSEUDOWRITE function C79000-B8576-C191-01 You can use this special job to transmit data. All parameters on the source and destination are stored in a DB/DX. The special job enables you: * To modify the source and/or destination data of a job during execution of the program * To program this job without COM PP. 5 - 15 5 Open Driver 5.3.1.3 CP 544 RECEIVE Receive data The data handling block RECEIVE transmits data from the CP to the CPU. The data handling block RECEIVE-DIRECT is only used for the following special jobs in the data transmission with the CP 544: Read parameters of a device interface You can use this special job to scan the parameters of a device interface independent of the COM PP parameterization software. The parameters are written into a defined data block. Read error message area of SYSTAT You can use this special job to read up to 3 error messages of the SYSTAT specific to the interface. Read status You can use this special job to scan the status of the CP 544 and the addressed device interface. Read hardware parameters You can use this special job to scan the hardware parameters which you have set using switches on the module (page frame number, number of pages, released coordination flag area) without having to remove the module. Read complete SYSTAT status area You can use this special job to read the complete SYSTAT, i.e. the error messages of both device interfaces of the CP 544. Read SYSID identification area You can use this special job to read data on the module, the memory submodule, the interface assignments and the output statuses of the loaded software from the SYSID. Read date and time You can use this special job to read the time on the CP 544 using the CPU. 5 - 16 C79000-B8576-C191-01 CP 544 5.3.1.4 Open Driver CONTROL Check job status 5.3.1.5 The data handling block CONTROL copies a job status into the defined status word. The job status provides information on the processing state of the job. Coordination Flags You can use the coordination flags to inhibit or release the transfer of data between the CPU and CP 544. The coordination flags must be released using switches on the CP 544 module (see Section 2.1). The coordination flags must be defined in the PLC as output communication flags in the DB 1. The coordination flag is defined in the definition of the receive mailbox of the partner CP. The byte number of the coordination flag appears in the status word of the ALL job in the destination PLC in the last transmission cycle. Using this byte number you can recognize that the data have arrived completely in the destination CPU. You can inhibit the repeated acceptance of data if you set the coordination flag in the STEP 5 program of the destination CPU. You can reset the coordination flag by the user program as soon as the data have been saved from the destination area or processed further; the job is then accepted again. Note that only the byte number of the coordination flag appears in the status word of SEND-ALL or RECEIVE-ALL, and not the bit number as well. You must therefore ensure that there is an unequivocal assignment between the byte number and coordination flag if you wish to evaluate the information of the status word in the program. C79000-B8576-C191-01 5 - 17 5 Open Driver CP 544 You can use every flag apart from flag 222 (DE hexadecimal) as a coordination flag but only byte numbers from 1 to 223 can be indicated in the status word. Flag 222 is reserved to indicate the complete transmission of a job if no coordination flags are transmitted. 5 - 18 C79000-B8576-C191-01 CP 544 5.3.2 Open Driver Assignment of Parameters to Open Driver in CP 544 Open Driver The COM PP parameterization software (see Chapter 7) supports you when assigning parameters to the open driver. If you do not have this software package, you must assign parameters to the open driver by means of the special job SEND-DIRECT 189 (see Section 6.3.8). You generate a static parameter set and, if you receive data with the CP 544, you must define the position of the receive mailbox on the CPU. Static parameter set In the static parameter set, you specify the parameters for the physical layer of the open driver. See Sections 5.3.2.1 to 5.3.2.4 to understand which parameters are required in which transmission mode. Receive mailbox The receive mailbox is a data block on the receiving CPU. You must create it on the receiving CPU and define its position on the receiving CP. Once you have read this section, you will be able to produce a concept for the static parameter set and the receive mailbox of the open driver for your special requirements. The following pages provide you with a summary of possible parameter settings. C79000-B8576-C191-01 5 - 19 5 Open Driver/Mode 1 5.3.2.1 CP 544 Mode 1 - Fixed Useful Data Length (ZVZ) Open Driver/Mode 1 When transmitting n bytes of useful data, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND. When receiving n bytes of useful data, the system program enters the number n of received useful data bytes into the first word of the receive mailbox. This length information does not include the word with the length data itself. The end of the message is detected when the character delay time has expired. The following pages list the values you can use to parameterize the data transmission with the open driver in mode 1 - fixed useful data length (end identifier: ZVZ expired). Static parameter set You must enter the parameters for the physical layer as well as transmission-specific parameters in the static parameter set. The following table shows you which values you can enter for the static parameter set. 5 - 20 C79000-B8576-C191-01 CP 544 Open Driver/Mode 1 Table 5.1 Static parameter set (open driver, mode 1) Parameter Input Mode 1 Fixed useful data length (ZVZ) Baud rate1) 300 600 1200 2400 4800 9600 19200 38400 76800 bps bps bps bps bps bps bps 2) bps 3) bps 3) Parity No Odd Even Bits per character 6 bits per character 7 bits per character 8 bits per character Stop bits 1 stop bit 2 stop bits Flow control None XON/XOFF RTS/CTS Character delay time Monitoring time 0.01 s to 635.35 s (steps: 10 ms) 5 1) The total baud rate of 76800 bps must not be exceeded. In full-duplex mode, the total baud rate is halved to 38400 bps. 2) Only with V.24 submodule and RS422-A/485 submodule 3) Only with RS422-A/485 submodule The flow control must be set according to the requirements of your partner. C79000-B8576-C191-01 5 - 21 Open Driver/Mode 1 CP 544 Meaning of parameters Mode Version of the possible data transmission modes. Baud rate Data transmission speed, data in bit/s (bps). Parity The parity is either even or odd. To check the parity, the string of information bits is extended by a further bit, the parity bit (0 or 1) which, when added to the information bits produces a selectable parity state. If "No" is set for the parity, the parity bit is set to 1 but not evaluated by the receiver/transmitter. Bits per character Number of data bits used to form a character. Stop bits Duration of the stop bits relative to the time required to transmit an information bit. The stop bits follow each transmitted character in a start/stop transmission. Flow control Mechanism which synchronizes the transmission (CPU or partner) and reception (partner or CPU) of data if the data source operates faster than the data sink. Controlling of the data flow using flow control is transparent for the user (with the exception of the required parameter settings). This means that if you use the flow control XON/XOFF (control characters XON=DC1=11H and XOFF=DC3=13H), the useful data must not contain these control characters. If you use flow control RTS/CTS, you must additionally wire the RTS and CTS signals. Important If you work with flow control, please refer to the information in Section 5.1. 5 - 22 C79000-B8576-C191-01 CP 544 Character delay time (ZVZ) Open Driver/Mode 1 The maximum permitted interval between two received characters (see also table below): n-th character (n+1)-th character Character delay time t Baud rate 300 600 1200 2400 4800 9600 19200 38400 76800 bps bps bps bps bps bps bps bps bps Minimum permissible character delay time ZVZ 50 30 20 10 10 10 10 10 10 ms ms ms ms ms ms ms ms ms 5 When transmitting data with the open driver, the parameters of the physical layer on the partner must agree with those of the CP 544. C79000-B8576-C191-01 5 - 23 Open Driver/Mode 1 CP 544 Receive mailbox Length The receive mailbox is located in a data block (DB) or extended data block (DX). It contains the received data and, in the first word, the length of the received data (in bytes). This is entered by the system program so that you can recognize how many bytes have been received. The specified length does not include the word containing the length specification itself. The maximum length of the receive mailbox is 2049 words (4098 bytes). The receive mailbox must always be one word larger than the data to be received. Length of receive mailbox = net data + 1 word Example: receive mailbox The example illustrates the structure of a receive mailbox in data block 8 with a length of 6 words starting at data word 1. 7 bytes were received. DB 8 0: KH = xxxx; does not belong to receive mailbox, contents irrelevant 1: KH = 0007; start of receive mailbox, length in bytes 2: KH = 0102; received data: 0102 3: KH = 0304; received data: 0304 4: KH = 0506; received data: 0506 5: KH = 07yy; received data: 07, yy was not received 6: KH = yyyy; contents of the receive mailbox, not received (filled with 00) 7: KH = xxxx; does not belong to the receive mailbox, contents irrelevant, need not exist : : 5 - 24 C79000-B8576-C191-01 CP 544 Receive mailbox Open Driver/Mode 1 The following table shows the values with which you can parameterize the receive mailbox. Parameter Meaning CPU No. Range of values 1 to 4 or no data Receive mailbox Data type DB or DX number starting at DW Length Coordination flag DB or DX Range of values 3 to 255 Range of values 2 to 2049 words Range of values for byte no. 0 to 223 Range of values for bit no. 0 to 7 or no data Meaning of parameters CPU number The CPU number specifies the CPU for which the data stored in the receive mailbox are intended. Only this CPU can receive the data from the CP. The data are stored in the lowest page on the receiving interface. The specification of a CPU number is not necessary if only one CPU is inserted in the PLC. Receive mailbox A data block or an extended data block can be specified as the receive mailbox. Further parameters to be entered are the data block number, the initial address in the data block and the length. Coordination flag By specifying a coordination flag you can prevent transmitted data which have not yet been processed from being overwritten. The coordination flags must be enabled using switches on the module (see Section 2.1). C79000-B8576-C191-01 5 - 25 5 Open Driver/Mode 1 CP 544 Protocol definition of open driver in mode 1 The following description is intended to help you if you wish to connect a non-SIMATIC device using the open driver in mode 1 (fixed useful data length (ZVZ)). It is also intended as a source of reference for engineers who have to develop a protocol compatible with the open driver on a non-SIMATIC computer. The following aspects are described for transmitting and receiving: * * * Structure of the transmitted/received data frame Restrictions, if any Basic sequence of events. In the sequence of events shown, the bold lines indicate the standard sequence, the thin lines represent the error handling sequence. Transmitting In mode 1, only the useful data are transmitted without length information. The data frame to be transmitted has the following structure: Length of useful data: n bytes 1 n Useful data - length n bytes XON (DC1 = 11H) or XOFF (DC3 = 13H) must not be present in the useful data when selecting the flow control with XON/XOFF. 5 - 26 C79000-B8576-C191-01 CP 544 Open Driver/Mode 1 Job processed Waiting for send job SEND job received Transmission of useful data The number of data to be transmitted is obtained from the first word of the transmit mailbox. This length information is not transmitted. . 5 Fig. 5-4 Receiving Transmission sequence in mode 1 The end of the message is recognized when the character delay time has expired. The data frame to be received has the following structure: Length of useful data: n bytes 1 n Useful data - length n bytes C79000-B8576-C191-01 5 - 27 Open Driver/Mode 1 CP 544 Job successful Character delay time expired Waiting for characters Characters received Characters received with ZVZ monitoring Error in reception (not a ZVZ error) Message complete (ZVZ expired) Job Signalling of error in error area passed on Waiting for ZVZ to expire and to clear receive buffer Fig. 5-5 5 - 28 Receiving sequence in mode 1 C79000-B8576-C191-01 CP 544 5.3.2.2 Open Driver/Mode 2 Mode 2 - Variable Useful Data Length (End Character) Open Driver/Mode 2 When transmitting n bytes of useful data, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND. The useful data are transmitted up to and including the end identifier (as defined in the static parameter set). When receiving, the useful data up to and including the end identifier (as defined in the static parameter set) are transferred to the receive mailbox. The system program enters the number n (data in bytes) of the received useful data bytes (including the end identifier) into the first word of the receive mailbox. This length information does not include the word with the length data itself. If the character delay time expires during reception of the useful data, reception is terminated. The message is discarded. The following pages list the values you can use to parameterize the data transmission with the open driver in mode 2 - variable useful data length (end identifier: defined end character). Static parameter set You must enter the parameters for the physical layer as well as transmission-specific parameters in the static parameter set. The following table shows you which values you can enter for the static parameter set. C79000-B8576-C191-01 5 - 29 5 Open Driver/Mode 2 CP 544 Table 5.3 Static parameter set (open driver, mode 2) Parameter Input Mode 2 Variable useful data length (end character) Baud rate1) 300 600 1200 2400 4800 9600 19200 38400 76800 bps bps bps bps bps bps bps 2) bps 3) bps 3) Parity No Odd Even Bits per character 6 bits per character 7 bits per character 8 bits per character Stop bits 1 stop bit 2 stop bits Flow control None XON/XOFF RTS/CTS Character delay time Monitoring time 0.01 s to 635.35 s (steps: 10 ms) 1st end identifier 00 xx 2nd end identifier xx Code of first end identifier, no second end identifier Code of first end identifier (range of values 01 to FF) Code of second end identifier (range of values 01 to FF) 1) The total baud rate of 76800 bps must not be exceeded. In full-duplex mode, the total baud rate is halved to 38400 bps 2) Only with V.24 submodule and RS422-A/485 submodule 3) Only with RS422-A/485 submodule The flow control must be set according to the requirements of your partner. 5 - 30 C79000-B8577-C191-01 CP 544 Open Driver/Mode 2 Meaning of parameters Mode Version of the possible data transmission modes. Baud rate Data transmission speed, data in bit/s (bps). Parity The parity is either even or odd. To check the parity, the string of information bits is extended by a further bit, the parity bit (0 or 1) which, when added to the information bits produces a selectable parity state. If "No" is set for the parity, the parity bit is set to 1 but not evaluated by the receiver/transmitter. Bits per character Number of data bits used to form a character. Stop bits Duration of the stop bits relative to the time required to transmit an information bit. The stop bits follow each transmitted character in a start/stop transmission. Flow control Mechanism which synchronizes the transmission (CPU or partner) and reception (partner or CPU) or data if the data source operates faster than the data sink. Controlling of the data flow using flow control is transparent for the user (with the exception of the required parameter settings). This means that if you use the flow control XON/XOFF (control characters XON=DC1=11H and XOFF=DC3=13H), the useful data must not contain these control characters. If you use flow control RTS/CTS, you must additionally wire the RTS and CTS signals. C79000-B8576-C191-01 5 - 31 5 Open Driver/Mode 2 Character delay time (ZVZ) CP 544 The maximum permitted interval between two received characters (see also table below) n-th character (n+1)-th character Character delay time t Baud rate 300 600 1200 2400 4800 9600 19200 38400 76800 End identifier bps bps bps bps bps bps bps bps bps Minimum permissible character delay time ZVZ 50 30 20 10 10 10 10 10 10 ms ms ms ms ms ms ms ms ms The data transmission is terminated by the specified end identifier. The entry NUL is a valid end character in the first end identifier. This ensures that at least one valid end identifier is assigned as standard. The second end identifier is optional and is only effective if the first end identifier is not NUL. When assigning the end identifier(s) make sure that bits 6 and 7 or bit 7 of the parameterized end identifier(s) are not transmitted for the data transmission with 6 or 7 bits per character. When transmitting data with the open driver, the parameters of the physical layer on the partner must agree with those of the CP 544. 5 - 32 C79000-B8577-C191-01 CP 544 Open Driver/Mode 2 Receive mailbox The receive mailbox is located in a data block (DB) or extended data block (DX). It contains the received data, including the received end identifier, after the first data word. The system program enters the number n (in bytes) of received useful data bytes (including the end identifiers) into the first word of the receive mailbox. This specified length does not include the word containing the length specification itself. The end identifiers enable you to recognize how many bytes have been received in addition to the first data word in the receive mailbox. Make sure that the partner operates with the same end identifiers as you have assigned in the static parameter set. Length The maximum length of the receive mailbox is 2049 words (4098 bytes). The receive mailbox must always be one word larger than the data to be received. Length of receive mailbox = net data + 1 word C79000-B8576-C191-01 5 - 33 5 Open Driver/Mode 2 CP 544 Example: receive mailbox The example illustrates the possible appearance of a receive mailbox in data block 8 with a length of 6 words starting at data word 1. In the static parameter set, 10H was assigned as the first end identifier and 03H as the second end identifier. DB 8 0: KH = xxxx; does not belong to receive mailbox, contents irrelevant 1: KH = 0009; start of receive mailbox, length in bytes 2: KH = 0102; received data: 0102 3: KH = 0304; received data: 0304 4: KH = 0506; received data: 0506 5: KH = 0710; received data: 07, 1st end identifier: 10 6: KH = 03yy; 2nd end identifier: 03, yy was not received (filled with 00) 7: KH = xxxx; does not belong to the receive mailbox, contents irrelevant, need not exist : : 5 - 34 C79000-B8577-C191-01 CP 544 Receive mailbox Open Driver/Mode 2 The following table shows the values with which you can parameterize the receive mailbox. Parameter Meaning CPU No. Range of values 1 to 4 or no data Receive mailbox Data type DB or DX number starting at DW Length Coordination flag DB or DX Range of values 3 to 255 Range of values 2 to 2049 words Range of values for byte no. 0 to 223 Range of values for bit no. 0 to 7 or no data Meaning of parameters CPU number The CPU number specifies the CPU for which the data stored in the receive mailbox are intended. Only this CPU can receive the data from the CP. The data are stored in the lowest page on the receiving interface. The specification of a CPU number is not necessary if only one CPU is inserted in the PLC. Receive mailbox A data block or an extended data block can be specified as the receive mailbox. Further parameters to be entered are the data block number, the initial address in the data block and the length. Coordination flag By specifying a coordination flag you can prevent transmitted data which have not yet been processed from being overwritten. The coordination flags must be enabled using switches on the module (see Section 2.1). C79000-B8576-C191-01 5 - 35 5 Open Driver/Mode 2 CP 544 Protocol definition of open driver in mode 2 The following description is intended to help you if you wish to connect a non-SIMATIC device using the open driver in mode 2 (variable useful data length (end identifier)). It is also intended as a source of reference for engineers who have to develop a protocol compatible with the open driver on a non-SIMATIC computer. The following aspects are described for transmitting and receiving: * * * Structure of the transmitted/received data frame Restrictions, if any Basic sequence of events. In the sequence of events shown, the bold lines indicate the standard sequence, the thin lines represent the error handling sequence. Transmitting In mode 2, the useful data are transmitted including the end identifier assigned in the static parameter set. The data frame to be transmitted has the following structure: Length of useful data: n bytes 1 n Useful data - length n bytes n+1 n+2 E1 E2 E1: first end identifier E2: second end identifier (if assigned in static parameter set) XON (DC1 = 11H) or XOFF (DC3 = 13H) must not be present in the message when selecting the flow control with XON/XOFF. 5 - 36 C79000-B8577-C191-01 CP 544 Open Driver/Mode 2 Job processed Waiting for send job SEND job received Transmission of useful data (including end identifier) n useful data plus the end identifier are transmitted 5 Fig. 5-6 C79000-B8576-C191-01 Transmission sequence in mode 2 5 - 37 Open Driver/Mode 2 Receiving CP 544 The received characters including the end identifier are stored in the receive mailbox after the first data word. The data frame to be received has the following structure: Length of useful data: n bytes 1 n Useful data - length n bytes n+1 n+2 E1 E2 E1: first end identifier E2: second end identifier (if assigned in static parameter set) The reception of the end identifier indicates a valid message. An invalid message is indicated if the character delay time ZVZ has expired. Make sure that the two partners operate with the same end identifier. 5 - 38 C79000-B8577-C191-01 CP 544 Open Driver/Mode 2 Job successful Valid end identifier received No valid character received within ZVZ Waiting for characters Characters received 5 Characters received with end character and ZVZ monitoring BREAK Signalling of error in error area Message complete Job transferred BREAK state cleared Error in reception Wait for character with ZVZ after BREAK Signalling of error in error area Other error (not ZVZ error) Valid character received within ZVZ Wait for valid end identifier and clear receive buffer Fig. 5-7 Receiving sequence in mode 2 C79000-B8576-C191-01 5 - 39 Open Driver/Mode 3 5.3.2.3 CP 544 Mode 3 - Fixed Useful Data Length, Unsymmetrical Open Driver/Mode 3 When transmitting n bytes of useful data, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND. When receiving, the useful data are transferred to the receive mailbox up to the fixed message length parameterized for the mailbox. The system program enters the number n of received useful data bytes into the first word of the receive mailbox (must correspond to "fixed message length when receiving"). This length information does not include the word with the length data itself. If the character delay time expires during reception of the useful data, reception is terminated. The message is discarded. The following pages list the values you can use to parameterize the data transmission with the open driver in mode 3 - fixed useful data length, unsymmetrical (end identifier: fixed message length). Static parameter set You must enter the parameters for the physical layer as well as transmission-specific parameters in the static parameter set. The following table shows you which values you can enter for the static parameter set. 5 - 40 C79000-B8577-C191-01 CP 544 Open Driver/Mode 3 Table 5.5 Static parameter set (open driver, mode 3) Parameter Input Mode 3 Fixed useful data length, unsymmetrical Baud rate1) 300 600 1200 2400 4800 9600 19200 38400 76800 bps bps bps bps bps bps bps 2) bps 3) bps 3) Parity No Odd Even Bits per character 6 bits per character 7 bits per character 8 bits per character Stop bits 1 stop bit 2 stop bits Flow control None XON/XOFF RTS/CTS Character delay time Monitoring time 0.01 s to 635.35 s (steps: 10 ms) 5 Fixed message Length in bytes length for reception 1) The total baud rate of 76800 bps must not be exceeded. In full-duplex mode, the total baud rate is halved to 38400 bps 2) Only with V.24 submodule and RS422-A/485 submodule 3) Only with RS422-A/485 submodule The flow control must be set according to the requirements of your partner. C79000-B8576-C191-01 5 - 41 Open Driver/Mode 3 CP 544 Meaning of parameters Mode Version of the possible data transmission modes. Baud rate Data transmission speed, data in bit/s (bps). Parity The parity is either even or odd. To check the parity, the string of information bits is extended by a further bit, the parity bit (0 or 1) which, when added to the information bits produces a selectable parity state. If "No" is set for the parity, the parity bit is set to 1 but not evaluated by the receiver/transmitter. Bits per character Number of data bits used to form a character. Stop bits Duration of the stop bits relative to the time required to transmit an information bit. The stop bits follow each transmitted character in a start/stop transmission. Flow control Mechanism which synchronizes the transmission (CPU or partner) and reception (partner or CPU) of data if the data source operates faster than the data sink. Controlling of the data flow using flow control is transparent for the user (with the exception of the required parameter settings). This means that if you use the flow control XON/XOFF (control characters XON=DC1=11H and XOFF=DC3=13H), the useful data must not contain these control characters. If you use flow control RTS/CTS you must additionally wire the RTS and CTS signals. Character delay time (ZVZ) The maximum permitted interval between two received characters (see also table below): n-th character (n+1)-th character Character delay time t 5 - 42 C79000-B8576-C191-01 CP 544 Open Driver/Mode 3 Baud rate 300 600 1200 2400 4800 9600 19200 38400 76800 Fixed message length for reception bps bps bps bps bps bps bps bps bps Minimum permissible character delay time ZVZ 50 30 20 10 10 10 10 10 10 ms ms ms ms ms ms ms ms ms If characters are received, the end of the message is detected based on the parameterized fixed message length. When transmitting data with the open driver, the parameters of the physical layer on the partner must agree with those of the CP 544. C79000-B8576-C191-01 5 - 43 5 Open Driver/Mode 3 CP 544 Receive mailbox The receive mailbox is located in a data block (DB) or extended data block (DX). It contains the received data after the first data word. The system program enters the number n (in bytes) of received useful data bytes into the first word of the receive mailbox (must correspond to the parameter "Fixed message length for reception" in the static parameter set). This specified length does not include the word containing the length specification itself. The number of received data can be determined by the parameter "Fixed message length for reception" in the static parameter set. Make sure that the partner really transmits the number of bytes selected in the static parameter set, otherwise the received data will be discarded. The "Fixed message length for reception" must not exceed the length of the receive mailbox minus one word (see above). The maximum length of the receive mailbox is 2049 words (4098 bytes). Remember to specify the length of the receive mailbox in words, but the parameter "Fixed message length for reception" in bytes. 5 - 44 C79000-B8576-C191-01 CP 544 Open Driver/Mode 3 Example: receive mailbox The example illustrates the structure of a receive mailbox in data block 8 with a length of 6 words starting at data word 1. In the static parameter set, 9 bytes were parameterized as the "Fixed message length for reception". DB 8 0: KH = xxxx; does not belong to receive mailbox, contents irrelevant 1: KH = 0009; start of receive mailbox, length in bytes 2: KH = 0102; received data: 0102 3: KH = 0304; received data: 0304 4: KH = 0506; received data: 0506 5: KH = 0708; received data: 0708, 6: KH = 09yy; received data: 09, yy was not received (filled with 00) 7: KH = xxxx; does not belong to the receive mailbox, contents irrelevant, need not exist : : C79000-B8576-C191-01 5 - 45 5 Open Driver/Mode 3 Receive mailbox CP 544 The following table shows the values with which you can parameterize the receive mailbox. Parameter Meaning CPU No. Range of values 1 to 4 or no data Receive mailbox Data type DB or DX number starting at DW Length Coordination flag DB or DX Range of values 3 to 255 Range of values 2 to 2049 words Range of values for byte no. 0 to 223 Range of values for bit no. 0 to 7 or no data Meaning of parameters CPU number The CPU number specifies the CPU for which the data stored in the receive mailbox are intended. Only this CPU can receive the data from the CP. The data are stored in the lowest page on the receiving interface. The specification of a CPU number is not necessary if only one CPU is inserted in the PLC. Receive mailbox A data block or an extended data block can be specified as the receive mailbox. Further parameters to be entered are the data block number, the initial address in the data block and the length. Coordination flag By specifying a coordination flag you can prevent transmitted data which have not yet been processed from being overwritten. The coordination flags must be enabled using switches on the module (see Section 2.1). 5 - 46 C79000-B8576-C191-01 CP 544 Open Driver/Mode 3 Protocol definition of open driver in mode 3 The following description is intended to help you if you wish to connect a non-SIMATIC device using the open driver in mode 3 (fixed useful data length, unsymmetrical). It is also intended as a source of reference for engineers who have to develop a protocol compatible with the open driver on a non-SIMATIC computer. The following aspects are described for transmitting and receiving: * * * Structure of the transmitted/received data frame Restrictions, if any Basic sequence of events. In the sequence of events shown, the bold lines indicate the standard sequence, the thin lines represent the error handling sequence. Transmitting In mode 3, only the useful data are transmitted without length information. The data frame to be transmitted has the following structure: Length of useful data: n bytes 1 n Useful data - length n bytes XON (DC1 = 11H) or XOFF (DC3 = 13H) must not be present in the useful data when selecting the flow control with XON/XOFF. C79000-B8576-C191-01 5 - 47 5 Open Driver/Mode 3 CP 544 Job processed Waiting for send job SEND job received Transmission of useful data Fig. 5-8 5 - 48 The number of data to be transmitted is obtained from the first word of the transmit mailbox. This length information is not transmitted. Transmission sequence in mode 3 C79000-B8576-C191-01 CP 544 Receiving Open Driver/Mode 3 The message length in bytes is determined by the length specified in the special static parameters. The receive mailbox contains the useful data after the first data word. The first data word of the receive mailbox contains the number (in bytes) of received useful data. A message has been transmitted completely and correctly if neither the character delay time has elapsed (gap between characters too large) nor a transmission error in the physical layer occurred during reception of the number of characters defined in the special static parameters. The data frame to be received has the following structure: Length of useful data : n bytes 1 n Useful data - length n bytes 5 The message is invalid if the character delay time (ZVZ) has expired. The useful data length is obtained from the static parameter set. C79000-B8576-C191-01 5 - 49 Open Driver/Mode 3 CP 544 Job successful Message length reached Character delay time expired Waiting for characters Characters received Characters received with end character and ZVZ monitoring Message complete Job transferred Faulty character received Signalling of Signalling of error in error area error in error area Error signalled Wait until selected message length reached, and clear receive buffer Fig. 5-9 5 - 50 Other reception error Error signalled Wait for ZVZ to expire, and clear receive buffer Receiving sequence in mode 3 C79000-B8576-C191-01 CP 544 5.3.2.4 Open Driver/Mode 4 Mode 4 - Printer Output For the output of n bytes of useful data on the printer, enter the number n of useful data bytes to be transmitted as the parameter "QLAE" when calling the data handling block SEND. The useful data are transmitted up to and including the end identifier (as you have programmed in the static parameter set). The data are prepared for printing during the output. Printing is terminated following transmission of the end identifier, the line counter and other values used for preparing printing remain valid, however. The reception of characters does not take place in this mode. The only exceptions are control characters for flow control if these have been parameterized accordingly. Any other characters which may appear are not transferred. The following pages list the values you can use to parameterize the data transmission with the open driver in mode 4 (printer output). Static parameter set You must enter the parameters for the physical layer as well as transmission-specific parameters in the static parameter set. The following table shows you which values you can enter for the static parameter set. C79000-B8576-C191-01 5 - 51 5 Open Driver/Mode 4 CP 544 Table 5.7 Static parameter set 1(open driver, mode 4) Parameter Input Mode 4 Printer output Baud rate1) 300 600 1200 2400 4800 9600 19200 38400 76800 bps bps bps bps bps bps bps 2) bps 3) bps 3) Parity No Odd Even Bits per character 6 bits per character 7 bits per character 8 bits per character Stop bits 1 stop bit 2 stop bits Flow control None XON/XOFF RTS/CTS 1st end identifier 00 xx 2nd end identifier xx Code of first end identifier, no second end identifier Code of first end identifier (range of values 01 to FF) Code of second end identifier (range of values 01 to FF) 1) The total baud rate of 76800 bps must not be exceeded 2) Only with V.24 submodule and RS422-A/485 submodule 3) Only with RS422-A/485 submodule The flow control must be set according to the requirements of your partner. 5 - 52 C79000-B8576-C191-01 CP 544 Open Driver/Mode 4 Table 5.8 Static parameter set 2 (open driver, mode 4) Parameter Input Wait time following Range of values transmission of CR, LF, FF 0 to 2550 ms Lines per page Range of values 1 to 255 (including header/footer lines) Left margin Number of spaces 1 to 255 Spaceholder for page number Representable characters 20H to 7EH Number of header/footer lines Is entered automatically (max. 2) Line terminator/ separator CR LF CR LF Carriage return Line feed Carriage return and line feed Meaning of parameters Mode Version of the possible data transmission modes. Baud rate Data transmission speed, data in bit/s (bps). Parity The parity is either even or odd. To check the parity, the string of information bits is extended by a further bit, the parity bit (0 or 1) which, when added to the information bits produces a selectable parity state. If "No" is set for the parity, the parity bit is set to 1 but not evaluated by the receiver/transmitter. Bits per character Number of data bits used to form a character. Stop bits Duration of the stop bits relative to the time required to transmit an information bit. The stop bits follow each transmitted character in a start/stop transmission. C79000-B8576-C191-01 5 - 53 5 Open Driver/Mode 4 CP 544 Flow control Mechanism which synchronizes the transmission (CPU or partner) and reception (partner or CPU) of data if the data source operates faster than the data sink. Controlling of the data flow using flow control is transparent for the user (with the exception of the required parameter settings). This means that if you use the flow control XON/XOFF (control characters XON=DC1=11H and XOFF=DC3=13H), the useful data must not contain these control characters. If you use flow control RTS/CTS, you must additionally wire the RTS and CTS signals. End identifier The data transmission is terminated by the specified end identifier. The entry NUL is a valid end character in the first end identifier. This ensures that at least one valid end identifier is assigned as standard. The second end identifier is optional and is only effective if the first end identifier is not NUL. The entry NUL in the second end identifier is counted as a non-parameterized end character. Wait times Wait times can be parameterized in the static parameters for output of carriage return (CR), line feed (LF) and form feed (FF). No further characters are output during the selected wait time. CR: control character "Carriage return" LF: control character "Line feed" FF: control character "Form feed", carriage return and paper transport to the start of the next page are executed in the log. 5 - 54 C79000-B8576-C191-01 CP 544 Lines per page Open Driver/Mode 4 The number of lines output is determined from the number of delimiters output. The number of lines per page also includes the header and footer lines. The value for the parameter "Lines per page" must therefore be selected at least one larger than the total number of header lines and footer lines: Lines per page (No. of header lines + No. of footer lines) +1 Left margin The left margin precedes every text, header or footer line in the form of blanks. You must make sure that the total length of a line can be handled by the printer. Spaceholder for page number The page number is printed with a maximum of four digits and can be selected in the header or footer. The defined character must be present as a spaceholder in the header or footer line. The driver replaces this character during the output by the page number with leading zeros. The highest page number that can be printed depends on the number of spaceholders. If the actual page number exceeds this value, the page numbering begins again at 1. The largest page number is therefore 0000! Number of footer and header lines The parameterized value specifies the number of lines for the header or footer. Remember that the number of lines per page also includes the header and footer lines. Line terminator/delimiter The defined delimiter for separating text lines as well as header and footer lines must be contained in the text, header and footer to be output. C79000-B8576-C191-01 5 - 55 5 Open Driver/Mode 4 CP 544 When assigning the end identifier(s) make sure that bits 6 and 7 or bit 7 of the parameterized end identifier(s) are not transmitted for the data transmission with 6 or 7 bits per character. The driver does not insert printer control characters (CR, LF, FF) between individual print jobs. These characters must be present in the text. The control character FF (form feed) present in the text is only output as the control character for form feed to the printer within the header and footer lines. Within the text, the control character FF (form feed) is converted into delimiters. The number of delimiters output depends on the parameter "Lines per page" and the internal line counter. When transmitting data with the open driver, the parameters of the physical layer on the partner must agree with those of the CP 544. Example: The example illustrates how you can parameterize a static parameter set in DB 10 from DW 04 onwards for a printer output. The parameters are transmitted to the CP with the data handling block SEND. The parameters are stored in data block 10 from DW 30 onwards. Note that you must fill the remaining data words according to Section 6.3.8. 5 - 56 C79000-B8576-C191-01 CP 544 Open Driver/Mode 4 DB 10 : 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 66: 78: 79: 80: 92: 104: 105: 106: 118: 119: : KH = 0008; KH = 0002; KH = 0007; KH = 0001; KH = 0001; KH = 0004; KH = 0000; KH = 0000; KH = 0000; KH = 0000; KH = 0000; KH = 0010; KH = 0004; KH = 0000; KH = 0032; KH = 0032; KH = 0064; KH = 0042; KH = 0008; KH = 0023; KH = 0002; KH = 0001; KH = 0003; KH = 070C; KS ='Siemens SIMATIC S5 '; KS =' Date: 01.06.92'; KH = 0D0A; KH = 1B30; KS ='Application example CP 54'; KS = 4 - DR21; Page: ##'; KH = 1B39; KH = 0D0A; KS ='Copyright Siemens AG 199'; KS ='3 '; KH = 0D0A; C79000-B8576-C191-01 Baud rate = 9600 bps Parity = 2 = even Bits per character= 7 Stop bits = 1 Flow control = XON/XOFF Mode = 4 = printer output Reserved Character delay time not required in mode 4 Reserved Reserved Reserved Code of 1st end identifier = 10H (DLE) Code of 2nd end identifier = 04H (EOT) Fixed message length not required Wait time after CR = 50 x 0.01s (=0.5 s) Wait time after LF = 50 x 0.01s (= 0.5 s) Wait time after FF = 100 x 0.01s (= 1 s) Lines per page = 66 Left margin = 8 blanks Spaceholder for page number = "#" Header lines = 2 lines Footer lines = 1 line Delimiter = 3 = CR LF 1st header line with control character: 07 - BEL (bell character) 0C - FF (form feed) Delimiter: 0D 0A - CR LF 2nd header line with control character: 1B 30 - ESC 0 (underlining on) 1B 39 - ESC 9 (underlining off) Delimiter: 0D 0A - CR LF 1st footer line Delimiter: 0D 0A - CR LF 5 - 57 5 Open Driver/Mode 4 CP 544 Protocol definition of open driver in mode 4 The following description is intended to help you if you wish to connect an existing printer using the open driver in mode 4 (printer output). The following aspects are described for transmitting: * * * Structure of the transmitted data frame Restrictions, if any Basic sequence of events. In the sequence of events shown, the bold lines indicate the standard sequence, the thin lines represent the error handling sequence. Transmitting In mode 4, the useful data are transmitted including the end identifier assigned in the static parameter set. The data frame to be transmitted has the following structure: Length of useful data: n bytes 1 n Useful data - length n bytes n+1 n+2 E1 E2 E1: first end identifier E2: second end identifier (if assigned in static parameter set) XON (DC1 = 11H) or XOFF (DC3 = 13H) must not be equal to the end identifier when selecting the flow control with XON/XOFF. Print editing is executed according to the static parameters (wait times, margin, page counter, delimiters and control characters). 5 - 58 C79000-B8576-C191-01 CP 544 Open Driver/Mode 4 Wait for print jobs Print job received BREAK Wait time expired Process print job Characters output with wait time Wait until output buffer is empty 5 Buffer empty Wait after transfer of delimiter Job processed Fig. 5-10 C79000-B8576-C191-01 Transmission sequence in mode 4 5 - 59 Open Driver/Mode 4 5.3.2.5 CP 544 Transmission of Parameters into CP 544 User Memory Once you have assigned parameters to the open driver using COM PP, transmit the parameters which are stored in a file ......ST.S5D into the user memory (internal RAM or RAM submodule) of the CP 544. Proceed as follows: * * * Select the transmission direction in the COM PP form "TRANSFER" and enter the CP interface. Transmit the parameters by pressing the function key "TRANSFER" Restart the CP 544 by pressing the function key "RESTART SI1" or "RESTART SI2". The LED TXD1 (device interface 1) must not subsequently light up red permanently on the front panel of the CP 544. The parameter settings are not correct or are incomplete if this is the case. 5 - 60 C79000-B8576-C191-01 CP 544 5.4 Open Driver Job Tables All data types which can be transmitted are shown in the following tables together with their possible parameter settings in the data handling block and the receive mailbox. Data with respect to the addresses are PLC-dependent and do not always agree in the case of different types of PLC. In particular, you should refer to the documentation specific to the PLCs in the case of absolute addresses. All data types which are generally stored in the partner in a destination DB or DX are permissible as the source. The parameter QLAE (source length) is a number of bytes if the source is organized in bytes (the number of words if not). No message transfer is carried out if 0 is entered. Caution with an odd number of bytes: since the destination area is a DB or DX, only complete words can be stored there. If the partner is a CP 544, this will assign 0 to the right data byte (DR) if it receives an odd number! C79000-B8576-C191-01 5 - 61 5 Open Driver Table 5.8 CP 544 Job table "Send data with open driver" Source, send from PLC 1 Destination, to PLC 2 Data block Parameter settings on DHB in PLC 1 (source) QTYP DBNR QANF QLAE Data block DB 3-255 0-2047 1-2048 Extended DB Data block DX 3-255 0-2047 1-2048 Flags Data block FA Irrelevant 0-255 1-256 Inputs Data block IA Irrelevant 0-127 1-128 Data block QA Irrelevant 0-127 1-128 Data block CA Irrelevant 0-255 1-256 Data block TA Irrelevant 0-255 1-256 Data block PY Irrelevant 0-255 1-256 Outputs Counters Timers I/O 1) 1) 1) These ranges are CPU-dependent. Explanation of abbreviations QTYP DBNR QANF QLAE 5 - 62 Source type Data block number Initial source address Source length C79000-B8576-C191-01 CP 544 Open Driver Parameter settings in the COM PP in PLC 2 (destination) ZTYP Z-DB Z-addr CF permissible DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes DB 3-255 0-255 Yes 5 Explanation of abbreviations ZTYP Z-DB Z-addr CF permissible C79000-B8576-C191-01 Destination type Data block number of destination Initial destination address Coordination flag permissible? 5 - 63 Open Driver CP 544 Source, send from PLC 1 Destination, to PLC 2 Data block Parameter settings on DHB in PLC 1 (source) QTYP DBNR QANF QLAE Extended DB DB 3-255 0-2047 1-2048 Extended DB Extended DB DX 3-255 0-2047 1-2048 Flags Extended DB FA Irrelevant 0-255 1-256 Inputs Extended DB IA Irrelevant 0-127 1-128 Extended DB QA Irrelevant 0-127 1-128 Extended DB CA Irrelevant 0-255 1-256 Extended DB TA Irrelevant 0-255 1-256 Extended DB PY Irrelevant 0-255 1-256 Outputs Counters Timers I/O 1) 1) 1) These ranges are CPU-dependent. Explanation of abbreviations QTYP DBNR QANF QLAE 5 - 64 Source type Data block number Initial source address Source length C79000-B8576-C191-01 CP 544 Open Driver Parameter settings in the COM PP in PLC 2 (destination) ZTYP Z-DB Z-addr CF permissible DX 3-255 0-255 Yes DX 3-255 0-255 Yes DX 3-255 0-255 Yes DX 3-255 0-255 Yes DX 3-255 0-255 Yes DX 3-255 0-255 Yes DX 3-255 0-255 Yes DX 3-255 0-255 Yes 5 Explanation of abbreviations ZTYP Z-DB Z-addr CF permissible C79000-B8576-C191-01 Destination type Data block number of destination Initial destination address Coordination flag permissible? 5 - 65 Open Driver 5.5 CP 544 Example of a Complete Parameter Set 100 data words from data block 20 (DB 20) starting at data word 10 (DW 10) are to be transmitted by the open driver in mode 3 to data block 5 (DB 5) starting at data word 1 (DW 1) in PLC 2. PLC 1 and PLC 2 are each equipped with a CP 544. You require the following for the CPU in PLC 1: * The DHB SEND-DIRECT which triggers the job. The following parameter settings must be made in it: SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE * 0 1 FW12 DB 20 10 100 FY11 The interface number is 0 The job number is 1 The status word is flag word 12 The source is a data block with the No. 20 and initial address 10 100 data words are sent FY 11 is selected for parameterization errors The DHB SEND-ALL which transfers the data from the PLC to the CP. This requires the following parameter settings: SSNR A-NR 0 0 ANZW PAFE FW16 FY19 The interface number is 0 The job number is 0, thus the ALL function is selected The status word is FW 16 FY 19 is selected for parameterization errors The status word (ANZW) of the SEND-ALL job must be different from that with SEND-DIRECT since other information is displayed. 5 - 66 C79000-B8576-C191-01 CP 544 Open Driver You require the following for the CP in PLC 1: * A static parameter set with the following parameters: Mode 3 Baud rate Parity Bits per character Stop bits Flow control Character delay time Fixed message length when receiving Fixed useful data length, unsymmetrical 9600 bps even 8 1 XON/XOFF 100 ms 20 byte You require the following for the CPU in PLC 2: * C79000-B8576-C191-01 The DHB RECEIVE-ALL which receives the data and enters them in the destination DB: SSNR A-NR 0 0 ANZW PAFE FW6 FY4 The interface number is 0 The job number is 0, thus the ALL function is selected The status word is FW 6 FY 4 is selected for parameterization errors 5 - 67 5 Open Driver CP 544 You require the following for the CP in the PLC 2: * The following parameters in the static parameter set: Mode 3 Baud rate Parity Bits per character Stop bits Flow control Character delay time Fixed message length when receiving * Data for the receive mailbox: CPU No. Receive mailbox Coordination flag 5 - 68 Fixed useful data length, unsymmetrical 9600 bps even 8 1 XON/XOFF 100 ms 20 byte 1 DB 5 from DW 1 onwards,, length 100 data words Not used C79000-B8576-C191-01 6 How do you Program the STEP 5 Program? Contents of Chapter 6 6 How do you Program the STEP 5 Program? . . . . . . . . 6.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 4 6.2 Parameters of the Data Handling Blocks . . . . . . . . . . . . . . . . . . . . 6 - 5 6.2.1 Status Word (ANZW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 12 6.2.2 Parameterization Error Byte (PAFE) . . . . . . . . . . . . . . . . . . . . . . . . 6 - 15 6.3 Which Data Handling Blocks can you Call in your STEP 5 Program? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 18 6.3.1 Synchronize CP and CPU (SYNCHRON) . . . . . . . . . . . . . . . . . . . . 6 - 19 6.3.2 6.3.2.1 6.3.2.2 Send Data (SEND). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 20 SEND-DIRECT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 21 SEND-ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 23 6.3.3 Fetch Data (FETCH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 25 6.3.4 6.3.4.1 6.3.4.2 Receive Data (RECEIVE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 27 RECEIVE-DIRECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 28 RECEIVE-ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 28 C79000-B8576-C191-01 6-3 6-1 Contents 6.3.5 Read Data - PSEUDO-READ (FETCH 190 - 199) . . . . . . . . . . . . . 6 - 30 6.3.6 Write Data - PSEUDO-WRITE (SEND 190 - 199) . . . . . . . . . . . . . 6 - 34 6.3.7 Check Job Status (CONTROL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 38 6.3.8 Assign Device Interface Parameters (SEND 189). . . . . . . . . . . . . . 6 - 39 6.3.9 Read Parameters of a Device Interface (RECEIVE 189) . . . . . . . . 6 - 54 6.3.10 Read Error Message Area of SYSTAT (RECEIVE 200) . . . . . . . . . 6 - 55 6.3.11 Delete Error Message Area of SYSTAT (RESET 200) . . . . . . . . . . 6 - 57 6.3.12 Read Complete SYSTAT (RECEIVE 221) . . . . . . . . . . . . . . . . . . . . 6 - 58 6.3.13 Scan Status (RECEIVE 205) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 60 6.3.14 Start Device Interface (SEND 202) . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 61 6.3.15 Stop Device Interface (RESET 202) . . . . . . . . . . . . . . . . . . . . . . . . 6 - 61 6.3.16 Import Mode-specific Static Parameters (SEND 203) . . . . . . . . . . . 6 - 62 6.3.17 Read Hardware Parameters (RECEIVE 204) . . . . . . . . . . . . . . . . . 6 - 63 6.3.18 Set Date and Time (SEND 218) . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 64 6.3.19 Read Date and Time (RECEIVE 218) . . . . . . . . . . . . . . . . . . . . . . . 6 - 67 6.3.20 Read SYSID (RECEIVE 223) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 68 6.4 Multi-processor Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 71 6-2 C79000-B8576-C191-01 CP 544 6 STEP 5 Program How do you Program the STEP 5 Program? Chapters 3 to 5 showed you which data handling blocks you can use for the type of link you have selected - RK 512 computer link, data transmission with the 3964/3964R procedures or open driver. Using the concept of your STEP 5 program for your particular task you can now provide the data handling blocks with their required parameters. You are supported in the process by the job tables in Chapters 3 to 5 and the information in this chapter on the various jobs. The description of the data handling blocks in this manual is intended to provide a better overview. It does not claim to be complete, however. You can find more detailed information in the descriptions of the corresponding data handling blocks. These are available as individual descriptions for the S5-135U and S5-155U. You can find the description of the data handling blocks for the S5-115U in the S5-115U Manual (see references to further reading). To enable better orientation, you are provided here with a summary of the various block numbers of the data handling blocks in the different programmable controllers and of the parameters of the data handling blocks. C79000-B8576-C191-01 6-3 6 STEP 5 Program 6.1 CP 544 Overview The data handling blocks for the CP 544 have the following numbers in the various programmable controllers: Table 6.1 DHB 6-4 Data handling blocks for CP 544 Function S5-115U S5-135U S5-155U SYNCHRON Synchronizes the CP FB 249 FB 125 SENDDIRECT n Starts the send job with job number n FB 244 FB 120 SEND-ALL Transfers the data from the CPU to the CP FB 244 FB 126 or Job No.= 0 FB 120 Job No.= 0 FETCHDIRECT n Starts the FETCH job with job number n FB 246 RECEIVEALL Transmits the data from the FB 245 FB 127 or CP to the CPU Job No.= 0 FB 121 Job No.= 0 RECEIVEDIRECT n Starts the RECEIVE job with job number n FB 245 FB 121 RESET DIRECT n Starts the RESET job with job number n FB 248 FB 124 CONTROL Copies the status of the respective job into the specified status word FB 247 FB 123 FB 122 C79000-B8576-C191-01 CP 544 6.2 STEP 5 Program Parameters of the Data Handling Blocks You specify the following parameters for the data handling blocks: Interface number (page frame number) SSNR Designation Meaning SSNR A-NR ANZW QTYP/ZTYP DBNR QANF/ZANF QLAE/ZLAE PAFE BLGR Interface number (page frame number) Job number Status word Type of data source or data destination Data block number Relative initial address within the area Number of source data or destination data Parameterization error Frame size Each CP in the PLC is assigned one (or several) interface numbers. The interface number of the lowest page of the CP (page number) and the number of pages per device interface (1, 2 or 4) are set using switches on the module. 6 Note The even interface numbers address device interface 1; the odd interface numbers address device interface 2. Parameter Type Format Data (byte) KY Assignment KY= x,y x=0 y = 0-255 x0 y = 0-255 C79000-B8576-C191-01 Direct parameterization Interface number (page number) Indirect parameterization Data word number. The parameters SSNR, A-NR and ANZW (BLGR with SYNCHRON) are stored in the currently opened DB starting at the defined data word. 6-5 STEP 5 Program CP 544 You can use a page number set for the device interface if the CPU sends (SEND) or fetches (FETCH) data; e.g. one page can be assigned to each CPU when using four pages per device interface. This ensures that the corresponding CPU can access the pages at any time. Note In the case of a SEND or FETCH job, the data in the partner CP are always transmitted via the lowest page of a device interface; i.e. the lowest page of the corresponding device interface must be defined as the page number for the corresponding ALL jobs on the partner CPU. PLC 1 CPU 1 PLC 2 CP 544 CP 544 CPU 1 SENDDIRECT RECEIVEALL CPU 2 CPU 2 Page Page 0 CPU 3 2 0 SI1 SI1 4 8 8 CPU 4 Fig. 6-1 2 4 CPU 3 CPU 4 Page assignment with a SEND job The partner CPU which is authorized can fetch data or provide data on the lowest page. 6-6 C79000-B8576-C191-01 CP 544 STEP 5 Program The authorized CPU can be specified separately for each job in the dynamic parameter set in the case of the RK 512. In the case of the 3964/3964R procedures and the open driver, one CPU must be specified for all jobs when defining the receive mailbox. Every CPU can access if a specific CPU is not defined. The data are then processed by the CPU which accesses first, the data are subsequently lost. Interface number with special jobs The ALL jobs for special jobs are executed on all set pages. Job number (A-NR) In the case of data transmission with the RK 512 computer link, every job (SEND/FETCH) is assigned a number which must agree with the number in the corresponding dynamic parameter set of the CP 544. In the case of special jobs, the number is used to define which function is to be executed by the job. Parameter Type Format Data KY (byte) C79000-B8576-C191-01 6 Assignment KY= 0,x x=0 x = 1-223 ALL function (not with FETCH) Direct function Number of job to be executed 6-7 STEP 5 Program Status word ANZW CP 544 You can use this parameter to specify the address of a doubleword in which the status of a particular job is indicated (see also Section 6.2.1). Parameter Type Assignment Format Address W (word) W = xxyyy xx = yyy = Source type (QTYP) or destination type (ZTYP) Address of status word with direct parameterization FW, QW, IW, RS or DW Number (dependent on xx) You can assign ASCII characters to these parameters which specify the type of data source (with SEND) or data destination (with RECEIVE or FETCH). Parameter Type Format Data (character) KS Assignment KS = yy yy = KS = XX QA, AS, RS, DB, DX, IA, FA, PY, TA, CA, OY Direct parameterization: the data on the data source/destination are directly present in the parameters QTYP/ZTYP, DBNR, QANF/ZANF, QLAE/ZLAE. Indirect parameterization: either the parameter set for the data source or destination is present in a data area which is specified using the parameters DBNR and QANF/ZANF. Only DB or DX is permissible with the special job PSEUDO-READ/WRITE, job numbers 190 to 199. 6-8 C79000-B8576-C191-01 CP 544 Data block number (DBNR) STEP 5 Program Here you enter the number of the data block if you have selected DB, DX or XX as the source or destination type, or the High byte of the initial address if you have selected AS or RS. Parameter Initial source address (QANF) or initial destination address (ZANF) Type Format Data (byte) KY Assignment KY= 0,x x = 3-255 Number of data block which contains the data, or the high byte of the initial address In the case of indirect parameterization - assignment of QTYP/ZTYP by XX - you enter the number of the DW here at which the parameter block commences. In the case of direct parameterization, QTYP/ZTYP refers to the defined range. The permissible limits depend on the data type and are listed in the job tables in Sections 3.4 (RK 512), 4.4 (3964/3964R procedures) and 5.4 (open driver). 6 Parameter C79000-B8576-C191-01 Type Format Data (fixedpoint number) KF Assignment KF= x x= See job tables for permissible range 6-9 STEP 5 Program Source length (QLAE) or destination length (ZLAE) CP 544 You enter the number of data to be transmitted here either in bytes or words depending on the data type (e.g. in bytes for flags, in words for data blocks). The permissible range of values also depends on the data type and is indicated in the job tables in the Sections 3.4 (RK 512), 4.4 (3964/3964R procedures) and 5.4 (open driver). Parameter Type Format Data KF (constant) Frame size BLGR KF= x x= See job tables for permissible range This parameter defines the size of the data frame which can be exchanged in one cycle of the DHB between the CPU and CP. It is only relevant to the DHB SYNCHRON. The data transfer time largely depends on the defined frame size. Using the DHB description for your CPU, you must decide which runtimes are applicable for your special application. Note with small frame sizes, i.e. short runtimes, that several data handling block calls are required for the data transfer depending on the amount of data. Parameter 6 - 10 Assignment Type Format Data (bytes) KY Assignment KY= 0,y Frame size y = 0 - 255 C79000-B8576-C191-01 CP 544 Parameterization error byte PAFE STEP 5 Program You use this parameter to specify the address of a byte in which a parameterization error of a particular job is to be indicated (see also Section 6.2.2). Parameter Type Assignment Format Address BY (bytes) BY = xxyy xx = yy = Parameterization error byte Possible areas QA, IA, FA, OY Number of the QA/IA/FA/OY 6 C79000-B8576-C191-01 6 - 11 STEP 5 Program 6.2.1 CP 544 Status Word (ANZW) The status word occupies a double word in the case of the DIRECT jobs SEND-DIRECT, FETCH-DIRECT, RECEIVE-DIRECT: With DIRECT jobs * The first part contains information on the job processing status The second part contains information on the length of the transmitted data. * The meanings of the bits in the first word of the status word of the DIRECT job are shown in the following table. The bits for the job status of the CP may also occur combined. Table 6.2 Meaning of the bits in the first word of the status word 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Job status CP RECEIVE job ready = 1 Job running = 1 Job finished without errors = 1 Job finished with errors = 1 Data management Data export/import running = 1 Data export finished = 1 Data import finished = 1 Data disabling by user = 1/ data enabling = 0 Error number 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 No errors PLC error, identical to PAFE CP error (see also Chapter 8) Vacant 6 - 12 C79000-B8576-C191-01 CP 544 STEP 5 Program SEND-ALL and RECEIVE-ALL enter the length of the data transmitted between the CPU and CP in the second part of the status doubleword. The ALL job adds the current number of data to the number which have already been imported. If several active ALL functions are required in order to execute the DIRECT job, the length value in the second part of the status doubleword grows continuously. You should reserve a separate status doubleword for each DIRECT job. You can use * * the flag area FW 0 to 252 or the data words 0 to 254 in the open data block (DB or DX). In order to guarantee reliable data transfer, it is sufficient if the STEP 5 program evaluates bits 1, 2 and 3 of the ANZW: * * Bit 1 indicates that the job has been accepted by the CP for processing. Renewed triggering of this job is only possible when bit 1 has been reset. Bits 2 and 3 identify that the CP has terminated processing of the associated job. If the job is terminated without an error (bit 2 = 1), you can provide new useful data for the next transmission or process the incoming useful data. An error number is entered in bits 8 to 11 of the ANZW if the job is terminated with an error (bit 3 = 1). Refer to Chapter 8 in this manual for a list of error numbers. Note If the RECEIVE-DIRECT jobs 200, 202, 204, 218 and 221 are parameterized with a length (ZLAE) which is greater than the required length, the value 15H is indicated in the ANZW. C79000-B8576-C191-01 6 - 13 6 STEP 5 Program With ALL jobs CP 544 The status word only occupies one data word or flag word in the ALL jobs RECEIVE-ALL and SEND-ALL. The number of the DIRECT job for which the data transport is carried out is indicated in this ANZW when the ALL function is executed. The value "00H" is entered if no function is executed. The ALL function indicates "FFH" in the ANZW when it is active for a partner job. "DEH" is indicated in the ANZW for the last data transfer if a coordination flag has not been specified for the partner job. The byte number of the coordination flag is indicated in the ANZW for the last data transfer if a coordination flag has been specified for the partner job. This number can only have values from 1 to 223 since it is interpreted by the DHB like a job number. "FFH" is indicated in the ANZW if the number is too high. "00H" is indicated in the ANZW if no function is executed. You can determine whether the partner job has been terminated using the status of the byte number of the coordination flag or the status "DEH" with the last data transfer. You can then use the STEP 5 program * to set the communication flag which corresponds to the coordination flag and either * process the incoming useful data (if the partner issues a SEND job) or * provide new useful data (if the partner issues a FETCH job). The set coordination flag prevents the partner from accessing the data area again. The data area can be accessed again if you reset the communication flag. With CONTROL jobs 6 - 14 Please refer to Section 6.3.7 for the meaning of the ANZW with CONTROL. C79000-B8576-C191-01 CP 544 6.2.2 STEP 5 Program Parameterization Error Byte (PAFE) You must specify a parameterization error byte (PAFE byte) in the data handling blocks. If the DHB detects an error, it writes the associated error number into the PAFE byte. The DHB writes 00H into the PAFE byte if there are no errors. In addition to the errors directly associated with parameterization, the PAFE byte indicates errors originating during communication between the CPU and CP 544. You should immediately eliminate the causes if the mentioned errors occur so that no more error messages result during operation! In certain exceptional cases, errors are signalled in the PAFE byte during operation which have been caused by the response of the CP 544 software in special operating situations: * * * If more than 20 DIRECT jobs are processed in the cycle, i.e. 20 jobs have already been signalled as "running", and you wish to start a 21st job If the STEP 5 program sets the communication flag (which corresponds to the coordination flag) whilst the CP has just received a message for this coordination flag If a SEND or FETCH job is started before the SYNCHRON job has been executed once without errors. You may also obtain a PAFE message in multi-processor mode if several CPUs simultaneously access the same page frame of the CP 544. The access is prevented (with a PAFE message) until the current CPU/CP communication has been terminated. This PAFE message does not indicate an error but identifies the current disabling of the access operation. C79000-B8576-C191-01 6 - 15 6 STEP 5 Program CP 544 The PAFE error messages are listed below. Note that the meaning of the individual error numbers depends on the type of PLC. You should therefore always refer to the instructions of the data handling blocks for your PLC. Table 6.3 PAFE error messages PAFE No. Meaning 6 - 16 11H Incorrect ORG format: source/destination parameter type incorrect, illegal area (initial address, length) 21H DB/DX or memory area does not exist 31H Source/destination area too small 41H Source/destination area does not exist (not equipped) Acknowledgement delay (QVZ) of area 51H Error in status word 61H No source/destination parameter with SEND/RECEIVE-ALL 71H Interface does not exist (QVZ of CP 544) Check the jumper setting for the interface number of the CP 544 81H Interface not ready or not synchronized. Check whether the SYNCRHON DHB is programmed in the restart OB and is being executed without errors 91H Interface overloaded since a program section is currently being transmitted from the PG to the CP 544 A1H CP interface currently occupied by other CPU in multi-processor mode (S5-135U and S5-155U) if several CPUs access one CP interface B1H Job number too large C79000-B8576-C191-01 CP 544 STEP 5 Program STEP 5 Program PAFE No. Meaning C1H Error in handshake (communication) with CP 544: - CP does not reply within monitoring time - CP rejects handshake, e.g. since more than 20 jobs have been triggered simultaneously (with 20 jobs, bit 1 in the ANZW is set to "Job running") - The coordination flag has been set whilst a message for this coordination flag has just been received D1H Frame size (SYNCHRON) faulty and group error for other handshake errors E1H DB call missing with indirect parameterization and group error for software errors of DHBs F1H Double calling of block (with possibility of interruption at command limits) 6 C79000-B8576-C191-01 6 - 17 CP 544 6.3 Which Data Handling Blocks can you Call in your STEP 5 Program? Table 6.1 Jobs for data transmission with the CP 544 Job Data handling block Job number SYNCHRON - No - Send data SEND 0-188 Yes - Fetch data FETCH 1-188 Yes - Synchronize CP and CPU Receive data Entry into Destination queue length in words * RECEIVE 0 Yes - Read data (PSEUDO-READ) FETCH 190-199 Yes - Write data (PSEUDO-WRITE) SEND 190-199 Yes - CONTROL 0-223 No - SEND 189 Yes - Read parameters of a device interface RECEIVE 189 Yes 0 to 2043 Read error message area of SYSTAT RECEIVE 200 No 2 Delete error message area of SYSTAT RESET 200 No - Check job status Parameterize device interface Read complete SYSTAT RECEIVE 221 No 16 Scan status RECEIVE 205 No 1 Start device interface SEND 202 No - Stop device interface RESET 202 No - Import mode-specific static parameters SEND 203 Yes - Read hardware parameters Set time RECEIVE 204 No 16 SEND 218 No - Read time RECEIVE 218 No 5 Read SYSID RECEIVE 223 No 64 * Information only for special jobs 6 - 18 C79000-B8576-C191-01 CP 544 6.3.1 Synchronize CP and CPU (SYNCHRON) Synchronize CP and CPU (SYNCHRON) Synchronize CP and CPU This (SYNCHRON) job synchronizes the interface between the CP and CPU. SYNCHRON must be called in the restart organization blocks of the CPU for each page frame which you use in the two device interfaces of the CP. The frame size for data transfer between the CPU and CP 544 is also set during the synchronization. Multi-processor mode It is sufficient if the SYNCHRON is programmed in the startup organization blocks of a CPU for each page frame which you use. If a SYNCHRON is executed on a page, and if another SYNCHRON is started for this page, it is rejected with error number 12H in the SYSTAT. You should monitor the PAFE byte of the SYNCHRON to ensure that the CPU/CP interface is actually synchronized (see Section 6.2.2 "Parameterization Error Byte"). Parameters C79000-B8576-C191-01 6 Param. Mode Type Meaning SSNR D KY Interface number (page number) BLGR D KY Frame size with data transfer between CP and CPU 0 = 64 bytes (for S5-115U) 256 bytes (for S5-135U/155U) 1 = 16 bytes 2 = 32 bytes 3 = 64 bytes 4 = 128 bytes 5 = 256 bytes 6 = 512 bytes 7 - 254 = see 0 255 = 512 bytes PAFE Q BY Parameterization error status 6 - 19 Send Data (SEND) 6.3.2 CP 544 Send Data (SEND) Send Data (SEND) The SEND job is used to transmit data from the CPU to the CP 544. It has two modes: * SEND-DIRECT (job number 0) The SEND-DIRECT function triggers a specific SEND job defined by the job number. * SEND-ALL (job number = 0) The SEND-ALL function checks whether a "communication request" is present at the interface. If this is so, the source parameters are provided by the CP and the data transfer is carried out. SEND-DIRECT and SEND-ALL are used combined together: 6 - 20 * The SEND-DIRECT DHB is used to trigger a job (depending on the parameter settings of the DHB). * The data of this job are then transferred from the interface to the CP by SEND-ALL. C79000-B8576-C191-01 CP 544 6.3.2.1 Send Data (SEND) SEND-DIRECT If a SEND-DIRECT job is called in the STEP 5 program, it is entered into the internal queue for jobs in the CP 544. Job processing The CP 544 processes an internal queue for each device interface into which up to 20 DIRECT jobs (SEND-DIRECT and FETCH-DIRECT) can be entered. The CP 544 notes the order in which the jobs have been triggered and entered into the queue as well as the associated data handling block parameters and sets bit 1 "Job running" in the status word for each of these jobs. The CP 544 processes the jobs in the order in which they have been entered into the queue. In the case of SEND jobs, the CP 544 subsequently requests the data from the CPU via a SEND-ALL. Once the job has been processed, either bit 2 "Job finished without errors" or bit 3 "Job finished with errors" is set in the status word. If an error occurs, an error number is entered into bits 8 to 11 of the status word and a more exact error number entered into the error message area of the SYSTAT. If 20 jobs have already been entered into the queue, every further job is rejected with error number 7H in the status word, 15H in the error message area of the SYSTAT and C1H in the parameterization error byte. The CPU cannot scan the filling status of the queue. Individual jobs cannot be deleted from the queue. All queue entries are deleted following a cold restart or synchronization of the CP. C79000-B8576-C191-01 6 - 21 6 Send Data (SEND) CP 544 If a job depends on the error-free processing of another job, you must implement this interlocking in your STEP 5 program. Jobs sent by the partner are processed outside the queue. Special jobs are processed directly and not via the queue (SEND 189 and SEND 203 are exceptions). Parameters 6 - 22 The block requires the following parameters for the SEND-DIRECT function: Param. Mode Type Meaning SSNR D KY Interface number A-NR D KY Number of DIRECT job ANZW I W Status word (1 doubleword is occupied) QTYP D KS Data type of source from which the data are sent DBNR D KY Number of data block if the source is a data block or an extended data block QANF D KF Relative initial address of data source QLAE D KF Number of data units (words or bytes) to be sent PAFE Q BY Parameterization error status C79000-B8576-C191-01 CP 544 6.3.2.2 Send Data (SEND) SEND-ALL When transmitting data, a SEND-ALL must be called in addition to a SEND-DIRECT. The SEND-DIRECT data handling block first triggers a job on the CP 544. The CP 544 stores the source parameters of the SEND-DIRECT in the process and passes on an ALL request to the CPU, also informing the CPU of the desired data source. The SEND-ALL then transmits the data from the CPU (source) to the dual-port RAM of the CP 544. With larger quantities of data, it may be necessary to use several ALL functions in order to transport the data. Note SEND-ALL jobs must always be called cyclically in the user program so that the triggered DIRECT job can also be processed completely. The source parameters which you must define with SEND-DIRECT are irrelevant with SEND-ALL; you can enter any values here. If your STEP 5 program results in a long cycle time, it may be advisable to call SEND-ALL several times per cycle since the actual data transmission on the path only commences when the SEND-ALL has transmitted all data into the CP memory. If you call SEND-ALL several times, the time from triggering the job up to commencement of the transmission on the path is greatly reduced in the case of a data quantity which is larger than the set frame size. SEND-ALL jobs only extend the cycle time if useful data are actually transmitted. C79000-B8576-C191-01 6 - 23 6 Send Data (SEND) Parameters 6 - 24 CP 544 The block requires the following parameters for the SEND-DIRECT function: Param. Mode Type Meaning SSNR D KY Interface number A-NR D KY Job number ANZW I W Status word, a doubleword is occupied (see also Section 6.2.1) PAFE Q BY Parameterization error status C79000-B8576-C191-01 CP 544 6.3.3 Fetch Data (FETCH) Fetch Data (FETCH) Fetch Data (FETCH) The FETCH job is only used for data transmission with the RK 152 computer link. This data handling block only recognizes the operating mode * FETCH-DIRECT A job with the same number must be stored in the dynamic parameter set on the CP 544 for each FETCH-DIRECT job (apart from the special jobs) which you program in the STEP 5 program. If a FETCH-DIRECT job is called in the STEP 5 program, it is entered into the internal queue for jobs in the CP 544. Job processing The CP 544 processes an internal queue for each device interface into which up to 20 DIRECT jobs (FETCH-DIRECT and SEND-DIRECT) can be entered. The CP 544 notes the order in which the jobs have been triggered and entered into the queue as well as the associated data handling block parameters and sets bit 1 "Job running" in the status word for each of these jobs. The CP 544 processes the jobs in the order in which they have been entered into the queue. If 20 jobs have already been entered into the queue, every further job is rejected with error number 7H in the status word and 15H in the error message area of the SYSTAT. C79000-B8576-C191-01 6 - 25 6 Fetch Data (FETCH) CP 544 The CPU cannot scan the filling status of the queue. Individual jobs cannot be deleted from the queue. All queue entries are deleted following a cold restart or synchronization of the CP. If a job depends on the error-free processing of another job, you must implement this interlocking in your STEP 5 program. Jobs sent by the partner are processed outside the queue. Parameters 6 - 26 The block requires the following parameters for the FETCH-DIRECT function: Param. Mode Type Meaning SSNR D KY Interface number A-NR D KY Job number ANZW I W Status word ZTYP D KS Data type of destination into which the data to be imported from the interface are stored DBNR D KY Number of data block if the destination is a data block or an extended data block ZANF D KF Relative initial address of data destination ZLAE D KF Number of data words to be imported PAFE Q BY Parameterization error status C79000-B8576-C191-01 CP 544 6.3.4 Receive Data (RECEIVE) Receive Data (RECEIVE) Receive Data (RECEIVE) The RECEIVE job is used to transmit data and parameters from the interface to the CPU. The data handling block recognizes the two operating modes: * RECEIVE-DIRECT (job number 0) The RECEIVE-DIRECT function carries out a specific RECEIVE job (special job) defined by the job number. * RECEIVE-ALL (job number = 0) The RECEIVE-ALL function checks whether a "communication request" is present at the interface. If this is so, the source parameters are provided by the CP and the CPU fetches the data from the CP. RECEIVE-DIRECT and RECEIVE-ALL are used together if the interface parameters are to be read (RECEIVE 189). In this case a RECEIVE-DIRECT triggers the job, the job is entered into the queue, and the CP 544 automatically delivers the individual data blocks to the RECEIVE-ALL once the job has been read out of the queue. C79000-B8576-C191-01 6 - 27 6 Receive Data (RECEIVE) 6.3.4.1 CP 544 RECEIVE-DIRECT The RECEIVE-DIRECT data handling block is used for special jobs. Special jobs are processed directly and not via the queue (RECEIVE 189 is an exception). Parameters 6.3.4.2 The block requires the following parameters for the RECEIVE-DIRECT function: Param. Mode Type Meaning SSNR D KY Interface number A-NR D KY Job number ANZW I W Status word ZTYP D KS Data type of destination into which the data to be imported from the interface are stored DBNR D KY Number of data block if the destination is a data block or an extended data block ZANF D KF Relative initial address of data destination ZLAE D KF Number of data units (words or bytes) to be imported PAFE Q BY Parameterization error status RECEIVE-ALL A FETCH-DIRECT or RECEIVE 189 data handling block first triggers a job on the CP 544. The CP 544 stores the destination parameters and passes on an ALL request to the CPU, also informing the CPU of the required data destination. The RECEIVE-ALL then transmits the requested data from the dual-port RAM of the CP 544 to the CPU (destination). With larger quantities of data, it may be necessary to use several ALL calls in order to transport the data. 6 - 28 C79000-B8576-C191-01 CP 544 Receive Data (RECEIVE) Note RECEIVE-ALL jobs must always be called cyclically in the user program so that the triggered DIRECT job can also be processed completely. The destination parameters which you must define with FETCH-DIRECT are irrelevant with RECEIVE-ALL; you can enter any values here. If your STEP 5 program results in a long cycle time, it is advisable to call RECEIVE-ALL several times per cycle in order to achieve a faster data transmission. RECEIVE-ALL calls only extend the cycle time if useful data are actually transmitted. RECEIVE-ALL in partner jobs RECEIVE-ALL not only transports data with jobs associated with its own CPU but also if the partner sends data on its own initiative. A message sent by the partner is analyzed by the respective type of coupling on the CP 544. If this establishes that the partner wishes to send data, it extracts the source parameters present in the message header. The CP sends an ALL request to the CPU to transmit the useful data, and the RECEIVE-ALL DHB carries out the data transfer between the dual-port RAM and the CPU. Parameters C79000-B8576-C191-01 The block requires the following parameters for the RECEIVE-ALL function: Param. Mode Type Meaning SSNR D KY Interface number A-NR D KY Job number ANZW I W Status word (see also Section 6.2.1) PAFE Q BY Parameterization error status 6 - 29 6 Read Data - PSEUDO-READ (FETCH 190 - 199) 6.3.5 CP 544 Read Data - PSEUDO-READ (FETCH 190 - 199) Read Data - PSEUDO-READ The special (FETCH job PSEUDO-READ 190 - 199) can only be used for data transmission with the RK 512 computer link. It is used for the indirect assignment of the source and destination parameters. A PSEUDO-READ/WRITE function is implemented in the CP 544 which is largely based on the function and format of the known R/W function (see description of data handling block). This function enables you to: * * * Modify the source and/or destination data of a job during the program sequence Program this job without COM PP Specify a coordination flag and the CPU number. All parameters for the source and destination are stored in a data block (DB) or extended data block (DX). The job numbers 190 to 199 are reserved for the PSEUDO-READ/ WRITE function. FETCH-DIRECT 190 to FETCH-DIRECT 199 You can start a FETCH job with the PSEUDO-READ function using one of the following data handling blocks: FETCH-DIRECT 190 to FETCH-DIRECT 199. A PSEUDO-READ job is entered into the internal queue for jobs in the CP 544 if it is called in the STEP 5 program. As with the SEND job, the CP fetches the specified data block using SEND-ALL and evaluates the source/destination parameters. If these are within the permissible limits, the FETCH message is subsequently sent to the partner. The RECEIVE-ALL DHB enters the data into the defined destination once they have been received from the partner. 6 - 30 C79000-B8576-C191-01 CP 544 Read Data - PSEUDO-READ (FETCH 190 - 199) In contrast to normal DIRECT jobs, an additional data transfer between the CPU and CP is required with the PSEUDO-READ function. This data transfer is carried out via the SEND-ALL DHB which transfers the source/destination parameters to the CP 544. PLC 1 CPU PLC 2 CP 544 CP 544 CPU FETCH Job No. 190 to 199 SENDALL Job No. 0 RECEIVEALL T R I G G E R P a r a m e t e r DT RK 512 RK 512 6 DT Job No. 0 SENDALL Job No. 0 DT DT Data destination DT Data source DT = data transfer Fig. 6-2 C79000-B8576-C191-01 READ function of the SEND-DIRECT 190 to 199 6 - 31 Read Data - PSEUDO-READ (FETCH 190 - 199) CP 544 The format of the data block with the destination parameters is shown below (parameter data block for FETCH-DIRECT 190 to FETCH-DIRECT 199). The data are stored relative to the initial address ZANF which is specified on the data handling block. ZANF + 6 - 32 0: KS= xx Source type (in partner device) xx = DB, DX, CA, TA, RS, AS, FA, QA, IA, PY, OY not: XX, RW, NN 1: KY= 0, y; Number of source data block y = 3 to 255 with source type DB/DX Irrelevant with other source types 2: KF= x; Initial source address x = dependent on source type and PLC type (see job tables in Section 3.4) 3: KF= x; (Source length) Irrelevant! x = don't care 4: KS= xx 5: KY= 0, y; Number of destination data block y = 3 to 255 with source type DB/DX Irrelevant with other destination types 6: KF= x; Initial destination address x = dependent on destination type and PLC type (see job tables in Section 3.4) 7: KF= x; Destination length x = dependent on source type and PLC type (see job tables in Section 3.4) 8: KY= x, y; Coordination flag (dependent on source type) x = 0 to 223: byte number y = 0 to 7: bit number No coordination flag: x = 255, y = 255 9: KF= x; CPU No. of partner x = 1 to 4 or x = 0 with PLC with only one CPU Destination type (in own PLC) xx = DB, RS, AS, DX, dependent on source type (see job tables in Section 3.4) C79000-B8576-C191-01 CP 544 Read Data - PSEUDO-READ (FETCH 190 - 199) You can obtain detailed information on the transmission possibilities from the job tables in Section 3.4 (RK 512). The data destination is in the own PLC for FETCH-DIRECT 190 to 199. Therefore the data on the length ZLAE in the parameter data block are decisive. The data in the parameter QLAE are not evaluated. All parameters for the data source refer to the partner device. The jobs FETCH-DIRECT 190 to 199 are called in the STEP 5 program like "normal" jobs using e.g. "JU". You enter your data block with the parameters for the data on the block: ZTYP, DB No., ZANF and ZLAE. Therefore the data for QLAE are irrelevant. The PSEUDO-READ/WRITE jobs can be called mixed together in any manner with normal SEND and FETCH jobs provided not more than 10 PSEUDO-R/W jobs are signalled as "running" simultaneously per page. The triggers must be mutually interlocked if more than 10 jobs are called. Since each job number can only be assigned once, it is not possible, for example, to simultaneously activate a SEND-DIRECT 190 and a FETCH-DIRECT 190. If the job SEND-DIRECT 190 is set to "running" in the status word, a further job with the number 190 (e.g. FETCH 190) can only be started when SEND-DIRECT 190 is "finished", with or without errors. C79000-B8576-C191-01 6 - 33 6 Write Data - PSEUDO-WRITE (SEND 190 - 199) 6.3.6 CP 544 Write Data - PSEUDO-WRITE (SEND 190 - 199) Write Data - PSEUDO-WRITE The special (SEND job PSEUDO-WRITE 190 - 199) is used for indirect setting of the source and destination parameters. A PSEUDO-READ/WRITE function is implemented in the CP 544 which is largely based on the function and format of the known R/W function (see description of data handling block). This function enables you to: * * * Modify the source and/or destination data of a job during the program sequence Program this job without COM PP Specify a coordination flag and the CPU number. All parameters for the source and destination are stored in a data block (DB) or extended data block (DX). The job numbers 190 to 199 are reserved for the PSEUDO-READ/WRITE function. SEND-DIRECT 190 to SEND-DIRECT 199 You can start a SEND job with the PSEUDO-WRITE function using one of the following data handling blocks: SEND-DIRECT 190 to SEND-DIRECT 199. The PSEUDO-WRITE job is entered into the internal job queue of the CP 544 like other DIRECT jobs. 6 - 34 C79000-B8576-C191-01 CP 544 Write Data - PSEUDO-WRITE (SEND 190 - 199) Once processing has commenced, the CP 544 requests the parameterized data block (or extended data block) via the SEND-ALL DHB and checks the source and destination parameters present in it. If these are within the permissible limits, the CP 544 requests the first source data via a further SEND-ALL DHB and handles the SEND job in the usual manner. PLC 1 CPU PLC 2 CP 544 SEND Job No. 190 to 199 CPU CP 544 T R I G G E R 6 DT RK 512 SENDALL RK 512 Parameter Job No. 0 DT RECEIVEALL Job No. 0 DT DT Data source DT Data destination DT = data transfer Fig. 6-3 C79000-B8576-C191-01 WRITE function of the SEND-DIRECT 190 to 199 6 - 35 Write Data - PSEUDO-WRITE (SEND 190 - 199) CP 544 The format of the data block with the source parameters is shown below (parameter data block for SEND-DIRECT 190 to SEND-DIRECT 199). The data are stored relative to the initial address QANF which is specified on the data handling block. QANF + 6 - 36 0: KS= xx Source type (in own PLC) xx = DB, DX, CA, TA, RS, AS, FA, QA, IA, PY, OY not: XX, RW, NN 1: KY= 0, y; Number of source data block y = 3 to 255 with source type DB/DX Irrelevant with other source types 2: KF= x; Initial source address x = dependent on source type and PLC type (see job tables in Section 3.4) 3: KF= x; Source length x = dependent on source type and PLC type (see job tables in Section 3.4) 4: KS= xx 5: KY= 0, y; Number of destination data block y = 3 to 255 with source type DB/DX Irrelevant with other destination types 6: KF= x; Initial destination address x = dependent on destination type and PLC type (see job tables in Section 3.4) 7: KF= x; (Destination length) Irrelevant! x = don't care 8: KY= x, y; Coordination flag (dependent on source type) x = 0 to 223: byte number y = 0 to 7: bit number No coordination flag: x = 255, y = 255 9: KF= x; CPU No. of partner x = 1 to 4 or x = 0 with PLC with only one CPU Destination type (in partner device) xx = DB, RS, AS, DS, dependent on source type (see job tables in Section 3.4) C79000-B8576-C191-01 CP 544 Write Data - PSEUDO-WRITE (SEND 190 - 199) You can obtain detailed information on the transmission possibilities from the job tables in Section 3.4 (RK 512). The data source is in the own PLC for SEND-DIRECT 190 to 199. The source length must be entered in the parameter data block (enter this in bytes if the QTYP is a byte area). The data for the parameter "Destination length" are irrelevant. All parameters for the data destination refer to the partner device. The jobs SEND-DIRECT 190 to 199 are called in the STEP 5 program like "normal" jobs using e.g. "JU". You enter your data block with the WRITE parameters for the data on the block: QTYP, DB No., QANF and QLAE. Therefore the data for the parameter "Destination length" are irrelevant. The PSEUDO-READ/WRITE jobs can be called mixed together in any manner with normal SEND and FETCH jobs provided not more than 10 PSEUDO-R/W jobs are signalled as "running" simultaneously per page. The triggers must be mutually interlocked if more than 10 jobs are called. Since each job number can only be assigned once, it is not possible, for example, to simultaneously activate a SEND-DIRECT 190 and a FETCH-DIRECT 190. If the job SEND-DIRECT 190 is set to "running" in the status word, a further job with the number 190 (e.g. FETCH 190) can only be started when SEND-DIRECT 190 is "finished", with or without errors. C79000-B8576-C191-01 6 - 37 6 Check Job Status (CONTROL) 6.3.7 CP 544 Check Job Status (CONTROL) Check Job Status (CONTROL) The CONTROL job copies the status of the respective job into the defined status word. The job status provides information on the processing states of the jobs. The data handling block can be called at any position in the program. It has the following two modes: * * Parameters 6 - 38 CONTROL-ALL (job number = 0) In the Low byte of the status word ANZW, the CONTROL-ALL function indicates which job is currently being processed by the CP 544. 0 is indicated in the low byte of the ANZW during processing of a partner job. The byte number of the coordination flag is indicated if it is the last data transfer, or DEH is indicated if you are working without coordination flags. CONTROL-DIRECT (job number 0) A job status exists in the interface for each job. It is handled by the interface and indicates whether a job is (still) running or if it has been terminated without an error or with a specific error. The CONTROL-DIRECT function transfers the job status selected by the parameter A-NR into the status word. The block requires the following parameters: Param. Mode Type Meaning SSNR D KY Interface number A-NR D KY Number of job to be monitored ANZW I W Status word: this contains the result of the scan PAFE Q BY Parameterization error status C79000-B8576-C191-01 CP 544 6.3.8 Assign Device Interface Parameters (SEND 189) Assign Device Interface Parameters (SEND 189) You can also assign parameters to the device interfaces of the CP 544 using the special job Assign Device Interface Parameters (SEND 189) * SEND-DIRECT 189 SEND-DIRECT 189 You must assign the parameters for each device interface separately. The device interface is indirectly defined by the fixed assignment between page frame number and device interface. You must store the configured data sets in a data block for each device interface. The data blocks can then be transferred to the CP using the job SEND-DIRECT 189. The following tables list the values with which you can parameterize the types of coupling, and how you must configure the data blocks used for this. All numbers are represented in hexadecimal notation. Note that you must additionally call a SEND-ALL block in order to transmit the parameterization data block. The SEND-DIRECT 189 is entered into the queue. The queue is deleted once the job has been executed, and the device interface switched to passive. Following successful parameter assignment ("Job completed without errors" is indicated in the status word), you can restart the device interface using the special job SEND-DIRECT 202. You can transmit data via this device interface as soon as this job has also been completed without errors. Chapters 3 to 5 describe the parameters for the individual coupling types in detail. C79000-B8576-C191-01 6 - 39 6 Assign Device Interface Parameters (SEND 189) Generating the parameter blocks CP 544 You can generate the parameter blocks either using the following parameter tables or using COM PP. Proceed as follows if you wish to generate the parameter blocks using COM PP: * * * Generate parameters for both device interfaces using COM PP Leave COM PP and call the program for the CPU using the STEP 5 package LAD/CSF/STL Transfer the DX1 and DX2 to the program for the CPU in succession using the transfer function. Please note that you must change the names of the destination blocks when transferring the parameter blocks, since blocks DX1 and DX2 are reserved in the CPU for special functions. Example: TRANSFER SOURCE: B: CP EXAMPLE BLOCK: DX1 TO DESTINATION: FD BLOCK: DB11 Note You must select the length of the parameter block such that all data relevant to the special link type can be transmitted. Thus you must transfer at least 41 data words for the 3964/3964R procedures. The remaining data words are automatically set to 0000 by the CP. 6 - 40 C79000-B8576-C191-01 CP 544 Assign Device Interface Parameters (SEND 189) Parameter sets for data transmission with the RK 512 computer link * * * * Data words 0 to 19 contain the link type and the pointers to all required parameters and parameter sets. Data words 30 to 40 contain the static parameter set. Data words 600 to 699 contain a comment field. Data words 700 to 1263 contain the dynamic parameter sets. Note Please note that all data words which are not used must be set to 0000. Data words 37 to 40 are only evaluated if you have entered 0003 or 0004 as the mode. 6 The standard values for modes 0001 and 0002 are: Mode 0001 C79000-B8576-C191-01 Mode 0002 Character delay time 220 ms 220 ms Acknowledgement delay time 550 ms 2000 ms Number of connection attempts 6 6 Number of repetitions 6 6 6 - 41 Assign Device Interface Parameters (SEND 189) Table 6.2 CP 544 Parameterization of RK 512 computer link without COM PP Parameter DW Range of Meaning values 0 4D41 Master 1 534B Slave 2 5331 or 5332 Interface SI1 or SI2 Link type 3 0020 RK 512 computer link Pointer to static parameter set 4 5801 or 5802 DX No. 1 or DX No. 2 5 001E DW No. 1E (30 decimal) onwards 6 5801 or 5802 or 0000 DX No. 1 or DX No. 2 If the CP 544 only receives 7 02BC or 0000 From DW No. 2BC (700 decimal) onwards If the CP 544 only receives 829 0000 Not used Baud rate 30 0003 0004 0005 0006 0007 0008 0009 000A 000B Parity 31 0000 0001 0002 No Odd Even Bits per character 32 0008 8 bits per character Stop bits 33 0001 0003 1 stop bit 2 stop bits Pointer to dynamic parameter sets 6 - 42 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps (only with V.24/RS422-A/485 module) 38400 bps (only with RS422-A/485 module) 76800 bps* (only with RS422-A/485 module) (* maximum total baud rate 76800) C79000-B8576-C191-01 CP 544 Assign Device Interface Parameters (SEND 189) Parameter DW Range Input of values - 34 0000 Not used 1 2 3 4 35 0001 0002 0003 0004 RK 512 RK 512 RK 512 RK 512 Priority 36 0000 0001 Low High Character delay time1) 37 0001 to FFFF Acknowledgement delay time1) 38 0001 to FFFF Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Number of 39 connection attempts 0001 to 00FF Number (range of values 1 to 255) Number of repetitions 0001 to 00FF Number (range of values 1 to 255) Mode Mode Mode Mode 40 600 ff. 1) with 3964 procedure with default values with 3964R procedure with default values with 3964 procedure and selectable values with 3964R procedure and selectable values Comment field (max. 180 characters) 6 Please observe the smallest permissible values depending on the baud rate (see Table "Acknowledgement delay time" in Section 3.3.2.1) C79000-B8576-C191-01 6 - 43 Assign Device Interface Parameters (SEND 189) Job No. DW 1 CP 544 Parameter Meaning SEND/FETCH job with job number 1 under RK 512 computer link 700 41xx or 45xx SEND job FETCH job xx Type of data to be transmitted: 44 45 4D 5A 53 58 41 50 54 42 Extended DB Output bytes I/O bytes Timers System addresses 701 xxyy Data destination No./data source No. xx, starting at DW No. yy 702 xxyz xx y z 2 Data block Input bytes Flag bytes Counters Absolute addresses Byte number of coordination flag1) Range of values 00 to EF (0 to 223) CPU number Range of values 1 to 4 (or 0,F)2) Bit number of coordination flag Range of values 0 to 7 or F3) SEND/FETCH job with job number 2 703 704 705 . . 188 . . . . SEND/FETCH job with job number 188 1261 1262 1263 1) You must enter the value FFH if you do not define a coordination flag, otherwise the job will be terminated with an error. 2) The CPU number of the partner is only relevant if you exchange data with several CPUs via a CP 544, CP 525 or CP 524 with a multi-processor PLC (S5-135U, S5-155U) 0H is present here if you enter a coordination flag but not a CPU. FH is present here if you do not enter a CPU or a coordination flag. All CPUs are possible in the partner in both cases. 3) FH is present here if you do not enter a coordination flag. 6 - 44 C79000-B8576-C191-01 CP 544 Assign Device Interface Parameters (SEND 189) Parameter sets for data transmission with the 3964 and 3964R procedures * * * Data words 0 to 19 contain the link type and the pointers to all required parameters and parameter sets. Data words 30 to 40 contain the static parameter set. Data words 600 to 699 contain a comment field. Note Please note that all data words which are not used must be set to 0000. Data words 37 to 40 are only evaluated if you have entered 0003 or 0004 as the mode. The standard values for modes 0001 and 0002 are: Mode 0001 C79000-B8576-C191-01 Mode 0002 6 Character delay time 220 ms 220 ms Acknowledgement delay time 550 ms 2000 ms Number of connection attempts 6 6 Number of repetitions 6 6 6 - 45 Assign Device Interface Parameters (SEND 189) Table 6.3 Parameterization of 3964/3964R procedures without COM PP Parameter Link type DW Range of values 0 4D41 Master 1 534B Slave 2 5331/5332 Interface SI1/SI2 3 0031 Data transmission with 3964/3964R 5801 or 5802 DX No. 1 or DX No. 2 5 001E DW No. 1E (30 decimal) onwards 6 - 10 0000 Not used 11 44xx or 58xx or 0000 DB No. xx or DX No. xx If CP 544 does not receive any data 12 xxxx or 0000 DW No. xx onwards If CP 544 does not receive any data 13 xxxx or 0000 Length of receive mailbox in words (range of values 0002 to 0801) If CP 544 does not receive any data 14 4Dxx 0000 Flag byte xx If a communication flag is not used 15 00xy CPU No. x (range of values 1 to 4, 0 and F)1) Communication flag bit y (range of values 0 to 7 or F)2) 4 Pointer to static parameter set Pointer to receive mailbox Communication flag, CPU No. 16 - 19 0000 Meaning Not used 1) The CPU number is only relevant if the CP 544 in a multi-processor PLC (S5-135U/S5-155U) exchanges data with several CPUs. 0H is present here if you enter a coordination flag but not a CPU. FH is present here if you do not enter a CPU or a coordination flag. All CPUs are possible in both cases. 2) FH is present here if you do not enter a coordination flag. 6 - 46 CP 544 C79000-B8576-C191-01 CP 544 Assign Device Interface Parameters (SEND 189) Parameter DW Range Input of values Baud rate 30 0003 0004 0005 0006 0007 0008 0009 000A 000B Parity 31 0000 0001 0002 No Odd Even Bits per character 32 0006 0007 0008 6 bits per character 7 bits per character 8 bits per character Stop bits 33 0001 0003 1 stop bit 2 stop bits - 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps (only with V.24/RS422-A/485 module) 38400 bps (only with RS422-A/485 module) 76800 bps* (only with RS422-A/485 module) (* maximum total baud rate 76800) 34 0000 Not used 1 2 3 4 35 0001 0002 0003 0004 Priority 36 0000 0001 3964 procedure with default values 3964R procedure with default values 3964 procedure and selectable values 3964R procedure and selectable values Low High Character delay time1) 37 0001 to FFFF Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Acknowledgement delay time1) 38 0001 to FFFF Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Number of connection attempts 39 0001 to 00FF Number (range of values 1 to 255) Number of repetitions 40 0001 to 00FF Number (range of values 1 to 255) Mode Mode Mode Mode 600 ff. 1) 6 Comment field (max. 180 characters) Please observe the smallest permissible values depending on the baud rate (see Table "Acknowledgement delay time" in Section 3.3.2.1) C79000-B8576-C191-01 6 - 47 Assign Device Interface Parameters (SEND 189) CP 544 Parameter sets for data transmission with the open driver * * * Data words 0 to 19 contain the link type and the pointers to all required parameters and parameter sets. Data words 30 to 40 contain the static parameter set. Data words 600 to 699 contain a comment field. Note Please note that all data words which are not used must be set to 0000. Data words 0 to 19 are the same for all four data transmission modes with an open driver. 6 - 48 C79000-B8576-C191-01 CP 544 Table 6.4 Assign Device Interface Parameters (SEND 189) Parameterization of open driver without COM PP Parameter DW Range of values Meaning 0 4D41 Master 1 534B Slave 2 5331/5332 Interface SI1/SI2 Link type 3 0030 Data transmission with open driver Pointer to static parameter set 4 5801 or 5802 DX No. 1 or DX No. 2 5 001E DW No. 1E (30 decimal) onwards 6 - 10 0000 Not used Pointer to 11 receive mailbox 44xx or 58xx or 0000 DB No. xx or DX No. xx If CP 544 does not receive any data 12 xxxx or 0000 DW No. xx onwards If CP 544 does not receive any data 13 xxxx or 0000 Length of receive mailbox in words (range of values 0002 to 0801) If CP 544 does not receive any data 14 4Dxx 0000 Flag byte xx If a coordination flag is not used 15 00xy CPU No. x (range of values 1 to 4, 0 and F)1) Communication flag bit y (range of values 0 to 7 or F)2) Communication flag, CPU No. 16 - 19 0000 Not used 1) The CPU number is only relevant if the CP 544 in a multi-processor PLC (S5-135U/S5-155U) exchanges data with several CPUs. 0H is present here if you enter a coordination flag but not a CPU. FH is present here if you do not enter a CPU or a coordination flag. 2) FH is present here if you do not enter a coordination flag. C79000-B8576-C191-01 6 6 - 49 Assign Device Interface Parameters (SEND 189) CP 544 Static parameter set for mode 1 Parameter DW Range Input of values Baud rate 30 0003 0004 0005 0006 0007 0008 0009 000A 000B Parity 31 0000 0001 0002 No Odd Even Bits per character 32 0006 0007 0008 6 bits per character 7 bits per character 8 bits per character Stop bits 33 0001 0003 1 stop bit 2 stop bits Flow control 34 0000 0001 0002 None XON/XOFF RTS/CTS Mode 1 35 0001 Fixed useful data length (character delay time) 36 0000 Not used 37 0001 to FFFF Monitoring time 0.01 s to 655.35 s (steps: 10 ms) Character delay time1) 1) 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps (only with V.24/RS422-A/485 module) 38400 bps (only with RS422-A/485 module) 76800 bps* (only with RS422-A/485 module) (* maximum total baud rate 76800) 38 - 40 0000 Not used 600 ff. Comment field (max. 180 characters) Please observe the smallest permissible values depending on the baud rate (see Table "Acknowledgement delay time" in Section 3.3.2.1) 6 - 50 C79000-B8576-C191-01 CP 544 Assign Device Interface Parameters (SEND 189) Static parameter set for mode 2 Parameter DW Range Input of values Baud rate 30 0003 0004 0005 0006 0007 0008 0009 000A 000B Parity 31 0000 0001 0002 No Odd Even Bits per character 32 0006 0007 0008 6 bits per character 7 bits per character 8 bits per character Stop bits 33 0001 0003 1 stop bit 2 stop bits Flow control 34 0000 0001 0002 None XON/XOFF RTS/CTS Mode 2 35 0002 Variable useful data length (end character) Character delay time1) 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps (only with V.24/RS422-A/485 module) 38400 bps (only with RS422-A/485 module) 76800 bps* (only with RS422-A/485 module) (* maximum total baud rate 76800) 36 0000 Not used 37 0001 to FFFF Monitoring time 0.01 s to 655.35 s (steps: 10 ms) 38 - 40 0000 Not used 1st end code 41 0000 00xx 1st end code, no 2nd end code 1st end code (range of values 01-FF) 2nd end code 42 0000 00xx No 2nd end code 2nd end code (range of values 01-FF) 600 ff. 1) 6 Comment field (max. 180 characters) Please observe the smallest permissible values depending on the baud rate (see Table "Acknowledgement delay time" in Section 3.3.2.1) C79000-B8576-C191-01 6 - 51 Assign Device Interface Parameters (SEND 189) CP 544 Static parameter set for mode 3 Parameter DW Range Input of values Baud rate 30 0003 0004 0005 0006 0007 0008 0009 000A 000B Parity 31 0000 0001 0002 No Odd Even Bits per character 32 0006 0007 0008 6 bits per character 7 bits per character 8 bits per character Stop bits 33 0001 0003 1 stop bit 2 stop bits Flow control 34 0000 0001 0002 None XON/XOFF RTS/CTS Mode 3 35 0003 Fixed useful data length, unsymmetrical Character delay time1) Fixed message length on reception 36 0000 Not used 37 0001 to FFFF Monitoring time 0.01 s to 655.35 s (steps: 10 ms) 38 - 42 0000 Not used 43 Message length in bytes 600 ff. 1) 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps (only with V.24/RS422-A/485 module) 38400 bps (only with RS422-A/485 module) 76800 bps* (only with RS422-A/485 module) (* maximum total baud rate 76800) 0001 to 1000 Comment field (max. 180 characters) Please observe the smallest permissible values depending on the baud rate (see Table "Acknowledgement delay time" in Section 3.3.2.1) 6 - 52 C79000-B8576-C191-01 CP 544 Assign Device Interface Parameters (SEND 189) Static parameter set for mode 4 Parameter DW Baud rate 30 Parity 31 Bits per character 32 Stop bits 33 Flow control 34 Mode 4 1st end code 35 36-40 41 2nd end code 42 Range of values 0003 0004 0005 0006 0007 0008 0009 000A 000B Input 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps 19200 bps (only with V.24/RS422-A/485 module) 38400 bps (only with RS422-A/485 module) 76800 bps* (only with RS422-A/485 module) (* maximum total baud rate 76800) No Odd Even 6 bits per character 7 bits per character 8 bits per character 1 stop bit 2 stop bits None XON/XOFF RTS/CTS Printer output Not used 1st end code, no 2nd end code 1st end code (range of values 01-FF) No 2nd end code 2nd end code (range of values 01-FF) Not used Range of values 0 to 2550 ms 43 Waiting time following 44 transmission of CR Waiting time following 45 transmission of LF 0000 0001 0002 0006 0007 0008 0001 0003 0000 0001 0002 0004 0000 0000 00xx 0000 00xx 0000 0000 to 00FF 0000 to 00FF Waiting time following 46 transmission of FF 0000 to 00FF Range of values 0 to 2550 ms Lines per page 0000 to 00FF Range of values 1 to 255 (including header/footer lines) C79000-B8576-C191-01 47 Range of values 0 to 2550 ms 6 - 53 6 Read Parameters of a Device Interface (RECEIVE 189) CP 544 Parameter DW Range Input of values Left margin 48 0000 to 00FF Number of spaces, 1 to 255 Spaceholder for page number 49 00xx Spaceholder xx in header or footer, 20H to 7EH Number of header lines 50 0000 0001 0002 Numbers of footer lines 51 0000 0001 0002 Line terminator or delimiter 52 0001 0002 0003 CR LF CR LF 53 Header and footer including delimiter from DW 52 (max. 554 characters) 600 ff. Comment field (max. 180 characters) Read Parameters of a Device Interface (RECEIVE 189) 6.3.9 Read Parameters of a Device Interface (RECEIVE 189) RECEIVE-DIRECT 189 Using the job * RECEIVE-DIRECT 189 you can read the parameters which you have generated using the job SEND-DIRECT 189. For this purpose you must specify a data block into which the parameters are read. You can select the size of the data block between 1 and 2043 words. You must additionally call a RECEIVE-ALL for the transmission. The RECEIVE-DIRECT is entered into the queue. 6 - 54 C79000-B8576-C191-01 CP 544 6.3.10 Read Error Message Area of SYSTAT (RECEIVE 200) Read Error Message Area of SYSTAT (RECEIVE 200) Read Error Message Area The error of SYSTAT message (RECEIVE area of the 200) SYSTAT is a data area in the dual-port RAM of the CP 544. Once the CP has detected an error, it enters the associated error number in the error message area of the SYSTAT. You determine how the CPU is to react to this by programming your STEP 5 program accordingly on the CPU. RECEIVE-DIRECT 200 The CPU reads the error message area of the SYSTAT for the defined page frame of the CP using the job * RECEIVE-DIRECT 200. The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. You define the area in the CPU (destination area) into which the error message area of the SYSTAT is to be transmitted by means of the parameter settings of the RECEIVE-DIRECT 200. This should be a data block. The RECEIVE-DIRECT 200 is only executed if an error number has been entered in the error message area of the SYSTAT since the bit "RECEIVE job ready" is only set in the ANZW (bit 0) in this case. In certain cases (e.g. no SYNCHRON carried out or restart error of CP 544), the error message area cannot be read via the RECEIVE-DIRECT 200 (see Section 6.3.12 "Read Complete SYSTAT"). Format of destination area If error numbers have been entered in the error message area, these are present in the selected area in the CPU (e.g. in the data block) following reading with RECEIVE-DIRECT 200. Destination length The destination length must be at least two words. C79000-B8576-C191-01 6 - 55 6 Read Error Message Area of SYSTAT (RECEIVE 200) DL 15 DR 14 13 12 DW 0 DW 1 CP 544 11 10 9 F U B 8 Error number 2 7 6 5 4 3 2 1 0 Error number 1 Error number 3 Explanations on destination area DW Bit DL 0 Bit 7,6,5,4 Bit 3 (F) Status Irrelevant 0 1 Bit 2 (U) 0 1 Bit 1 (B) Bit 0 DR 0 DL 1 DR 1 6 - 56 Meaning 0 1 No error in SYSTAT (not following executed RECEIVE-DIRECT 200) Error entered in SYSTAT This bit is always set with error entries i.e. you can thus check whether data have been transmitted with RECEIVE-DIRECT 200. (You must have previously also set the receive area on the CPU to 0.) No error overflow (max. 3 error entries) Error overflow (more than 3 errors) No BREAK on the interface BREAK on the interface Bit 1 indicates the current status and does not mean an error in all cases. The error status BREAK is only dependent on the error number in DR 0, DL 1 and DR 1. The current BREAK status can only be indicated here if a coupling mode has been loaded and started. Irrelevant Error message 1 Error message 2 Error message 3 00 = no error C79000-B8576-C191-01 CP 544 6.3.11 Delete Error Message Area of SYSTAT (RESET 200) Delete Error Message Area of SYSTAT (RESET 200) RESET-DIRECT 200 The CPU resets the error message area of the SYSTAT specific to the page frame using the job * RESET-DIRECT 200. All entries are deleted with the exception of the BREAK bits (B). Delete Error Message Area of SYSTAT (RESET 200) The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. Parameters The block requires the following parameters: Param. Mode Type Meaning SSNR D KY Interface number A-NR D KY Number of job to be reset (200) PAFE Q BY Parameterization error status 6 The error message area of the SYSTAT is not deleted by a SYNCHRON call. The CP 544 can enter up to 3 error numbers into the error message area. If further errors occur, these cannot be signalled if the "old" entries have not been deleted. Therefore the error message area must be reset sufficiently early using a RESET-DIRECT 200. The destination area in the CPU should also be reset. C79000-B8576-C191-01 6 - 57 Read Complete SYSTAT (RECEIVE 221) 6.3.12 CP 544 Read Complete SYSTAT (RECEIVE 221) RECEIVE-DIRECT 221 In addition to the error message area of the SYSTAT, the complete SYSTAT of the CP can also be read using the job * RECEIVE-DIRECT 221. The read area then contains the error message area for both interfaces (in bytes 4 to 10). This job can also be executed if no error numbers are entered. Read Complete SYSTAT (RECEIVE 221) In certain cases (e.g. no SYNCHRON carried out or restart error of CP 544), the SYSTAT cannot be read via the RECEIVE-DIRECT 221. It must then be read directly out of the dual-port RAM (starting at address F660H). The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. Destination length A destination length greater than or equal to 32 bytes (= 16 words) is required. Note that you must set a frame size of at least 32 bytes in the SYNCHRON. 6 - 58 C79000-B8576-C191-01 CP 544 Read Complete SYSTAT (RECEIVE 221) The transmitted area has the following format: DL 15 DR 14 13 12 DW 0 Irrelevant DW 1 Irrelevant 11 10 9 8 RUN STP 7 6 5 4 3 2 1 Irrelevant TST Irrelevant F1 U1 B1 DW 2 F2 U2 B2 DW 3 Error number 1 from page frame 1 Error number 2 from page frame 1 DW 4 Error number 3 from page frame 1 Error number 1 from page frame 2 DW 5 Error number 2 from page frame 2 Error number 3 from page frame 2 DW 6 Error number 1 from page frame 3 Error number 2 from page frame 3 DW 7 Error number 3 from page frame 3 Error number 1 from page frame 4 DW 8 Error number 2 from page frame 4 Error number 3 from page frame 4 DW 9 F6 U6 B6 F8 U8 B8 F5 U5 B5 0 F4 U4 B4 F3 U3 B3 + + F7 U7 B7 DW 10 Error number 1 from page frame 5 Error number 2 from page frame 5 DW 11 Error number 3 from page frame 5 Error number 1 from page frame 6 DW 12 Error number 2 from page frame 6 Error number 3 from page frame 6 DW 13 Error number 1 from page frame 7 Error number 2 from page frame 7 DW 14 Error number 3 from page frame 7 Error number 1 from page frame 8 DW 15 Error number 2 from page frame 8 Error number 3 from page frame 8 + 6 + The individual bits have the following meanings: C79000-B8576-C191-01 RUN set: mode selector is in RUN position STP set: mode selector is in STOP position TST set: mode selector is in TEST position F bit set: at least 1 error has been entered U bit set: more than 3 errors have occurred B bit set: a BREAK is present on the receive line. 6 - 59 Scan Status (RECEIVE 205) 6.3.13 CP 544 Scan Status (RECEIVE 205) RECEIVE-DIRECT 205 You can use the job * RECEIVE-DIRECT 205 Scan Status (RECEIVE to 205) scan the status of the addressed device interface and the complete module. When parameterizing the RECEIVE-DIRECT 205, you define the area in the CPU (destination area) in which the status is to be transmitted. This should be a data block. The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. Destination length The destination length must be one word. The status word has the following format: 6 - 60 Bit Status 0 1 2 3 CP 544 CP 544 CP 544 CP 544 4 5 6 7 SI (addressed device interface) not in operation SI configuration faulty SYNCHRON has not yet arrived SI ready 8 9 10 11 SI is being reparameterized (INIT) SI stopped (SW-STOP) SI enabled (following INIT/SW-STOP) Still vacant 12 13 14 15 SI in RUN (ready) SI in TEST (ready) SI in STOP (ready) Still vacant in in in in RUN STOP TEST error status C79000-B8576-C191-01 CP 544 6.3.14 Start Device Interface (SEND 202) Start Device Interface (SEND 202) SEND-DIRECT 202 You can use the job * SEND-DIRECT 202 Start Device Interface to (SEND start a202) device interface from the STEP 5 program. You must do this e.g. following a SEND 189 job (assign parameters to device interface). The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. The device interface is only started if the job has been signalled in the status word with "Job ready without errors". The data can be transmitted if the device interface has already been parameterized (SEND 189 job). The parameters QTYP, DBNR, QANF and QLAE have no significance. 6 6.3.15 Stop Device Interface (RESET 202) RESET-DIRECT 202 You can use the job * RESET-DIRECT 202 to stop a device interface from the STEP 5 program. Refer to Section 2.10 to find out how the module responds following a stop job. The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. C79000-B8576-C191-01 6 - 61 Import Mode-specific Static Parameters (SEND 203) 6.3.16 CP 544 Import Mode-specific Static Parameters (SEND 203) SEND-DIRECT 203 You can use the job * SEND-DIRECT 203 to import the mode-specific parameters of the static parameter set (starting at data word 35) without stopping the device interface (parameters DW 0 to DW 34 are not influenced). Import Mode-specific Static Parameters (SEND 203) This job is required for mode 4 of the link type "Open driver" in order to be able to modify the parameters for printing without resetting the device interface. Refer to the description of the SEND-DIRECT 189 for the parameters of the open driver in mode 4. Note that you must additionally call a SEND-ALL block for the transmission of the parameter block. The SEND-DIRECT 203 is entered into the queue. Once the job has been executed, all further jobs are carried out with the modified parameter settings. In contrast to SEND 189, the device interface need not be restarted. Note You must only use the SEND-DIRECT 203 to transmit the parameters described in Section 6.3.8 starting at data word 35 (mode) (see also notes and paragraph "Generating the parameter blocks" in Section 6.3.8). You must select the length of the parameter block such that all data relevant to the special link type are transmitted. Thus you must transmit at least 6 data words for the 3964/3964R procedure. The other data words are automatically set to 0000 by the CP. All unused data words must contain 0000. 6 - 62 C79000-B8576-C191-01 CP 544 6.3.17 Read Hardware Parameters (RECEIVE 204) Read Hardware Parameters (RECEIVE 204) RECEIVE-DIRECT 204 You can use the job * RECEIVE-DIRECT 204 Read Hardware Parameters to read(RECEIVE the hardware 204)parameters (page number, number of pages, enabled coordination flag area) without having to remove the module. The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. You define the area in the CPU (destination area) into which the hardware parameters are to be transmitted by means of the parameter settings of the RECEIVE-DIRECT 204. This should be a data block. The following Fig. shows the format of the first two words, words 3 to 16 are reserved. Destination length The destination length must be at least 16 words. You must set a frame size of at least 32 bytes in the SYNCHRON. 6 Word 1 High byte (DL) 7 6 5 Low byte (DR) 4 3 2 1 0 7 2 6 2 5 2 4 2 3 2 2 2 1 0 Signifi2 2 cance 7 6 5 4 3 2 1 0 Page number Reserved (00 corresponds to page 0) Word 2 High byte (DL) 7 6 5 Low byte (DR) 4 3 2 1 0 7 6 Communication flag area 224- 192- 160- 128- 96- 64- 32- 0255 223 191 159 127 95 63 32 5 4 3 2 1 0 Number of pages per SI (01 = 1page/SI 10 = 2 pages/SI 11 = 4 pages/SI) (FFH means that all communication flags are disabled) C79000-B8576-C191-01 6 - 63 Set Date and Time (SEND 218) 6.3.18 CP 544 Set Date and Time (SEND 218) SEND-DIRECT 218 You can use the job * SEND-DIRECT 218 - - to set the time on the CP 544 and to define the time master or time slave function using the CPU. Set Date and Time (SEND 218) The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. A CP 544 can be defined either as the time master or the time slave. * Time slave The CP initially responds as a time slave following a power-up. It can update its own date and time, but the CPU cannot read these. * Time master The master delivers the system time, i.e. it must be able to provide this at all times. If the CPU wishes to synchronize these CPs (at regular intervals or following certain events), it reads the system time from the time master and sets all time slaves using this time. The time slaves need not carry out unnecessary updating operations. The CPU can set the date and time on a CP 544 at any time. However, it can only read the date and time of the CP 544 if this has previously been declared as the time master. 6 - 64 C79000-B8576-C191-01 CP 544 Set Date and Time (SEND 218) The date/time area which is transmitted when reading or writing has the following format: DL DR DW 0 Bit 0 = master identification 0 1 = master 0 = slave DW 1 1/100 s DW 2 min h DW 3 Day Month DW 4 Year 0 s The date and time are BCD-coded and must be entered in the data format "KH" (hexadecimal). Job number 218 is defined on the CP 544 for the jobs "Read/write date and time". The CPU declares the CP as the master or slave by means of the job SEND-DIRECT 218. The CPU can also simultaneously transfer the date and time to the CP. Whether the CPU transfers the date and time depends on the defined source length (QLAE = length of data to be transmitted): - C79000-B8576-C191-01 QLAE = 1 word The CP 544 is declared as the master/slave by the contents of bit 0 (least significant bit) in the first byte; master: bit 0 = 1/slave: bit 0 = 0. In the case of a restart or warm restart of the CPU, SEND-DIRECT 218 must be called for the CP which is to become the master by using QLAE = 1 and master bit 0 = 1. The date and time on the CP 544 are not changed by QLAE = 1. 6 - 65 6 Set Date and Time (SEND 218) - CP 544 QLAE = 5 words The CP is declared as the master/slave by means of the master identification, and the date and time are transferred. Note that the master identification must be set when transferring the time to a master which is to remain the master. The time is checked for consistency when writing. The SEND job is rejected in the case of an error. 7 is output in the status word ANZW, and 1DH in the SYSTAT. Remember that the date and time are only accepted by the CP during the handshake (synchronization via inputs or following reading of another clock). The source from which the data are transferred to the CP should be a data block. The CP 544 can be declared as the time master on one or both device interfaces. The date and time can only be read on the device interface on which the CP has been declared as the master. If the CP on one device interface has been declared as the master and then on the other device interface as the slave, the CP becomes the time slave on both device interfaces. The following occurs: the error number 1F is entered in SYSTAT when reading the date/time from the first device interface. The handshake is not carried out when reading from the second device interface since the bit "RECEIVE job ready" is not set in the ANZW (bit 0). An error message does not appear. SYNCHRON does not influence the master/slave response. 6 - 66 C79000-B8576-C191-01 CP 544 6.3.19 Read Date and Time (RECEIVE 218) Read Date and Time (RECEIVE 218) RECEIVE-DIRECT 218 You can use the job * RECEIVE-DIRECT 218 to read the clock on the CP 544 from the CPU. Read Date and Time (RECEIVE 218) This assumes that the CP has previously been declared as the time master by means of SEND-DIRECT 218. You should also use a data block as the destination in this case. Destination length The destination length must be 5 words. The read data are only meaningful if the date and time have been set at least once following insertion of the module (using SEND-DIRECT 218, length: 5 words). The date and time are BCD-coded and must be entered in the data format "KH" (hexadecimal). 6 C79000-B8576-C191-01 6 - 67 Read SYSID (RECEIVE 223) 6.3.20 CP 544 Read SYSID (RECEIVE 223) Read SYSID (RECEIVE An 223) identification area is specified on every CP 544. The CP 544 is described in the SYSID identification area and contains information on: * * * * The module The memory submodule The interface assignment The output statuses of the loaded software etc. RECEIVE-DIRECT 223 The job * RECEIVE-DIRECT 223 can be used by the CPU to read the SYSID of the CP 544. The job is not entered into the queue but is immediately executed on the CP following triggering and thus overtakes the jobs entered in the queue. Frame length A prerequisite is a frame size 128 byte, i.e. the BLGR data: KY 0.4/KY 0.5/KY 0.6 on the SYNCHRON. Destination length A destination length 64 words is also required. "Ready with error" and error number 7 are entered in the status byte and the number 1E in the error message area of the SYSTAT if the frame size is smaller than 128 bytes. The SYSID area is not transmitted in this case. 15H is indicated in the ANZW instead of 45H if fewer data are transmitted than specified. The SYSID can also be read directly out of the dual-port RAM without data handling blocks (address F680H onwards). Refer to your PLC Manual for more details. 6 - 68 C79000-B8576-C191-01 CP 544 Read SYSID (RECEIVE 223) Format of the SYSID identification area The SYSID contains a number of parameters which identify the CP. Each parameter is terminated by a carriage return (CR = 0 BH, is counted in the number of bytes). Non-assigned parameters only consist of CR. Some parameters have different meanings for different types of memory submodules. All parameters are represented in ASCII. These parameters have the following format with the CP 544: C79000-B8576-C191-01 Parameter No. (max. length) Description 0 (10 bytes) Memory submodule identification/capacity F-EPROM: e.g. 374-2FH21 present here for Order No. 6ES5374-2FH21 RAM: Storage capacity of module RAM xxxkW, e.g. xxx = 64 1 (6 bytes) CP 544 module identification 2 (3 bytes) CP firmware version 3 (20 bytes) System identification from memory submodule or internal parameter memory 4 (9 bytes) Date of parameter generation 5 to 7 (1 byte each) Not used with CP 544 8 (8 bytes) Password for writing the SYSID area by means of COM 9 (6 bytes) COM version with which the CP is parameterized 10 (6 bytes) PROM software version which is used to program the memory submodule 6 6 - 69 Read SYSID (RECEIVE 223) CP 544 Device interface SI 1 Parameter Description Example 11 (9 bytes) Link type RK 512 12 (3 bytes) Version of link type nn 13 (9 bytes) Name of SCC driver (interface driver) ESCC1-1 14 (3 bytes) Version of SCC driver (interface driver) nn 15 (4 bytes) Module type TTY Device interface SI 2 Parameter Description Example 16 (9 bytes) Link type 3964 procedure 17 (3 bytes) Version of link type nn 18 (9 bytes) Name of SCC driver (interface driver) ESCC1-1 19 (3 bytes) Version of SCC driver (interface driver) nn 20 (4 bytes) Module type V.24 nn = Version number If the device interface is unused, the interface-specific parameters are filled by spaces (20H). 6 - 70 C79000-B8576-C191-01 CP 544 6.4 Multi-processor Mode It is even more decisive in the case of multi-processor mode compared to single-processor mode that you carefully match the programming of the individual CPUs (STEP 5 programs) and the CP 544 (CP 544 parameter sets) to one another. As the complexity of the application increases, you must also be increasingly careful that you enter the correct numbers of the various CPUs when assigning parameters to the CP 544. If several CPUs are to provide jobs for a device interface of a CP 544, it is advantageous to reserve a separate page frame for each CPU (also refer to information on interface number in Section 6.2). The number of pages per device interface must then be set accordingly. Note that not more than 20 jobs can be processed simultaneously on a device interface. If you trigger a 21st job, this is terminated with error number 07H in the ANZW and message 15H in the error message area. You can only trigger a job again when another job has been terminated with or without an error. If jobs with the same job number and the same page number are programmed on several CPUs, you must design the STEP 5 programs such that only one CPU can start one of these jobs at a specific point in time. All other CPUs must wait until this job has been signalled as "ready" (with or without errors). C79000-B8576-C191-01 6 - 71 6 CP 544 Reception of data In contrast to the RK 512 (where the CPU is defined separately in the dynamic parameter set for each job), only one CPU can receive data with the 3964/3964R procedure and the open driver. The CPU number is defined when defining the receive mailbox (also refer to information on interface number in Section 6.2). Any CPU can access if a CPU is not defined. The data are then processed by the CPU which accesses first. The data are then lost. 6 - 72 C79000-B8576-C191-01 7 How do you Work with the COM PP Parameter Assignment Software? Contents of Chapter 7 7 How do you Work with the COM PP Parameter Assignment Software? . . . . . . . . . . . . 7-3 7.1 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 3 7.2 Screen Form Tree Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 4 7.3 How is the COM PP Parameter Assignment Software Loaded and Operated? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 7 7.4 How are the Parameters Stored? . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 16 7.5 What must you Observe when Programming the EPROM Submodule?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 17 C79000-B8576-C191-01 7-1 CP 544 7 COM PP Parameter Assignment Software How do you Work with the COM PP Parameter Assignment Software? This chapter explains how you can enter, modify, transfer and test the parameters for your selected link type simply and using menus. 7.1 Function The COM PP parameter assignment software package supports the generation of the parameters for the various link types on the CP 544 communications processor. You must generate separate parameter sets for each device interface. You can carry out the following with COM PP: * * * * * * * * Generate new parameter sets offline or online Modify the parameters of an existing user program offline or online Print parameter sets Transfer parameter sets between PG and CP Read the info file (memory submodule, interface assignments, output versions) on the CP 544 Delete the two device interfaces of the CP 544 Execute a CP 544 restart Execute test functions. Refer to the descriptions of the individual link types in Chapters 3 to 5 for a description of the parameters. C79000-B8576-C191-01 7-3 7 COM PP Parameter Assignment Software CP 544 COM PP creates the following parameter sets: 7.2 * Static parameter set This contains all parameters of the physical and data link layers. * Dynamic parameter sets (only with RK 512 link type) These contain the partner information (destination or source) of the RK 512 jobs. * Definition of the receive mailbox (only with data transmission with the 3964/3964R procedures and the open driver) This contains all information on the data area (data block DB or extended data block DX) on the CPU which accepts the data to be received. Screen Form Tree Structure The screen forms of the COM PP are divided into various hierarchical levels according to their functions. The screen form tree on the following page provides you with a summary of all forms. Note If you wish to change the floppy disk or the CP during a COM session, you must return to the 1st section of the SELECTION form. 7-4 C79000-B8576-C191-01 CP 544 COM PP Parameter Assignment Software LANGUAGE SELECTION Name of screen form; is present in the overview area of the form 1 2 3 8 SELECTION 6 Softkey menu (F1 to F8) S5-KOMI Use F8 in all screen forms to return by one hierarchical level 8 SELECTION A 1 2 3 4 5 6 8 TRANSFER 1 2 4 5 8 DELETE CP RESTART CONFIGURING 6 8 1 TEST FUNCTIONS 8 3964 PROCEDURE RK 512 6 OPEN DRIVER 5 8 A 1 RK 512 3 5 8 8 SELECTION 6 STAT. PAR. 2 3 5 A 8 3964 PROCEDURE 5 8 1 7 STAT. PAR. 8 STAT. PAR. 2 6 SELECTION DYN. PAR. STAT. PAR. 1 6 8 1 8 8 SELECTION A SYSID INFO. 8 TRANSFER OPEN DRIVER 6 8 A PRINT 8 6 8 STAT. PAR. 6 8 8 8 SELECTION STAT. PAR. HEADER 8 6 Fig. 7-1 STAT. PAR. FOOTER 8 6 Tree with screen forms of the COM PP parameter assignment software C79000-B8576-C191-01 7-5 COM PP Parameter Assignment Software CP 544 The following table lists the screen forms in which you can enter parameters: Table 7.1 7-6 Parameters in the screen forms of COM PP Screen form Parameters LANGUAGE SELECTION German, English, French SELECTION Module, program file, SYSID file, path file, path name, configuring, plant designation, generation date, interface CONFIGURATION Link type, comment on interface OPEN DRIVER CPU No., receive mailbox, coordination flags STAT.PAR. 1 Transmission mode, baud rate, parity, bits per character, stop bits, flow control, character delay time, 1st end identifier, 2nd end identifier, fixed message length on reception STAT.PAR. 2 (PRINTER) Wait time after sending, lines per page, left margin, placeholders for page number in header and footer, number of headers/ footers, line end character STAT.PAR. 3 (HEADER) Placeholder for page number in header and footer, line no., column no. STAT.PAR. 3 (FOOTER) Placeholder for page number in header and footer, line no., column no. 3964/3964R PROCEDURES CPU No., receive mailbox, coordination flags STAT.PAR Transmission mode, baud rate, parity, bits per character, stop bits, priority, character delay time, acknowledgement delay time, attempts at establishment, number of repetitions DYN.PAR Job No., job, data destination/source, CPU No., DB No., destination address/source address, coordination flags C79000-B8576-C191-01 CP 544 COM PP Parameter Assignment Software Screen form Parameters TRANSFER Data medium, drive, interface, program name DELETE CP Data medium, interface PRINT Printer file, footer file, print data block assignment, print static parameter set, print dynamic parameter set SYSID INFORMATION Submodule, module, firmware version, plant, generation date, symbolic address, industry bus address, slave no. on PG bus, password, COM version, PROM version, interface 1/2: communication process name/version, driver name/version, submodule type TEST FUNCTIONS Number, date, time 7.3 How is the COM PP Parameter Assignment Software Loaded and Operated? Scope of delivery COM PP is supplied in two different floppy disk formats (3.5" and 5.25") under the PCP/M operating system. The software package comprises: * * - - - The command file S5PXCPPX.CMD and text files in the following languages: S5PDCPPX.DAT for German, S5PECPPX.DAT for English and S5PFCPPX.DAT for French texts. You can also use COM PP under the MS-DOS operating system with the aid of the PCP/M emulator. C79000-B8576-C191-01 7-7 7 COM PP Parameter Assignment Software CP 544 Making back-up copies First of all, please make back-up copies of the floppy disks you have received. Do not copy the files onto HD disks, but onto disks of the following quality depending on the size of the originals: Floppy disk size Floppy disk quality 3.5" DS, DD, 135 TPI 5.25" DS, DD, 96 TPI If you are working with a programmer from the PG 7xx family, use the DISK floppy disk management program to copy the originals. You can call this program from the command line. You can also call DISK on a PG 730, PG 750 or PG 770 by pressing function key F2 when the following menu has been displayed immediately after booting your PG: F1: F2: F6: F7: F8: Start S5-DOS Format, duplicate and check disks Load MS-DOS operating system Load FlexOS operating system Enter PCP/M-86 commands You are guided through the floppy disk management program by menus. When using programmers of the PG 6xx series, you can format and copy disks guided by menus using the DSKMAINT floppy disk management program. 7-8 C79000-B8576-C191-01 CP 544 Transfer COM PP onto hard disk COM PP Parameter Assignment Software First transfer the COM PP files as system files onto the hard disk of your programmer (see also Section 9.4.1 "Install COM PP"). COM PP under PCP/M It is assumed that the PCP/M-86 and S5-DOS operating systems are in user area 0 on the hard disk (as supplied). The files of these operating systems should also have the attribute SYS (system). COM PP in all USER areas Loading If you find it more practical to work with COM PP in several USER areas, copy all files from the original disk into USER area 0 and declare these files as system files by assigning the attribute SYS to them. You can then work with COM PP in all USER areas. Load the S5-DOS operating system using the call "S5". The S5-DOS command interpreter (S5-KOMI) is activated. The S5-KOMI displays the packages you can select. Starting Call COM PP by positioning the cursor in front of the COM PP package and pressing the function key F1 (PACKAGE). The initial COM PP screen form then appears. COM PP in one USER area Loading To create program files with COM PP, it is sensible to select an area other than area 0. Copy all the files from the original disk in PCP/M format into the USER area you have selected. Starting Set the hard disk and the USER area containing COM PP in the command level. The call is the same as when working with COM PP in a USER area. C79000-B8576-C191-01 7-9 7 COM PP Parameter Assignment Software CP 544 COM PP under MS-DOS Loading If your PG has only one MS-DOS partition, you can still use COM PP with the aid of the PCP/M emulator. Use the command PCOPY to copy all COM PP files from the original disk into the directory of your hard disk which contains the PCP/M emulator and the STEP 5 basic package. Starting You can call COM PP by positioning the cursor in front of the COM PP package in the S5-DOS command interpreter (S5-KOMI) and pressing function key F1 (PACKAGE). The initial COM PP screen form then appears. Working with COM PP Operation Your dialog with COM PP is based on screen forms whose contents are largely self-explanatory. A screen form consists of four basic areas: * * * * 7 - 10 Overview area Configuring area Message line Softkey menu. C79000-B8576-C191-01 CP 544 COM PP Parameter Assignment Software LANGUAGE SELECTION -> SELECTION -> CONFIG. -> Overview area SIMATIC S5 / COM PP STATIC PARAMETER SET Configuring area Transmission mode: Mode 1: RK 512 WITH 3964 WITH DEFAULT VALUES Baud rate: Parity: EVEN Bits per character: 8 Stop bits: 1 Priority: LOW 9600 bps 7 Character delay time: 22 * 10 ms Acknowledgement delay time: 55 * 10 ms Connection attempts: 6 Repetitions: 6 Message line F1 F2 F3 SELECT Fig. 7-2 F4 F5 Softkey menu F6 ENTER F7 HELP F8 RETURN Layout of a screen form Overview area This area helps you to see where you are in the program; a path to the current screen form (1st line) and the name of this form (2nd line) are displayed. Configuring area This area contains texts which you cannot change and inversely displayed input and output fields. You can position the cursor in input and output fields and modify the displayed parameters or enter new ones. Message line The message line displays error messages and processing messages. Softkey menu An important element of COM PP is the softkey menu F1 to F8. The softkey menu of a screen form shows you the operations you can carry out with the function keys. Each screen form contains at least one softkey which tells COM PP to display a new screen form. C79000-B8576-C191-01 7 - 11 7 COM PP Parameter Assignment Software CP 544 You can display two additional screen areas if necessary: * Help window * Selection window. Help window The help function supports you when entering parameters. You can call a help window for each input field. Position the cursor within an input field and press F7. A help window is then displayed containing information on the input field you selected. The help window is closed again when you have correctly filled in the corresponding input field. Selection window There is a specific number of possible entries for each input field. You can call these fixed options by pressing F3. A different input is then displayed or - if there is a large number of possible entries for an input field - a selection window is opened. The top entry in the selection window is selected when the window is opened. You can select a different entry using the cursor keys. You enter your selection by pressing F6 (ENTER), and the selection window is then closed. Input keys Function keys, cursor keys and S5-specific keys are available for COM PP operations. The significance of the eight keys F1 to F8 is displayed in the softkey menu of the currently displayed screen form. The cursor keys and the S5-specific keys (for example for calling the help function or for deleting characters) are described in more detail in the reference section. 7 - 12 C79000-B8576-C191-01 CP 544 COM PP Parameter Assignment Software Page forwards Press one of the keys specified in the softkey menu to move on to the next screen form. Page backwards Press F8 to return to the previous screen form. In some cases the softkey menu of the current screen form changes into an acknowledgement menu and you are warned in the message line of the risk of losing the data entered in the screen form and asked if you wish to save your inputs. Importing inputs You can import your inputs by pressing F6. All your inputs are checked by COM PP. Faulty operations are detected, and the storage of incomplete or incorrect data prevented. F6 has different effects depending on the situation in which it is pressed: Printing parameter sets C79000-B8576-C191-01 * The importing of a screen form results in storage of the entered data and branching to the next operating level * An entry selected in a selection window is imported into the input field, and the selection window closed. Importing in a selection window can also be carried out by pressing the RETURN key. You can output the generated parameter sets and a list of data blocks used to a printer or into a file. The log has a header and footer. The header cannot be modified, the footer can be specified by a footer file. You can specify this footer file and a printer parameter file in the screen form PRINT. The generation of footer and printer parameter files is not a component of COM PP, these files can be generated and edited using the SIMATIC utilities FOOTER and PRINTER. 7 - 13 7 COM PP Parameter Assignment Software CP 544 Transferring parameter sets between PG and CP You can transfer the parameter sets for a device interface from the PG to the CP and vice versa. The destination or source of the transfer is always the program file which was set with COM PP. Read info file to CP 544 You can use this function to read online the firmware version and the module identification as well as the generation date and the plant designation. Delete CP 544 device interfaces You can delete the device interfaces of the CP 544. All parameter sets of a device interface are deleted, it is not possible to delete individual parameter sets. Error messages in the message line are not deleted by this function. Execute cold restart of Once you have transferred the parameters for a device CP 544 interface to the CP, you can request a cold restart of the CP using this function. The restart is only carried out for the currently selected device interface. Execute test functions You can activate the following test functions: Read error area, delete error area. The error area is a circulating buffer in which the current error messages (max. 32) of a device interface are entered together with their date and time stamp. The same error numbers are used as are entered in the error message area of the SYSTAT (see Chapter 8). Note, however, that the error area which you can read using COM PP is not identical to the error message area in the SYSTAT. The error area of COM PP is present once per device interface, the area message area in the SYSTAT is defined for each page frame. 7 - 14 C79000-B8576-C191-01 CP 544 COM PP Parameter Assignment Software The function "Delete error area" therefore has no effect on the error message area in SYSTAT. The same applies in the reverse direction to the function "Delete error message area of SYSTAT". Change floppy disk or CP If you wish to change the floppy disk or CP during a COM session, you must return to the 1st section of the SELECTION screen form. Exiting COM PP You can exit COM PP and return to S5-KOMI by repeatedly pressing F8 (return function). You must react as necessary to acknowledgement menus. 7 C79000-B8576-C191-01 7 - 15 COM PP Parameter Assignment Software 7.4 CP 544 How are the Parameters Stored? Program file The data blocks which you configure using COM PP are stored in so-called program files where you can select the first six characters of the name, the remaining component of the name is always ST.S5D. The first of the six characters must always be a letter. Special characters are not permitted (e.g. !, $, % etc.). Example: TEST01ST.S5D DX1, DX2 The parameters are stored in a data block for each device interface, in block DX 1 for device interface 1 and in block DX 2 for device interface 2. SYSID file The SYSID file is required when storing on a PROM outside the COM PP in the EPROM package. The plant designation and the generation date are stored in it. The name of the SYSID file corresponds to the name of the program file except for the ending ...SD.INI. You must enter the file name in the field "SYSID file" in the STEP 5 package EPROM so that the plant designation and generation date are stored in the EPROM. 7 - 16 C79000-B8576-C191-01 CP 544 7.5 COM PP Parameter Assignment Software What must you Observe when Programming the EPROM Submodule? You can find a detailed description of the EPROM submodule programming in the STEP 5 manual. You can only program the EPROM submodules on a PG 7xx programmer with the aid of the STEP 5 basic package (version 6 and upward). Please note the following special points: * * * If you have created a SYSID file with the COM PP, you must enter a SYSID file in addition to the program file in the screen form "Presets" of the STEP 5 package EPROM You must enter "Word/Field" as the operating mode in the default screen form If you have entered a SYSID file, you must store it in the EPROM submodule by pressing the keys "E info" and "SYSID INP" before closing the program file. 7 C79000-B8576-C191-01 7 - 17 8 What must you do if the CP 544 or COM PP Outputs Error Messages? Contents of Chapter 8 8 What must you do if the CP 544 or COM PP Outputs Error Messages? . . . . . . . . . . . . 8-3 8.1 Which Messages do you Receive from the CP 544? . . . . . . . . . . . 8 - 3 8.1.1 Error Messages for SYSTAT, ANZW and REATEL, Arranged According to Numbers for SYSTAT . . . . . . . . . . . . . . . . . 8 - 11 8.1.2 Error Messages for SYSTAT, ANZW and REATEL, Arranged According to Numbers for ANZW . . . . . . . . . . . . . . . . . . 8 - 34 8.1.3 Error Messages for SYSTAT, ANZW and REATEL, Arranged According to Numbers for REATEL . . . . . . . . . . . . . . . . 8 - 35 8.2 Which Messages do you Receive from COM PP? . . . . . . . . . . . . 8 - 36 C79000-B8576-C191-01 8-1 CP 544 8 CP 544 Error Messages What must you do if the CP 544 or COM PP Outputs Error Messages? This chapter tells you which messages are output by the CP 544 and COM PP. The messages contain a detailed error description arranged according to error numbers as well as information on elimination of the cause. 8.1 Which Messages do you Receive from the CP 544? Errors which occur during data transmission may be caused at different positions. CPU reactions If the CP 544 has detected the errors, they are signalled to the CPU in as much detail as possible. You determine how the CPU is to react by writing your STEP 5 program accordingly on the CPU. For example you can request that * an error message is output on a printer, either via another CP 544, or via the other device interface of the same CP 544 or via a CP 525, * the errors are identified on a screen by means of messages or * the job is repeated. Error numbers Errors are signalled by: * * * * C79000-B8576-C191-01 An error number in the PAFE byte of the data handling block An error number in the status word ANZW of the data handling block An error number in the error message area of the SYSTAT An error number in the reply message REATEL (the CP 544 only signals an error to the partner in the case of data transmission with the RK 512 computer link). 8-3 8 CP 544 Error Messages CP 544 Error numbers in the PAFE byte of the data handling block (DHB) PAFE byte The PAFE byte is a parameter which you enter when calling a DHB. The data handling blocks indicate in the PAFE byte whether serious errors have occurred in conjunction with a CP or whether parameters have been entered incorrectly. See Section 6.2.2. for a detailed description of the PAFE byte error messages. If you receive a PAFE error number, this means that the data transfer between the CPU and CP could not be started or has been aborted following unsuccessful attempts. The following cases are exceptions where the error numbers 91H and C1H could mean that no serious errors are present: * * Following a transmission from the PG to the CP 544 If the coordination flag is used incorrectly. If such exceptions occur on your system, you should initially repeat the associated job. Error numbers in the status word ANZW Status word ANZW 8-4 The status word ANZW is also a parameter which you enter when calling a DHB. In the case of DIRECT jobs (SEND-DIRECT, FETCH-DIRECT, RECEIVE-DIRECT), the ANZW indicates whether the job is still running or has been finished. C79000-B8576-C191-01 CP 544 CP 544 Error Messages An error number is entered in bits 8 to 11 in the ANZW if the job has been terminated with an error. Bit 3 is set in addition: "Job finished with error". An error number is only entered in the ANZW if the error occurred when processing a DIRECT job! Since only 4 bits are available for the error numbers in the ANZW, one error number usually comprises several error states. As a result of the low number of error numbers, the ANZW is suitable for evaluation by the STEP 5 program. The errors are differentiated according to the different error sources: Table 8.1 Assignment between ANZW error messages and error sources No. for ANZW Source 1 to 5 Parameterization errors detected by the CPU of the PLC and signalled to the CP 6 Errors detected by the CP during data transfer between the CPU and CP 7 Job cannot be executed, error in job parameters 9, A, B, C, D Error during execution of a job, caused by a faulty reaction or error messages from the partner E, F Errors in data transfer between CP 544 and partner Refer to the tables on the following pages for descriptions of the errors. C79000-B8576-C191-01 8-5 8 CP 544 Error Messages CP 544 A status byte is reserved in the dual-port RAM for each job. If the CP detects an error which is related to a DIRECT job, it writes the error number and the bit "Job finished with error" into the status byte of the associated job in the dual-port RAM. To enable the job status to reach the status word, it is necessary to * * either call the CONTROL DHB with the corresponding job number in the cycle (OB 1) in the STEP 5 program or call the DIRECT job (SEND-DIRECT) using the JU command and RLO = 0. Error numbers in the error message area of the SYSTAT Error message area of the SYSTAT The error message area of the SYSTAT is a data area in the dual-port RAM which can be read by the CPU using the special job RECEIVE-DIRECT 200. The error message area of the SYSTAT comprises three error message bytes for each interface and an additional status byte. You can find a detailed description in Section 6.3.10. All errors detected by the CP are entered into the error message area of the SYSTAT. An error number is additionally entered in the status word if the error occurs in conjunction with a DIRECT job. An error number is additionally transmitted in the reply message to the partner if the error occurs during data transmission with the RK 512 computer link in conjunction with a partner job. The error entry in the SYSTAT is so detailed that it is particularly suitable for exact error analysis during the system startup. 8-6 C79000-B8576-C191-01 CP 544 CP 544 Error Messages Evaluation of individual error numbers by the program could also be possible. Remember that not only serious errors are entered in the SYSTAT. The special job RECEIVE-DIRECT 200 for reading the error message area in the SYSTAT should be called in the OB1, in particular during the system startup. If errors occur - you can recognize this in that the CP sets bit 0 to 1 in the ANZW of the RECEIVE-DIRECT 200 - the error numbers are copied into the data block specified as the parameter. If a programmer is connected to the CPU of the PLC, you can directly view the errors on the screen in operating mode "STATUS variable" or "FORCE variable" in the STEP 5 package LAD/CSF/STL. To delete the error entries in the SYSTAT, call the special job RESET-DIRECT 200. Error numbers in the error area which you can read out via COM PP The same numbers as those entered in the SYSTAT are also used for the error area which you can read out via COM PP (see also Chapter 7). 8 C79000-B8576-C191-01 8-7 CP 544 Error Messages CP 544 The errors are differentiated according to the various error sources: Table 8.2 Assignment of SYSTAT error messages to error sources No. for SYSTAT Source 1 to 6 Parameterization error detected by the CPU of the PLC and signalled to the CP. 10 to 14 Error detected by the CP in the data transfer between CPU and CP. 15 to 1F System error at start of job processing. 20 to 2F Error detected by the CP during processing of a PLC job. 30 to 3A Error detected by the partner during processing of a PLC job and passed on to the CP by means of an error number in the reply message. 40 to 53 Error detected by the CP during processing of a partner job. 5E to 5F Reception of a message which cannot be evaluated. B0 to B8 Error in data transfer between PG and CP. C0 to CA Hardware error on the module. D0 to FF Error in data transfer between CP and partner. Error numbers in reply message (only for data transmission with the RK 512 computer link) Reply message 8-8 If an error status results in conjunction with a SEND or FETCH message of the partner, an error number is signalled in the 4th byte of the reply message. The partner job is then terminated. C79000-B8576-C191-01 CP 544 CP 544 Error Messages The following tables contain detailed descriptions of the error numbers arranged according to: * * * The numbers for ANZW The numbers for SYSTAT The numbers for REATEL. The tables also describe how help can be obtained! The numbers of the error messages are specified as hexadecimal values. The tables generally contain 3 columns with error numbers (No. for ANZW/SYSTAT/REATEL). The error numbers in the 2nd and 3rd columns correspond to the numbers in the first column. Please note: Error numbers are only entered in ANZW and REATEL if a corresponding job is being executed when the error occurs. For example: * * C79000-B8576-C191-01 If noise occurs on the line during a pause in transmission, the procedure detects a faulty character. It then generates the error code FEH which is entered in the SYSTAT. The ANZW is not changed since the error did not occur during the actual transmission If the noise occurs whilst a PLC job is being sent, and if the repetitions are not successful, an error number (EH) is entered in the ANZW in addition to the SYSTAT entry (FEH). 8-9 8 CP 544 Error Messages CP 544 The error description always commences with an underlayed line which is marked by abbreviations as follows: RK 512 computer link RK Data transmission with 3964/R procedure 3964/R Data transmission with open driver Input example: OT RK 3964/R Error description and remedy apply to RK 512 and 3964/R procedure. 8 - 10 C79000-B8576-C191-01 CP 544 8.1.1 CP 544 Error Messages Error Messages for SYSTAT, ANZW and REATEL, Arranged According to Numbers for SYSTAT Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL Parameterization errors detected by the CPU of the PLC and signalled to the CP: RK 01H 01H 0AH 3964/R OT Source/destination type (e.g. DE) Check parameter settings on illegal, CPU and CP and correct if necessary. Area (initial address, length) illegal (negative value) RK 02H 02H 3964/R RK Partner supplies illegal parameters in the message header. OT 14H DB/DX does not exist or is illegal (e.g. DB 0, DB 1, DB 2, DX 0, DX 1, DX 2) or Check parameter settings on CPU and CP, set up the block if necessary. 0CH other data type does not exist or is illegal The permissible data types are listed in the job tables. RK Partner supplies incorrect parameters in the message header. RK 03H 03H C79000-B8576-C191-01 3964/R OT 14H DB/DX too short: (initial address + length)> area or 0CH area too short for another data type (initial address + length) > area Check parameter settings on CPU and CP, check block/area if necessary. RK Partner supplies incorrect parameters in message header. 8 - 11 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 04H 04H 0AH 3964/R OT No access to area possible for user: e.g. hardware memory too small or input/output module not fitted Check parameter settings on CPU and CP. The permissible initial addresses and lengths are listed in the job tables. RK Partner supplies incorrect parameter in message header. RK 05H 05H 0CH RK 06H 06H 0AH - - OT 3964/R 3964/R Check whether the status word is permitted. OT Error indication from CPU to CP, which cannot interpret it RK 07H 3964/R Incorrect status word: group message for all errors which can be attributed to the status word Evaluate PAFE on data handling block (STEP 5 program). OT PAFE byte does not exist or is illegal Check whether the PAFE byte is permitted. Errors detected by CP in data transfer between CPU and CP: RK 10H 8 - 12 06H 0AH 3964/R Timeout for ALL jobs OT Check whether RECEIVE-ALL or SEND-ALL are called in the STEP 5 program, evaluate PAFE on data handling block. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 11H 06H - 06H - 06H - 06H - 3964/R 3964/R Check STEP 5 program, e.g. error in data handling block (message also possible following a transmission from the PG to the CP). OT Check STEP 5 program, e.g. error in data handling block OT Unknown job type or illegal job number with DIRECT job RK 14H 3964/R Error in data transmission between CPU and CP RK 13H OT ALL job without request or DIRECT job despite overloading or job carried out on non-synchronized page RK 12H 3964/R Check STEP 5 program, e. g. incorrect param. settings for DHB. OT Error in the CP firmware Switch the module off and on again. Replace the module if necessary. System errors at beginning of job processing: RK 15H 07H - 07H C79000-B8576-C191-01 - OT Number of simultaneously processed DIRECT jobs too large for CP 544 (queue full) RK 16H 3964/R 3964/R Modify STEP 5 program such that a maximum of 20 DIRECT jobs can run simultaneously. OT Current job was terminated with error status by new SYNCHRON when restarting the CP (power up) or carrying out a cold restart of the CP by means of the PG A remedy is not possible for the power up. In the case of the cold restart of the CP by means of the PG, you should ensure that no more CPU jobs are being executed before accessing an interface. The SYNCHRON DHB deletes the job statuses in the dual-port RAM, but not the SYSTAT entry! 8 - 13 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 17H 07H - 07H - 07H - 07H - 07H - Assign parameters to device interface. OT Check the time parameters. 3964/R OT Frame size too small RK 1FH 3964/R Repeat the job. OT Time faulty RK 1EH 3964/R Job illegal in this status (e.g. device interface not parameterized) RK 1DH OT Area is occupied (resource) RK 18H 3964/R 3964/R Select larger frame length for SYNCHRON. OT "Read time/date" (RECEIVEThe CP must be set as the time DIRECT 218) illegal since CP is master prior to reading - this set as time slave then applies to the module. Check whether the CP is set as a slave on another interface. Parameterization errors detected by the CP in the STEP 5 program (e.g. in the PSEUDO-R/W parameters) or in the dynamic parameter set (CP 544 user program): RK 20H 8 - 14 07H - Dynamic parameter set does not exist or is faulty or the type of job (SEND/ FETCH) does not agree with the arrived job Set or correct the parameters for this job using COM PP. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 21H 07H - 3964/R OT Error with data type (DB, QB...): The permissible data types and unknown data type or data type their combinations are listed in illegal (e.g. DE) the job tables. RK Data type in DHB parameters is illegal in conjunction with data type in dynamic parameter set RK 22H 07H - 3964/R OT Initial address specified too high for desired data type, or initial address or DB/DX No. too low The permissible initial addresses and the DB/DX numbers which may be specified in the CP 544 user program or in the STEP 5 program (PSEUDO-R/W parameters) are listed in the job tables. RK 23H 07H - Coordination flag illegal for this data type, or incorrect bit number entered Coordination flags are not permissible for all data types. Check when using the PSEUDO-R/W function whether the bit number has been specified correctly (0 to 7). RK 24H 07H C79000-B8576-C191-01 - CPU number specified too large Permissible CPU No.: none, 1, for the PSEUDO-R/W 2, 3 or 4 parameters 8 - 15 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 25H 07H - 07H - OT Transmission length illegal RK 26H 3964/R 3964/R OT Transmission length too long for transmission (> 4 kbyte). See the job tables for valid lengths. RK The permissible lengths for DHBs or PSEUDO-R/W parameters are listed in the job tables. RK 3964/R OT Divide the job into several shorter jobs. RK 27H 0CH - 3964/R OT Switch at STOP for PLC job. Set the mode selector to the RUN position. RK 28H 8 - 16 0CH - Error when transmitting a command message. An associated procedure error number has been entered directly previously in SYSTAT (see error numbers E1 to E5 and F8 to FF). See remedy measures for preceding procedure error numbers. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL Error in reply message from partner, recognized by CP: RK 29H 0CH - Synchronization error of partner since - reply message arrived although no job is running or - the (continuation) FETCH message has not yet been sent or - a continuation reply message has been received following the transmission of a FETCH message or - a reply message has been received following the transmission of a continuation FETCH message. This error is signalled following the cold restart of the own PLC in the case of long messages or with the cold restart of the partner. This is a normal startup reponse of the system and need not be corrected. The error may also occur during operation as a result of previous error statuses which have only been detected by the partner. Otherwise you can assume that the partner has responded incorrectly. The error may not occur with jobs < 128 byte. RK 2AH 0BH - Error in format of received reply Prove faulty response of message: 1st byte not 00H or partner using interface test unit FFH (FOXPG) inserted into transmission line if applicable. RK 2BH 0BH - Received reply message following FETCH job has too much data. 8 RK 2CH 0BH - Received reply message following FETCH job has too few data. RK 2DH 0BH C79000-B8576-C191-01 - Received reply message following SEND job arrived with data. 8 - 17 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 2EH 0BH - 3964/R OT An illegal parameter setting has Correct the illegal parameter been detected when starting setting and carry out a cold the parameterized restart. communication. The interface could not be parameterized. RK 2FH 8 - 18 0DH - A reply message has not arrived from the partner within the monitoring time following the transmission of a command message. Is the partner a very slow device? This error is often indicated as a result of a previous error. For example, procedure reception errors (F0H to FFH) can be indicated after a FETCH message has been sent. Reason: the reply message could not be received because of interferences, the monitoring time elapses. This error may also occur if a cold restart has been carried out on the partner before it could answer the last FETCH message it received. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL A reply message with an error number in the 4th byte is returned to the CP 544 if the partner detects an error when processing an external job. The CP generates a number for SYSTAT and for ANZW from this: RK 30H 09H 32H DB/DX disabled on partner by coordination flag In the partner program: reset the coordination flag again following processing of the last transmitted data! In the STEP 5 program: repeat job! RK 31H 0AH C79000-B8576-C191-01 0AH Error in partner or in CP 544 as Check, whether the partner can partner: transmit the desired data type. Check hardware design of - Illegal source/destination type partner. or Set switch of partner PLC to - memory error in partner PLC RUN position. or - error in CP/CPU communication with partner or - partner PLC is in STOP status 8 - 19 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 32H 0AH 0CH Memory access error on Check whether the desired data partner (memory does not exist) area is present in the partner and is sufficiently large, or With CP 544 as partner: check the dynamic parameter - Incorrect area with status word sets in the CP 544 or the or PSEUDO-R/W parameters in - data area does not exist the STEP 5 program. (except DB/DX) or Check the defined length on the - data area too short DHB. (except DB/DX) RK 33H 0AH 14H DB/DX access error on partner (DB/DX does not exist or is too short) With CP 544 as partner: - DB/DX does not exist or - DB/DX too short or - DB/DX No. illegal Permissible source area exceeded with FETCH job RK 34H 0BH 16H Error in message header, detected by partner: 3rd command byte in header is incorrect RK 35H 0BH 10H Error in message header: 1st or 4th command byte in header is incorrect Check whether the error is based on interferences or on a faulty response of the partner. Prove this using an interface test unit (FOXPG) inserted into the transmission line. RK 36H 8 - 20 0BH 34H Partner detects incorrect message length (total length) C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 37H 0CH 36H Partner detects synchronization error: Message sequence is faulty This error occurs with a cold restart of the own PLC or the partner. This is a normal startup response of the system and need not be corrected. This error may also occur during operation as a result of previous errors. Otherwise you can assume that the partner has responded incorrectly. RK 38H 0CH 2AH No cold restart has yet been Carry out cold restart on performed on the partner. partner PLC or set mode With CP 544 as partner: selector on CP to RUN position. A SYNCHRON DHB has not been executed since the powerup, or the mode selector is in the STOP position. 39H 0BH 12H Partner signals "Job type illegal" Incorrect response of partner since a system command has not been sent from the CP 544. RK RK 3AH 0BH C79000-B8576-C191-01 - Unknown error number received in reply message Check whether the error results from interferences or from a faulty response of the partner. Prove this using an interface test unit (FOXPG) inserted into the transmission line. 8 - 21 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL Error in command message of partner. A reply message is sent to the partner with the defined error number in the 4th byte. RK 40H - 10H Error in 1st command byte: not 00H or FFH RK 41H - 16H Error in 3rd command byte: Command letter is not "A" or "0" or "E" Basic header error in partner. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. RK 42H - 16H Error in 3rd command byte with continuation message: Command letter not as with 1st command message RK 43H 8 - 22 - 10H Error in 4th command byte: Command letter incorrect Basic header error in partner, or a command combination has been requested which is illegal with the CP 544. Check the permissible commands in the command tables. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 44H - 10H Error in 4th command byte with continuation message: Command letter not as with 1st command message Basic header error in partner. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. RK 45H - 14H Error in 5th command byte: DB/DX No. illegal (e.g. 00) RK 46H - 0CH The permissible DB/DX numbers, initial addresses or lengths are listed in the job tables. Error in 5th or 6th command byte: Initial address too high RK 47H - 34H Errors in 7th and 8th command bytes: Illegal length RK 48H - 0CH Errors in 9th and 10th command bytes: The specification of a coordination flag is illegal for this data type, or the bit number of the coordination flag is too high (permissible range 0 to 7). Basic header error in partner. The job tables list when a coordination flag is permissible. RK 49H - C79000-B8576-C191-01 0CH Error in 10th command byte: CPU No. too large (permissible values 0, 1, 2, 3, 4, F) Basic header error in partner. 8 - 23 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 4BH - 34H Send message was longer than Correction necessary in partner. expected, i.e. more data were received (possibly with continuation messages) than were specified in the message header. OT The parameterized end characters have not occurred within the max. permissible length (modes 2 and 4). Correct your user program or that of the partner. RK 4CH - 34H Send message was too short or Correction necessary in partner. < 128 bytes, i.e. fewer data were received (possibly with continuation messages) than specified in the message header. RK 4DH - 34H Fetch message received with useful data Further errors when processing the partner job: RK 4EH 8 - 24 - 2AH CP has received message whilst mode selector was in STOP position. Set mode selector of CP to RUN position. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 50H - - Error when sending the (continuation) reply message, an associated procedure error number was entered immediately previously in the SYSTAT (error numbers E0 to E5, F8 to FF). See remedy measures for the error number entered directly previously in the SYSTAT (SYSTAT nos. E0 to E5 and F8 to FF). RK 51H - C79000-B8576-C191-01 36H Synchronization error of partner since - new (continuation) command message arrived although previous (continuation) reply message has not yet been sent by the CP 544 or - a normal command message has been received although a continuation command message was expected or - a continuation command message arrived although a command message was expected. This error is signalled following the cold restart of the own PLC in the case of long messages or with the cold restart of the partner. This is a normal startup response of the system. The error may also occur during operation as a result of previous error statuses which have only been detected by the partner. Otherwise you can assume that the partner has responded incorrectly. The error may not occur with jobs < 128 bytes. 8 - 25 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 52H - 32H DB/DX disabled by coordination In the own STEP 5 program: flag Reset the coordination flag again following the processing of the last transmitted data. In the partner program: Repeat the job. During initial system startup: Make sure that the coordination flags are distributed amongst the individual processors, CPs, IPs and the coordinator, that the jumper settings are correct and that the used coordination flags are reset in the restart OBs (OB 20, OB 21, OB 22). RK 5EH 8 - 26 - - A correct message has been received with a length shorter than the header length in the (continuation) command message (< 4 bytes with continuation messages or reply messages; < 10 bytes with command messages). The message is ignored. Currently active jobs are not aborted. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW REATEL RK 5FH - 34H A correct message with a length > 128 bytes was received. The message cannot be evaluated. The processed job is aborted. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. 8 C79000-B8576-C191-01 8 - 27 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW RK C6H - - - - Load the interface parameters OT Check the parameters or replace the CP or the RAM submodule. 3964/R Connection could not be established, the number of connection attempts has been exceeded. RK D9H 3964/R Illegal parameter, parameter memory faulty, submodule removed following parameterization RK D8H OT No parameters present, parameter memory empty or unknown contents RK C7H 3964/R Check the interface cable or the transmission parameters. 3964/R Data could not be transmitted, the permissible number of repetitions has been exceeded. Error in data transfer CP <--> partner: RK E0H 8 - 28 - 3964/R A repetition is not an error but it Transmission of first repetition: may indicate that interferences - An error has been detected when transmitting the message have occurred on the transmission line or that the or the partner requests a partner responds incorrectly. If repetition by means of a negative acknowledgement (NAK). the message still cannot be transmitted following the maximum number of repetitions, an error no. is signalled which describes the error which occurred first. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW RK E1H 0EH Error during establishment of connection:, - NAK or any other character (except DLE or STX) was received after STX was sent or - the reply took place too early or - an initialization conflict has occurred. RK E2H 0EH E4H - - C79000-B8576-C191-01 Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. 3964/R Acknowledgement delay time (QVZ) exceeded: a reply from the partner did not arrive within the acknowledgement delay time following transmission of STX. RK E3H 3964/R Partner is too slow or not ready to receive or there is e.g. an interruption in the transmission line. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. 3964/R Check whether the partner also indicates errors since it may be Abort by partner: the case that not all transmitted One or more characters (including NAK) have been received by the data have arrived (e.g. interruption in transmission line) partner during a current or the major interferences exist transmission. or RK 3964/R there is a faulty response of the partner. Prove this by connecting Error at connection termination: interface test unit (FOXPG) into - The message was rejected by the partner at the end by NAK or transmission line if applicable. any other character (except DLE) or - the acknowledgement character (DLE) was received too early 8 - 29 8 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW RK E5H - Acknowledgement delay time exceeded at connection termination: No reply was received from the partner during the QVZ following clearance of the connection with DLE ETX. RK F0H - - Partner is too slow or faulty. Prove this using interface test unit (FOXPG) inserted into transmission line if applicable. 3964/R First repetition expected: A fault was detected whilst receiving a message, and the CP 544 requested a repetition from the partner by means of a negative acknowledgement (NAK). RK F1H 3964/R A repetition is not an error but it may indicate that interferences have occurred on the transmission line or that the partner responds incorrectly. If the message still cannot be transmitted following the maximum number of repetitions, an error no. is signalled which describes the error which occurred first. 3964/R Error during establishment of connection: - One or more characters (apart from NAK or STX) were received in the idle state or - further characters were sent by the partner following a received STX without waiting for the reply DLE. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. Following power-up of partner: - The CP receives an undefined character whilst the partner is being switched on. 8 - 30 C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW RK F2H - Logic error during reception: A further character (apart from DLE, ETB, ETX) was received following the reception of DLE. RK F3H - 3964/R 3964/R OT Character delay time (ZVZ) exceeded: - Two successive character were not received within the ZVZ or - 1st character following transmission of DLE when establishing the connection was not received within the ZVZ. RK F4H - Partner is too slow or faulty. Prove this using interface test unit (FOXPG) inserted into transmission line if applicable. 8 3964R Error in block check character BCC (only with RK 512 with 3964R procedure, and with 3964R procedure): The internally generated value of the BCC does not agree with the BCC received by the partner at the end of the connection. C79000-B8576-C191-01 Check whether the partner always doubles DLE in the message header and in the data string or whether the clearance of the connection is made with DLE ETX. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. Check whether there is a large interference on the connection, in this case error codes FE may also be observed occasionally. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. 8 - 31 CP 544 Error Messages Error number CP 544 Error description Remedy RK 512 only SYSTAT ANZW RK F5H - Repetition number of partner does not agree with the own setting of repetition attempts RK F6H - 3964/R 3964/R OT A vacant receive buffer is not available: Following the reception of STX, an empty receive buffer was not available to the procedure for the establishment of the connection and a further wait time. Set the same number of repetitions on the partner as on the CP. Prove faulty response of partner using interface test unit (FOXPG) inserted into transmission line if applicable. RK 3964/R The error can only occur where there is a large interference in operation. Reason: brief overloading of protocol. Remove the fault by modifying the system design or rerouting the cables. OT Use the flow control. RK F8H 8 - 32 - 3964/R Receive buffer is too short. End identifier could not be stored in the receive buffer. Increase receive buffer. C79000-B8576-C191-01 CP 544 CP 544 Error Messages Error number Error description Remedy RK 512 only SYSTAT ANZW RK FEH - 0FH OT Transmission error: A transmission error (parity error, stop bit error, overflow error) has been detected. Repetitions are started if this occurred during transmission or reception. The error is signalled immediately if a faulty character is received in the idle state so that influences on the transmission line can be detected early. RK FFH 3964/R 3964/R Interferences on the transmission line cause message repetitions and thus reduce the throughput of useful data. The risk of an undetected error is increased. Change the system structure or reroute the cables. Check whether the baud rate, parity and number of stop bits are set equally on the two devices. OT BREAK The connecting cable (receive line) to the partner is interrupted. This error number is repeated until the status is eliminated. Reestablish the connection between the devices, or switch the partner on. Check in TTY mode that current flows in the idle state. 8 C79000-B8576-C191-01 8 - 33 CP 544 Error Messages 8.1.2 CP 544 Error Messages for SYSTAT, ANZW and REATEL, Arranged According to Numbers for ANZW Error number RK 512 only 8 - 34 ANZW REATEL SYSTAT 01H 0AH 01H 02H 14H/0CH 02H 03H 14H/0CH 03H 04H 0AH 04H 05H 0CH 05H 06H 0AH 06H, 10H-14H 07H - 15H-18H, 1DH-1FH 20H-26H 09H 32H 30H 0AH 0AH, 0CH, 31H-33H 14H 0BH 10H, 12H 16H, 34H 2AH-2EH, 34H-36H, 39H, 3AH 0CH 36H, 2AH 27H-29H, 37H, 38H 0DH - 2FH 0EH - E1H, E2H 0FH - FFH C79000-B8576-C191-01 CP 544 8.1.3 CP 544 Error Messages Error Messages for SYSTAT, ANZW and REATEL, Arranged According to Numbers for REATEL CP 544 Error Messages Error number RK 512 only REATEL ANZW SYSTAT 0AH 01H, 04H, 06H, 0AH 01H, 04H, 06H, 10H, 31H 0CH 02H, 03H, 05H, 0AH 02H, 03H, 05H, 32H, 46H, 48H, 49H 10H 0BH 35H, 40H, 43H, 44H 12H 0BH 39H 14H 02H, 03H, 0AH 02H, 03H, 33H, 45H 16H 0BH 34H, 41H, 42H 2AH 0CH 38H, 4EH 32H 09H 30H, 52H 34H 0BH 36H, 47H, 4BH, 4CH, 4DH, 5FH 36H 0CH 37H, 51H 8 C79000-B8576-C191-01 8 - 35 COM PP Messages 8.2 CP 544 Which Messages do you Receive from COM PP? COM PP Messages COM PP outputs text as necessary in the message line of a screen form. The texts belong to one of the following categories: * * * * * * Messages when loading the language-dependent text file (identification DAT) Error resulting from incorrect inputs (identification MF) Messages (identification MESS) Acknowledgements (identification ACK) Handling errors (identification ERR) Internal errors (identification IMF). The texts themselves and their causes, meanings and effects are listed below. You are also informed of how to react to the various messages and to clear the error. Message Explanation/troubleshooting DAT.001: Problem reading desired DAT file Default loaded The desired text file (English, French, German) cannot be loaded. The corresponding *.DAT file must be present in the same directory as S5PXCPPX.CMD. DAT.002: Problem reading DAT file! Press F8! None of the text files has been found. Check whether the *.DAT files are present in the same directory as S5PXCPPX.CMD. This error also occurs if the main memory on the PG is too small. Remove TSR programs if they are working under MS-DOS. DAT.003: Please wait... This message is output when loading the COM PP. DAT.004: Loading DAT file... This message is output when loading the DAT files. 8 - 36 C79000-B8576-C191-01 CP 544 COM PP Messages Message Explanation/troubleshooting MF.001: Incorrect key You have attempted to enter an illegal character in the input field marked by the cursor or you pressed the wrong function key. MF.002: Incorrect input The input in the field marked by the cursor is not between the permitted limits or is not one of the permitted alternatives. Press function key F7 and read the information about this input field. Message Explanation/troubleshooting MESS.001: Incorrect key You have attempted to enter an illegal character in the input field marked by the cursor or you pressed the wrong function key. MESS.002: Incorrect input The input in the field marked by the cursor is not between the permitted limits or is not one of the permitted alternatives. Press function key F7 and read the information about this input field. MESS.003: DX1/DX2 found These messages are displayed during the plausibility check. If the message "DX1/DX2/static parameter set/dynamic parameter set not found" appears, the program is incomplete. You must then create the missing component. MESS.004: DX1/DX2 not found MESS.005: Static parameter set found MESS.006: Static parameter set not found The message "DX1/DX2 not found" is also displayed if you have initiated a cold restart but DX1/DX2 was not transferred to the interface. First transfer DX1/DX2 to the corresponding interface. MESS.007: Dynamic parameter set found MESS.008: Dynamic parameter set not found C79000-B8576-C191-01 8 - 37 8 COM PP Messages CP 544 MESS.009: New file This message appears when you select a new file. MESS.010: Entered Your input was checked and written to the external memory. MESS.011: Job entered A job belonging to a dynamic parameter set (e.g. SEND or FETCH) was checked and written to the external memory. MESS.012: Job deleted A job belonging to a dynamic parameter set (e.g. SEND or FETCH) was deleted but not written to the external memory. MESS.013: Warning! Job faulty Incorrect jobs have been found in the dynamic parameter set. The first error-free job is displayed. Page to job 1 and go through all the jobs step by step. Rewrite incorrect jobs. MESS.014: No file of this type found on selected drive A file of the type *ST.S5D (program file), *DR.INI (printer presets file), or *F1.INI (footer file) does not exist. Either enter a new program file name in the input field or create a new printer presets file or footer file using the STEP 5 package. MESS.015: Limit reached When editing the header or footer for the static parameter set, the limit of 554 characters including control characters and delimiters has been reached. MESS.016: Insert function illegal When editing the header or footer for the static parameter set, it is not possible to insert an extra line. MESS.017: Printer not connected or not ready Either there is no printer connected or the connected printer is not ready or not switched on. MESS.018: Active This message informs you that the PG is active and that you cannot make any entries at the moment. The message appears, e.g. when COM PP is loading a DAT file (texts). 8 - 38 C79000-B8576-C191-01 CP 544 COM PP Messages MESS.019: Printing... This message appears when the print function is active. MESS.020: Printing aborted This message appears when the print function was aborted with F2. MESS.021: Printing finished This message appears when the print function was completed correctly. MESS.022: No memory space free. Press F8. There is not enough memory in the PG or an internal system error has occurred. Exit COM PP and the S5 KOMI, then boot the PG and restart COM PP. If you are working with MS-DOS, remove any TSR programs. MESS.023: Space not sufficient (max. data block length exceeded) When assigning parameters to DX1/2, note that the static parameter set, the dynamic parameter sets and the coordination byte must be completely within the block boundaries in the DB. MESS.024: Coordination bytes: limit value exceeded The coordination bytes have different limits depending on whether they are in a DB, flag or S flag. Press function key F7 and read the information about this input field. MESS.025: Change the entry "Dynamic parameter set:" from "NO" to "YES" You wanted to assign parameters for a dynamic parameter set. This is only possible, however, if you entered "Dynamic parameter sets: YES" when assigning parameters. MESS.026: Dyn. param. set: last The maximum number of 188 programmable dynamic valid job with no. parameter sets can also be restricted by the particular ###! location of the dynamic parameter sets and the static parameter set. COM PP calculates the last valid job. MESS.027: Further jobs not possible acc. to DX1/2 parameter assignment C79000-B8576-C191-01 The maximum number of 188 programmable dynamic parameter sets can also be restricted by the particular location of the dynamic parameter sets and the static parameter set. 8 - 39 8 COM PP Messages CP 544 MESS.028: There are more than Only 256 files (program files, printer files) can be 256 files of this type displayed in the selection window. Enter the required file name directly in the input field. If you are searching for a particular file which is not displayed in the selection window, leave COM and search in the operating system (DIR). MESS.029: Transferred This message appears following the successful transfer of data to the CP 544. MESS.030: Deleted This message appears following a delete operation on the CP 544. MESS.031: Cold restart carried out This message appears following a cold restart on an interface of the CP 544. MESS.032: No new entries exist You have repeatedly pressed the function key F6 (READ) for the error output but no new error messages have been found. MESS.033: No entries exist You have pressed the function key F6 (READ) for the error output but no error messages have been found. Alternately you have selected a path file which does not contain any paths. MESS.034: BREAK present on receive line You have pressed function key F6 (READ) for the error output. A BREAK exists on the point-to-point link of the CP 544 (not on the CP-PG connection!). The listed error messages in the error output may be continuation errors resulting from the BREAK. MESS.035: Start reached You have pressed function key F1 (PAGE BACKWARDS) or F4 (CURSOR UP) or the corresponding cursor key for the error area output although you are already positioned at the beginning of the display area. MESS.036: End reached You have pressed function key F2 (PAGE FORWARDS) or F5 (CURSOR DOWN) or the corresponding cursor key for the error area output although you are already positioned at the end of the display area. 8 - 40 C79000-B8576-C191-01 CP 544 COM PP Messages MESS.038: Transfer not executed Transfer to DX1/DX2 not carried out (block faulty or transfer aborted by user). ACK.001: Internal system error. Exit? Exit COM PP by repeatedly pressing function key F8. Exit S5 KOMI as well and boot the PG. Then restart COM PP. ACK.002: Internal system error. Exit? ACK.003: Screen form modified. Abort last entry? This acknowledgement appears when you attempt to exit a screen form before importing your input. Press function key F1 (YES), if you want to abort your input. ACK.004: Continue? Read the text in the info window. Press function key F1 (YES) to execute the function (e.g. ESC or F8). Press function key F3 (NO) and the last input is discarded and the COM PP remains in the current screen form. ACK.005: Abort printing? This message appears when you press function key F2 (STOP PRINT) while printing out. ACK.006: Link type changed. Enter? A different link type from the one currently set is programmed in the .S5D file you have selected. Please remember that a different link type may also require changes or additions to the programmed data (static parameter set, dynamic parameter sets). C79000-B8576-C191-01 8 - 41 8 COM PP Messages CP 544 ACK.007: Link type changed. Stat. param. set must be generated again. Cont.? The static parameter set already existed when the link type was changed. The static parameter set is now no longer suitable for the new link type and must be modified. Press F1 (YES) to call the screen form for assigning parameters to the static parameter set. Press F3 (NO) to undo the modification to the link type. ACK.008: Stat. param. set longer. Overwrite data behind old stat. p. set? After the static parameter set (at higher DW addresses) there may be data that have already been created with the DB editor or COM PP. If you change the link type, the mode of the static parameter set and the number or length of the header or footer (which together determine the length of the static parameter set), these data may be overwritten. COM PP detects this and displays this message. If you press F1 (YES) the current parameter set overwrites the existing data in the data block. If you press F3 (NO) you remain in the current screen form and the data after the old unmodified static parameter set remain unchanged. ACK.009: Overwrite non-interpretable data in DB with stat. param. set? The location you have selected for the static or dynamic parameter set is at an address where there are already data in the data block. These data cannot be interpreted as COM PP parameter sets. If necessary, you can check the DB using the DB editor. If you press F1 (YES), the current parameter set overwrites the existing non-interpretable data. If you press F3 (NO), the data are not overwritten. ACK.010: Overwrite non-interpretable data in DB with dyn. param. set? ACK.011: Link type changed. A static parameter set already exists. Overwrite data in DB If you press F1 (YES), the old parameter set is with stat. param. set? overwritten. If you press F3 (NO), COM PP remains in the currently displayed screen form and the parameter set is not stored. 8 - 42 C79000-B8576-C191-01 CP 544 ACK.012: Stat. param. set faulty. Must be generated again. Continue? ACK.013: Dyn. param. set faulty. Must be generated again. Continue? COM PP Messages The data in the parameter set are incorrect and cannot be interpreted by COM PP. The data block may contain data you created previously with the DB editor or with COM PP. Using the DB editor, check and if necessary change the location of the parameter set ("from DW") in the parameters in DX2. If you press F1 (YES) you can create a new parameter set and overwrite the non-interpretable data. If you press F3 (NO), COM PP remains in the currently displayed screen form. ACK.014: Link type changed. DX1/DX2 must be generated again. Continue? A DX1/DX2 already exists. If you press F1 (YES) you can assign new parameters for DX1/DX2. If you press F3 (NO), COM PP remains in the currently displayed screen form. ACK.015: DX1/DX2 faulty. DX1/DX2 must be generated again. Continue? The data from DW 0 onwards of DX1/DX2 are incorrect and cannot be interpreted by COM PP: You may have made a mistake when generating DX1/DX2 with the DB editor. Check the DB with the DB editor. If you press F1 (YES), you can create a new DX1/DX2 and overwrite the non-interpretable data. If you press F3 (NO), COM PP remains in the currently displayed screen form. ACK.016: Link type changed. Overwrite existing DX1/DX2 ? A DX1/DX2 already exists. If you press F1 (YES), the old DX1/DX2 is overwritten. If you press F3 (NO), COM PP remains in the currently displayed screen form and the old DX1/DX2 is retained. ACK.017: Overwrite non-interpretable data in DX1/DX2 ? COM PP cannot interpret the data in DX1/DX2. Check the DB with the DB editor. If you press F1 (YES), the DX1/DX2 currently displayed by the COM overwrites the existing but not-interpretable DX2. If you press F3 (NO), COM PP remains in the currently displayed screen form and the old DX1/DX2 is retained. C79000-B8576-C191-01 8 - 43 8 COM PP Messages CP 544 ACK.018: Link type changed. Stat. p. set 2 must be generated again. Cont? You have changed the link type to "open driver" and the static parameter set, part 2, must be recreated. If you press F1 (YES), the screen form STAT. PARAMETER SET 2 (PRINTER) appears. If you press F3 (NO), COM PP remains in the currently displayed screen form. ACK.019: Stat. param. set 2 faulty. Must be generated again. Continue? The static parameter set, part 2, cannot be interpreted by COM PP. The data block may contain data you created previously with the DB editor or with COM PP. Check the DB with the DB editor. If you press F1 (YES), you can create a new static parameter set, part 2, and overwrite the non-interpretable data. If you press F3 (NO), COM PP remains in the currently displayed screen form. ACK.020: Job faulty. Must be generated again. Continue? In the dynamic parameter set you pressed F1, F2 (PAGE BACKW./FORW.) or F4 (GO TO JOB) and COM PP has recognized that the next job is incorrect. If you press F1 (YES), the screen form for the next job is displayed with the defaults. If you press F3 (NO), COM PP remains in the current job. You can obtain other jobs by pressing F4. ACK.021: Quit COM? With this acknowledgement you indicate whether or not you want to exit COM PP. If you press F1 (YES), you exit COM PP and return to the S5 KOMI. If you press F3 (NO), COM PP remains in the currently displayed screen form. 8 - 44 C79000-B8576-C191-01 CP 544 ACK.022: Stat. param. set 1 not yet in external memory. Quit screen form? COM PP Messages The static parameter set, part 1, is only stored together with the static parameter set, part 2, on an external data medium (diskette) for the link type "open driver" in the mode "PRINTER OUTPUT". Press F6 (ENTER) in the STAT. PARAMETER SET 2 (PRINTER) screen form. If you exit the screen with F8 (RETURN), the static parameter set, part 1, is not written to diskette. If you press F1 (YES), you exit the screen form and the static parameter set is not entered. If you press F3 (NO), COM PP remains in the currently displayed screen form. ACK.023: SYSID file cannot be The system name and the creation date are stored in the read or interpreted. SYSID file. The file is required when writing the PROM. Create? This message is output if the file cannot be read or interpreted by COM PP. If you acknowledge with "YES", the old SYSID file is deleted and a new one created. ACK.024: Comment not yet on external memory. Leave screen form? The comment on the interface is only stored when importing the following screen form (3964/3964R PROCEDURE or OPEN DRIVER). The comment cannot be stored on its own. ACK.025: Interface already assigned parameters. Overwrite? You have already assigned parameters to an interface. Press F1 (YES) to overwrite. Press F3 (NO) to retain. ACK.026: Parameter already exists on disk. Overwrite? Parameters already exist on diskette. Press F1 (YES) to overwrite. Press F3 (NO) to retain. C79000-B8576-C191-01 8 - 45 8 COM PP Messages CP 544 ERR.001: Internal error following read/write access to external memory Exit COM PP by repeatedly pressing F8 ! Exit S5 KOMI as well and boot your PG. Then start COM PP again. The programmed data may be lost (on diskette or hard disk). For this reason always make a back-up copy. ERR.002: External memory (diskette) faulty or drive not available The diskette drive is open, the diskette or drive is not correctly formatted or is defective. You have selected a drive which does not exist. Close the drive or format the diskette correctly. Create the drive if applicable. ERR.003: External memory (diskette) write-protected The diskette cannot be written. Remove the write-protect tab or use a different diskette. ERR.004: File is write-protected You cannot write the file you have selected. Change the attribute of the file (PCPM: SET XXXXXXST.S5D [RW]) or select a new file. ERR.005: File cannot be interpreted (not a STEP 5 file) The file you have selected does not have a STEP 5 format and cannot be read. Enter a different file name. ERR.006: Diskette has been changed During an editing session with COM PP, the diskette was changed. This is not permitted. Insert the original diskette in the drive again. ERR.007: DX1/DX2 faulty This message is displayed during the plausibility check. Set up a new DX1/DX2 with COM PP. ERR.008: Printer parameters cannot be read An error has occurred reading the printer file or the printer file does not exist. Set up a new printer file with the STEP 5 basic package keeping to the name convention *DR.INI. ERR.009: Print to file not possible There is not enough memory for the print to file function. Create space on the PG by deleting unnecessary files. 8 - 46 C79000-B8576-C191-01 CP 544 ERR.010: Static parameter set faulty COM PP Messages These messages appear during the plausibility check. Set up new parameter sets with COM PP. ERR.011: Dynamic parameter set faulty ERR.012: External memory (diskette) full There is not enough space on the diskette and the data cannot be stored. Exit COM PP and delete the files you no longer require. ERR.013: Directory full No more files can be created because the maximum number of files has been reached. Exit COM PP and delete the files you no longer require. ERR.014: File does not exist The file you have selected (e.g. footer file) does not exist. ERR.015: File too big The file cannot be read into COM PP. The limit for the acknowledgement delay time has been ERR.016: Illegal ack. delay exceeded. Remember that the minimum values vary with time (HELP: limit values. SELECT: min the transmission speed. Press F7 to display the limit or F3 to obtain the minimum value). value suitable for the transmission speed. ERR.017: Illegal char. delay time (HELP: limit values. SELECT: min value) The limit for the character delay time has been exceeded. Remember that the minimum values vary with the transmission speed. Press F7 to display the limit or F3 to obtain the minimum value suitable for the transmission speed. ERR.018: Drive not available You have selected a non-existent drive. C79000-B8576-C191-01 8 - 47 8 COM PP Messages ERR.019: Static parameter set 1 faulty CP 544 These messages appear during the plausibility check. Set up the appropriate new parameter set. ERR.020: Static parameter set 1 too short. Cannot be interpreted ERR.021: Static parameter set 2 faulty ERR.022: Static parameter set 2 too short. Cannot be interpreted ERR.023: Parameter set too long (max. data block address DW 2042 exceeded) The parameter set cannot be stored. Change the mode of the static parameter set (select shorter mode) or shorten the header/footer or change your entry for "from DW" in the parameters for DX1/DX2. ERR.024: No. of header/footer lines illegal (cannot be processed) The header/footer editor cannot interpret the header/footer of the static parameter set (number of lines and delimiters do not correspond to the text). ERR.025: DX1/DX2 too short. These messages appear during the plausibility check. Cannot be interpreted Set up the appropriate new parameter set. ERR.026: DX1/DX2 faulty ERR.027: Stat. param. set too short. Cannot be interpreted ERR.028: Dyn. param. set too short. Cannot be interpreted ERR.029: No. of header/footer lines in static parameter set 2 illegal 8 - 48 C79000-B8576-C191-01 CP 544 ERR.030: Static parameter set and coordination bytes overlap. COM PP Messages When you assigned parameters, you specified the location of the receive mailbox and the parameter sets such that at least two memory areas are in the same data block and overlap each other. ERR.031: Static parameter set and dynamic This error only occurs if the parameters have not been parameter set overlap entered using the COM PP and were transferred to the CP using data handling blocks. ERR.034: Dynamic parameter set and coordination Change the parameters. bytes overlap ERR.037: Static parameter set and receive mailbox overlap ERR.040: Receive mailbox and coordination bytes overlap ERR.041: Error reading external memory. Plausibility check not done. When you exit a user program (return to the screen form "SELECTION") a plausibility check is made on the parameter sets. This means that all the data blocks involved must be read from external memory (diskette). If an error occurs when reading from diskette (e.g. diskette drive opened accidentally), the plausibility check cannot be performed. ERR.042: Static parameter set If the static parameter set and the data programmed in DX1/2 are in the same data block, the data may overlap if overlaps mailboxes or coordination bytes the static parameter set is extended. Change the location of the mailboxes, coordination bytes and parameter sets in DX1/DX2. ERR.043: Internal system error C79000-B8576-C191-01 Exit COM PP by repeatedly pressing F8 ! Exit S5 KOMI as well and boot your PG! Then start COM PP again. 8 - 49 8 COM PP Messages CP 544 ERR.044: SYSID cannot be interpreted The SYSID file (system identification) read by the CP cannot be interpreted by COM PP. Check that a CP 544 is inserted and that the PG-CP cable is connected. Check that the CP 544 and COM PP versions match. Repeat the last operation. Perhaps try by switching the CP off/on. ERR.045: The interface parameters to be transferred do not yet exist You wanted to transfer interface parameters (from the PG or CP) which do not yet exist. ERR.046: PG interface cannot be initialized Error when initialising the serial PG interface (possibly the cable to the CP was not connected previously and you have now connected it). Repeat the last operation (e.g. transmit, delete). ERR.047: Communication error A communication error has occurred between the PG and between PG and CP CP 544. The SYSID cannot be read. Repeat the last operation (e.g. transfer). Check that a CP 544 is inserted and that the PG-CP cable is connected. ERR.048: No CP 544 plugged The SYSID cannot be read by the CP or the SYSID read by the CP does not contain the identification "CP544". Check that a CP 544 is inserted and that the PG-CP cable is connected. ERR.049: CP error. You pressed F6 (READ) during the error output but the No test area received corresponding test blocks could not be received by the PG. Switch off the CP and on again and repeat the operation. ERR.050: CP memory is full 8 - 50 You wish to transfer data to the CP, but the CP or memory card has insufficient space. Use a larger memory card. C79000-B8576-C191-01 CP 544 COM PP Messages ERR.051: Block exists in EPROM You wished to create, transmit or delete an interface on the CP. The EPROM cannot be overwritten or deleted, however. ERR.052: Memory error in CP RAM The CP is in an undefined state. Switch the CP off and on again (remove module from rack if applicable). ERR.053: Function illegal in current CP status Certain COM PP functions (test functions) are only permissible in specific CP states (STOP, RUN, TEST). ERR.054: Compression of CP memory aborted The CP 544 memory was being reorganized but could not be completed (e.g. because of brief voltage dip in power supply). The memory is nevertheless consistent and you can continue working. ERR.055: User submodule not present in CP This message is output if you wish to transfer reloadable drivers to the CP (only possible in next version of COM PP). Insert a memory card into the CP. ERR.056: Error in user submodule of CP This error may occur with a brief voltage dip. It may also mean that the memory card or the internal RAM of the CP is faulty. Try to repeat the last operation. Switch the CP off and on again (remove CP from rack). Replace the memory card if the error has not yet been cleared. The module may be faulty if you are not using a memory card or if the error occurs with the card replaced. ERR.057: User submodule in CP is EPROM You wanted to transfer/delete data on the CP. The user submodule is an EPROM, however, and cannot be overwritten. Insert a RAM user submodule. C79000-B8576-C191-01 8 - 51 8 COM PP Messages CP 544 ERR.058: Data block The parameter set which you wished to transmit cannot (DX1/DX2) cannot be be loaded onto the CP 544. The CP checks the loaded parameter set (DX1/DX2) transmitted from the COM PP. This error should not actually occur since the COM PP itself carries out a test prior to the transfer. The COM PP carries out a test when selecting a program (screen form SELECTION). Return to this form and carry out the test. If you have generated the parameter set online, attempt to enter the parameters again. If this still does not work, the CP and COM PP versions do not correspond, or either the CP or the COM PP is faulty. ERR.059: CP memory write-protected You have inserted a memory card in the CP but have set the write-protect function. ERR.060: Protocol error in CP - A general error (protocol error) has occurred during the PG communication CP - PG transmission. Repeat the last operation. Check whether the cable is subject to external interferences. ERR.061: Internal error in CP The CP 544 is in an undefined status. Communication between the CP 544 and the PG is not possible. Switch the CP off and on again (remove briefly from rack). The CP is faulty if this is unsuccessful. ERR.062: Timeout in CP - PG communication The CP 544 does not reply within a defined acknowledgement time. Check the connection cable to the CP 544. Check whether the correct module is inserted and switched on. Leave the COM if applicable and recall it. Switch off the CP if applicable and then on again by pulling it briefly out of the rack. ERR.063: Transmission error A general error (in the bottom transmission layer) has occurred in the CP - PG transmission. Repeat the last operation. Check whether the cable is subject to external interferences. 8 - 52 C79000-B8576-C191-01 CP 544 COM PP Messages ERR.064: AS interface in PG not ready Serial interface of PG in undefined status (possibly the cable to the CP was not connected previously and you have now connected it). Repeat the last operation (e.g. transmit, delete). ERR.065: External memory (diskette) full or directory full Insufficient space on the diskette, or the maximum number of files has been exceeded. Exit COM PP and delete the files you no longer require. ERR.066: Path selection unsuccessful. Path cancelled The online connection from the COM PP to the CP 544 could not be established. Check that all modules and connections are configured correctly in your bus configuration. Try the last operation again. ERR.067: Path does not match KOMI default setting The defined path does not match the default setting. The default setting is specified outside the COM PP in the S5 KOMI (e.g. AS 511, SINEC L2). Select a matching path or modify the path in the package "BUS SELECTION". ERR.068: Path does not exist in path file You can only specify paths which are already present in the path file. COM PP displays all existing paths for the specified path file when you press F3 (SELECT). ERR.069: H1-CP not configured The online connection from the COM PP to the CP 544 could not be esatblished via SINEC H1. Your local H1-CP in the PG is not configured. 8 IMF.001: Screen form not found IMF.002: Field not found Exit COM PP by repeatedly pressing F8. The configured data may be lost (on the external memory). For this reason always make a back-up copy. IMF.003: Illegal call C79000-B8576-C191-01 8 - 53 9 What is a Typical Application of the CP 544? Contents of Chapter 9 9 What is a Typical Application of the CP 544? . . . . . . . . 9.1 Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 6 9.2 Objective. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 7 9.3 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 8 9.4 COM PP Parameterization Package . . . . . . . . . . . . . . . . . . . . . . . . 9 - 12 9.4.1 Installation of COM PP on the PG 7xx . . . . . . . . . . . . . . . . . . . . . . 9 - 12 9.4.2 Call COM PP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 13 9.5 CP 544 Parameter Sets for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 13 9.5.1 Assign Parameters to Static Parameter Set . . . . . . . . . . . . . . . . . . 9 - 14 9.5.2 Transfer Parameters to CP 544 User Memory . . . . . . . . . . . . . . . . 9 - 15 9.6 CP 544 Parameter Sets for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 16 9.7 SEND Job from Data Block to Data Block . . . . . . . . . . . . . . . . . . . 9 - 17 C79000-B8576-C191-01 9-5 9-1 Contents 9.7.1 CP 544 Parameter Sets for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 19 9.7.2 9.7.2.1 9.7.2.2 STEP 5 Program for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 19 Starting the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 20 Cyclic Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 21 9.7.3 CP 544 Parameter Sets for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 24 9.7.4 9.7.4.1 9.7.4.2 STEP 5 Program for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 24 Starting the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 25 Cyclic Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 26 9.7.5 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 28 9.8 FETCH Job from Data Block to Data Block . . . . . . . . . . . . . . . . . . 9 - 29 9.8.1 CP 544 Parameter Sets for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 31 9.8.2 STEP 5 Program for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 32 9.8.3 CP 544 Parameter Sets for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 34 9.8.4 STEP 5 Program for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 34 9.8.5 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 36 9.9 SEND Job "Flag to Data Block". . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 37 9.9.1 CP 544 Parameter Sets for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 39 9.9.2 STEP 5 Program for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 39 9.9.3 CP 544 Parameter Sets for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 40 9.9.4 STEP 5 Program Extension for PLC 2 . . . . . . . . . . . . . . . . . . . . . . 9 - 40 9.9.5 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 42 9.10 Coordination Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 43 9.10.1 CP 544 Parameter Sets for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 44 9.10.2 STEP 5 Program for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 45 9-2 C79000-B8576-C191-01 Contents 9.10.3 CP 544 Parameter Sets in PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 47 9.10.4 STEP 5 Program for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 47 9.10.5 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 48 9.11 PSEUDO-WRITE Job "Input to Data Block" . . . . . . . . . . . . . . . . . . 9 - 49 9.11.1 CP 544 Parameter Sets for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 51 9.11.2 STEP 5 Program for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 51 9.11.3 CP 544 Parameter Sets for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 54 9.11.4 STEP 5 Program for PLC 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 55 9.11.5 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 55 9.12 Reading the Error Message Area in the SYSTAT . . . . . . . . . . . . . . 9 - 56 9.12.1 STEP 5 Program for PLC 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 56 9.12.2 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 59 9.13 Date/Time Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 60 9.13.1 Read Date/Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 61 9.13.1.1 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 62 9.13.2 Set Date/Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 62 9.13.2.1 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 63 9.13.3 Synchronization of Several CP Hardware Clocks . . . . . . . . . . . . . . 9 - 64 9 C79000-B8576-C191-01 9-3 CP 544 9 Application Examples What is a Typical Application of the CP 544? The following application example shows how you can actually use the CP 544 communications processor. The RK 512 computer link has been selected as the data transmission mode. The example is also interesting if you wish to use the 3964/3964R procedures or the open driver since it indicates the basic procedure when using the CP 544. The application example is divided as follows: * You will first be informed of the prerequisites necessary to implement the point-to-point link described * The required hardware settings are then explained * The next step describes how you can assign parameters to the CP 544 using the COM PP parameter assignment software * You are finally shown how the associated STEP 5 program should appear for the CPU of the programmable controller. 9 C79000-B8576-C191-01 9-5 Application Examples 9.1 CP 544 Prerequisites You require the following if you wish to implement the described application example: Hardware * * * * * * * * Two CP 544 modules Two interface submodules (e.g. TTY) One connecting cable CP 544 CP 544 (TTY) One PG 7xx programmer One adapter cable PG CP 544 Two S5-135U programmable controllers Two CPU 928 modules with RAM submodule One connecting cable PG CPU 928 and if possible: * * One digital input module (24 V, min. 8 channels) One digital output module (24 V, min. 8 channels) and: Software * * * 9-6 The S5-DOS parameterization package COM PP The STEP 5 basic package for the PG 7xx programmer (supplied with your programmer) Data handling blocks for the CPU 928. C79000-B8576-C191-01 CP 544 9.2 Application Examples Objective The following tasks must be solved: * * * * * * * Data are transmitted from a data block in one PLC to a data block in the other PLC The data are subsequently fetched from the data block of the second PLC and stored in a data block A flag word is then sent cyclically to a data word of the partner The acceptance of this cyclically sent data is inhibited by a coordination flag A PSEUDO-WRITE job is programmed to demonstrate the PSEUDO-READ/WRITE function and used to send an input byte to a data word of the partner Reading of the error message area in the SYSTAT is carried out Reading and adjustment of the CP 544 hardware clock are shown, and the synchronization of several CP hardware clocks explained. The individual tasks are limited to that which is absolutely essential and are loosely based on one another. The DIRECT jobs (i.e. the jobs which trigger job processing) are entered into the queue of the CP 544 which accommodates 20 jobs and processed in the order in which they are entered. Jobs which are already in the queue are not entered again. Since less than 20 DIRECT jobs are programmed in this application example, a triggered DIRECT job is always processed. Interlocking of jobs is therefore unnecessary in this application example. C79000-B8576-C191-01 9-7 9 Application Examples 9.3 CP 544 Hardware A point-to-point link is to be made between two SIMATIC S5 programmable controllers in this application example. The programmable controllers used are two S5-135Us with one CPU 928 each. S5-135Us Insert the two CPUs 928 into the provided slots of the two S5-135Us. Carry out an overall reset for the CPUs and then switch the mode selector to STOP. 1st CP 544 Set page frame number 2 on a CP 544, i.e. press down all switches in switch assembly S2 apart from position 1. Enable the communication flag bytes 0 to 31 on this CP 544 by setting all switches in switch assembly S4 upwards apart from position 0. Set the number of pages per interface to 1 by pressing down the switch at position 1 in switch assembly S5 and setting the switch at position 0 upwards. Insert this CP into a provided slot (see Section 2.5) in one of the S5-135Us. 2nd CP 544 Set the page frame number to 0 on the other CP (press down all switches in switch assembly S2) and disable all communication flags (set all switches in switch assembly S4 upwards). Set the number of pages per interface to 1 by pressing down the switch at position 1 in switch assembly S5 and setting the switch at position 0 upwards. Insert the CP 544 into a provided slot (see Section 2.5) in the other S5-135U. Connecting cable Connect the top device interfaces (SI 1) of the two CPU modules together using the associated connecting cable. 9-8 C79000-B8576-C191-01 CP 544 Input/output modules Application Examples Set the module address to 0 on the digital input module and the digital output module. The input byte IB 0 and the output byte QB 0 are available for this purpose. Insert the modules into any free slots in one of the S5-135Us. Assignment of input byte IB 0: Bit 0 Not used Bit 1 Trigger SEND 1 PLC job (see Section 9.7) Bit 2 Trigger FETCH 2 PLC job (see Section 9.8) Bit 3 Trigger PSEUDO-WRITE PLC job (see Section 9.11) Bit 4 Reset error message area in SYSTAT (see Section 9.12) Bit 5 Trigger date/time synchronization (see Section 9.13.3) Bit 6 Trigger date/time setting (see Section 9.13.2) Bit 7 Reset coordination flag (see Section 9.10) Assignment of output byte QB 0: C79000-B8576-C191-01 Bit 0 SYNCHRON parameterization error (see Section 9.7) Bit 1 Error with SEND 1 PLC job (see Section 9.7) Bit 2 Error with FETCH 2 PLC job (see Section 9.8) Bit 3 Error with PSEUDO-WRITE job (see Section 9.11) Bit 4 Error when reading SYSTAT error message area (see Section 9.12) Bit 5 Error when reading CP 544 clock (see Section 9.13.1) Bit 6 Error when setting CP 544 clock (see Section 9.13.2) Bit 7 Error when synchronizing slave clocks (see Section 9.13.3) 9 9-9 Application Examples CP 544 If you do not have any input/output modules, use flag byte FY 0 instead of input byte IB 0. You can modify these flags using the STEP 5 online function FORCE VARIABLE. In the description below, the S5-135U which also contains the digital input/output modules is referred to as PLC 1, and the other S5-135U as PLC2. Programmable controller 1 S5-135U/CPU 928 Programmable controller 2 S5-135U/CPU 928 ... Digital input/output modules CPU 928 ... CPU 928 CP 544 Fig. 9-1 9 - 10 CP 544 System configuration in application example C79000-B8576-C191-01 CP 544 Programmer Application Examples Connect the PG 7xx programmer to the PG interface of the CP 544 using the corresponding adapter cable. STEP 5 basic package for PG 7xx COM PP parameterization software PG 750 ... Fig. 9-2 CPU CP 544 ... S5-135U programmable controller Use of programmer for point-to-point link 9 C79000-B8576-C191-01 9 - 11 Application Examples 9.4 CP 544 COM PP Parameterization Package The prerequisites for the generation of the parameter sets for the computer link are provided in this section. 9.4.1 Installation of COM PP on the PG 7xx You require a PG 7xx programmer in which the STEP 5 basic package is already installed. Select drive C: user level 0 by entering 0: Copy the contents of the COM PP floppy onto the hard disk drive user level 0 using PIP C:=A:*.*[R V] (option: V = copy check, R = copy SYS files) Declare the COM PP files as write-protected system files using SET SET SET SET S5PXCPPX.CMD [SYS RO] S5PDCPPX.CMD [SYS RO] S5PECPPX.CMD [SYS RO] S5PFCPPX.CMD [SYS RO] You can now use COM PP in every user level. Leave user level 0 using n: (n = required user level) 9 - 12 C79000-B8576-C191-01 CP 544 9.4.2 Application Examples Call COM PP Now call the package selection form using S5 Position the cursor to the line "COM PP" and select the COM PP parameter assignment software for the CP 544 using function key F1 (PACKAGE). The COM PP startup form appears. 9.5 CP 544 Parameter Sets for PLC 1 Generate the parameter sets for the CP 544 using the COM PP parameter assignment software. Following selection of the language, you are provided with the screen form "SELECTION". Enter the following values: Parameterization of module CP 544 Program file C:RKCP01ST.S5D SYSID file C:RKCP01SD.INI System name Application example Generation date 00.00.00 (actual date) Interface 1 Path file AP.INI Path name Data to 9 FILE Import the entered data. C79000-B8576-C191-01 9 - 13 Application Examples CP 544 Then access the screen form "CONFIGURATION" and enter the following parameters: Type of link RK 512 WITH 3964R WITH DEFAULT VALUES Comment Application example, generated by .... Import the entered data. 9.5.1 Assign Parameters to Static Parameter Set Enter the following parameters in the screen form "STATIC PARAMETER SET": Transmission mode MODE 1: RK 512 WITH 3964 WITH DEFAULT VALUES Baud rate 9600 bps Parity EVEN Bits per character 8 Stop bits 1 Priority HIGH Character delay time 22 * 10 ms Acknowledgement delay time 55 * 10 ms Number of 6 connection attempts Number of repetitions 6 These parameters are automatically entered in the current mode. Import the entered data. 9 - 14 C79000-B8576-C191-01 CP 544 9.5.2 Application Examples Transfer Parameters to CP 544 User Memory Transfer the generated parameters to the CP 544 user memory (internal RAM or RAM user submodule) by means of the screen form "TRANSFER": * * first select the transmission direction and then specify the CP interface. Source Destination Data medium FD CP Drive B Interface 1 Program name RKCP01ST.S5D 1 You must restart the CP 544 following transmission of the parameters. Do this by pressing the function key "COLD RESTART" for the corresponding device interface. The LED TXD 1 on the front panel of the CP 544 must not subsequently light up permanently (see Section 2.10). The parameter settings are not correct or are incomplete if this is the case. You have then carried out all preparations on the CP in PLC 1 for programming the RK 512 computer link function. 9 C79000-B8576-C191-01 9 - 15 Application Examples 9.6 CP 544 CP 544 Parameter Sets for PLC 2 The parameter settings of the computer link for the CP 544 in PLC 2 are identical to the parameter settings of the computer link for the CP 544 in PLC 1 apart from the setting of the priority in the static parameter set. You can therefore copy the file in which the parameters are stored. To do this, leave STEP 5 and copy at the operating system level. The command with PCP/M is e.g.: PIP RKCP02ST.S5D = RKCP01ST.S5D Subsequently change the priority to LOW using COM PP and transfer the modified file to the CP 544 in PLC 2. The parameter settings for the two CP 544 modules have then been completed and you can now commence with generation of the STEP 5 program. 9 - 16 C79000-B8576-C191-01 CP 544 9.7 Application Examples SEND Job from Data Block to Data Block Start with a SEND job from PLC 1 to PLC 2. Task 20 data words are to be transferred from data block DB 10 (starting at data word DW 0) in the CPU 928 of PLC 1 to data block DB 11 (starting at data word DW 4) in the CPU 928 of PLC 2. The source and destination data can thus be completely different. The following program structure is then required: PLC 1 CPU PLC 2 CP 544 SENDDIRECT Job No. 1 Source = DB10 20DW from DW0 T R I G G E R D T CPU CP 544 DT RK 512 RK 512 SENDALL DT Job No. 0 RECEIVEALL Job No. 0 DT DT DT Data DB 10 DW 0 to 19 Job No. 1 Data SEND DB 11 DW 4 to 23 Destination from DW4 in DB11 DT = data transfer Fig. 9-3 C79000-B8576-C191-01 Structure of a SEND job from DB to DB 9 - 17 9 Application Examples CP 544 The static parameters have already been loaded into the user memories of the two CPs 544 (see Section 9.5.2). A job need only be programmed on the CP 544 in the active PLC. The active PLC is the one which triggers the data exchange. You need thus only program a SEND job for the CP 544 of PLC 1. The SEND job is triggered by the CPU by calling the data handling block SEND-DIRECT with job number "n". Select job number 1. The associated job on the CP 544 has the same job number "n". This job contains information on the data destination in PLC 2. The CP 544 then fetches the data by calling the data handling block SEND-ALL and transfers the data from the CPU/DB 10 to the CP 544 in PLC 2. The CP 544 receives the data in PLC 2. By calling RECEIVE-ALL, it stores the data in the destination defined by PLC 1. The SEND-ALL has the job number A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether the CP requires data. If yes, the SEND-ALL fetches these from the defined source and transfers them to the CP 544. If data are not required, the function block is left and the cyclic program continued. The RECEIVE-ALL has the job number A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether the CP wishes to transfer data to the CPU. If yes, the RECEIVE-ALL stores these at the destination address defined by the CP 544. If data are not to be transferred, the function block is left and the cyclic program continued. 9 - 18 C79000-B8576-C191-01 CP 544 9.7.1 Application Examples CP 544 Parameter Sets for PLC 1 The parameter settings of the computer link on the CP 544 in PLC 1 must be extended by the dynamic parameter set for job 1. You can access the screen form "DYNAMIC PARAMETER SET" in the COM PP by pressing the key "ENTER" in the screen form "CONFIGURATION". Enter the following parameters: Job No. 1 Job SEND Data destination DATA BLOCK DB No. 11 Destination address from 4 dec. You need not specify a CPU number since this is not multi-processor mode. A coordination flag need not be entered either. Import the entered data. Subsequently transfer the dynamic parameter set to the CP and carry out a cold restart as described in Section 9.5.2. 9.7.2 STEP 5 Program for PLC 1 Call the S5 package LAD, CSF, STL, name your STEP 5 program file "B:RKAG01ST.S5D" and select STL. Transfer the data handling blocks for the CPU 928 into this program file. Connect the CPU 928 to the PG 7xx. The STEP 5 program must: * * * C79000-B8576-C191-01 Synchronize the CPU and CP 544 during the PLC startup Trigger the SEND job Transfer the data from the CPU to the CP 544. 9 - 19 9 Application Examples 9.7.2.1 CP 544 Starting the Program You must call the data handling block SYNCHRON unconditionally in the restart organization blocks OB 20, OB 21 and OB 22. SYNCHRON The interface number SSNR for the device interface 1 (SI 1) is the same as the set page number "2". Select frame size "2". Data can then be transferred in portions of up to 32 bytes at once between the CPU and CP 544. Any other frame size can also be used. If you wish to transfer more data than correspond to the set frame size, the CP 544 simply requests the remaining data with further SEND-ALL calls. You can use the frame size to decide whether you wish to transfer large or small amounts of data per SEND-ALL (and RECEIVE-ALL) call. In the case of a small frame size, the data exchange is distributed amongst several cycles, and only requires a small portion of the cycle time. Large amounts of data can be transmitted at once using large frame sizes, but this requires a larger cycle time. Use flag byte "FY 10" as the parameterization error byte PAFE. 9 - 20 C79000-B8576-C191-01 CP 544 Application Examples Restart organization blocks OB 20, OB 21 and OB 22 The restart organization blocks OB 20, OB 21 and OB 22 thus appear as follows: NAME SSNR BLGR PAFE : JU FB125 : SYNCHRON : KY0,2 : KY0,2 : FY10 : : BE SYNCHRONIZATION CP 544 CPU INTERFACE NUMBER 2 FRAME SIZE: 2 (MAX. 32 BYTE) PARAMETERIZATION ERROR BYTE A parameterization error is to be indicated at digital output Q 0.0. Since a process image, and thus digital inputs/outputs, cannot be processed in the restart organization blocks, the indication can only be made in the cyclic program (OB 1). If an error occurs here, check whether the interface number and page number are the same. If this is the case, the error indicates a hardware fault. A computer link cannot be carried out in this case. 9.7.2.2 Cyclic Program At the beginning of the cyclic program, an indication is first made of whether a parameterization error has occurred during the restart. SEND-DIRECT C79000-B8576-C191-01 The SEND job is triggered by a SEND-DIRECT call, i.e. a call of the data handling block SEND with a job number not equal to 0 (job number 1 in the example). The job number on the SEND-DIRECT must agree with that of the job in the CP 544. The job is to be executed if a positive edge appears at digital input I 0.1. 9 - 21 9 Application Examples CP 544 The interface number SSNR "2" and the job number A-NR "1" must be programmed. Select the status word ANZW "FW 11" and parameterization error byte PAFE "FY 15". The status word occupies two words. Flag word FW 11 indicates the job status and error messages, if any. The number of transmitted data per SEND-ALL call is indicated in flag word FW 13. Information on the source of the data in the CPU must be made on the data handling block with the SEND job. The data source is to be a data block (source type QTYP "DB") with the number DBNR "10". The source start QANF is data word "0", and the source length QLAE is "20" data words. The SEND job is triggered by the result of the logic operation 1. If the result of the logic operation with the call is 0, the status word is only updated. The termination of the job with an error, or the occurrence of a parameterization error, is indicated at the digital output Q 0.1. In the event of an error, evaluate the error numbers in the parameterization error byte PAFE, the status word ANZW and the error message area in the SYSTAT (see also Section 9.12). SEND-ALL 9 - 22 The job is triggered by the SEND-DIRECT call. The data are transmitted by the SEND-ALL call. The interface number must also be SSNR "2". The job number A-NR is "0". We shall select status word ANZW "FW 16" and parameterization error byte "FY 18". The status word is only one word long with the ALL function. The least significant byte (FY 17) indicates the number of the job for which the SEND-ALL is currently transmitting data from the CPU to the CP, i.e. job number 1 in our case. The SEND-ALL can be called with any result of the logic operation. C79000-B8576-C191-01 CP 544 Organization block OB 1 Application Examples The corresponding program in the cyclic organization block OB 1 is shown below. NAME SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE NAME SSNR A-NR ANZW PAFE C79000-B8576-C191-01 :A F 10.0 := Q 0.0 : : : AN I 0.1 :R F 2.1 :A I 0.1 : AN F 2.1 :S F 2.1 : : JU FB120 : SEND : KY0,2 : KY0,1 : FW11 : KSDB : KY0,10 : KF+0 : KF+20 : FY15 : :0 F 12.3 :0 F 15.0 := Q 0.1 : : JU FB126 : SEND-A : KY0,2 : KY0,0 : FW16 : FY18 : : BE IF SYNCHRON PARAMETERIZATION ERROR HAS OCCURRED SET OUTPUT EDGE EVALUATION: THE RESULT OF THE LOGIC OPERATION RLO IS SET FOR A CYCLE IF THE SIGNAL AT INPUT I 0.1 CHANGES FROM 0 TO 1 . TRIGGER SEND JOB 1 INTERFACE NUMBER 2 JOB NUMBER 1 STATUS WORD SOURCE TYPE DATA BLOCK SOURCE DATA BLOCK DB 10 SOURCE START DATA WORD 0 SOURCE LENGTH 20 DATA WORDS PARAMETERIZATION ERROR BYTE JOB 1 FINISHED WITH ERROR OR PARAMETERIZATION ERROR INDICATE AT OUTPUT Q 0.1 INTERFACE NUMBER 2 JOB NUMBER 0 0 STATUS WORD PARAMETERIZATION ERROR BYTE 9 - 23 9 Application Examples Data block DB 10 CP 544 Only the data source is now missing - data block DB 10. It should be at least 63 data words long so that its length is also sufficient for the other application examples. Assign the first 20 data words DW 0 to DW 19 with values not equal to 0. Transfer the data handling blocks for the PLC 1 and OB 20, OB 21, OB 22, OB 1 and DB 10 to the user memory of your CPU. Carry out a cold restart on the CPU. The green LED (RUN display) must light up. The LED TXD 1 goes out on the CP. 9.7.3 CP 544 Parameter Sets for PLC 2 No modifications are made to the previous parameter settings of the computer link from Section 9.6 since a job is not required in the passive PLC 2, and thus no dynamic parameter set either. Set the CP 544 to operating mode RUN. The red interface-specific LED display TXD 1 on the CP 544 continues to flash slowly. The parameter settings are incorrect or incomplete if this is not the case, or there is a CP 544 hardware error. 9.7.4 STEP 5 Program for PLC 2 Connect the CPU 928 to the PG 7xx. Call the S5 package LAD, CSF, STL, name your STEP 5 program file for the PLC 2 "B:RKAG02ST.S5D" and select STL. Transfer the data handling blocks for the S5-135U into this program file. 9 - 24 C79000-B8576-C191-01 CP 544 Application Examples The STEP 5 program must * * 9.7.4.1 synchronize the CPU and CP 544 when restarting the PLC, transfer the received data from the CP 544 to the CPU. Starting the Program You must call the data handling block SYNCHRON unconditionally in the restart organization blocks OB 20, OB 21 and OB 22. SYNCHRON The interface number SSNR for the device interface 1 (SI 1) is the same as the set page frame number "0". We shall select the smallest frame size "1". Data can thus be transferred in portions of up to 16 bytes at once between the CPU and CP 544. Any other frame size can also be used. If more than 16 bytes are transmitted, the remaining data are simply stored in the CPU with further RECEIVE-ALL calls. You can use the frame size to define whether you wish to transfer large or small amounts of data per RECEIVE-ALL (and SEND-ALL) call. In the case of a small frame size, the data exchange is distributed amongst several cycles, and only requires a small portion of the cycle time. Large amounts of data can be transmitted at once using large frame sizes, but this requires a larger portion of the cycle time. Use flag byte "FY 10" as the parameterization error byte PAFE. C79000-B8576-C191-01 9 - 25 9 Application Examples Restart organization blocks OB 20, OB 21 and OB 22 CP 544 The restart organization blocks OB 20, OB 21 and OB 22 thus appear as follows: NAME SSNR BLGR PAFE : JU FB125 : SYNCHRON : KY0,0 : KY0,1 : FY10 : : BE SYNCHRONIZATION CP CPU INTERFACE NUMBER 0 FRAME SIZE 1 (MAX. 16 BYTE) PARAMETERIZATION ERROR BYTE A parameterization error is indicated by flag F 10.0. If an error occurs here, check whether the interface number and page frame number are the same. If this is the case, the error indicates a hardware fault. A computer link cannot be carried out following a parameterization error during the restart. 9.7.4.2 Cyclic Program RECEIVE-ALL 9 - 26 The data transfer from the CP 544 to data block DB 11 is carried out by a RECEIVE-ALL call. The interface number SSNR must be "0". The job number A-NR is "0". Select status word ANZW "FW 11". The status word is only one word long for the ALL function. The coordination flag byte number of the job which has just sent data is indicated here in the least significant byte (FY 12) with the last RECEIVE-ALL for a job (see Section 9.10). Since a coordination flag has not been programmed in this example, DEH appears there for a call with the last RECEIVE-ALL. The parameterization error byte PAFE is flag byte "FY 13". C79000-B8576-C191-01 CP 544 Application Examples The data handling block RECEIVE-ALL can be called by any result of the logic operation (RLO). Organization block OB 1 The corresponding program in the cyclic organization block OB 1 thus appears as follows: NAME SSNR A-NR ANZW PAFE Data block DB 11 : JU FB127 : RECEIVE : KY0,0 : KY0,0 : FW11 : FY13 : : BE RECEIVE-ALL CALL INTERFACE NUMBER 0 JOB NUMBER 0 STATUS WORD PARAMETERIZATION ERROR BYTE Only the data destination is now missing - data block DB 11. This must be at least 24 data words long. Transfer the S5-135U data handling blocks as well as OB 20, OB 21, OB 22, OB 1 and DB 11 into the user memory of your PLC 2. Carry out a cold restart on the CPU. The green LED (RUN display) must continue to light up. The red LED TXD1 goes out on the CP. 9 C79000-B8576-C191-01 9 - 27 Application Examples 9.7.5 CP 544 Testing Monitor the data words DW 4 to DW 23 of data block DB 11 in the PLC 2 using the PG 7xx online function FORCE VARIABLE. Then switch digital input I 0.1 on the PLC 1 from "0" to "1". The values from DB 10 in the PLC 1 now appear in DB 11 in the PLC 2. If you do not have a digital input module, use the flag F 0.1 instead of input I 0.1. Set the flag using the PG 7xx online function FORCE VARIABLE (or reset it). Monitor the status word FW 11 and the parameterization error byte FY 15 using FORCE VARIABLE. 9 - 28 C79000-B8576-C191-01 CP 544 9.8 Application Examples FETCH Job from Data Block to Data Block The data which have been sent in Section 9.7 to the PLC 2 are fetched back from the PLC 2 into the PLC 1 again using a FETCH job. Task 20 data words are to be fetched from data block DB 11 (starting at data word DW 4) in the PLC 2 and transferred to data block DB 10 (starting at data word DW 20) in the PLC 1. The source and destination data are again completely different. The following program structure is required: PLC 1 CPU PLC 2 CP 544 CPU CP 544 FETCHDIRECT Job No. 2 Destination = DB 10 20DW from DW20 T R I G G E R DT RK 512 RK 512 RECEIVEALL DT Job No. 0 SENDALL Job. No. 0 DT DT DT Job No. 2 FETCH Source from DW 4 in DB 11 Data DB 10 DW 20 to 39 Data DB 11 DW 4 to 23 DT = data transfer Fig. 9-4 C79000-B8576-C191-01 Structure of a FETCH job from DB to DB 9 - 29 9 Application Examples CP 544 The static parameters have already been loaded into the user memories of the two CPs 544 (see Section 9.5.2). A job need only be programmed on the CP 544 in the active PLC. The active PLC is the one which triggers the data exchange. You need thus only program a FETCH job for the CP 544 of PLC 1. The FETCH job is triggered by the CPU by calling the data handling block FETCH-DIRECT with job number "n". We shall select job number 2. The associated job on the CP 544 has the same job number "n". This job contains information on the data source in the PLC 2; information on the data destination in the PLC 1 is stored in the FETCH-DIRECT. The CP 544 in PLC 1 sends a request message to the CP 544 in PLC 2 with information on where the data are to be fetched from. The CP 544 in PLC 2 fetches the requested data from data block DB 11 of the CPU by means of a SEND-ALL and transfers them to PLC 1. They are received there by the CP 544 and stored in data block DB 10 by a RECEIVE-ALL. The SEND-ALL has the job number A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether the CP requires data. If yes, the SEND-ALL fetches these from the source defined by the CP 544 and transfers them to the CP 544. If data are not required, the function block is left and the cyclic program continued. The RECEIVE-ALL has the job number A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether the CP wishes to transfer data to the CPU. If yes, the RECEIVE-ALL stores these at the destination defined by the CP 544. If data are not to be transferred, the function block is left and the cyclic program continued. 9 - 30 C79000-B8576-C191-01 CP 544 9.8.1 Application Examples CP 544 Parameter Sets for PLC 1 The parameter settings of the computer link on the CP 544 in the PLC 1 must be extended by the dynamic parameter set for job 2. You can access the screen form "DYNAMIC PARAMETER SET" in the COM PP by pressing the key "ENTER" in the screen form "CONFIGURATION". Scroll to job number 2. Enter the following parameters: Job No. 2 Job FETCH Data source DATA BLOCK DB No. 11 Source address from 4 dec. You need not specify a CPU number since this is not multi-processor mode. A coordination flag need not be entered either. Import the entered data. Subsequently transfer the dynamic parameter set to the CP and carry out a cold restart as described in Section 9.5.2. 9 C79000-B8576-C191-01 9 - 31 Application Examples 9.8.2 CP 544 STEP 5 Program for PLC 1 The FETCH job is triggered by means of a FETCH-DIRECT call with a job number not equal to 0, job number 2 in our example. The job number on the FETCH-DIRECT block and that of the job in the CP 544 must agree. The job is to be executed if a positive edge occurs at the digital input I 0.2. FETCH-DIRECT The interface number SSNR "2" and the job number A-NR "2" must be programmed. Select the flag word "FW 20" as the status word ANZW and the flag byte "FY 24" as the parameterization error byte PAFE. The job status and any error messages are indicated in the status word. Information on the data destination in the PLC 1 must be defined on the data handling block FETCH-DIRECT. The data destination should be the data block (destination type QTYP "DB") with the number DBNR "10". The destination start ZANF is data word "20", and the destination length ZLAE is "20" data words. The FETCH job is triggered by the result of the logic operation 1. If the result of the logic operation with the call is 0, the status word is only updated. The termination of the job with an error, or the occurrence of a parameterization error, is indicated at the digital output Q 0.2. In the event of an error, evaluate the error numbers in the parameterization error byte PAFE, the status word ANZW and the error message area in the SYSTAT (see also Section 9.12). RECEIVE-ALL 9 - 32 The data sent by the PLC 2 are stored in the CPU 928 by the CP 544 of PLC 1 by means of RECEIVE-ALL. The interface number must also be SSNR "2". The job number A-NR is "0". Select status word ANZW "FW 25" and parameterization error byte PAFE "FY 27". The number of the job for which the RECEIVE-ALL transfers data from the C79000-B8576-C191-01 CP 544 Application Examples CP to the CPU is stored there in the least significant byte (FY 26). This is job number 2 in our example. The RECEIVE-ALL can be called with any result of the logic operation (RLO). Organization block OB 1 Call the program file "B:RKAG01ST.S5D" in the STEP 5 presets form and extend the organization block OB 1 by the following statements: NAME SSNR A-NR ANZW ZTYP DBNR ZANF ZLAE PAFE NAME SSNR A-NR ANZW PAFE C79000-B8576-C191-01 : AN I 0.2 :R F 2.2 :A I 0.2 : AN F 2.2 :S F 2.2 : : JU FB122 : FETCH : KY0,2 : KY0,2 : FW20 : KSDB : KY0,10 : KF+20 : KF+20 : FY24 : :O F 21.3 :O F 24.0 := Q 0.2 : : JU FB127 : REC-A : KY0,2 : KY0,0 : FW25 : FY27 EDGE EVALUATION: THE RESULT OF THE LOGIC OPERATION RLO is "1" FOR A CYCLE IF THE SIGNAL AT INPUT I 0.2 CHANGES FROM 0 TO 1. TRIGGER FETCH JOB 2 INTERFACE NUMBER 2 JOB NUMBER 2 STATUS WORD DESTINATION TYPE DATA BLOCK DESTINATION DATA BLOCK DB 10 DESTINATION START DATA WORD 20 DESTINATION LENGTH 20 DATA WORDS PARAMETERIZATION ERROR BYTE JOB 2 FINISHED WITH ERROR OR PARAMETERIZATION ERROR INDICATE AT OUTPUT Q 0.2 RECEIVE-ALL CALL 9 INTERFACE NUMBER 2 JOB NUMBER 0 STATUS WORD PARAMETERIZATION ERROR BYTE 9 - 33 Application Examples CP 544 Transfer the extended OB 1 to the user memory of your CPU 928. Data block DB 10 9.8.3 Data block DB 10 has already been generated with a sufficient length in the previous example. CP 544 Parameter Sets for PLC 2 No modifications are made to the previous parameter settings of the computer link from Section 9.6 since a job is not required in the passive PLC 2, and thus no dynamic parameter set either. 9.8.4 STEP 5 Program for PLC 2 SEND-ALL The transfer of the data requested by PLC 1 from the CPU (data block DB 11) to the CP 544 in PLC 2 is carried out by a SEND-ALL call. The interface number SSNR must be "0". The job number A-NR is "0". Select status word ANZW "FW 14". The coordination flag byte number of the job for which the data are fetched is indicated there in the least significant byte (FY 15) with the last SEND-ALL for a job. Since a coordination flag has not been programmed in the FETCH job of the CP 544 in PLC 1 in our example, DEH appears there with the last SEND-ALL for a job. Parameterization error byte PAFE is flag byte "FY 16". 9 - 34 C79000-B8576-C191-01 CP 544 Organization block OB 1 Application Examples Connect the CPU of PLC 2 to the PG 7xx and call the program file "B:RKAG02ST.S5D" in the STEP 5 default form. Organization block OB 1 must be extended as follows: NAME SSNR A-NR ANZW PAFE : JU FB126 : SEND : KY0,0 : KY0,0 : FW14 : FY16 SEND-ALL CALL INTERFACE NUMBER 0 JOB NUMBER 0 STATUS WORD PARAMETERIZATION ERROR BYTE Transfer the extended OB 1 to the user memory of your PLC 2. Data block DB 11 You have already generated the data block DB 11 in the previous example. 9 C79000-B8576-C191-01 9 - 35 Application Examples 9.8.5 CP 544 Testing Monitor the data words DW 0 to DW 19 and DW 20 to DW 39 of data block DB 10 in PLC 1 using the PG 7xx online function FORCE VARIABLE. Switch digital input I 0.1 and then input I 0.2 on PLC 1 from "0" to "1". 20 data words from data word DW 0 to DW 19 are then sent to the PLC 2, and then returned from there to data words DW 20 to DW 39. The values from data words DW 0 to DW 19 must now also be present in data words DW 20 to DW 39. If you do not have digital input/output modules, use flags F 0.1 and F 0.2 instead of the inputs I 0.1 and I 0.2. Set the flags using the PG 7xx online function FORCE VARIABLE (or reset them). Output the status words FW 11 and FW 20 and the parameterization error bytes FY 15 and FY 24 using FORCE VARIABLE. 9 - 36 C79000-B8576-C191-01 CP 544 9.9 Application Examples SEND Job "Flag to Data Block" A SEND job is programmed in the opposite direction, i.e. from PLC 2 to PLC 1. Task Flag word 8, i.e. the flag bytes 8 and 9, is to be transferred from PLC 2 to data block DB 10, data word DW 40, in PLC 1 in every second program cycle. The following program structure is required: PLC 2 PLC 1 CPU CPU CP 544 CP 544 SENDDIRECT T R I G G E R DT RK 512 Job No. 1 Source from flag byte 8 RK 512 SENDALL RECEIVEALL DT DT Job No. 0 Job No. 0 DT DT Data DB 10 DW 40 Job No. 1 SEND Data Dest. = DW 40 in DB 10 Flags FY 8 and 9 DT = data transfer Fig. 9-5 C79000-B8576-C191-01 Structure of a SEND job "Flag to DB" 9 - 37 9 Application Examples CP 544 The static parameters have already been loaded into the user memories of the two CPs 544 (see Section 9.5.2). A job need only be programmed on the CP 544 in the active PLC. The active PLC is the one which triggers the data exchange. Thus a SEND job need only be programmed for the CP 544 of PLC 2. The SEND job is triggered by the CPU by calling the data handling block SEND-DIRECT with job number "n". Select job no. "1". The associated job on the CP 544 has the same job number "n" . This job contains information on the data destination in PLC 1. The CP 544 then fetches the data by calling the data handling block SEND-ALL and transfers the data from the CPU/FW 8 to the CP 544 in PLC 1. The CP 544 in PLC 1 receives the data and stores them in the destination defined by PLC 2 by calling the RECEIVE-ALL. The SEND-ALL has the job no. A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether the CP requires data. If yes, the SEND-ALL fetches the data from the defined source and transfers them to the CP 544. If data are not required, the function block is left and the cyclic program continued. The RECEIVE-ALL in PLC 1 has the job number A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether the CP wishes to transfer data to the CPU. If yes, the RECEIVE-ALL stores these at the address defined by the CP 544. If data are not to be transferred, the function block is left and the cyclic program continued. The contents of the flag word FW 8 are to be incremented by 1 in each program cycle. The successful execution of the SEND job can thus be easily recognized in the PLC 1. 9 - 38 C79000-B8576-C191-01 CP 544 9.9.1 Application Examples CP 544 Parameter Sets for PLC 1 The previous parameter settings of the computer link need not be changed since a job is not required in the passive PLC 1, and thus no dynamic parameter set either. 9.9.2 STEP 5 Program for PLC 1 The transfer of the data received by the CP 544 to the data block DB 10 is executed by the cyclically called RECEIVE-ALL. Since this, as well as the data block DB 10, has been programmed in the previous examples, the STEP 5 program in the CPU 928 in PLC 1 need not be changed. Set the CPU to RUN. The green LED must now light up. 9 C79000-B8576-C191-01 9 - 39 Application Examples 9.9.3 CP 544 CP 544 Parameter Sets for PLC 2 The parameter settings of the computer link on the CP 544 in PLC 2 must be extended by the dynamic parameter set for job 1. You can access the screen form "DYNAMIC PARAMETER SET" in the COM PP by pressing the key "ENTER" in the screen form "CONFIGURATION". Enter the following parameters: Job No. 1 Job SEND Data destination DATA BLOCK DB No. 10 Destination address from 40 dec. You need not specify a CPU number since this is not multi-processor mode. A coordination flag need not be entered either. Import the entered data. Subsequently transfer the dynamic parameter set to the CP and carry out a cold restart as described in Section 9.5.2. 9.9.4 STEP 5 Program Extension for PLC 2 The SEND job is triggered by a SEND-DIRECT call, i.e. a call of the data handling block SEND with a job number not equal to 0, job number 1 in the example. The job number of the SEND-DIRECT and that of the job in the CP 544 must agree. The job is to be executed in every second program cycle. 9 - 40 C79000-B8576-C191-01 CP 544 SEND-DIRECT Application Examples Program the interface number SSNR as "0" and the job number A-NR as "1". Select the status word ANZW "FW 20" and the parameterization error byte PAFE "FY 25". The status word occupies two words. The job status is indicated in flag word FW 20, as well as any error messages. The number of data transferred during the current SEND-ALL call is present in flag word FW 22. Information on the source of the data in the CPU must be specified on the data handling block for the SEND job. The data source should be flag bytes (source type QTYP "FY"). The parameter with the data block number DBNR is therefore not evaluated. The source start QANF is flag byte "8" and the source length QLAE is 2 flag bytes. The SEND job is triggered by a result of 1 for the logic operation. Only the status word is updated if the result of the logic operation is 0 when the call is made. Inverting the flag bit F 3.0 means that the RLO is 0 in one cycle and 1 in the next cycle. Termination of the job with errors is indicated in bit 3 of the status word. The occurrence of a parameterization error is recognized in that bit 0 of the parameterization error byte is set. In the event of an error, an error evaluation program tailored to the application is usually called. Evaluate the error numbers in the status word ANZW, the error message area in the SYSTAT (see also Section 9.12) and the parameterization error byte PAFE. SEND-ALL The SEND-ALL job has already been programmed in the previous example. Connect the PG 7xx to the CPU of PLC 2 and call the program file "B:RKAG02ST.S5D" in the STEP 5 presets screen form. C79000-B8576-C191-01 9 - 41 9 Application Examples Organization block OB 1 CP 544 Extend organization block OB 1 by the following statements: NAME SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE : : : : : : : : : : : : : : : : : : L L +F T FW8 KF+1 FW8 INCREMENT CONTENTS OF FLAG WORD BY 1 FOR EACH PROGRAM CYCLE AN = F 3.0 F 3.0 INVERT FLAG BYTE FOR EACH PROGRAM CYCLE JU FB120 SEND KY0,0 KY0,1 FW20 KSMB KY0,0 KF+8 KF+2 FY24 TRIGGER SEND JOB 1 INTERFACE NUMBER 0 JOB NUMBER 1 STATUS WORD SOURCE TYPE FLAG NOT EVALUATED SOURCE START FLAG BYTE 8 SOURCE LENGTH 2 FLAG BYTES PARAMETERIZATION ERROR BYTE Transfer OB 1 to the user memory of your PLC 2. 9.9.5 Testing Monitor the data word DW 40 of data block DB 10 in PLC 1 using the PG 7xx online function FORCE VARIABLE. The value in the data word must constantly be incremented. 9 - 42 C79000-B8576-C191-01 CP 544 9.10 Application Examples Coordination Flags You can enable or disable the data transfer between CPU and CP 544 using a coordination flag. You must declare the coordination flags in the STEP 5 program as output communication flags and enable them on the CP 544 using switch S4 (see Section 2.1). The communication flags (and thus also the coordination flags of course) are part of the normal flag area. Communication flags with CPU 928 The communication flags must be entered in data block DB 1 as communication flag outputs. (As soon as DB 1 is programmed, the digital input and output bytes must also be entered there.) The output communication flags of the CPU are updated in the dual-port RAM of the CP at the end of the cyclic program. A SEND job (job number 1) is triggered by the PLC 2 in every second program cycle. It is transferred to data block DB 10, data word DW 40, in the PLC 1 by flag word FW 8. The job has already been programmed in Section 9.9 and thus need only be supplemented by specification of the coordination flag F 5.3. The contents of the flag word are incremented by one in each program cycle. 9 C79000-B8576-C191-01 9 - 43 Application Examples CP 544 The program in PLC 1 recognizes in the status word of RECEIVE-ALL that data have arrived from a SEND job with the coordination flag byte number 5. The coordination flag F 5.3 is then set. The jobs with the same coordination flag data (same byte and bit numbers) are then rejected with error number 32H in the reply message, 09H in the status word and 30H in the SYSTAT, and data word DW 40 is thus protected from being overwritten. You can reset the coordination flag again using digital input I 0.7, and thus permit acceptance of the SEND job. 9.10.1 CP 544 Parameter Sets for PLC 1 No changes need be made to the previous parameter settings of the computer link. A job is not required in PLC 1 anyway. The communication flag bytes 0 to 31 have already been enabled by switches (see Section 9.3). 9 - 44 C79000-B8576-C191-01 CP 544 9.10.2 Application Examples STEP 5 Program for PLC 1 The transfer of the data received by the CP 544 to data block DB 10 is executed by the cyclically called RECEIVE-ALL. RECEIVE-ALL and data block DB 10 have already been programmed. The coordination flag byte number appears in the least significant byte of the RECEIVE-ALL status word as soon as data have arrived from the SEND job of the PLC 2 (with job number 1). The coordination flag F 5.3 is set if the byte number is 5. SEND jobs of the PLC 2 are then rejected. The coordination flag is reset again by a positive edge at digital input I 0.7, and the acceptance of the job is permitted again. The coordination flag is immediately reset again following the next SEND job of PLC 2 (with job number 1). 9 C79000-B8576-C191-01 9 - 45 Application Examples Organization block OB 1 CP 544 Extend organization block OB 1 as follows: : : : : : : : : : : : : : : : : : : : : Data block DB 1 L L !=F S FY26 KF+5 F 5.3 COORDINATION FLAG BYTE NUMBER FROM STATUS WORD OF RECEIVEALL EQUAL TO 5? IF YES, SET COORDINATION FLAG THE DATA DESTINATION IS PROTECTED FROM BEING OVERWRITTEN AS LONG AS THE COORDINATION FLAG REMAINS SET. THE SEND JOB WITH COORDINATION FLAG F 5.3 IS REJECTED. AN R A AN S I 0.7 F 2.7 I 0.7 F 2.7 F 2.7 EDGE EVALUATION: THE RESULT OF THE LOGIC OPERATION RLO IS SET FOR A CYCLE IF THE SIGNAL CHANGES FROM 0 TO 1 AT THE INPUT I 0.7. R F 5.3 RESET COORDINATION FLAG WITH 0 1 EDGE AT INPUT I 0.7 The output communication flag byte 5, the input byte 0 and the output byte 0 must be entered in data block DB 1 using the STEP 5 program function INPUT (F1) - SCR FORM (F4): DB 1 I/O ASSIGNMENT DIGITAL INPUTS DIGITAL OUTPUTS IPC FLAG INPUTS IPC FLAG OUTPUTS TIMER FIELD LENGTH :, :, :, :, :, 0, 0, , 5, , , , , , , , , , , , , , , , , , ... ... ... ... Transfer the extended OB 1 and DB 1 to the CPU 928. 9 - 46 C79000-B8576-C191-01 CP 544 9.10.3 Application Examples CP 544 Parameter Sets in PLC 2 The parameter settings of the computer link on the CP 544 in PLC 2 must be extended by entering the coordination flag in the dynamic parameter set for job 1. You can access the screen form "DYNAMIC PARAMETER SET" in the COM PP by pressing the key "ENTER" in the screen form "CONFIGURATION". Select the previously programmed job 1 and extend it by the parameter Coordination flag 5.3 You need not specify a CPU number since this is not multi-processor mode. Import the entered data. Subsequently transfer the dynamic parameter set to the CP and carry out a cold restart as described in Section 9.5.2. 9.10.4 STEP 5 Program for PLC 2 The previous STEP 5 program is not changed. The SEND job with the job number 1 is triggered as previously (see Section 9.9). Set the CPU to RUN. The green LED must now light up. 9 C79000-B8576-C191-01 9 - 47 Application Examples 9.10.5 CP 544 Testing Monitor the data word DW 40 of data block DB 10 in the PLC 1 using the PG 7xx online function FORCE VARIABLE. It has a value which does not change. Switch the input I 0.7 from 0 to 1. The value in data word DW 40 must change once and then remain constant since the coordination flag is reset again immediately after acceptance of the job. Also monitor the status word FW 20 of the SEND job with job number 1 in PLC 2. KH = 0928 appears briefly in the status word when this coordination flag is set in the CPU 928, i.e. this SEND job is rejected by PLC 1. This means "Job completed with error 9H", DB or DX are disabled by coordination flags. Error number 30H appears in the error message area of the SYSTAT (see Section 9.12). 9 - 48 C79000-B8576-C191-01 CP 544 9.11 Application Examples PSEUDO-WRITE Job "Input to Data Block" The PSEUDO-READ/WRITE jobs enable the source and destination data of a job to be defined by the STEP 5 program and to be modified during execution of the program. Task Input byte IB 0 of PLC 1 is to be sent to data word DW 0 in data block DB 11 of PLC 2 by means of a PSEUDO-WRITE job. PLC 1 CPU PLC 2 CPU CP 544 CP 544 SENDDIRECT Job No. 190 Parameter DB10 from DW41 Parameter DB 10 DW 41 to 50 T R I G G E R DT RK 512 SENDALL RK 512 Job No. 0 SENDALL DT DT RECEIVEALL Job No. 0 Job No. 0 DT DT READ/ WRITE Job No. 190 Data Input byte IB 0 Data DB 11 DW 0 DT = data transfer Fig. 9-6 C79000-B8576-C191-01 Structure of a PSEUDO-WRITE job 9 - 49 9 Application Examples CP 544 The static parameters have already been loaded into the user memories of the two CPs 544 (see Section 9.5.2). The special jobs 190 to 199 for the PSEUDO-READ and PSEUDO-WRITE jobs are always installed on the CP 544. These need not therefore be programmed by the user or transferred to the CP user memory. The job numbers 190 to 199 are reserved in the computer link for the PSEUDO-READ and PSEUDO-WRITE functions. The job is triggered by the call SEND-DIRECT as for the PSEUDO-WRITE function. Select job number 190. The CP 544 first fetches the source and destination partners from the parameter data block by means of a SEND-ALL. The input byte IB 0 is subsequently fetched by a second SEND-ALL and transferred to the CP 544 in PLC 2. The CP 544 in PLC 2 receives the data and stores them in the destination defined by the PLC 1 by means of the RECEIVE-ALL. When transmitting only one byte into a data word, the CP 544 writes the data into the left data byte DL and overwrites the right data byte DR with 0. The SEND-ALL has the job No. A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether this requires data. If yes, the SEND-ALL fetches the data from the address specifed by the CP 544 and transfers them to the CP 544. If data are not required, the function block is left and the cyclic program continued. The RECEIVE-ALL has the job number A-NR 0. It is called unconditionally in every program cycle and examines in the CP 544 (dual-port RAM) whether this wishes to transfer data to the CPU. If yes, the RECEIVE-ALL stores these at the address defined by the CP 544. If data are 9 - 50 C79000-B8576-C191-01 CP 544 Application Examples not to be transferred, the function block is left and the cyclic program continued. 9.11.1 CP 544 Parameter Sets for PLC 1 The job 190 is always present on the CP 544 and need not therefore be programmed. Switch the CP 544 to RUN. The red LED display TXD 1 of device interface 1 (SI 1) must now flash slowly. The parameter settings are incorrect or incomplete if this is not the case, or there is a CP 544 hardware fault. 9.11.2 STEP 5 Program for PLC 1 The PSEUDO-WRITE job is to be triggered by the change in signal from "0" to "1" at digital input I 0.3. SEND-DIRECT The PSEUDO-WRITE job is triggered by a SEND-DIRECT call, i.e. calling of the data handling block SEND with a job number in the range 190 to 199. Select job number 190. Interface number SSNR "2" and job number A-NR "190" must be programmed. Select status word ANZW "FW 30" and parameterization byte PAFE "FY 34". The status word occupies two words. The job status and any error messages are indicated in flag word FW 30. The number of transmitted data per SEND-ALL call is present in flag word FW 32. C79000-B8576-C191-01 9 - 51 9 Application Examples CP 544 The initial address of the transfer parameters must be specified for the PSEUDO-WRITE job. The parameters are to present in the data block (QTYP "DB") with the number DBNR "10" starting at data word QANF "41". The CP 544 automatically requests 10 data words as transfer parameters; the parameter QLAE is therefore not evaluated. The SEND job is called unconditionally and triggered by the result of the logic operation (RLO) 1. Only the status word is updated if the RLO for the call is 0. The termination of the job with errors or the occurrence of a parameterization error is indicated at digital output Q 0.3. In the event of an error, evaluate the error numbers in the status word ANZW, the parameterization error byte PAFE and the error message area of the SYSTAT (see Section 9.12). Connect the PG 7xx to the CPU 928 and call the program file "B:RKAG01ST.S5D" in the STEP 5 presets form. 9 - 52 C79000-B8576-C191-01 CP 544 Organization block OB 1 Application Examples Extend organization block OB 1 as follows: NAME SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE : AN :R :A : AN :S : : JU : SEND : : : : : : : : : :O :O := I 0.3 F 2.3 I 0.3 F 2.3 F 2.3 EDGE EVALUATION: THE RESULT OF THE LOGIC OPERATION RLO IS SET FOR A CYCLE IF THE SIGNAL CHANGES FROM 0 TO 1 AT INPUT I 0.3. FB120 TRIGGER SEND JOB 190 KY0,2 KY0,190 FW30 KSDB KY0,10 KF+41 KF+0 FY34 INTERFACE NUMBER 2 JOB NUMBER 190 STATUS WORD SOURCE TYPE DATA BLOCK PARAMETER FROM DB 10 START OF PARAM. BLOCK DW 41 NOT EVALUATED PARAMETERIZATION ERROR BYTE F 31.3 F 34.0 Q 0.3 JOB 190 COMPLETED WITH ERROR OR PARAMETERIZATION ERROR INDICATE AT OUTPUT Q 0.3 The SEND-ALL call required for transmission of the transfer parameters and the input byte has already been programmed. 9 C79000-B8576-C191-01 9 - 53 Application Examples Data block DB 10 CP 544 Program the source and destination in data block DB 10: 41 42 43 44 45 46 47 48 49 50 : : : : : : : : : : KS = IB KY = 0,0 KF = +0 KF = +1 KS = DB KY = 0,11 KF = +0 KF = +0 KY = 255,255 KF = +0 QTYP source type input byte DBNR not required QANF source start is input byte 0 QLAE source length is 1 byte ZTYP destination type data block DBNR destination data block is DB 11 ZANF destination start is DW 0 ZLAE irrelevant with SEND No coordination flag CPU number Transfer the organization block OB 1 and data block DB 10 to the user memory of your PLC 1. 9.11.3 CP 544 Parameter Sets for PLC 2 There are no changes to the previous parameter settings for the computer link since a job is not required in the passive PLC 2, and thus a dynamic parameter set is not required either. 9 - 54 C79000-B8576-C191-01 CP 544 9.11.4 Application Examples STEP 5 Program for PLC 2 The transfer of the data received by the CP 544 to the data block DB 11 is executed by the cyclically called RECEIVE-ALL. Since this, as well as the data block DB 11, has already been programmed, the STEP 5 program need not be changed. Set the CPU to RUN. The green LED must now light up. 9.11.5 Testing Monitor the data word DW 0 of data block DB 11 in PLC 2 using the PG 7xx online function FORCE VARIABLE. Switch the digital input I 0.3 on PLC 1 from "0" to "1". The bit pattern of input byte IB 0 appears in the most significant part of data word DW 0 (left data byte DL = 0). The right data byte DR 0 is always overwritten with 0. If you do not have digital input/output modules in PLC 1, use flag byte FY 0 instead of input byte IB 0. Set the flags using the PG 7xx online function FORCE VARIABLE (or reset them). Monitor the status word FW 30 and the parameterization error byte FY 34 using FORCE VARIABLE. 9 C79000-B8576-C191-01 9 - 55 Application Examples 9.12 CP 544 Reading the Error Message Area in the SYSTAT The SYSTAT is a memory area on the CP 544 which contains status information for each page separately. The error information is to be transferred to DW 51 and 52 in data block DB 10. The job is called unconditionally in each program cycle, but only executed if an error occurs. It must be called with the result of the logic operation RLO 1. Task The PLC job RECEIVE-DIRECT 200 is reserved for reading the error message area. This job is executed directly, i.e. it is not entered into the queue of the CP 544 and does not require a RECEIVE-ALL. It is not necessary to program a job on the CP 544 either. 9.12.1 STEP 5 Program for PLC 1 RESET-DIRECT 200 The error message area of the addressed page is reset by calling the RESET-DIRECT 200 - in our example, device interface 1 of the CP 544 (SSNR = 2). The data words DW 51 and DW 52 in data block DB 10 - in which the error numbers are written by the RECEIVE-DIRECT 200 - must be reset separately. The error message area is reset by a positive edge at digital input I 0.4. 9 - 56 C79000-B8576-C191-01 CP 544 Application Examples Function block FB 100 Set the parameters for function block FB 100 as follows: NAME SSNR A-NR PAFE : JU FB124 : RESET : KY0,2 : KY0,200 : FY40 : : :Q DB10 :L KF+0 :T DB 10 :T DW52 : BE RESET SYSTAT INTERFACE NUMBER 2 JOB NUMBER 200 PARAMETERIZATION ERROR BYTE DELETE DATA WORDS DW 51 AND DW 52 IN DATA BLOCK 10 9 C79000-B8576-C191-01 9 - 57 Application Examples Organization block OB 1 CP 544 Extend organization block OB 1 by the following commands: NAME SSNR A-NR ANZW ZTYP DBNR ZANF ZLAE PAFE NAME :O F 3.0 : ON F 3.0 : : JU FB121 : RECEIVE : KY0,2 : KY0,200 : FW35 : KSDB : KY0,10 : KF+51 : KF+2 : FY39 : :O F 36.3 :O F 39.0 := Q 0.4 : : AN I 0.4 :R F 2.4 :A I 0.4 : AN F 2.4 :S F 2.4 : : JC FB100 : R-SYSTAT GENERATE RLO = 1 READ SYSTAT INTERFACE NUMBER 2 JOB NUMBER 200 STATUS WORD THE DESTINATION IS A DATA BLOCK DATA BLOCK NUMBER DB 10 STARTING AT DATA WORD 51 2 DATA WORDS PARAMETERIZATION ERROR BYTE JOB COMPLETED WITH ERROR OR PARAMETERIZATION ERROR INDICATE AT OUTPUT Q 0.4 EDGE EVALUATION: THE RESULT OF THE LOGIC OPERATION RLO IS SET FOR A CYCLE IF THE SIGNAL CHANGES FROM 0 TO 1 AT INPUT I 0.4. Transfer organization block OB 1 and function block FB 100 to the user memory of the CPU 928. 9 - 58 C79000-B8576-C191-01 CP 544 9.12.2 Application Examples Testing Monitor data block DB 10, DW 51 and DW 52, using the PG 7xx online function FORCE VARIABLE, and disconnect the cable between the two CPs 544. KH = 0EFF immediately appears in data word DW 51 and KH = FFFF in DW 52, i.e. BREAK. This error number is signalled repeatedly until the status has been eliminated. The error buffer in the SYSTAT therefore also overflows; bit 2 is set in the first byte. Transfer jobs are terminated with error FH in the associated ANZW. Reestablish the connection between the two CPs 544. Reset the SYSTAT error message area by switching input I 0.4 from 0 to 1. Check the resetting using FORCE VARIABLE. Trigger the SEND job with the job number 1 at input I 0.1 in PLC 1. Switch the mode selector of the CP 544 in PLC 2 to STOP and trigger the SEND job with job number 1 in PLC 1. KH = 0838 appears in data word DW 51 of DB 10, i.e. the error message that the partner CP has been switched to STOP. 9 C79000-B8576-C191-01 9 - 59 Application Examples 9.13 CP 544 Date/Time Jobs The CP 544 has an internal hardware clock which continues to run even in the event of power failures because of the backup battery of the PLC subrack. It can be used as a date and time generator if necessary. It is easy to set and read this clock and to synchronize it with the hardware clocks of other CPs in the same PLC. The PLC job number 218 is reserved on the CP 544 for reading and writing the date and time. This special job is executed directly, i.e. it is not entered into the CP 544 queue and does not require SEND-ALL or RECEIVE-ALL. Triggering of the job and the transfer are carried out in one call. You need not program a call on the CP 544. The master status must be set in order to process date/time jobs. The master status on the CP 544 is reset when the power supply is switched on. It is not influenced by the function block SYNCHRON either. Setting of the master status is described in Sections 9.13.2 and 9.13.3. 9 - 60 C79000-B8576-C191-01 CP 544 9.13.1 Application Examples Read Date/Time Task In the PLC 1, the current date and time values as well as the master status are to be transmitted cyclically by the CP 544 hardware clock to data block DB 10 starting at data word DW 53. The transmission is to take place in every cycle. The end of the job is indicated by an error at output Q 0.5. Organization block OB 1 Extend OB 1 by a corresponding PLC job trigger: NAME SSNR A-NR ANZW ZTYP DBNR ZANF ZLAE PAFE :O F 3.0 : ON F 3.0 : : JU FB121 : RECEIVE : KY0,2 : KY0,218 : FW41 : KSDB : KY0,10 : KF+53 : KF+5 : FY45 : :O F 42.3 :O F 45.0 := Q 0.5 GENERATE RLO = 1 INTERFACE NUMBER 2 JOB NUMBER 218 STATUS WORD THE DESTINATION IS A DATA BLOCK DATA BLOCK NUMBER DB 10 STARTING AT DATA WORD 53 5 DATA WORDS PARAMETERIZATION ERROR BYTE JOB COMPLETED WITH ERROR OR PARAMETERIZATION ERROR INDICATED AT OUTPUT Q 0.5 Transfer the extended organization block OB 1 to the CPU 928. C79000-B8576-C191-01 9 - 61 9 Application Examples CP 544 9.13.1.1 Testing Monitor data block DB 10 from DW 53 to DW 57 using the PG 7xx online function FORCE VARIABLE. The date and time are not entered because the master status is not set when the CP 544 is started up by switching on the power. The job is terminated with an error in the status word (7H, SYSTAT = 1FH); nothing is entered in the destination data block. 9.13.2 Set Date/Time Task Enter the required value - e.g. 31. December 1992, 23 hours, 58 minutes and 30 seconds - in BCD format into data block DB 10 starting at data word DW 59. The CP 544 is to be the master clock. Therefore the master status (bit 8) must be set in data word DW 58 (see also Sections 9.13.1 and 9.13.3). Data block DB 10 58 59 60 61 62 :KH = :KH = :KH = :KH = :KH = 0100 0030 5823 3112 9200 Master status 1/10 s / 1/100 s / seconds Minutes / hours Day / month Year / -- The set function is to be triggered by a change in signal from "0" to "1" at input bit I 0.6. The termination of the job is to be indicated with an error at output Q 0.6. 9 - 62 C79000-B8576-C191-01 CP 544 Organization block OB 1 Application Examples Extend OB 1 by the associated PLC job trigger: NAME SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE : AN I 0.6 :R F 2.6 :A I 0.6 : AN F 2.6 :S F 2.6 : : JU FB120 : SEND : KY0,2 : KY0,218 : FW46 : KSDB : KY0,10 : KF+58 : KF+5 : FY50 : :O F 47.3 :O F 50.0 := Q 0.6 EDGE EVALUATION: THE RESULT OF THE LOGIC OPERATION RLO IS SET FOR A CYCLE IF THE SIGNAL CHANGES FROM 0 TO 1 AT INPUT I 0.6. INTERFACE NUMBER 2 JOB NUMBER 218 STATUS WORD THE SOURCE IS A DATA BLOCK DATA BLOCK NUMBER DB 10 STARTING AT DATA WORD 58 5 DATA WORDS PARAMETERIZATION ERROR BYTE JOB COMPLETED WITH ERROR OR PARAMETERIZATION ERROR INDICATED AT OUTPUT Q 0.6 Transfer OB 1 and data block DB 10 to the user memory of the CPU 928. 9.13.2.1 Testing Switch the digital input I 0.6 from "0" to "1". The master status, date and time of the CP 544 hardware clock are set to the value programmed in data block DB 10. You can check the success on the date and time values which are written cyclically into data words DW 53 to DW 57; the hundredths of a second, the tenths of a second, the seconds and the minutes must change continuously. The CP 544 indicates the change in year shortly afterwards. C79000-B8576-C191-01 9 - 63 9 Application Examples 9.13.3 CP 544 Synchronization of Several CP Hardware Clocks In order to synchronize the hardware clocks of several CP modules, the CPU must * * read the date and time from a CP declared as the master and transfer the time and date to the other communications processors declared as slaves. The time is read using a RECEIVE-DIRECT 218 (see Section 9.13.1) and set using a SEND-DIRECT 218 (see Section 9.13.2). Time master, time slave A CP is declared as the time master by a SEND-DIRECT 218 if bit 8 is set in the first data word transmitted. The CP is declared as the slave if this bit is set to "0". Transmit master status, date, time Only the master status is influenced if only one data word is transmitted with the SEND-DIRECT 218 (QLAE = 1); the time remains unchanged. The master status, date and time are transmitted if 5 data words are transmitted with the SEND-DIRECT 218 (QLAE = 5). The hardware clock is set accordingly and starts immediately with the new value. As an example, two CP 544 modules are inserted in an S5-135U with CPU 928. These modules have the page numbers 0 and 2. The CP 544 with page number 2 has already been declared as the master and has the correct time. The date, time and master status are read from the master clock (interface 2) in every program cycle using the command sequence from Section 9.13.1, and written into data block DB 10 starting at data word DW 53. The master status must be reset in data block 10, data word DW 53, before the date and time of the master clock can be transmitted to the slave clock (interface 0). Carry out the synchronization following a rising edge at input I 0.5. 9 - 64 C79000-B8576-C191-01 CP 544 Application Examples A prerequisite for exact synchronization is that the time read from the master clock is transmitted to the slave clock in the same program cycle. The trigger flag F 3.2 for interface 0 (SSNR 0) is set following the 0-1 edge at input I 0.5. Successful reading The set job (SEND-DIRECT 218) is only carried out if the associated trigger flag is set and if the read job (RECEIVE-DIRECT 218) has been carried out. You can recognize successful reading in that the master status which is reset in DB 10 DW 53 in each cycle is set immediately after calling the RECEIVE-DIRECT. The trigger flag of the slave clock is removed once the latter has been synchronized correctly (completed without errors). Errors when reading An error when reading the master clock is indicated at output Q 0.5, and an error when setting the slave clock at output Q 0.7. In the event of an error, evaluate the error numbers in the status word (ANZW) the parameterization error byte (PAFE) and the error message area of the SYSTAT for the respective interface (see Section 9.12). 9 C79000-B8576-C191-01 9 - 65 Application Examples Organization block OB 1 CP 544 The program in organization block OB 1 for synchronizing the two CPs 544 is then as follows: NAME SSNR A-NR ANZW ZTYP DBNR ZANF ZLAE PAFE 9 - 66 :O F 3.0 : ON F 3.0 : : JU FB121 : RECEIVE : KY0,2 : KY0,218 : FW41 : KSDB : KY0,10 : KF+53 : KF+5 : FY45 : :O F 42.3 :O F 45.0 := Q 0.5 : :Q DB10 :A D 53.8 := F 3.1 :R D 53.8 : : AN I 0.5 :R F 2.5 :A I 0.5 : AN F 2.5 :S F 2.5 : :S F 3.2 : RESULT OF LOGIC OPERATION RLO = 1 INTERFACE NUMBER 2 JOB NUMBER 218 STATUS WORD THE DESTINATION IS A DATA BLOCK DATA BLOCK NUMBER DB 10 STARTING AT DATA WORD 53 5 DATA WORDS PARAMETERIZATION ERROR BYTE JOB COMPLETED WITH ERROR OR PARAMETERIZATION ERROR INDICATED AT OUTPUT Q 0.5 IF MASTER STATUS 1, SET "READING SUCCESSFUL", RESET MASTER STATUS EDGE EVALUATION: THE RESULT OF THE LOGIC OPERATION RLO IS 1 FOR A CYCLE IF THE SIGNAL CHANGES FROM 0 to 1 AT INPUT I 0.5. SET TRIGGER FLAG SSNR TO 0 C79000-B8576-C191-01 CP 544 Application Examples : : : : NAME : SSNR A-NR ANZW QTYP DBNR QANF QLAE PAFE : : A F 3.2 A F 3.1 JU FB120 SEND KY0,0 KY0,218 FW51 KSDB KY0,10 KF+53 KF+5 FY55 A F 52.2 R F 3.2 :O :O F 52.3 F 55.0 := Q 0.7 SET SLAVE CLOCK SSNR IF TRIGGER FLAG IS SET AND DATE/TIME READ INTERFACE NUMBER 0 JOB NUMBER 218 STATUS WORD SOURCE IS A DATA BLOCK DATA BLOCK NUMBER DB 10 STARTING AT DATA WORD 53 5 DATA WORDS PARAMETERIZATION ERROR BYTE SETTING OF SSNR 0 COMPLETED WITHOUT ERRORS, RESET TRIGGER FLAG JOB SSNR 0 COMPLETED WITH ERRORS OR PARAMETERIZATION ERROR INDICATED AT OUTPUT Q 0.7 The set values could also have been sent to interface numbers SSNR 1 and 5 since the CP 544 only has one hardware clock for both device interfaces. 9 C79000-B8576-C191-01 9 - 67 10 Reference Section Contents of Chapter 10 10 Reference Section C79000-S8576-C191-01 . . . . . . . . . . . . . . . . . . 10 - 3 10 - 1 C COM PP 10 Reference Section C COM PP The COM PP parameterization software supports the parameter settings of point-to-point links for the two serial interfaces of the CP 544. Input keys Working with COM PP is possible with S5-specific keys, function keys and cursor keys. S5-specific keys The key description is based on the programmers of the PG 7xx range. DELETE: Deletes the character at the current cursor position. EXPAND HORIZONTALLY: Inserts a blank at the current cursor position. 0 INSERT INSERT key: This key enters your input and has the same function as function key F6. ESCAPE key: With certain restrictions, this key has basically the same functions as function key F8. (You cannot exit acknowledgement menus with the ESC key.) 10 HELP key: Triggers the help function and opens a help window. C79000-S8576-C191-01 10 - 3 COM PP Cursor keys C The key description is based on the programmers of the PG 7xx range. CURSOR up/down: The cursor is positioned to the higher/lower input field. SHIFT CURSOR left/right: The cursor is positioned to the previous/next input field. CURSOR left/right: The cursor is positioned to the previous/next character in the input field. If the limit of the field is reached, the cursor moves to the previous/next field. RETURN key: Selects an entry in a selection window and closes the window. Positions the cursor to the next input field (the cursor jumps from the last field of a screen form to the first field). PAGE forwards/backwards: You can page forwards/backwards. If there are insufficient data for a complete further page, the screen scrolls to the end. You can use these keys in selection windows. You can jump to the end/start of a selection window. 10 - 4 C79000-S8576-C191-01 C Function keys COM PP The eight function keys F1 to F8 are assigned a specific function in the softkey menu of the currently selected screen form. The function keys F3, F6, F7 and F8 usually have the following meanings: F3 F6 F7 F8 SELECT: Opens a selection window. ENTER (same as INSERT key): Closes a selection window, imports the data you have entered, and displays the next screen form. HELP (same as HELP key): Triggers the help function and then opens a help window. RETURN (same as ESC key): Exits the screen form, returns to the next higher level in the screen form hierarchy. 10 C79000-S8576-C191-01 10 - 5 Data handling blocks D D Data handling blocks The two following tables list the numbers of the various data handling blocks in the different types of programmable controller, and which data handling blocks you can call in your STEP 5 program. Block numbers Table 10.1 DHB 10 - 6 Data handling blocks for the CP 544 Function S5-115U S5-135U S5-155U SYNCHRON Synchronizes the CP FB 249 FB 125 SENDDIRECT n Starts the SEND job with job number n FB 244 FB 120 SEND-ALL Transfers the data from the CPU to the CP FB 244 FB 126 or Job No.= 0 FB 120 Job No.= 0 FETCHDIRECT n Starts the FETCH job with job number n FB 246 RECEIVEALL Transfers the data from the CP to the CPU FB 245 FB 127 or Job No.= 0 FB 121 Job No.= 0 RECEIVEDIRECT n Starts the RECEIVE job with job number n FB 245 FB 121 RESETDIRECT n Starts the RESET job with job number n FB 248 FB 124 CONTROL Copies the status of the respective job into the defined status word FB 247 FB 123 FB 122 C79000-S8576-C191-01 D Data handling blocks Jobs Table 10.2 Jobs for data transmission with the CP 544 Job Synchronize CP and CPU Data Job handling number block SYNCHRON - Entry into queue No Destination length in words * - Send data SEND 0-188 Yes - Fetch data FETCH 1-188 Yes - RECEIVE 0 Yes - Read data (PSEUDO-READ) FETCH 190-199 Yes - Write data (PSEUDO-WRITE) SEND 190-199 Yes - CONTROL 0-223 No - SEND 189 Yes - Read device interface parameters RECEIVE 189 Yes 0 to 2043 Read error message area of SYSTAT RECEIVE 200 No 2 Delete error message area of SYSTAT RESET 200 No - Read complete SYSTAT RECEIVE 221 No 16 Scan status RECEIVE 205 No 1 Start device interface SEND 202 No - Stop device interface RESET 202 No - Import mode-specific static parameters SEND 203 Yes - RECEIVE 204 No 16 SEND 218 No - Read time RECEIVE 218 No 5 Read SYSID RECEIVE 223 No 64 Receive data Check job status Parameterize device interface Read hardware parameters Set time * Data only for special jobs C79000-S8576-C191-01 10 - 7 10 Installation guidelines I I Installation guidelines Only the most important EMC rules are listed here as installation guidelines. You can obtain further information on installation in your programmable controller manual. The most important EMC rules It is usually sufficient to observe a number of elementary rules in order to ensure electromagnetic compatibility (EMC). Please therefore observe the following 5 rules when installing your programmable controller. Rule 1: Ensure when installing the programmable controllers that the inactive metal components are grounded with a good large-area contact. * * * * Connect all inactive metal components with a large contact and low impedance. For the screw connections on painted and anodized metal parts, use either special contact washers or remove the insulating protective layers. Do not use any aluminum parts if possible. Aluminum is easily oxidized and is thus less suitable for grounding purposes. Produce a central connection between the ground and the grounding electrode/protective ground system. Rule 2: Ensure that the cables are routed correctly. * * * 10 - 8 Divide the cables into groups (power cables, power supply cables, signal cables, data cables). Always route the power cables and signal/data cables in separate ducts or bundles. Route signal and data cables as close as possible to grounded surfaces (e.g. supporting members, metal rails, cabinet panels). C79000-S8576-C191-01 I Installation guidelines Rule 3: Ensure that the cable shields are secured perfectly. * * * * * Data lines must be shielded. The shield must be connected at both ends. Analog cables should be shielded. Connection of the shield at one end may be advantageous when transmitting signals with small amplitudes. Connect the cable shields directly on entry into the cabinet to a shield/protective ground rail with a large-area contact and secure the shields using cable clamps. Route the shield up to the module without an interruption, but do not connect it there again. Ensure that the shield/protective ground rail is connected to the cabinet with a low impedance. Use metal or metal-plated plug housings for shielded data cables. Rule 4: Use special EMC measures for special applications. * * Provide all inductors with spark quenchers which are not controlled by SIMATIC-S5 modules. Use filament lamps for the cabinet illumination; avoid the use of fluorescent lamps. Rule 5: Produce a uniform reference potential and ground all electrical equipment if possible. * * * C79000-S8576-C191-01 Take care when implementing the grounding measures. Grounding of the controller serves for protective and functional purposes. Connect system components and cabinets with central controllers and expansion units radially to the grounding electrode/protective ground system. This prevents the production of ground loops. If there are differences in potential between system components and cabinets, provide sufficiently dimensioned equipotential bonding conductors. 10 - 9 10 Interface submodules Interface submodules L The following interface submodules can be used in the CP 544: Table 10.3 Interface submodules in the CP 544 Interface submodules V.24 (RS 232) TTY RS 422 RS 485 Transmission mode V 28 TTY X.27 RS 485 Interface lines V 24 RXD TXD X.21 X.24 Floating No No * Yes Minimum baud rate 300 bps 300 bps 300 bps Maximum baud rate 19.2 K 9.6 K 76.8 K * Only floating on passive side L LED displays Module-specific displays 10 - 10 Table 10.4 LED displays (module-specific) LED RUN LED STOP Meaning On (green) Off - CP is in RUN state. - The CP can process jobs arriving from the CPU and the partner. Slow flashing Off - CP is in TEST state. - The CP can process jobs arriving from the CPU and the partner. Off On (red) - CP is in STOP state. - Module in operation, but no more data transfer is taking place to the CPU via the S5 interface. Off Slow flashing - CP in state "Error". - An error has occurred which means that further processing is not reliable. This state can only be left by switching off the power. C79000-S8576-C191-01 M Mode selector switch Interface-specific displays Table 10.5 LED displays (interface-specific) TXD 1, TXD 2 On (red), permanent Interface submodule inserted but no interface parameters present On (red), fast flashing Correct/incomplete parameters or incorrect interface submodule inserted On (red), slow flashing Parameters OK, but synchronization not yet carried out via backplane bus On (green) Job has been triggered Off Interface is in operation, active and passive jobs can be executed, or no interface submodule inserted RXD 1, RXD 2 On (green) Job has been received M Mode selector switch A mode selector is present on the front panel of the CP 544 with the three positions RUN/TEST/STOP. RUN If the mode selector is set to RUN (and if a SYNCHRON job has been executed without errors), the CP 544 processes jobs which arrive from the CPU and the partner. TEST The switch position TEST currently has no special meaning. The CP 544 responds as in switch position RUN. STOP C79000-S8576-C191-01 The transfer of useful data on the serial transmission line is interrupted if the mode selector is set to STOP. Incoming jobs are rejected with an error message (see also Chapter 8). 10 - 11 10 Mode switchover P Mode switchover RUN/TEST STOP The transfer of useful data on the serial transmission line is interrupted. If a job is currently being processed, it is completed without an error message. Thus a longer period may expire until the STOP status is reached depending on the amount of data to be transmitted. Illumination of the LED on the front panel indicates this status. STOP RUN/TEST The CP 544 recommences job processing. The LED on the front panel goes out. Changing the switch position does not result in a cold restart of the CP 544! P Pin assignments Front connector for PG interface: 1 Ground (Mext.) 2 Receiver TTY - 3 4 P24V 5 Identifier 1, TTL level 6 Transmitter TTY + 7 Transmitter TTY - 8 Ground (Mext.) 9 Receiver TTY + 10 M 24 (current sources 20 mA -) 11 Current source +20 mA 12 0V 13 Current source +20 mA 14 Identifier 2 15 10 - 12 C79000-S8576-C191-01 R RS422-A/485 submodule R RS422-A/485 submodule You can use the RS422-A/485 submodule in RS422-A mode with: * * * RK 512 computer link, data transmission with the 3964/3964R procedures, data transmission with the open driver but not if the CP 544 is used without a fan subassembly. Pin assignments The following table lists the pin assignments of the 15-way Sub-D plug on the front panel of the RS422-A/485 submodule: Pin Name acc. to CCITT X.24 8 1 Shield 2 T(A) Output 3 C(A) Output 4 R(A) Input/, output 5 I(A) Input 6 S(A) Input 7 B(A) Output 8 GND 9 T(B) Output 10 C(B) Output 11 R(B) Input/, output 12 I(B) Input 13 S(B) Input 14 B(B) Output 15 X(B) Input 15 9 1 C79000-S8576-C191-01 Input/ output Remarks In full-duplex mode, data can only be received on this 2-wire line. In full-duplex mode, data can only be received on this 2-wire line. 10 10 - 13 RS422-A/485 submodule Jumper settings R When supplied, the jumpers on the RS422-A/485 submodule are inserted as shown below. You can therefore use the RS422-A/485 submodule immediately. Front connector 15-pin sub-D plug X9 X8 X10 4 3 2 1 X11 1 X3 2 3 X4 X6 1 2 3 X5 X7 Backplane connector Fig. 10-1 10 - 14 RS422-A/485 submodule: jumper settings when supplied C79000-S8576-C191-01 R RS422-A/485 submodule Using jumpers X10 and X11, you can cancel the detection of the BREAK state via the twisted pair R. 1 X10 X11 X10 X11 2 BREAK state on twisted pair R cancelled, the BREAK state cannot be detected reliably Twisted pair R active, the BREAK state can be detected reliably You must not change the other jumper settings. 10 C79000-S8576-C191-01 10 - 15 RS422-A/485 submodule Standard connecting cables for the RS422-A/485 submodule R There are standard connecting cables in various lengths for linking the RS422-A/485 submodule in the CP 544 to the partner. The following lengths are permissible depending on the baud rate: * 1200 m up to 19200 bps * 500 m at 38400 bps * 250 m at 76800 bps Refer to the ordering information in Chapter 11 for the order nos. CP 544 CP 524, CP 544 2 T(A) R(A) 4 9 T(B) R(B) 11 4 R(A) T(A) 2 11 R(B) T(B) 9 G G 8 Transmitter Receiver Receiver Transmitter 8 GND* Shield 1 Casing, ground* Fig. 10-2 GND* 1 Casing, ground* RS422-A/485 submodule: connecting cable CP 544 - CP 524, CP 544 Note * Never connect the casing ground and GND together, the submodules could otherwise be destroyed. * GND must always be connected at both ends, otherwise destruction of the submodule is also possible. 10 - 16 C79000-S8576-C191-01 R RS422-A/485 submodule Technical data Important for USA and Canada The following approvals have been assigned: UL Listing Mark Underwriters Laboratories (UL) according to Standard UL 508, Report E 85972 CSA Certification Mark Canadian Standard Association (CSA) according to Standard C 22.2 No. 142, Report LR 63533 Degree of protection Noise immunity, EMC Climatic ambient conditions Mechanical ambient conditions Power supply Transmission speed Front connector Transmission cable All as for CP 544 Power loss Dimensions (w x h x d) 300 to 76 800 bps 15-pin Sub-D plug Shielded 4-wire cable (5-wire cable for RS422-A) with braided shield and metal connector casing, grounding necessary at both ends Max. 1 200 m At 5 V At 24 V Max 0.6 A Max. 3 W 16.3 mm x 60 mm x 102.7 mm Weight Approx. 0.1 kg Cable length Current input 10 C79000-S8576-C191-01 10 - 17 Switch settings S S Switch settings You can use the following switch settings on the CP to define the page frame numbers, the number of pages and the coordination flag area: Table 10.6 Switch settings on the CP 544 Switch Setting of page frame number assembly S2 The CP occupies up to 8 successive page numbers. You need only set the lowest page number, the following numbers result from the number of pages. To set the value, position the associated switch upwards. When supplied, all switches are pressed down (page number 0 set). Switch Setting of coordination flags assembly S4 Using S4 you can enable up to 8 blocks with 32 bytes each as communication flags by pressing the corresponding switches down. When supplied, all switches are positioned upwards (all coordination flags are disabled). Position 0 1 2 3 4 5 6 7 = = = = = = = = flag flag flag flag flag flag flag flag bytes bytes bytes bytes bytes bytes bytes bytes 0 32 64 96 128 160 192 224 - 31 63 95 127 159 191 223 255 Switch Setting of number of pages (1, 2 or 4 pages) assembly S5 Position 1 Position 0 Down Up Up Down or up 1 page per interface (= delivery condition) 2 pages per interface Down 4 pages per interface Up The other switches of S5 must be positioned upwards. 10 - 18 C79000-S8576-C191-01 T Technical data of CP 544 T Technical data of CP 544 Important for USA and Canada The following approvals have been assigned: UL Listing Mark Underwriters Laboratories (UL) according to Standard UL 508, Report E 85972 CSA Certification Mark Canadian Standard Association (CSA) according to Standard C 22.2 No. 142, Report LR 63533 Device-specific data Design Double Eurocard format, two ES 902 backplane connectors, series 2, 48-way, 1 slot wide Front connector 15-pin Sub-D plug Interface submodule connector (SI1,SI2) 48-way female connector, three-row Memory submodule connector 68-pin male connector, two-row Current consumption Max. 0.9 A at 5 V (without submodules) Max. 30 A at 2.7 V in backup mode Max. 120 mA at 24 V Power loss Max. 4.5 W (without submodules) Fan-free operation possible (exception: fanfree operation with the RS422-A/RS485 submodule 6ES5 752-0AA42) Transmission speed of PG interface Max. 9600 bps with 1000 m cable length Supply voltages 5 V 5% 2.7 V + 30%/- 10% 24 V + 25%/- 15% Weight Approx. 0.5 kg Dimensions (h x w x d) 20.32 x 233.4 x 160 mm C79000-S8576-C191-01 10 10 - 19 Technical data of CP 544 T Device safety Device corresponds to DIN VDE 0805 / EN 60 950 / IEC 950 Protection class I Degree of protection IP 20 to DIN 40 050 / IEC 529 Noise resistance, electromagnetic compatibility (EMC) Noise suppression Limit class TO VDE 0871 A EMC resistance To DIN VDE 0843 Conducted interference on signal lines To IEC 801-4 (burst): 1 kV Noise immunity to discharges of static electricity To IEC 801-2 (ESD): 4 kV relay Noise immunity to external fields To IEC 801-3: 3 V/m Climatic ambient conditions Temperature: Operation Storage/transport Tested to DIN IEC 68-2-1/2 0 C to +55 C -40 C to +70 C Temperature gradient: Operation Transport and storage Max. 10 K/h Max. 20 K/h Relative humidity: Operation Transport and storage < 95% at 25 C < 95% at 25 C Operating altitude Max. 1500 m above sea level Mechanical ambient conditions Oscillation Operation Transport Shock Operation 10 - 20 Tested to DIN IEC 68-2-6 10 - 58 Hz: amplitude 0.075 mm 58 - 500 Hz: amplitude 10 m/s2, (1 g) 5 - 9 Hz: amplitude 3.5 mm 9 - 500 Hz: amplitude 10 m/s2, (1 g) Tested to DIN IEC 68-2-27 Half-sine: 150 m/s2 (15 g), 11 ms C79000-S8576-C191-01 T TTY submodule TTY submodule You can use the TTY submodule with: * * * RK 512 computer link, data transmission with the 3964/3964R procedures, data transmission with the open driver. The following table lists the pin assignments of the 25-way Sub-D plug on the front panel of the TTY submodule: Pin assignments Pin Name 13 25 14 1 Current Remarks direction 1 Shield 9 24 V external 10 + TxD 12 + 20 mA 13 + RxD 14 - RxD 16 + 20 mA 19 - TxD 21 - 20 mA Return circuit 24 - 20 mA Return circuit This connection is switched between 24 V internal and 24 V external using jumper J 3. Current source, transmitter Current source, receiver : Input : Output 10 C79000-S8576-C191-01 10 - 21 TTY submodule Jumper settings T When supplied, the jumpers on the TTY submodule are inserted as shown below. You can therefore use the TTY submodule immediately. Front connector 25-pin sub-D plug J3 3 2 1 J4 J2 J1 1 2 3 Backplane connector Fig. 10-3 10 - 22 TTY module: jumper settings when supplied C79000-S8576-C191-01 T TTY submodule Using jumpers J 1 and J 2 you can switch over the polarity of the transmitted and received data. 1 2 3 J1 Transmitted data negated Transmitted data with normal polarity J2 Received data with normal polarity Received data negated Using jumper J 3 you can switch over the 24-V source voltage for generating the current. 1 J3 2 3 24 V applied to pin 9 of Cannon socket on front panel 24 V supplied via backplane connector (internal) 10 C79000-S8576-C191-01 10 - 23 TTY submodule Standard connecting cables to the TTY submodule T There are standard connecting cables in various lengths up to 1000 m for the link from the TTY submodule in the CP 544 to the partner. Refer to the ordering information in Chapter 11 for the order nos. and lengths. Note The following applies to all connecting cables: Never connect the casing ground and GND together, the submodules could otherwise be destroyed. GND must always be connected at both ends, otherwise destruction of the submodule is also possible. CP 524, CP 525, CPU 928B, CP 544 CP 544 13 + RxD - TxD 19 14 - RxD + TxD 10 21 - 20 mA + 20 mA 12 12 +20 mA - 20 mA 21 10 + TxD - RxD 14 - TxD + RxD Receiver 13 Receiver +24 V Transmitter Transmitter 19 Casing, ground Fig. 10-4 10 - 24 1 Shield 1 +24 V Casing, ground TTY submodule: connecting cable CP 544 - CP 525, CP 524, CPU 928B, CP 544 C79000-S8576-C191-01 T TTY submodule DR 210/211 DR 230/231 CP 544 13 + 20 mA + RxD 21 + 24 V Receiver 14 + TxD - RxD 18 Transmitter 10 + TxD + 20 mA 10 + 24 V Transmitter 19 + RxD - TxD 9 Receiver 5 25 3 2 V.24 assignments V.24 assignments 2 3 7 7 1 Shield 1 Casing, ground Fig. 10-5 Casing TTY submodule: connecting cable CP 544 - DR 210/211, DR 230/231 You can use this connecting cable for both the TTY and V.24 submodules. Ensure that you have the same interface type in the CP 544 and in the printer. C79000-S8576-C191-01 10 - 25 10 TTY submodule T No standard connecting cables are available for the link to the CP 523 and CP 521 communications processors. Note that you must only use metal connector housings. The cable shield must be connected to the connector housing and the shield rail at both ends using a large-area contact. CP 544 15-pin sub-D plug (male connector) 16 + 20 mA + TxD 12 13 + RxD - TxD 10 14 - RxD 24 - 20 mA 12 + 20 mA 10 + TxD 19 - TxD + RxD 8 21 - 20 mA - RxD 6 + 24 V Receiver CP 523 25-pin sub-D plug (male connector) Transmitter + 24 V Transmitter Receiver 1 Shield 24, 25 Casing, ground Cable type LIYCY 5 x 0.14 Fig. 10-6 10 - 26 TTY submodule: connecting cable CP 544 - CP 523 C79000-S8576-C191-01 T TTY submodule CP 521 SI 25-pin sub-D plug (male connector) CP 544 15-pin sub-D plug (male connector) 16 + 20 mA + TxD 18 13 + RxD - TxD Transmitter 21 14 - RxD 24 - 20 mA 12 + 20 mA 10 + TxD Transmitter 19 - TxD + RxD 9 - 20 mA - RxD 10 + 24 V Receiver + 24 V 21 1 Casing, ground Fig. 10-7 Receiver Shield Cable type LIYCY 5 x 0.14 TTY submodule: connecting cable CP 544 - CP 521 SI 10 C79000-S8576-C191-01 10 - 27 TTY submodule T Technical data Important for USA and Canada The following approvals have been assigned: UL Listing Mark Underwriters Laboratories (UL) according to Standard UL 508, Report E 85972 CSA Certification Mark Canadian Standard Association (CSA) according to Standard C 22.2 No. 142, Report LR 63533 Degree of protection Noise immunity, EMC Climatic ambient conditions Mechanical ambient conditions Power supply All as for CP 544 Transmission speed 300 to 9 600 bps Front connector 25-pin Sub-D plug Transmission cable Shielded 4-wire cable with braided shield and metal connector casing, grounding necessary at both ends Cable length Max. 1 000 m Current input At 5 V At 24 V Max. 0.1 A 60 mA Power loss Max. 2 W Dimensions (w x h x d) 16.3 mm x 60 mm x 102.7 mm Weight Approx. 0.1 kg 10 - 28 C79000-S8576-C191-01 V V.24 submodule V V.24 submodule You can use the V.24 submodule with: * * * Making your own connecting cables RK 512 computer link, data transmission with the 3964/3964R procedures, data transmission with the open driver. If you make your own connecting cables, remember that unused inputs on the partner may have to be connected to open-circuit potential. For more information, refer to the appropriate device manuals and the CCITT recommendations V.24 and V.28. 10 C79000-S8576-C191-01 10 - 29 V.24 submodule V The following table lists the pin assignments of the 25-pin Sub-D plug on the front panel of the V.24 submodule. Pin assignments The signal numbering complies with DIN 66020 (V.24/ RS 232C), the signal names are in accordance with the usual international abbreviations (RS 232C). Pin DIN CCITT Abbrevi- Input/ 66020 V.24 ation output 1 Remarks Shield 2 D1 103 TxD Output 3 D2 104 RxD Input 4 S2 105 RTS Output 5 M2 106 CTS Input 6 M1 107 DSR Input 7 E2 102 GND 8 M5 109 DCD Input 15 T2 114 TxC Input 17 T4 115 RxC Input Only for synchronous data transmission (not available since no synchronous protocols are currently implemented) 18 PS3 141 Output Not supported 20 S1.2 108.2 DTR Output 22 M3 125 Input 23 S4 111 Output 24 T1 113 Output Only for synchronous data transmission (not available since no synchronous protocols are currently implemented) 25 PM1 142 Input Not supported 13 25 14 1 10 - 30 RI C79000-S8576-C191-01 V Jumper settings V.24 submodule When supplied, the jumpers on the V.24 submodule are inserted as shown below. You can therefore use the V.24 submodule immediately. Front connector 25-pin sub-D plug J9 J6 J3 J5 J4 J2 J8 J1 J7 Backplane connector Fig. 10-8 V.24 submodule: jumper settings when supplied 10 C79000-S8576-C191-01 10 - 31 V.24 submodule V Using jumpers J 3 and J 5 you can switch over the polarity of the transmitted and received data. 1 2 3 J3 Transmitted data with normal polarity Transmitted data negated J5 Received data with normal polarity Received data negated Using jumper J 6 you can switch all V.24 receivers so that they can receive signals even if these are only in the positive voltage range. 1 2 3 J6 All received signals must have the V.24 signal level All received signals can be in a positive range Using jumper J 9 you can connect CTS permanently to open-circuit potential or connect it through from the front connector. 1 J9 2 3 CTS applied to open-circuit potential CTS applied to pin 5 The transmitter is enabled if +12V are applied to input CTS. Data are output by the transmitter if +12V are present at output RTS. 10 - 32 C79000-S8576-C191-01 V V.24 submodule There are standard connecting cables in various lengths up to 16 m for the link from the V.24 submodule in the CP 544 to the partner. Standard connecting cables to the V.24 submodule Refer to the ordering information in Chapter 11 for the order nos. and lengths. Note The following applies to all connecting cables: Never connect the casing ground and GND together, the submodules could otherwise be destroyed. GND must always be connected at both ends, otherwise destruction of the submodule is also possible. CP 524, CP 525, CPU 928B, CP 544 CP 544 Receiver Transmitter 3 TxD RxD 2 Transmitter Receiver 2 TxD RxD 7 7 1 Casing, ground Fig. 10-9 3 Shield 1 Casing, ground 10 V.24 submodule: connecting cable CP 544 - CP 525, CP 524, CPU 928B, CP 544 C79000-S8576-C191-01 10 - 33 V.24 submodule V DR 210/211 DR 230/231 CP 544 TTY assignments 13 21 14 18 10 10 19 9 5 CTS Busy 3 RxD TxD 2 2 TxD RxD 3 TTY assignments 25 Receiver Transmitter Receiver Transmitter 7 1 7 Shield 1 Casing, ground Casing Fig. 10-10 V.24 submodule: connecting cable CP 544 - DR 210/211, DR 230/231 You can use the connecting cable CP 544 - DR 230/231 for both the V.24 and TTY submodules. Ensure that you have the same interface type in the CP 544 and in the printer. 10 - 34 C79000-S8576-C191-01 V V.24 submodule No standard connecting cables are available for the link to the CP 523 and CP 521 communications processors. Note that you must only use metal connector housings. The cable shield must be connected to the connector housing and the shield rail at both ends using a large-area contact. CP 544 25-pin sub-D plug (male connector) CP 523 25-pin sub-D plug (male connector) Receiver Transmitter 3 TxD RxD 11 Transmitter Receiver 2 TxD RxD 7 1 5 2, 21, 23 Shield Casing, ground 24, 25 Casing, ground Cable type LIYCY 4 x 0.14 Fig. 10-11 V.24 submodule: connecting cable CP 544 - CP 523 10 C79000-S8576-C191-01 10 - 35 V.24 submodule V CP 521 SI 25-pin sub-D plug (male connector) CP 544 25-pin sub-D plug (male connector) Receiver Transmitter 3 RxD TxD 2 2 TxD RxD 3 Transmitter Receiver 7 1 7 Shield Casing, ground Cable type LIYCY 4 x 0.14 Fig. 10-12 V.24 submodule: connecting cable CP 544 - CP 321 SI 10 - 36 C79000-S8576-C191-01 V V.24 submodule CP 544 CP 544 Receiver Transmitter 3 TxD RxD 2 Transmitter Receiver 2 TxD RxD 3 RTS 4 4 RTS CTS 5 5 CTS 7 7 1 Casing, ground Shield 1 Casing, ground Fig. 10-13 Example of a connecting cable CP 544 - CP 544 for RTS/CTS flow control 10 C79000-S8576-C191-01 10 - 37 V.24 submodule V Technical data Important for USA and Canada The following approvals have been assigned: UL Listing Mark Underwriters Laboratories (UL) according to Standard UL 508, Report E 85972 CSA Certification Mark Canadian Standard Association (CSA) according to Standard C 22.2 No. 142, Report LR 63533 Degree of protection Noise immunity, EMC Climatic ambient conditions Mechanical ambient conditions Power supply All as for CP 544 Transmission speed 300 to 19 200 bps Front connector 25-pin Sub-D plug Transmission cable Shielded 4-wire cable with braided shield and metal connector casing, grounding necessary at both ends Cable length Max. 16 m Current input At 5 V At 24 V Max. 0.3 A - Power loss Max. 1.5 W Dimensions (w x h x d) 16.3 mm x 60 mm x 102.7 mm Weight Approx. 0.1 kg 10 - 38 C79000-S8576-C191-01 11 Appendix In the appendix you can find C79000-A8576-C191-01 * Ordering information on products referred to in the manual * A list of further reading * A list of abbreviations * A list of key words. 11 - 1 CP 544 Ordering information Ordering information This section lists ordering information for the products mentioned and/or described in this manual. You can obtain the actual Order Nos. from the respective catalog. CP 544 Module . . . . . . . . . . . . . . . . . . . . . . . . . . 6ES5 544-3UA11 COM PP Parameterization software for CP 544 and CPU 928B, in three languages (G, E, F) . . . . . . . . . . . 6ES5 895-4SP01 F-EPROM submodule 16 bit, 256 byte . . . . . . . . . . . . . . . . . . . . . 6ES5 374-2FH21 RAM submodule 16 bit, 256 byte . . . . . . . . . . . . . . . . . . . . . 6ES5 374-2AH21 Interface submodules RS 422-A/485 submodule . . . . . . . . . . . . . 6ES5 752-0AA42 TTY submodule . . . . . . . . . . . . . . . . . . . . . 6ES5 752-0AA12 V.24 submodule. . . . . . . . . . . . . . . . . . . . . 6ES5 752-0AA22 Adapter CP 544 to PG . . . . . . . . . . . . . . . . . . . . . . 6ES5 734-4AG00 Standard connecting cables CP 544 - CP 524/544 (RS 422-A/485)*. . . . CP 544 - CP 525/524, CPU 928B, CP 544 (TTY) . . . . . . . . . . . . . . . . CP 544 - DR 210/DR 211 DR 230/DR231 (TTY/V.24) . . . . . CP 544 - CP 525/524, CPU 928B, CP 544 (V.24) . . . . . . . . . . . . . . . 6ES5 725-7xxx0 6ES5 726-1xxx0 6ES5 726-5xxx0 6ES5 726-8xxx0 (xxx = SIMATIC length code, see catalog) * C79000-A8576-C191-01 11 Permissible lengths depend on the baud rate (see under RS422-A/485 submodule in the reference section) 11 - 3 CP 544 Further Reading Further Reading /1/ Catalog ST 59: Programmers SIMATIC S5 /2/ Catalog ST 52.3: S5-115U Programmable Controller SIMATIC S5 /3/ Catalog ST 54.1: Programmable Controllers S5-135U, S5-155U/H SIMATIC S5 /4/ Catalog ST 57: Standard Function Blocks and Driver Software for Programmable Controllers of the U Range SIMATIC S5 /5/ S5-115U Programmable Controller Order No. 6ES5 998-0UF23 /6/ Standard Function Blocks, Handling Blocks CPU 922, CPU 928, CPU 928B S5-135U, S5-155U Programmable Controllers Order No. C79000-G8576-C366 /7/ Handling Blocks, Standard Function Blocks CPU 946/947 S5-155U Programmable Controller 11 Order No. C79000-G8563-C572 C79000-A8576-C191-01 11 - 5 Further Reading CP 544 /8/ S5-155H Programmable Controller Order No. 6ES5 998-3SR21 /9/ STEP 5 Order No. C79000-G8576-C140 11 - 6 C79000-A8576-C191-01 CP 544 Abbreviations Abbreviations A A-NR ANZW AS 512 Job number Status word Interface module 512 (IM 512) B BCC BLGR Block check character Frame size C CC CP CPU Central controller Communications processor Central processing unit D DB DBNR DHB DR DW DX Data block Data block number Data handling block Drive (floppy disk) Data word Extended data block E EPROM submodule Plug-in memory submodule 11 C79000-A8576-C191-01 11 - 7 Abbreviations CP 544 F FB FW FY Function block Flag word Flag byte I IPC Interprocessor communication flag O OB Organization block P PAFE PG PLC Parameterization error byte Programmer Programmable controller Q QANF QLAE QTYP QVZ Initial address of source Source length = number of source files Source type = type of data source Acknowledgement delay time R RAM submodule REATEL RK RLO 11 - 8 Plug-in memory submodule Reply message Computer link Result of logic operation C79000-A8576-C191-01 CP 544 Abbreviations S SI SSNR SYSID SYSTAT Interface Interface number Identification area SYSID Error message area of the SYSTAT T TTY Current-loop signals (20 mA) Z ZANF ZLAE ZTYP ZVZ Initial address of destination Destination length = number of destination files Destination type = type of data destination Character delay time 11 C79000-A8576-C191-01 11 - 9 CP 544 - Index A Index A ANZW 6-12 Areas of application 1-5 Assign device interface parameters without COM PP 6-39 CP 544 installation properties (summary) removal 2-15 1-3 2-16 D B Block check character 4-33 C Check job status 6-38 Check list correct hardware installation 2-20 COM PP 1-10, 10-7 exit 7-15 function 7-3 input keys 10-7 install 9-12 load and operate 7-7 scope of delivery 7-7 start 7-9 under MS-DOS 7-10 Command messages RK 512 3-46 Connecting cables 1-15, 2-17 Continuation message 3-46 Coordination flag area setting 2-9 Coordination flags 3-15, 4-13, 5-17, 9-43 Data handling blocks block numbers jobs (summary) Data link layer 3964/3964R procedures RK 512 Delete error message area Delete SYSTAT Device interface start stop DHBs for CP 544 6-4, 6-4 6-18 4-4 3-4 6-57 6-57 6-61 6-61 10-10 E End identifier 5-32, EPROM submodules special features when programming Error message area of SYSTAT Error numbers 5-54 1-16 7-17 8-6 8-3 11 C79000-A8576-C191-01 11 - 11 F CP 544 - Index F J Fetch data 6-25 FETCH job 3-12, 9-29 Fitting step-by-step 2-3 Flow control 5-22, 5-31, 5-42 Front panel 1-9 Full-duplex mode RS422-A/485 submodule 1-11 Job processing FETCH-DIRECT SEND-DIRECT Job tables 3964/3964R procedures open driver RK 512 Jumper settings G L Generation of backup copies (COM PP) 7-8 H Help window 7-12 I Identification area Import mode-specific status parameters Information character Initialization conflict 3964/3964R Input keys Installation guidelines Interface submodules 1-8, 1-11, installation removal Interfaces 4-23 5-61 3-27 2-12 LED displays interface-specific 2-24, module-specific 2-23, Link types Link partners 3964/3964R procedures connection open driver RK 512 2-23 10-13 10-12 1-6 1-5 4-5 2-7 5-17 3-5 6-68 M 6-62 4-32 4-37 7-12 10-3 10-20 2-13 2-14 1-8 Memory cards Message header RK 512 Mode changeover Mode selector Module 1-15, 2-14 3-47 10-6 2-22, 10-6 1-7 N Network layer RK 512 11 - 12 6-25 6-21 3-4 C79000-A8576-C191-01 CP 544 - Index O O Open driver coupling partners data transfer STEP 5 program transmission direction transmission mode transmission safety transmission speed Operation of CP 544 5-3 5-7 5-11 5-13 5-8 5-9 5-6 5-4 2-22 P PAFE byte see parameterization error byte Page numbers assignment 2-4, 2-6 Parameter blocks 6-40, 6-62 Parameterization error byte 6-15 Parameterization example 3964/3964R procedures 4-28 open driver, mode 3 5-66 RK 512 3-38 Physical layer 3964/3964R procedures 4-4 open driver 5-6 RK 512 3-4 Pin assignments PG interface 10-20 Position of switches on module 2-5 Point-to-point link of components 1-7 Power-up response 2-21 Printer output 5-10, 5-51 Printing parameter sets 7-13 C79000-A8576-C191-01 Procedure errors 3964/3964R Procedures 3964/3964R 4-3, coupling partners data exchange receive mailbox static parameter set STEP 5 program transmission direction transmission reliability transmission speed Programmer connection Protocol definition 3964/3964R procedures data transmission levels open driver, mode 1 open driver, mode 2 open driver, mode 3 open driver, mode 4 RK 512 PSEUDO-WRITE job 6-34, 4-38 4-31 4-5 4-7 4-15 4-15 4-9 4-6 4-4 4-3 2-19 4-31 3-44 5-26 5-36 5-47 5-58 3-44 9-49 Q Quasi full-duplex mode 3-57 R RAM submodules 1-16 Read complete SYSTAT 6-58 Read date/time 6-67, 9-61 Read error message area 6-55, 9-56 Read hardware parameters 6-63 Read parameters of a device interface 6-54 Read SYSID 6-68 Read SYSTAT 6-55, 9-56 Receive data 6-27 11 - 13 11 S CP 544 - Index Receive mailbox 3964/3964R procedures 4-19 open driver, mode 1 5-24 open driver, mode 2 5-33 open driver, mode 3 5-44 Receiving 3964/3964R 4-34 open driver, mode 1 5-27 open driver, mode 2 5-38 open driver, mode 3 5-48 Reply message RK 512 3-48 RK 512 computer link 3-3 coupling partners 3-5 data exchange 3-7 dynamic parameter set 3-18 static parameter set 3-18 STEP 5 program 3-9 transmitted data 3-6 transmission direction 3-6 transmission reliability 3-4 transmission speed 3-3 RS422-A/485 submodule 1-11, 10-14 jumper settings 10-15 pin assignments 10-14 standard connecting cables 10-17 technical data 10-18 S Scan status Screen form design of COM PP Screen form tree of COM PP Scroll backwards (COM PP) Scroll forwards (COM PP) Selection window 11 - 14 6-60 7-11 7-5 7-13 7-13 7-12 SEND job 9-17, 9-37 3964/3964R procedures 4-10 open driver 5-14 RK 512 3-10 Set date/time 6-64, 9-62 Setting the coordination flag area 2-9 Setting the number of pages 2-7 Setting the page number 2-6 Slots 2-16 Standard connecting cables RS422-A/485 submodule 10-17 TTY submodule 10-27 V.24 submodule 10-36 Static parameter set 3964/3964R procedures 4-15 - 4-16 open driver, mode 1 5-21 open driver, mode 2 5-30 open driver, mode 3 5-41 open driver, mode 4 5-52 RK 512 computer link 3-19 Status transitions 2-26 module-specific 2-26 interface-specific 2-27 Status word 6-12 bits in the first word 6-12 STEP 5 program 6-3 synchronize CP and CPU 6-19 synchronize several hardware clocks 9-64 Switch positions 2-5 Switch settings 10-19 Switching on of power supply 2-21 Synchronization of CPU and CP 2-21 SYSTAT error numbers 8-8 C79000-A8576-C191-01 CP 544 - Index T T U Technical data (CP 544) 10-21 Transmission modes 5-9 Transmission of parameters 9-15 3964/3964R procedures 4-21 open driver 5-19, 5-60 RK 512 3-25 Transmission reliability 3964/3964R procedures 4-4 open driver 5-6 RK 512 3-4 Transmission speed 3964/3964R procedures 4-3 open driver 5-4 RK 512 3-3 Transmit data 6-20 Transport layer RK 512 3-4 TTY submodule 1-12, 10-23 jumper settings 10-24 pin assignments 10-23 standard connecting cables 10-27 technical data 10-31 User memory submodules CP 544 without 1-15 1-17 V V.24 submodule 1-14, 10-32 jumper settings 10-34 pin assignments 10-33 standard connecting cables 10-36 technical data 10-41 W Write data 6-34 11 C79000-A8576-C191-01 11 - 15 Documentation Supplement C79000-Q8576-C191-02 CP 544 Jan uary 1995 6ES 5 998-2DB21, Release 01 This supplement contains additional information and corrections to the CP 544 and the CP 544 manual, release 01. The supplement should be considered more up-to-date than the manual i f uncertainties arise. Notes o n the CP 544 M odu le (6ES 5 544-3UA 11) CP 544, computer link, accessing A S and RS from the link partner is not performed correctly (fault corrected from release 3). If the CP 544 receiv es a job from the link partner in which absolute addresses (AS) or sy stem addresses (RS) greater than 255 are giv en as the source address (partner FETCH) or destination address (partner SEND), incorrect addresses i n the range from 0 to 255 are read and wri tten. Remedy: None (only AS and RS addresses which li e i n the range from 0 to 255 may be accessed). C79000-Q8576-C191-02 - 1 - Documentation Supplement Notes o n the CP 544B M odu le (6ES 5 544-3UB11) You can also run special drivers with the CP 544B. You will need version 3.0 of the COM PP software for this. Loading special drivers To be able to run the speci al dri vers you must always use a user memory submodule (RAM or EPROM ). Deleting special drivers If a special driv er i s already present on the CP on interface 1 or 2, it cannot simply be overwritten (error message: "Speci al dri ver cannot be overwritten because referenced i n DX1/2"). Y ou must delete the interface which the special driv er i s using in the selection screen DELETE CP. The other interface may also have to be deleted if it uses the same special driv er. A dd itio ns to the M anu al Handling block SEND, parameter QLA E When sending n bytes of user data, state the number n of bytes of user data to be transferred as the parameter QLAE when calling the handling block SEND. Note that the parameter QLAE must either be speci fied in words (DB, DX, CA, TA, RS, AS) or i n bytes (FA, I A, QA, PY ) depending on the data type to be transferred. New RS422-A /485 submodule for operation without fan (Section 1.1.4) Operation without a fan is possible with the newly developed RS422-A/485 submodule wi th the order number 6ES5 752-0AA43. - 2 - C79000-Q8576-C191-02 Documentation Supplement Description of the LEDs TXD1, TXD2 (Section 2.10 and Reference Section) The TXD LEDs also flash quickly when the parameters are complete, a cold restart has been performed and no submodule is plugged. The correct description for "TXD LED off" is: Interface is i n operation, active and passive jobs can be ex ecuted and the interface submodule is plugged or No parameters are available and no interface submodule is plugged. CP 544, computer link, accessing A S from partner CPUs with more than 64K address area (e.g. CPU 948, CPU 945) (Chapter 3) Access (SEND or FETCH) to absolute addresses from partner CPUs with more than 64K address area is not allowed because only an address area with up to 64K words can be addressed wi th the computer link. This does not guarantee which 64K address area the data are written to or read from. Handling blocks for 3964 procedures (Section 4.3.1.2) and open drivers (Section 5.3.1.2) The handli ng block "PSEUDO-WRITE" may not be used for the 3964 procedures and the open dri ver. Using the special jobs 189 and 203 (Section 6.3) The special jobs 189 and 203 cannot be used if you have stored the parameters in an EPROM user memory submodule. C79000-Q8576-C191-02 - 3 - Documentation Supplement A ssigning device interface parameters with SEND 189; incorrect description in manual (Section 6.3.8) If the device i nterface is assigned parameters wi th the SEND 189, the 3964/3964R procedures and the open driv er must also have their data word 6 and 7 fi lled out as follows as for the RK 512 computer link: DW6: 5801 - DX No.1 (i nterface 1) or 5802 - DX No.2 (i nterface 2) or 0000 - If no receiv e mailbox i s confi gured on the interface. DW7: 02BC - From DW No. 2BC (700 decimal) onwards or 0000 - If no receiv e mailbox i s confi gured on the interface. A ssigning parameters (Chapter 7) Y ou can assign parameters to the CP 544 offline in a file or online on the module itself (online parameter assignment is not possible on the CPU 928B and CPU 948). Y ou should observe the followi ng: Data in the file: After the parameters for a screen form have been entered, they are saved to the file with "ENTER". I f y ou do not want to save the parameters, y ou can return to the previ ous screen form with the "RETURN" key. Data on the module: If you assign parameters on the module itself the data are saved to a temporary file with "ENTER" and only transferred to the CP when you have finished assigning parameters. You are then asked whether y ou want to abandon the parameters or transfer them to the CP. - 4 - C79000-Q8576-C191-02 Documentation Supplement Installing COM PP (Section 7.3) If you are working on a programmer with MS-DOS and you want to store COM PP and the program fi le/special driv ers on the same driv e, y ou must store them i n the same directory (path). Status word (A NZW) (Section 8.1.1) Contrary to the information in the manual, the status word (ANZW) can be used for all driv er ty pes. C79000-Q8576-C191-02 - 5 - Siemens AG AUT 1282 D-76181 Karlsruhe Federal Republic of Germany From: Your Name: Your Title: Company Name: Street: City, Zip Code: Country: Phone: ............................................... ............................................... ............................................... ............................................... ............................................... ............................................... ............................................... Please check any industry that applies to you: Automotive Chemical Electrical Machinery Food Instrument and Control Nonelectrical Machinery Petrochemical Pharmaceutical Plastic Pulp and Paper Textiles Transportation Other . . . . . . . . . . . . . . . Remarks Form C79000-V8576-C117-01 1 Remarks Form Remarks Form Your comments and recommendations will help us to improve the quality and usefulness of our publications. Please take the first available opportunity to fill out this questionnaire and return it to Siemens, Please do not forget to state the title, order number, and release of your manual. Title of Your Manual: ................................................................................................. Order No. of Your Manual: ...................................................... Release: ...... Please give each of the following questions your own personal mark within the range from 1 (very good) to 5 (poor). 1. Do the contents meet your requirements? 2. Is the information you need easy to find? 3. Is the text easy to understand? 4. Does the level of technical detail meet your requirements? 5. Please rate the quality of the graphics/tables: Additional comments: .............................................................. .............................................................. .............................................................. .............................................................. .............................................................. .............................................................. .............................................................. .............................................................. Remarks Form 2 C79000-V8576-C117-01