Home

CP 523 Serial I/O Module - Service, Support

image

Contents

1. Select 3964 R mode 3 Select 3964 R mode follow up IRA A job request conectanvaheiortenteyacccpoaive o fo fe o Conciones orneman 0 0 Coordinate data transfer Read status byte and coordination A information ecsvenessagorame a o TT 7 58 EWA 4NEB 811 6044 02a CP 523 Communications Mode Illegal job requests in Communications mode If you write a job request into word 0 of the transfer memory other than one of those listed above the CP flags Illegal job request error 4X in the status byte The Print all message texts request 8000 for example is permissible in Print mode but not in Communications mode Error 4X would be flagged in the status byte in Communications mode You also receive this error flag if you transfer illegal parameter setting data with the Transfer parameter setting data request In all cases except AOXX Coordinate data transfer you must wait 30 ms after initiating a job request before reading out the status byte In all cases except AOXX Coordinate data transfer you must wait 30 ms after initiating a job request before reading out the status byte e The Transfer parameter setting data requests job number 90 are explained in section 7 3 These job requests are used to set the CP 523 parameters e The Set clock request is identical in Communications mode and Print mode 6 7 2 EWA 4NEB 811 6044 02a 7 59 Communications Mode CP 523 7 6 Sending Messag
2. 56 Return Info and Error Flags in the Coordination Byte Receive CBR in 3964 R Mode cece ete eens 7 56 Error Priority in 3964 R Mode Permissible Job Requests to the CP 523 in Communications Mode Flags Used in FB 123 EWA 4NEB 811 6044 02a CP 523 Communications Mode 7 Communications Mode In Communications mode the CP 523 permits transfer of a frame of up to 256 bytes between the CPU and a peripheral device connected to the CP 523 in response to a CPU job request e Communication with a terminal device terminal barcode reader keyboard e Point to point connection to another CP 523 or a CPU 944 7 1 General You can choose between the following e Transparent mode The CP 523 does not interpret any characters in Transparent mode No XON XOFF protocol is possible Only fixed length message frames can be received Exception If you program very skillfully you can also receive variable length frames by evaluating ZVZ i e character time out 7 4 2 under the heading character time out e Interpretive mode The CP 523 evaluates the following characters in Interpretive mode RUB OUT 7F BACKSPACE 08 XON OFF character if programmed 1 or 2 end characters e 3964 R mode The CP 523 interprets the following characters in 3964 R mode DLE 104 STX 02 NAK 154 ETX 03 During the parameter setting phase you can also specify whether the data frames a
3. Example Reading the current clock data Start address 128 is set on the module The clock data is to be output to digital output modules beginning address 8 CLOCKDAT KH 0000 Load ACCUM 1 with nonrelevant data and transfer to the CP in PW 128 word 0 so that the CP will transfer the current data to the transfer PY 129 memory KH 000F Read the current clock data and transfer to the digital output modules QB PW QW PW QW PW QW When using the integral clock you can evaluate the following additional flags in the status byte e Default time of day set 2X This evaluation is only of use if you operate the programmable controller without a backup battery e Time of day or date error 3X This error evaluation is only meaningful after you have set the clock e Clock defective 1X Thi l l 7 46 EWA 4NEB 811 6044 02a CP 523 Communications Mode 7 4 2 Reading Coordination Information after Coordinate Data Transfer As soon as the Coordinate data transfer request has been transferred to the CP the CP 523 writes coordination information into bytes 1 to 7 of the transfer memory This information can be read out with load operations This coordination info is available in Transparent and Interpretive mode after the following requests e A000 Read status byte and coordination info e A001 Send message frame e A0O80 Receive message frame In 3964 R mode different coordination info is retu
4. Print Message Text CPU to CP Transferring Additional Information for Set Time of Day and Date CPU to CP Status of the Module in Print Mode Byte 0 Status of the Printer Date and Time of Day Assignments of the Parameter Blocks in Communications Mode Parameter Blocks 0 2 and 9 0 cc cee tees A Assignments of the Parameter Blocks in Communications Mode Parameter Block 7 Permissible Job Requests to the CP 523 in Communications Mode Transfer Memory Assignments for Send Fixed Length Message Frame CPU to CP Transfer Memory Assignments for Send Message Frame with End of Text Characters CP to CPU Transfer Memory Assignments for Receive Message Frame CPU to CP Coordination Information for Coordinate Data Transfer CP to CPU Status Information and Current Clock Data CP to CPU Status Byte in Communications Mode CP to CPU Status Info from the CP 523 for Job Number AO00O Status Info for Send Request A001 Status Info for Receive Request A080 Return Info and Error Flags in the Coordination Byte Send CBS in 3964 R Mode Return Info and Error Flags in the Coordination Byte Receive CBR in 3964 R Mode EWA 4NEB 811 6044 02a CP 523 Summary A Summary A 1 Parameter Setting in Print Mode Table A 1 Parameter Setting Data for Print Mode 6 3 Baud rate no parity check BUSY signal Interface RS 232 C V 24 Data format 1
5. Receive buffer full Data rejected Too many message frames received Buffer full subsequent message frames will be rejected OB Frame too long 256 bytes Data rejected DLE not doubled or no ETX after DLE Message frame time out Data rejected Checksum error Data rejected OOo ees o See error message 7 56 EWA 4NEB 811 6044 02a CP 523 Communications Mode When several errors occur simultaneously the error codes are output in the priority shown below Table 7 31 Error Priority in 3964 R Mode Message frame too long Break Input buffer full Too many message frames Message frame time out DLE error STX error Character time out Parity error BCC error Message frame length 0 Oan RWWNND o EWA 4NEB 811 6044 02a 7 57 Communications Mode CP 523 7 5 Overview of Permissible Job Requests in Communications Mode Data exchange between the CPU and the CP 523 is always initiated by a job request from the CPU The CPU transfers the job request to the CP 523 in word 0 The job number is stored in byte 0 Table 7 32 Permissible Job Requests to the CP 523 in Communications Mode Read the status byte the status of the peripheral device and the current clock data Set the clock settings in bytes 1 to 7 Day of the week Transfer parameter setting data Transfer parameter setting data ities teseratinetace fT 8 Set the XON XOFF parameters 2 2 ee e a Saesnes o ff Saame o
6. in Print mode processing L Line feed execute d4 P Allo N ia IN Pp Ala O Om aa ER S LA A ant O M oa N Z es P D a had Era al M Mark Memory submodule evaluation initializing parameter setting plug in unplug Message buffer clear Message frame receive receive with end of text character receive with length evaluation receive with 3964 R protocol send send with end of text character send with fixed length send with length specification send with 3964 R protocol structure transfer Message frame length greater 256 bytes Message text ASCII character configured on the memory submodule configuring inserting number output printout with spaceholders without spaceholders Message text printout parameter setting data Method of transmission Mode 3964 R Communications Print setting Modem Modify DB CP 523 NIN af NI oO 7 78 7 70 7 82 7 66 8 3 9 amp Pa O R oe 45 2 T Pe Ni a T NI a ANE A O Co D an o gt an D D A ary D n a a on olo aj oe O Oo si io P A 3 P A a IERA EE a nm aq 1 an MY mk zR EWA 4NEB 811 6044 02a CP 523 Module functioning plug in status unplug O Operating modes change Output message text Overflow Receive mailbox P
7. 74 the countermeasures Message text number separator Message text taken Message text end of text character 75 the length of the Message text number separator Message text resulting Message text down times Message text end of text character Printout of message text 70 The following overview indicates the problems that have arisen during the monitoring period the measures taken and the length of the resulting downtimes EWA 4NEB 811 6044 02a 6 23 Print Mode CP 523 Message text number as KV variable If you have configured the KV variable in a message text you must specify the numbers of the message texts to be inserted in bytes 2 to 7 in the case of the Print message text job e Byte2and3 Number ofthe 1st message text to be inserted binary code e Byte4and5 Number of the 2nd message text to be inserted binary code e Byte6and7 Number of the 3rd message text to be inserted binary code You can use the KV spaceholder up to three times in one message text You can use the KV spaceholder in a message text simultaneously with spaceholders for variables You must then make sure that you transfer the data in bytes 2 and 7 correctly Example Configuring message texts with spaceholders for inserting message text KV You want to store the following message texts in DB 8 Message text 80 The KV has KV as a result of KV Message text 81 Motor Message text 82
8. EF Message frame length 1 to 256 bytes 001 to 256 0 for memory sub module with configured message texts 1 no memory submodule 0001 6 10 ms 64 7 16 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Setting parameters on the MEMORY SUBMODULE for TRANSPARENT MODE with the PG 685 Start address 128 is set on the CP 523 The module is to be operated in Transparent mode Parameters are set as follows e Parameters for the serial interface parameter block 0 2400 Bd 6 Even parity 0 No BUSY signal 0 V 24 interface 1 7 data bits 11 bit character frame 0 Handshake OFF 0 e Parameters for Communications mode parameter block 7 Character delay time 300 ms 0030p Message frame size 6 bytes no end of text character It is recommended that you proceed as follows 1 Enter parameter setting data in DB 1 on the programmer and include detailed commentary 2 Store DB 1 on floppy disk or hard disk 3 Transfer DB 1 to the memory submodule Table 7 4 Setting Parameters for Transparent Mode on the Memory Submodule Parameters for the seri Parameter block 0 al interface 2400 Bd 0600100 Even parity No BUSY signal V 24 interface 7 data bits 11 bit character frame Handshake OFF Parameters for Communications mode 710030006 aracter aelay time Frame size 6 bytes EWA 4NEB 811 6044 02a 7 17 Communications Mode CP 523
9. isolate error bit and buffer Increment pointer to byte 1 8 31 Using the SEND and RECEIVE Function Blocks CP 523 Read byte 1 acknowledgement or CBR when computer link and output or buffer Set pointer back to module base address Acknowledgement with error NO ERROR F 254 3 Set error bit for STAT FY 254 STAT Output STATbit KH 0090 Does the CP report FY 254 delay time exceeded Y E S gt message is output in the status byte but the function block is not interrupted Program END FY 246 Error flagged in CBR KH 007F error flag is isolated KBOK Coordination byte OK KH 0088 Output error CBR error computer link STAT Program END NETWORK 6 00BD Reset auxiliary register 2 OOBE OOBF 8 32 EWA 4NEB 811 6044 02a CP 523 Using the SEND and RECEIVE Function Blocks Set pointer to base address 6 byte 6 Read no of message blocks in Receive message frame from the CP decrement by 1 convert to number of words one message block comprises 4 words and store Set pointer to base address 2 byte 2 Read length of Receive message frame in the bytes from the CP convert to number of words and store Subtract the number of message blocks in words from this and store The result of the subtraction is the number of words in the last message block Correct the number of message blocks Reset the ZLAE register Load ZANF
10. o O h H u U f F Other character No headers or K1 Text H1 Text footers K2 Text H2 Text F1 Text F2 T ext 16 characters can be converted with a code sequence consisting of up to 7 characters 400 to 400 s month EWA 4NEB 811 6044 02a CP 523 Summary A 2 Job Requests in Print Mode Table A 2 Permissible Job Requests to the CP 523 in Print Mode CPU to CP 6 7 Read status byte status of the printer and current clock data Lo Message text number Print message text with CR LF at end l Day Olina eck Set clock settings in bytes 1 to 7 setting 0 Page number Page Page number Print message text with CR LF at end Message text number Print message text without CR LF at end Message text number Print message text without CR LF at end fe f o o rome CS o o o pee Transfer parameter setting data Set serial interface parameters Set XON XOFF character parameters Select Print mode T Print requests These are written into the message buffer if necessary EWA 4NEB 811 6044 02a A 3 Summary CP 523 Print message text 6 7 1 Table A 3 Transferring Additional Information for Print Message Text CPU to CP Value of the variable or number of the message text to be inserted Value of the variable or number of the message text to be inserted Value of the variable or 0000 to FFFF dependent on the configured data format 0000 to
11. 200 baud 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud even odd mark space no parity check No TTY RS 232 C V 24 7 data bits 8 data bits 8 data bits 7 data bits 7 data bits 8 data bits 01 to 7Fy FFFF no XON XOFF 01 to 7Fy protocol EIET Correction value s month 400p to 400p 0000p Only possible in interpr EWA 4NEB 811 6044 02a etive ASCII mode A 7 CP 523 er 444445 0241010 SayAq u sapeiey gt 1X8 jO pua Z 10 0 93440 3400 0 1000 2 334q u saydesey gt swte SESS9 0 1x 40 PU Sp sw 000p Zma jayewey gt a lueAaiad HARLIN 4444 014 LAAN w Aejep X204 a0 1x 40 pu3 wenaja sSz 011 444034 5314434 JO aqUINN a14q 0 sa1Aq 9 z 02 ssz or i sidwaye I sz sw 000Z SWOL SESS9 0 4 azis i az s Hirm Han dneniuna vaio 1 Hoana Haasa o14iaan 17A 1Nn0 w1I 1 awe abessayy 49010 03 1000 awesy abesso l saqesey gt POY YO YUM SWO SESS9 0 SWOL 000 03 L dapesey gt yey sw ozz ZAZ awit awit 7 XOIA INOUTIAA I Hat 4444407 Aejap uajyoesveyd sw 0 1000 Aejapsayeseyy swo 1000 PON oo stay apow E 010 SHG SPOW 01 0 511g saqUuNU 420 q 1919 ei Jaquinu 430 q 4318 sage geese JAAQUINU YIO q 1912 Weld Ob SUA ee Wesed O Y SHA en L ee weed 4 O y SHA SWOL 000E 93 L awl Aejap sayevey gt apon 01 0 stig JaquUNU 90 q 4332 Weed 1 01
12. EWA 4NEB 811 6044 02a CP 523 EWA 4NEB 811 6044 02a Using the SEND and Receive Function Blocks and store Is the message block to be transferred the last subframe LAST MESSAGE BLOCK Increment QANF register by 3 and store QANF register to DWINDEX register Set pointer to base address 6 byte 6 and store Calculate data word index register and store Compute corresponding byte address and store Open source DB Load data byte to be transferred into ACCUM and transfer to CP Increment pointer Load data byte to into ACCUM Using the SEND and Receive Function Blocks CP 523 01B4 T PY 0 and forward to CP 01B5 L FW 250 Decrement pointer 01B6 D 1 01B7 T FW 250 01B8 01B9 L FW 250 Last word of message block 01BA L FW 242 forwarded 01BB 1 gt lt F 01BC JC NADR NEXT ADDRESS O1BD 01BE L FW 240 Is message block 01BF L KB 0 to be transferred o1co F the last message block 01C1 JC END END 01C2 01 3 L FW 244 Increment QANF register by 1 01C4 ADD KF 1 01C6 T FW 244 and store 01C7 F 01C8 JU NBLO NEXT MESSAGE BLOCK 01C9 NADR 01CA L FW 250 Decrement pointer for byte 01CB D 2 address by 2 01cc T FW 250 and store 01CD 01CE L FW 246 Decrement data word 01CF D 1 index register by 1 01D0 T FW 246 and store 01D1 01D2 JU NWOR NEXT WORD 01D3 END H 01D4 L KH 0002 Load STAT bit SEND
13. Flag 100 0 is set when the CP has accepted the Send request The statement list does not show how or when this flag is reset This could be done for instance after a new request has been submitted to the CP NAME SEND2 iL KH PW PY BY F EWA 4NEB 811 6044 02a Check module status request Transfer CBS to flag byte 110 error analysis The CP accepted the job request when flag 100 0 is set then Block End Load message frame size 12 bytes into ACCUM 1 and forward to word 2 from transfer memory Load Send message frame request A001 into transfer to word 0 transfer memory Transfer CBS to flag byte 110 Check to see if request accepted If not Block End conditional If so set flag 100 0 and send message frame Open DB 20 DW 3 to transfer memory word 6 DW 2 to transfer memory word 4 DW 1 to transfer memory word 2 DW 0 to transfer memory word 0 The CP forwards the contents of transfer memory to the Send mailbox DW 5 to transfer memory word 2 DW 4 to transfer memory word 0 The CP forwards words 2 and 0 of the transfer memory to the Send mailbox then transmits the message frame from the Send mailbox to the I O device Communications Mode CP 523 7 7 Receiving a Message Frame from a Peripheral Device A080 The CPU can receive up to 256 bytes with a single job request This data is referred to as a message frame in the following Peripheral 5 CPU CP 523 dara Serial Send int
14. Load Receive request and transfer to CP Message frame in Receive mailbox If no then Block End Set message frame flag Load module address set byte 6 address and store Load end of text character and store Preset data word pointer Preset auxiliary data word pointer Load module address and store Request next message block by writing byte 0 Is the next data byte equal to the end of text character If yes set End flag 7 80 EWA 4NEB 811 6044 02a CP 523 EWA 4NEB 811 6044 02a Communications Mode Store data bytes in destination DB Block End if end of text character detected Has the message block been completely transferred If no read in two further data bytes Set auxiliary data word pointer for the next message block Set auxiliary data word pointer for the first two data bytes of the next message block Read in next message block Increment data word pointer by 1 Increment current address on the CP by 2 Read in next word of message block Block End 7 81 Communications Mode CP 523 7 7 3 Receiving Message Frames with 3964 R Protocol Basically data transfers between the CPU and the CP 523 are handled the same way as in Transparent mode The additional return information pertaining to the itself is entered in a coordination byte CBS CBR CBS coordination byte send CBR coordination byte receive Schematic for Rece
15. Page format Parameter block entering Parameter setting CP 523 FB 201 RECEIVE FB 200 SEND memory submodule serial interface Parameter setting data transfer Parity bit error Peripheral device connecting cable Permanent wire break Pin assignments RS 232 C V 24 subminiature D connector TTY TTY active TTY passive V 24 Point to point connection Print mode illegal job requests interruptions job requests Printing configured message texts Printing messages EWA 4NEB 811 6044 02a 4 1 3 3 3 3 P oe o D O oo ER oO ae co o a Z Dp EREEE P A ar Index Processing job requests 6 30 Protocol 3964 3964R 7 2 Protocol error R Reading clock data Reading coordination information Real time clock Ege ER ql integral Receive buffer fixed length message frame 7 38 7 76 mailbox 2 2 message frame with end of text character 7 78 message frame with 3964 R protocol 7 82 mailbox overflow 7 49 program Restart procedure RS 232 C V 24 interface gE S Send buffer mailbox 2 2 message frame with end of text character 7 66 8 3 message frame with length specification message frame with 3964 R protocol message frame of specific size 8 3 program 8 1 Separator Serial interface 2 4 2 5 parameter setting 6 3 6 5 Setting CP 523 CP 523 parameters page number
16. RLO at jump Transfer Read STATUS request to CP 523 Read job request acknowledgement from CP 523 Read CBS when 3964 R mode Display CP 523 STATUS Display CBS when 3964 R mode RLO 0 or is SEND executing CP 523 Evaluate RLO and read status EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks SEGMENT 3 _ _ Checking the SEND FB parameters a fe ee Sa a i l l l l l l l l i i l l Q DB available l l l l l l l l l l l l l l l l l l l l l l l l l i i l I Yes I i i l l No l l l l l l l Yes l l l i i l l Yes l l 4 I i i l Yes QLAE gt 128 l l l l l Q DB length gt l l QANF QLAE l i i l Yes i i ee EWA 4NEB 811 6044 02a 8 7 Using the SEND and Receive Function Blocks CP 523 SEGMENTA L n Lalcullating the Number of Send frames l l l l L e e e e e e e o o e o o eee eee eee o o o o o e e o o o e e o l SEGMENT 5 Establish SEND connection to the CP 523 e e A E aa aes a E AAN T A a EAN e T A Ge ESO A AY 1 Transfer send length to the CP Transfer end of text character to the CP Transfer SEND ID to the CP Evaluate job acknowledgement SEGMENT 6 from CP 523 Dg A EE Ng te E a aa as S Se a A E Coe a E A a EN a ew 1 Read acknowlegement from CP Acknowledgement with error r y Output error message Lo
17. Read status byte 0 from CP 523 00E1 00E2 Isolate error bits 00E3 and buffer 00E4 00E5 iL Reset aux flag byte 00E7 00E8 00E9 No computer link OOEA OOEB B 00EC Increment pointer to base address 2 00ED byte 2 CBS when O0EE computer link OOEF E 00FO Read CBS OOFL1 OOF T output 00F T and buffer 00F 00F iL Set pointer back to 00 D base address EWA 4NEB 811 6044 02a 8 15 Using the SEND and Receive Function Blocks CP 523 Error in status byte NO ERROR Set error flag for STAT Output STAT flags oO Program END Contains CBS error flags when computer link KBOK CBS ok KH 0088 Output error Computer link STAT error in CBS ran O Oo CO 3 AO Set pointer to base address 6 FF The CP loads and stores no of message blocks to be sent Set pointer back to base address Fr 01 0 0 01 0 01 0 0 01 0 01 01 01 01 0 0 01 01 01 01 01 0 0 01 01 01 a E r OA w S s 0 OE S t o E ON DO E S O S FO Reset aux flag for Send with EOT characters Load QANF parameter and store QANF register 8 16 EWA 4NEB 811 6044 02a CP 523 QLAE KH 0000 0 01 0 01 01 01 01 0 01 0 01 01 01 0 01 01 01 01 0 01 01 01 01 gI 01 0 01 01 01 01 01 01 0 01 01 01 0 01 01 0 01 01 01 01 01 EWA 4NEB 811 6044 02a Using the SEND and Receive Fun
18. You can configure the function characters in data block 1 parameter block 3 The default value for the function characters is 22 Function character Spaceholder Function character Figure 6 5 Structure of a Spaceholder Wrongly entered spaceholders are treated as text EWA 4NEB 811 6044 02a 6 17 Print Mode CP 523 Table 6 7 Overview of Spaceholders Configurable in Message Texts Insert date Insert time of day Transfer printer control parameters Insert message text fixed message text number Insert message text variable message text number Insert variable Unlimited Three 16 bit variables or one 32 bit variable one 16 bit variable The message text to be printed must be 250 characters long The message text to be printed must be 250 characters long Transfer message text numbers in bytes 2 to 7 to the CP Transfer values of the variables in bytes 2 to 7 to the CP You can enter spaceholders in either lower or uppercase Example Spaceholders for date and time of day D 0 TY Spaceholders for variables KH Kh kH kh Transfer of data when using the Insert message text spaceholder KV and the Insert variables spaceholders Transfer the messsage text numbers for the Insert message text spaceholder KV and the values for the Insert variables space holders to bytes 2 to 7 on the CP Access to bytes 2 to 7 depends on the order of
19. header or footer has been configured Left margin configurable up to 60 characters Number of lines per page 20 to 255 configurable within the range 14 to FFy The CP 523 counts the lines on a page using the line feeds LF sent to the printer If you print 15 message texts with CR LF for example the CP counts 15 lines The CP does not count the additional lines for message texts longer than one line EWA 4NEB 811 6044 02a 6 9 Print Mode CP 523 Configuring headers and footers You can configure up to two headers and two footers The headers and footers may contain spaceholders for the date and time of day as well as for control characters Spaceholders for variables and message texts are not evaluated and appear in the printout as configured Headers and footers are configured according to the following schematic If entering more than one header or footer ie gee an oe me te a 1 I I Block Parameter Header or End of separator block y footer text 3A number number character 6 36 K1 K2 F1 F2 9 Figure 6 2 Schematic for Entering Headers and Footers Enter the header or footer in the same manner as the ASCII characters of a message text 6 4 A header or footer must not be configured with more than 136 characters The printed text may be longer than one line if spaceholders are used Continuous printout It is recommended that the message text printout be
20. parameters on the memory submodule time of day 6 39 Space Index Spaceholder for control parameters for date entering inserting for message texts for time of day for variables Start address Start bit Status byte structure Status byte byte 0 Stop bit Subminiature D connector pin assignments Subrack Switch bank T Time setting Time of day inserting set spaceholder Transfer memory CPU 944 Transfer parameter setting data Transmission mode Transparent mode TTY interface U Unplugging V V 24 interface RS232C Variable inserting spaceholder Ww Waiting times 6 18 X XOFF receive XON XOFF character XON XOFF protocol 5 1 5 2 2 5 2 6 a al 8 22 2 5 2 6 3 6 bd 3 4 5 1 CP 523 7 15 26 29167 7 11 7 15 EWA 4NEB 811 6044 02a Siemens AG AUT E1114B Postfach 1963 Werner von Siemens Str 50 D 92209 Amberg Fed Rep of Germany Suggestions CP 523 Manual Release 3 6ES5 998 0DD21 Corrections From please fill in Company Department Have you discovered any printing errors in this manual If so please list them on the preprinted form We would also appreciate any suggestions for improvement EWA 4NEB 811 6044 02a
21. request 6000 has not yet been serviced it is cancelled by this request Execute line feed job number 6000 This job request generates a blank line A subsequent Execute form feed request 5000 cancels this request if it has not yet been serviced Clear message buffer job number 7000 All print requests stored in the message buffer are deleted Print all messages job number 8000 The message texts are printed as configured with the message text number at the beginning of the line Transfer parameter setting data job number 90 On restart the CP 523 accepts the data in DB 1 as you configured it on the memory submodule You can use this job request to change part of the parameter setting data on the CP 523 You can change the data in parameter blocks 0 2 and 7 The contents of the memory submodule remain unchanged e Job number 9000 parameter block 0 of DB 1 on the memory submodule Parameters for the serial interface changing the baud rate for example e Job number 9020 parameter block 2 of DB 1 on the memory submodule Parameters for the XON and XOFF protocols e Job number 9070 parameter block 7 of DB 1 on the memory submodule Setting the Print mode with job number 9070 The data transferred to the CP with the Transfer parameter setting data request has priority over the data stored on the memory submodule in DB 1 The parameter setting data on the memory submodule is valid after power up prov
22. you must enter all the parameter blocks to be changed in DB 1 on the programmer Then transfer DB 1 to the memory submodule Further tips for input e To make the programmer screen presentation clearer alternate between the KC and C formats e You can enter comments in addition to the parameter blocks Schematic for entering parameter blocks The parameter blocks can be entered in DB 1 according to the following schematic Block separator Parameter block Configuration 3A no data Figure 7 5 Schematic for Entering Parameter Blocks in DB 1 The following pages contain the parameter block assignments and an example for entering parameter setting data with the PG 685 arameter block assignment for setting parameters with the memory submodule corresponds to the assignment of bytes 2 to 7 of the transfer memory when setting parameters with the user program 7 10 EWA 4NEB 811 6044 02a CP 523 Communications Mode Table 7 2 Parameter Block Assignments on the Memory Submodule Baud rate 110 Bd 200 Bd 300 Bd 600 Bd 1200 Bd 2400 Bd 4800 Bd 9600 Bd even odd mark space no parity check SO1 FON OC lanNnounwn BUSY signal no Interface TTY V 24 O Data format 11 bit character 7 data bits frame 8 data bits 8 data bits 10 bit character 7 data bits frame 7 data bits 8 data bits HW handshaking 2 XON character 01 to 7E Signifi No XON XOFF cant protocol on
23. 01 01 01 01 01 01 0 01 01 01 01 01 Empty Receive mailbox loop EWA 4NEB 811 6044 02a 8 35 Using the SEND and RECEIVE Function Blocks CP 523 150 JUM1 151 Last word of the message block 152 read 154 155 ee YES Increment BADR index register by 2 and store NEXT WORD Set module index register to module base address Last message block N O gt next message block Output count register Output status Segment 7 016F 8 36 EWA 4NEB 811 6044 02a CP 523 Using the SEND and RECEIVE Function Blocks 8 2 6 Execution Times for FB 200 and 201 Table 8 5 Execution Times for FB 200 and 201 in ms EWA 4NEB 811 6044 02a 8 37 System Overview Technical Description Hardware Installation Notes on Operation Address Assignment Print Mode Communications Mode Using the SEND and RECEIVE Function Blocks ONOOaRWND Parameter Setting in Print Mode Job Requests in Print Mode Feedback Information in Print Mode Setting Parameters in Communications Mode Job Requests in Communications Mode Feedback Information in Communications Modes 1 and 2 Feedback Information in Communications Mode 3 Combinations of the Most Important Parameters B Siemens Addresses Worldwide EWA 4NEB 811 6044 02a Parameter Setting Data for Print Mode Permissible Job Requests to the CP 523 in Print Mode CPU to CP Transferring Additional Information for
24. 1 2 installing the CP 523 You must note the following when installing and unplugging the CP 523 The module may only be plugged in or unplugged when the PLC is in the POWER OFF state e The memory submodule may only be plugged in or unplugged when the PLC is at POWER OFF e The connecting cable to the peripheral device Cannon subminiature D male connector may only be plugged in and unplugged when the CPU is at STOP and data transfer between the CP and the peripheral device has been tem inated Use in the S5 1 15 U S5 I 15F You require an adapter casing for the CP 523 6 5 491 OLB11 EWA 4035 7 Figure 3 1 Installing the CP 523 in the Adapter Casing 6ES5491 OLB1 1 EWA4NEB811 6044 02a 3 3 Hardware Installation CP 523 Use in the S5 135U S5 150U and S5 155U The CP 523 is mounted direct onto the module rack Figure 3 2 Installing the CP 523 in the 5 135U Central Controller 3 1 3 Settings on the Module You must set the address of the module on switch bank S 1 Section 5 Select the initial address with switches S 1 1 to S15 e Define the addresses i n the selected O area P O IM 3 or iM 4 in steps of eight bytes using switches S 1 6 to 1 8 128 136 to 248 i n the P area O 8 to 248 i n the O IM 3 and IM 4 areas Only the P area can be selected when using the S5 1 15u Note The modules are factory set to start address 128 in the P nomal 1 0 area Make sure that no other modules reserve this ad
25. 123 can be assigned the relevant parameters You can choose the start address of the module and end of text characters They must be specified when the FB is invoked Table 7 33 Flags Used in FB 123 F 100 1 Message frame transmitted F 100 2 End of text character flag set Data word pointer Auxiliary data word pointer Start address Current address of the transfer memory End of text character 7 66 EWA 4NEB 811 6044 02a CP 523 Communications Mode Permission to send End of text character flag set Prepare to transfer message block DW end of text character Set end of text character flag Transfer word to CP Last word of the message block Prepare transfer of next word Figure 7 11 Flowchart for FB 123 SEND 3 EWA 4NEB 811 6044 02a 7 67 Communications Mode CP 523 Segment 1 0000 NAME SEND 3 DES BADR T Q D B T C D KM KH KY KC KF KT KZ KG KF DES gt ENZE I Q D B T C D KM KH KY KC KF KT KZ KG KH Open source data block Has a message frame been sent If yes Block End Load module start address Set byte 4 address of the CP 523 and store Load end of text character and transfer to CP 523 in bytes 4 and 5 Set byte 2 address of the CP 523 and store Load message frame length and transfer to the CP 523 in bytes 2 and 3 Set byte 0 address of the CP 523 and store Transfer Send coordination request to the CP 523
26. 2 stop bits bit 8 data bits Figure 2 4 11 Bit Character Frame with 8 Data Bits and 2 Stop Bits When using the RS 232 C V 24 interface the readiness of the sending or receiving device can only be recognized via the control signals You are therefore recommended to set Handshaking ON mode 2 3 1 Print Mode You have a choice of three methods of transmission in Print mode All three are possible with both the RS 232 C V 24 and TTY interfaces Table 2 1 Methods of Transmission in Print Mode XON XOFF XON characters Priority over protocol XOFF characters BUSY signal and print without protocol BUSY signal RXD DSR 0 Priority over print without protocol Without Irrelevant Wait after Line break not protocol CR carriage return detectable LF line feed FF form feed 2 6 EWA 4NEB 811 6044 02a CP 523 Technical Description 2 3 2 Communications Mode The possible methods of transmission depend on the following Type of interface TTY or RS 232 C V 24 Whether handshaking has been configured when the RS 232 C V 24 interface is used Handshaking OFF or ON Type of Communications mode Transparent without send side end identifier sequence Interpretive with send side end identifier sequence 3964 R TTY active or RS 232 C V 24 interface with handshake OFF The CPU evaluates only the RXD circuit If the CP receives data from the peripheral device the latter must maintain l
27. 7 0 means either that a parameter error was detected or that the Send request could not be serviced even though the Send buffer was free as it was not preceded by a check module status request CBS bit 7 1 means that the Send buffer is not free because the previous Send request is still being serviced If byte 1 is 01 4 CBS bit 7 1 means that the request was accepted the Send buffer is now reserved for this request See Error Flags 7 54 EWA 4NEB 811 6044 02a CP 523 Communications Mode Table 7 29 Return Info and Error Flags in the Coordination Byte Send CBS in 3964 R Mode Continued Negative acknowledgement from receiver Receive data invalid to connection cleardown attempt Negative acknowledgement from receiver Receive data invalid to connection buildup attempt OFy Transmission aborted by receiver Receive data invalid 15 Time out QVZ during connection No data is transmitted 17 Time out QVZ during connection Receive data invalid cleardown 194 Initiation conflict both link partners have No data is transmitted high priority 1B Break Transmission is aborted 1D Initiation conflict both link partners have No data is transmitted low priority a F EWA 4NEB 811 6044 02a 7 55 Communications Mode CP 523 Table 7 30 Return Info and Error Flags in the Coordination Byte Receive CBR in 3964 R Mode 1 XX Request accepted 0 No message frame to fetch Parity error Data rejected
28. CPU peripheral device not ready 2 CP sets RTS 3 CP waits till CTS ON If the peripheral device still has not set CTS to ON after 20 ms the CP reports the error to the CPU peripheral device not ready 4 CP sends data CP resets RTS after sending data Peripheral device sets CTS to OFF ou 1 TXD xox xcooxxexx 0 DTR 2 Co a ee eee OFF l 1 l RXD xcoocxexx J oodocxxx 0 I ATS i OFF DSR OFF i i crs i XXX OFF l i I I I i CPi repoits dat max reports data max 205 cannot be received 20s I I I I I CP switched I I I I I I Peripheral device switched on Figure 2 5 Timing Diagram for Data Transfer between the CP and the Peripheral Device Example Peripheral device wants to send data The peripheral device only checks the DTR line If ON Data may be sent CP ready to receive If OFF Data transmission must be interrupted CP not ready to receive EWA 4NEB 811 6044 02a 2 9 Technical Description CP 523 2 4 Memory Submodule In Print mode you require a user submodule which you must configure with the following data in off line mode using a programmer e Message texts in DB 2 to 255 These DBs are independent of the DBs stored in the CPU The DBs in the memory submodule and the DBs in the CPU may have the same numbers e Printer interface parameters and configuration data for the message texts in DB 1 You can use two types of us
29. Characters After a Receive request you can receive a message frame from the CP which ends with end of text characters The CP checks the end of text characters You can evaluate the receive data in the user program Prerequisites e You must specify the end of text characters in parameter block 7 when initializing the CP 523 7 3 e You must make sure that the peripheral device sends only message frames containing these end of text characters to the CP e The CP 523 must be set for Interpretive mode You must define this in parameter block 7 at the initializing stage 7 3 Schematic for Receive a message frame with evaluation of the specified end of text characters 1 The CPU transfers the Coordinate data transfer for receive message frame request A080 to word 0 of the transfer memory 2 The CPU reads the coordination information from word O of the transfer memory If there is no message frame in the Receive mailbox bit 7 in byte 1 0 no message frame can be received Byte 7 also contains the number of message frames in the Receive buffer 3 The CPU reads the message frame from the transfer memory in message blocks of eight bytes The CPU reads the message block from the transfer memory and checks that the end of text characters have been transferred 4a If end of text characters have been received then Block End 4b If no end of text character was transferred then write word 0 of the transfer memory The CP th
30. Data format 11 bit character 7 data bits frame 8 data bits 8 data bits 10 bit character 7 data bits frame 7 data bits 8 data bits 7 28 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Transferring parameter setting data for parameter block 0 Start address 128 is set on the CP 523 You can set its parameters as follows Parameters for the serial interface parameter block 0 e 2400 baud 06y e Even parity 00y e No BUSYsignal 00h e RS 232 C V 24 interface 01 e 7 data bits 11 bit character frame 00 e Handshaking OFF 00 Say FB 99 SYNC iL H Handshaking OFF JU FB 110 1 7 data bits 11 bit character frame BLOCKO iL H No BUSY signal BE 1 RS 232 C V 24 interface H 2400 baud Even parity Transfer Parameter setting data parameter block 0 job number 52 The program waits at FB 99 until the CP 523 can accept job request 4 1 estart organization block OB 22 is only processed if the CPU is in from POWER OFF to POWER ON UN mode before you switc The status byte can be scanned approx 30 ms after the request was issued in order to check whether correct parameter setting data was transferred X4 is returned to indicate errored 4 1 EWA 4NEB 811 6044 02a 7 29 Communications Mode CP 523 Transferring parameter setting data for parameter block 7 Table 7 14 Transfer Memory Assignments for Transfer Initialization Data for Par
31. N Y L L 11 6 45 ESI 6 37 4 3 N i Configuration data for entering message texts for message text printout Configuring message texts on the memory submodule Configuring footers Configuring headers Connecting cable to the peripheral device plug in unplug Continuous printout Control commands Control parameters spaceholders transfer Control signals Correction value integral clock CPU 944 transfer memory D Data bit Data format 10 bit character frame 11 bit character frame for variables Data transfer Date insertion setting spaceholder Default time Default values E EEPROM Entering message texts parameter setting data EPROM Error Error flag Error number Execution times Expansion unit Index zad e 7 6 3 ei 2 1 6 11 6 18 6 45 6 19 7 45 6 4 7 3 Index F FB 200 SEND parameter setting FB 201 RECEIVE parameter setting Feedback CP 523 Form feed execute Function block RECEIVE SEND Function character Function mode change set Functioning of the module H Handshake l I O area I O device Illegal jobs in print mode Initializing FB 201 RECEIVE memory submodule Initiation conflict Installing Integral clock correction value Interface RS 232 C V 24 serial TTY Interpretive mode J Job buffer Job request in Communications mode illegal
32. OFFFy 0000 to FFFFy dependent on the configured data format 0000 to OFFF 0000 to FFFF dependent on the configured data format number of the message text to be inserted 0000 to OFFF Set time of day and date 6 7 2 Table A 4 Transferring Additional Information for Set Time of Day and Date CPU to CP O0gcp tO 23gcp in the case of the 24h clock Configuration of 12h clock or 24h O1pgeptO 12gcp in the case of the 12h clock am clock in DB 1 on the memory sub 81gcptO 92gcp in the case of the 12h clock p m module O0gep tO 59gcp O0gcp tO 59 pep Bit 7 1 in the case of the 12h clock p m A 4 EWA 4NEB 811 6044 02a CP 523 Summary A 3 Feedback Information in Print Mode Table A 5 Status of the Module in Print Mode Byte 0 6 6 x 1 Defective memory submodule x 2 No texts configured No message texts configured on the memory submodule x 7 No battery backup Either No battery has been inserted in the power supply module or The battery is defective X Job buffer message The module cannot service any further print requests buffer full at present The request must be repeated F CP in restart routine Message appears only on restart The clock data is invalid The module cannot accept any job requests Clock defective Replace module 2 X Default clock time set The clock is preset with the values Sunday 1 1 90 12 00 00 3 X Time of day date error At least one setting is outside
33. Partner in the link 3964 R mode lt STIX DLE _ ________ gt lt 1st character lt lt nth character lt DLE lt ETX lt BCC DLE gt BCC in3964R mode only Figure 7 3 Error Free Data Interchange Receive EWA 4NEB 811 6044 02a 7 5 Communications Mode CP 523 Initiation conflict If one partner in the link replies to a line bid STX character from the other link partner with STX instead of DLE or NAK the result is an initiation conflict i e both link partners want to transmit The low priority partner retracts its line bid and sends DLE The high priority partner sends its data as described above Following connection cleardown the low priority partner can send its data The Priority parameter is set when initializing parameter block 7 in 3964R mode Make sure that one link partner is assigned high priority and the other low priority Example for resolving an initiation conflict CP 523 3964 R mode Link partner Low priority High priority SEX lt STX DLE gt lt ___ _ __ 1stcharacter lt nth character lt DLE lt ETX lt BCC DLE STX 2 lt DLE 1st character _ W ______ gt BCC in 3964R mode only Figure 7 4 Resolving an Initiation Conflict 7 6 EWA 4NEB 811 6044 02a CP 523 Communications Mode Protocol Errors The protocol can detect errors caused by incorrect behaviour on the
34. Q DB using the block address list Q DB available ERROR Calculate the length of the Q DB and buffer Check the QANF QANF less than 0 ERROR QANF gt 255 ERROR Check QLAE QLAE gt 0 CONTINUE Check end of text characters for gt 0 PARAMETERS O K otherwise ERROR QLAE gt 128 8 13 Using the SEND and Receive Function Blocks CP 523 009F 00A0 00A1 ERROR 00A2 00A3 Check to make sure that 00A4 QANF QANF QLAE not gt Q DB length 0045 QLAE 00A6 00A7 FW 254 Load calculated Q DB length 0048 00A9 FE03 ERROR OOAA QANF QLAE lt 255 OOAB KF 255 00AD OOAE PAOK Then OK OOAF 00B0 KH 0038 Output FB PARAMETER 00B2 STAT ERROR 00B3 00B4 Program END 00B5 00B6 Segment 4 00B7 00B8 Segment 5 00B9 z 00BA Increment pointer to 00BB base address 2 byte 2 OOBC OOBD 00BE Write length bytes of the 00BF frame to be transferred 00c0 to bytes 2 and 3 00C1 of the CP 523 00C2 00C3 Set pointer to base 00c4 address 4 byte 4 00C5 and store 00c6 00Cc7 Write end of text characters 1 and 2 00c8 to bytes 4 and 5 00c9 of the CP 523 8 14 EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks Set pointer to base address of the CP 523 and store Write KOOR ID SEND to word 0 of the CP 523 Set pointer back to base address Segment 6 00E0
35. Send request See 8 1 for a printout and explanation of the statement list of the SEND function block The function block is a user friendly interface for handling Send message frame requests Use of the function block is also explained in 8 1 7 60 EWA 4NEB 811 6044 02a CP 523 Communications Mode CPU transfers message frame length or end of text character to the transfer memory on the CP words 2 and 4 CPU transfers the Send message frame request to the transfer memory of the CP word 0 CPU reads the transfer memory and evaluates the coordination bytes bytes 0 and 1 Has the CP accepted the Send job bit O in byte 1 1 No Yes CPU transfers message block to the transfer memory of the CP CP transfers data from the transfer memory to the Send mailbox Transfer another Y ie message block to the transfer memory No CP transfers data from the Send mailbox to the peripheral device END EWA 4NEB 811 6044 02a Figure 7 8 Schematic for Send Message Frame 7 61 Communications Mode CP 523 CPU user program CP functions CPU issues the Send message frame request gt Word 2 Word 4 Word 6 CP Send length End of text Not re reads job number from in bytes character significant transfer memory writes coordination information into the transfer memory CPU reads Coordination information W
36. The module is to be operated in 3964 R mode Parameters are to be set as follows e Parameters for the serial interface parameter block 0 2400 baud 6 Even parity 0 No BUSY signal 0 V 24 RS 232 C interface 1 7 data bits 11 bit frame 0 Handshaking OFF 0 Character delay time 1s 00100 Time out 2s 00200 Block delay time 4s 00400 With block check character 1 Low priority 0 Buildup attempts 012 No of Send attempts 003 7 22 EWA 4NEB 811 6044 02a CP 523 Communications Mode The following procedure is recommended 1 Enter the initialization data in DB 1 using the programmer and include sufficient commen tary 2 Store DB 1 on floppy or hard disk 3 Transfer DB 1 to the memory submodule Table 7 8 Setting Parameter for 3964 R Mode on the Memory Submodule Parameters for the serial Parameter block 0 interface 2400 baud 0600100 Even parity No BUSY signal V 24 RS232C interface 7 data bits 11 bit frame Handshaking OFF Parameters for 3964 R mode 7300100002000040010012003 Character delay tim Time out Block delay time 3964R with BCC Low priority Connection buildup attempts No of Send attempts 7 3 2 Setting the CP 523 Parameters in the User Program You can transfer data for a parameter block to the CP 523 with a Transfer parameter setting data request 90xx You can only set parameters for parameter blocks 0 2
37. Using the Transfer Memory 10 Bit Character Frame with 7 Data Bits 1 Parity Bit and 1 Stop Bit 11 Bit Character Frame with 8 Data Bits and 2 Stop Bits Timing Diagram for Data Transfer between the CP and the Peripheral Device Methods of Transmission in Print Mode Valid Control Signals of the RS 232 C V 24 Interface in Handshake ON Mode Overview of Permissible User Submodules Error Messages in conjunction with the Memory Submodule EWA 4NEB 811 6044 02a CP 523 Technical Description 2 Technical Description 2 1 Principle of the CP 523 The CP 523 handles data transfer with a peripheral device autonomously Data transfer between the CPU and the CP 523 must always be started by the CPU by sending a job request to the CP 523 Typical jobs would be for example Print message text number 20 in Print mode or Receive a message frame from a peripheral device in Communications mode EPROM EEPROM memory submodule DB1 parameter setting data for the serial interface and configuration data for the format of message text RAM printouts Send mailbox DB2 to 255 up to 4095 Receive mailbox message texts Message buffer 8 byte RS 232 C V 24 seria transfer interface or TTY memory Micro interface rocessor 25 pin subminiature D p Cannon connector of peripheral device printer barcode reader CP 523 etc Operating system memory Integral real time clock Internal bus Figure 2 1 Schemat
38. V 24 interface with handshake ON The RS 232 C V 24 interface of the CP 523 can handle the following signals in handshake ON mode Table 2 2 Valid Control Signals of the RS 232 C V 24 Interface in Handshake ON Mode Outputs Send data CP holds send line at logic 1 when not transmitting V 3V Data Terminal Ready CP 523 switched on ready to receive CP 523 not switched on not ready to receive Request to send CP 523 ready to send CP 523 not sending Receive data Receive line must be held at logic 1 by the peripheral device V 3 V Data set ready Peripheral device switched on ready to receive Peripheral device not switched on not ready to receive Clear to send Peripheral device can receive characters from the CP 523 The CP expects this as reply to RTS ON Peripheral device cannot receive characters from the CP 523 An XON XOFF protocol is not possible if you evaluate the control signals handshake ON In 3964 R mode handshaking is not possible hardware signals are neither evaluated nor affected 2 8 EWA 4NEB 811 6044 02a CP 523 Technical Description Data transfer between the CP and peripheral device takes place as follows The CP 523 sets the DTR output after startup This indicates that the CP is operable and ready to receive Example The CP wants to send data 1 CP waits till DSR ON If the peripheral device still has not set DSR to ON after 20 s the CP reports the error to the
39. Water loss Message text 83 Thermal problems Message text 84 Motor KH is down because of KV at T Message text 85 EMERGENCY OFF 80 The KV has KV as Message text number separator a result of KV S Message text with spaceholder for message end of text character 81 Motor Message text number separator Message text end of text character 82 water loss Message text number separator Message text end of text character 83 thermal problems Message text number separator Message text end of text character 84 The Motor KH is Message text number separator down because of KV Message text with spaceholder for at T S variable and inserting message text end of text character 85 EMERGENCY OFFS Message text number separator Message text end of text character Printout of message text 80 with message texts 81 82 and 83 inserted The motor has thermal problems as a result of water loss Printout of message text 84 when the CPU transfers 20 as the variable value and message text 85 as the message text to be inserted Motor 20 is down because of EMERGENCY OFF at 12 00 00 6 24 EWA 4NEB 811 6044 02a CP 523 Print Mode Maximum length of message texts Messages may not exceed 136 characters in length If you use space holders the printout may be longer than 136 characters The maximum length of the printout is 250 characters E
40. X1 Eo a ADB Oo _ _ ADB aDBe ADB4 aDB5 aDBe ADB ADB 10 Figure 3 5 Pin Assignments of Backplane Connector X1 3 3 Cable Length The cable lengths given below are contingent to error free data transmission TTY interface e CP 523 active TTY maximum cable length 10 m 33 ft e Peripheral device active TTY Refer to the User s Guide for the relevant device for the permissible cable length maximum 1000 m 3280 ft l Voltage drops on the cable and the module s sending and receiving elements must be noted when using longer cables 2 2 RS 232 C V 24 interface Cable length is not critical up to 15 m 49 ft In general longer cables can be used in conjuction with lower baud rates EWA 4NEB 811 6044 02a 3 7 Hardware Installation CP 523 3 4 Terminal Diagrams This section contains typical terminal diagrams for connecting the following e A printer PT 88 e A point to point connection data terminal equipment DTE CP 523 to CP 523 CP 523 to CPU 944 e Modem link data communications equipment DCE 3 4 1 Terminal Diagrams for Print Mode The CP 523 assumes a printer with an RS 232 C V 24 or TTY interface as the peripheral device CP 523 passive TTY to PT 88 active TTY without BUSY signal CP 523 PT 88 TTY OUT 10 10 TTY IN 20 mA TTY OUT 12 9 TTY IN Shield 25 Figure 3 6 Pin Assignments for CP 523 Passive TTY to PT
41. a memory submodule initialized for Interpretive or 3964 R mode into the CP 523 You can change modes during operation To do so you must issue the Transfer parameter setting data request to the CP 523 but remember that you may have to reconfigure the serial interface The Send and Receive buffers are cleared 7 8 EWA 4NEB 811 6044 02a CP 523 Communications Mode 7 3 Setting the CP 523 Parameters in Communications Mode The CP 523 is supplied with default values for all parameters e Parameters for the interface to the peripheral device baud rate type of interface handshake mode The parameters must conform to the specifications and settings on in the peripheral device e Specifications of the XON XOFF protocol e Parameter setting data for data transfer in Communications mode message length end of text character e Correction value for the accuracy of the integral clock The integral clock is set for an ambient temperature of 35 C If the CP 523 is used in other ambient temperatures you can increase the accuracy of the clock by configuring a correction value If you want to initialize the CP 523 with different data there are ways of transferring parameter setting data to the CP e Store the parameter setting data on a memory submodule in data block DB 1 and plug the initialized memory submodule into the CP 523 7 3 1 e Transfer the parameter setting data to the CP 523 in the user program The restart organi
42. be replaced in the POWER ON state as otherwise the clock data is lost and the clock must be reset Default setting The clock is factory set to Sunday 1 1 90 12 00 00 Setting the time and date You can set the clock e In the user program see Section 6 7 2 for details e With the FORCE VAR programmer function refer to the example Writing to word O of the transfer buffer with the CPU 944 using FORCE VAR in Section 5 2 Output format of the clock data in the message text You can configure how the current clock data is to be output to the printer 6 3 3 The default is e For the date lt Day gt lt Month gt lt Year gt e For the time lt Hours gt lt Minutes gt lt Seconds gt Accuracy of the integral real time clock The accuracy of the clock is tg 2s day Temperature dependency of the clock The temperature dependency Tp of the clock is Tp 3 5 T 15 2 ms day at an ambient tempera ture of Ta Correction value You can configure a correction value to enhance the accuracy of the clock Print mode 6 3 6 Communications mode 7 3 1 and 7 3 2 The correction value is given in s month A month is defined as 30 days Example Determining the correction value You have observed that the clock loses 12 s in 4 days This would be 90 s in 30 days The correction value is then 90 s month EWA 4NEB 811 6044 02a 2 11 Technical Description CP 523 2 6 Accessories List and Ordering Data Memory submodules Me
43. character EWA 4NEB 811 6044 02a 6 21 Print Mode CP 523 Direct entry with the KH format The control parameters are entered direct with the KH format during configuration of a message text You must use the table to find the ASCII codes of the control parameters Switch from the KS or C format to the KH format on the programmer and specify the control parameters in ASCII code Then switch back to the KS or C data format If you use the Print all configured message texts job 8000 to print message texts in which control parameters have been entered direct these control parameters will be executed and will not appear as configured Example Configuring a message text with a place holder for control parameters direct entry You want to store the following message text in DB 4 Message text 40 Motor works lt Line feed gt lt Carriage return gt Newhaven lt Line feed gt lt Carriage return gt 9999 Wackeldorf 40 Engine Plant Message text no 40 separator message text ASCII code for line feed OA and carriage return OD S Newhaven Message text KH OAOD ASCII code for line feed OA and carriage return OD KS 9999 Wackeldorf Message text end of message character 6 22 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 4 5 Spaceholders for Message Text The spaceholder is replaced by a message text on printout The number of the message text to be replaced can be sp
44. characteristics of each mode are discussed in Section 2 3 2 The CP 523 is a powerful I O module which can be used in the S5 115U S5 135U S5 150U S5 155U and S5 115F programmable controllers In order to make best use of the serial I O module you require comprehensive information For this reason the CP 523 serial I O module has its own manual dealing only with those facts and examples that are relevant to the module Demands for a higher quality of technical documentation have also been met which means e Standardization of terminology and notation e More detailed breakdown of subjects e Illustration of individual problems e User friendly arrangement of the contents The aim is that both users with little previous experience and SIMATIC S5 experts should find all the information that they require to work with the CP 523 However the applications are so numerous that not all the problems that might occur can be dealt with in one manual For other problems please ask your Siemens representative for advice EWA 4NEB 811 6044 02a v CP 523 Introduction Introduction It is important to study the introduction carefully before reading the rest of the manual This will help you to use the manual and will save you time Description of Contents This manual is a comprehensive description of the CP 523 The manual can be divided into blocks according to topics e Description The System Overview contains information on the tasks the
45. characters EWA 4NEB 811 6044 02a 6 25 Print Mode CP 523 6 4 6 Spaceholders for Variables The spaceholder is replaced by the variable at printout You must specify the variables in bytes 2 to 7 in the Print message text request e Byte2and3 Value of the 1st variable data format as configured e Byte4and5 Value of the 2nd variable data format as configured e Byte6and7 Value of the 3rd variable data format as configured The first spaceholder configured for variables in the message text is replaced by the variable 1 the second by variable 2 and the third by variable 3 e f the message text contains more than three spaceholders for variables they are not interpreted as spaceholders but printed out as text e If aspaceholder is wrongly configured it is also treated as text and printed out e When spaceholders are replaced by the appropriate values the total length may be greater than 136 characters You must specify the data format in which the variable has been transferred from the CPU as the spaceholder Table 6 8 Data Formats for Variables KM Constant Bit pattern 16 bits KH Constant Hexadecimal pattern 0000 to FFFFy KC KS Constant Alphanumeric characters 20 to 7F 20 to 7F KT Constant Time base 1 0 to 999 3 o gt K onstant Count 0 to 999 Z C KY Constant Byte byte 0 to 255 0 to 255 KB Constant Byte 0 to 255 KF Constant Fixed point number 32768 to 3276
46. characters are valid the printout is implemented with XON XOFF protocol The Print with BUSY signal setting and parameter block 1 waiting times are then insignificant 6 3 2 Configuration Data for Entering Message Texts Parameter Block 3 Message texts must always contain an end of text character 6 4 If you configure spaceholders in the message text they must be delimited by a function character You can configure any ASCII character you want as function character and end of text character Table 6 3 Configuration Data for Entering Message Texts Parameter Block 3 End of text ASCII character 01 to 7Fy 244 character Function character ASCII character 014 to 7Fy EWA 4NEB 811 6044 02a 6 7 Print Mode CP 523 6 3 3 Configuration Data for Message Text Printout Parameter Blocks 4 to 6 If you enter an illegal value the CP will replace it with the relevant default value e Ifthe lower limit is exceeded the lower limit value is set e If the upper limit is exceeded the upper limit value is set Example Input Lines per page 10 is replaced by 14 Input Left margin 80 is replaced by 3C Table 6 4 Configuration Data for Message Text Printout Parameter Blocks 4 to 6 Date and time of day Order for date J Y Year M Month T D Day Separator for date Order for time of day H Hours M Minutes S Seconds Separator for time of day 24h clock 12h clock Pag
47. check char Transm with block l check character a Low Priority High l Number of retries l 1 to 255 l Irrelevant 7 26 CP 523 Communications Mode Transferring parameter setting data for parameter block 2 relevant in Interpretive mode only Table 7 11 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 2 Job number Transfer parameter setting data Bits 0 to 3 Only significant for parameter blocks 7 and 9 XON character 01 to 7Ey FFFFy No XON XOFF XOFF character 01 to 7E protocol Not significant Transferring parameter setting data for parameter block 9 Table 7 12 Transfer Memory Assignments for the Transfer Parameter Setting Data for Parameter Block 9 Job number Transfer parameter setting data Qn Bits 4 to 7 Parameter block number Bits 0 to 3 Sign for correction value 0 positive 1 negative Correction value s month Op to 400 EWA 4NEB 811 6044 02a 7 27 Communications Mode CP 523 Setting parameters for gt TRANSPARENT MODE in the USER PROGRAM Transferring the parameter setting data for parameter block 0 Table 7 13 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 0 Job number Transfer parameter setting data Bits 4 to 7 Parameter block number Bits 0 to 3 Relevant for parameter blocks 0 and 9 only Baud rate mark space no parity check
48. data block 21 beginning DW 0 Flag 101 0 is to be set as soon as a message frame is entered in data block 21 The statement list does not explain how or when flag 101 0 is reset This can be done for example when the message frame has been evaluated and data block 21 can be overwritten NAME RECEIVE2 A F 101 0 Flag 101 0 is set when a message frame has been entered in DB 21 BEC then Block End conditional L KH A080 Load Receive message frame request into ACCUM 1 T Pw 128 Transfer to word 0 in transfer memory L PY 129 Load CBR into flag byte 111 for error T FY lll analysis if necessary L KH 0080 Check to see if Receive mailbox is empty PL PW 128 AW Read and analyze coordination info gt lt F When Receive mailbox is empty BEC then Block End conditional S F 101 0 Ifitis not set flag 101 0 and C DB 21 open DB 21 KH 0000 sE PW 128 L PW 134 Read transfer memory word 6 and T DW 3 transfer to DW 3 L PW 132 Read transfer memory word 4 and T Dw 2 transfer to DW 2 PW 130 Read transfer memory word 2 and T DW 1 transfer to DW 1 PW 128 Read transfer memory word 0 and T DW 0 transfer to DW 0 KH 0000 T Pw 128 Write to transfer memory word 0 PW 130 Read transfer memory word 2 and T DW 5 transfer to DW 5 PW 128 Read transfer memory word 0 and T Dw 4 transfer to DW 4 EWA 4NEB 811 6044 02a 7 83 NOOR WOOD System Overview Technical Description Hardware I
49. data for the serial interface and for the format of the printout is defined in data block 1 DB 1 on the memory submodule You can configure up to 4095 different message texts in DBs 2 to 255 The CP 523 can be operated in Print mode only if a memory submodule containing at least one message text is plugged in e Communications mode You can define the parameter setting data for the serial interface in DB 1 on the memory submodule In Communications mode the CP 523 can also be operated without a memory submodule in which case the parameter setting data for the serial interface is then transferred from the user he CP Integral real time hardware clock The CP 523 has an integral real time hardware clock The clock can be set and read either with a programmer or in the user program The clock is optimized for an ambient temperature of 25 C A correction factor can be pro grammed to compensate for this temperature dependency This correction factor can be trans ferred to the CP from the user program or it can be programmed in DB 1 on the memory submo dule Addressing The CP 523 is addressed as an eight byte input output module in I O areas P O IM3 and IM4 You can set the desired start address of the module in eight byte steps via DIP switches on the mo dule 5 Example You have set start address 128 with the DIP switches Byte 0 has address 128 0 128 Byte 7 has address 128 7 135 EWA 4NEB 811 60
50. delay time into ACCUM 1 ACCUM 1 and transfer to the CP nt 52 FB 99 waits until the CP 523 can accept job requests 4 1 The status byte can be scanned approx 30 ms after the request was issued to check whether correct parameter values were forwarded X4 is returned to indicate false values 7 4 1 EWA 4NEB 811 6044 02a 7 37 Communications Mode Setting parameters for the 3964 R MODE in the USER PROGRAM Transferring the parameter setting data for parameter block 0 CP 523 Table 7 18 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 0 Job number Transfer parameter setting Bits 4 to 7 Parameter block number Bits 0 to 3 Relevant for parameter blocks 7 and 9 only Baud rate 110 baud 200 baud 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud Data format 11 bit character frame 10 bit character frame 7 38 even odd mark space no parity check 7 data bits 8 data bits 8 data bits 7 data bits 7 data bits 8 data bits EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Transferring parameter setting data for parameter block 0 Start address 128 is set on the CP 523 Set CP parameters as follows Parameters for the serial interface parameter block 0 e 2400 baud 06y e Even parity 00y e No BUSY signal 00 e V 24 RS232C interface Olp e 7 data bits 11 bit character fr
51. if the spaceholder is the only one or the first one in the message text e In bytes 4 to 7 if the spaceholder is the second one in the message text In addition the memory requirement of four bytes has the following effects e Only one spaceholder per message text can be initialized in KG or KGa b for Insert floating point number A second spaceholder of this type would be interpreted as text and printed as configured e In addition to a spaceholder for Insert floating point number only one further KV or Insert variable spaceholder can be configured per message text 6 28 EWA 4NEB 811 6044 02a CP 523 Print Mode KG KG and KG data format If you configure the KG or KG data format 13 characters are printed out In the case of KG and KG a comma is printed out and in the case of KG a decimal point KGa b data format You can set the following parameters e Specify the total number of characters to be printed with a The sign and the decimal point each count as one character e Configure the number of places after the point with b The variable value is not changed here in contrast to the KFa b data format e In the case of data format KFa b a comma between thousands is printed out and in the case of KFa b a decimal point Table 6 13 Value Ranges for the Number of Characters to be Printed and Decimal Places Errors occurring when configuring the KGa b format have the following eff
52. in DB1 Using the Transfer Memory esssaaaaaaa aaan 7 43 Sending Message Frames to a Peripheral Device Schematic for Send Message Frame 2 2 0 6 eee 7 Transfer Memory Assignments for Send Message Frame Forwarding Data with Send Message Frame Schematic for FB 123 SEND 3 Receiving a Message from a Peripheral Device Schematic for Receive Message 0c eee ee Contents of the Transfer Memory for Receive Message Frame Data Interchange with Receive Message Frame Flowchart for FB 126 RECEIVE 3 2 0 2 cee 7 79 Parameter Blocks in Communications Mode 0 000eeee eee aed Parameter Block Assignments for the Memory Submodule Contents of the Parameter Blocks for Transparent Mode Setting Parameters for Transparent Mode on the Memory Submodule Parameter Block Assignments for Interpretive Mode Setting the CP 523 Parameters in Interpretive Mode on the Memory Submodule Parameter Block Assignments for 3964 R Mode Setting Parameters for 3964 R Mode on the Memory Submodule Transfer Memory Assignments for Transfer Initialization Data for Parameter Block 0 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 7 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 2 Transfer Memory Assignments for the Transfer Parameter Setting Data for Parameter Block 9 Job 0 tenes 7 27 Transfer Memory
53. in bytes 0 and 1 Check acknowledgement of coordination job from the CP 523 Can data be sent If no Block End Set message frame flag Load module start address and store Load end of text character and store Preset data word pointer Preset auxiliary data word pointer 7 68 EWA 4NEB 811 6044 02a CP 523 EWA 4NEB 811 6044 02a Communications Mode If end of text character flag set block end Load data word pointer increment by 4 and store Load auxiliary data word pointer increment by 4 and store Set byte 6 CP 523 address and store Load end of text character and compare with the data word to be transferred If data word end of text character set end of text character flag Transfer data word to CP 523 Transfer message block 8 data bytes to the CP 523 If no transfer next data word Prepare transfer of next message block Set number of the next data word and store Set transfer area on the CP 523 and store Block End 7 69 Communications Mode CP 523 7 6 3 Sending Message Frames with 3964 R Protocol In principle data transfers between the CPU and the CP 523 are handled the same way as in Transparent mode The additional return information about the protocol itself is entered in a so called coordination byte CBS CBR CBS Coordination byte send CBR coordination byte receive You specify the message frame length in word 2
54. le ee g mi mim E j mi ee E i mi mim iE Ej E E m m m j mi mi mi mim jE jE jm j mi mi mj E C ee a a ee eS SSS ae mi mi mi mi mi mi mi mi mi mi mi mi mi mj E E miN j miN Eim mim mim i miN le E ee ee ee es ee es ee es eS ee ee ee mi mim jE jE jm mi mi mj E E jm jm jE jE E jm E i mi m mi mi mi mi mj E C ee O O a O o O a Table 5 2 Settings on Switch Bank S1 for Defining the I O Area P normal ae VO FO80 FOFF Beginning start address128 Q extended Ne area F100 F1FFF a Can only be read and written to with LIR and TIR Can only be read and written to with LIR and TIR IM3 FC00 FCFFy IM 4 FDO0 FDFFy m on m off 5 2 EWA 4NEB 811 6044 02a CP 523 Address Assignment 5 2 Access to the Transfer Memory The CPU can write data to the transfer memory at any time After the CPU has written the relevant data into word 0 e the CP 523 fetches data from the transfer memory e the CP 523 updates the transfer memory with current data e the CPU can read the current data from the transfer memory This has the following consequences for the order in which data is transferred from the CPU to the transfer memory e Words 2 4 and 6 in the transfer memory must be written first if the job requires it If you want to print a message text into which three variables are to be inserted for example the actual variable values must be transferred in words 2 4 and 6 e Finally the job number must be written t
55. module can perform and on how the module is used in the S5 115U S5 135U S5 150U S5 155U and S5 115F The Technical Description contains general information on the principle of operation of the module technical specifications details of the serial interface and input output I O modules and a list of accessories e Installation and operation The chapter on Hardware Installation tells you which programmable controllers and expansion units the module can be used with how it is assembled and how to connect it to a printer or I O module connector pin assignments and terminal diagrams Notes on Operation describes the restart characteristics and actual operation This chapter also contains the error messages that can occur during startup e Addressing This chapter demonstrates how to address the module and describes the function of the transfer memory e Functional description We have devoted a separate chapter to the Print mode and the Communications mode Each of these chapters contains the information necessary for programming the module for the relevant mode This saves you time consuming searches in the manual e Appendix A Summary All the information you require to operate the CP 523 has been gathered together here in list form This has been designed for those users who have read the manual and wish to find some brief item of information quickly EWA 4NEB 811 6044 02a vii Introduction CP 523 Conventions In o
56. part of the link partner and errors caused by disturbances or interference on the line In both cases an attempt is first made to transmit or receive the message frame without error by initiating a retry If this is still impossible after the maximum number of attempts has been made or if another error occurs the protocol aborts transmission or reception An error code is entered in the coordination byte and the CP goes to the idle state 7 2 Prerequisites for Operation in Communications Mode The following conditions must be met for operating the CP 523 1 Settings on the peripheral device The settings on the peripheral device must agree with the parameter setting data for the CP 523 If your peripheral device is transmitting data at 2400 baud for example you must also set this baud rate for the CP 523 See 3 4 2 for configuration examples with termina e See 2 6 2 for details of the serial interface e Setting the CP 523 parameters in Communications mode is explained in 7 3 iagrams 2 Setting the CP 523 parameters There are two ways of setting the CP 523 parameters e Store the parameter setting data on a memory submodule in DB 1 Initialize the memory submodule with a programmer in offline mode e Transfer the parameter setting data in the user program after power up or recovery of power The restart organization blocks are used for this purpose No memory submodule is required You must specify the following para
57. routine completely processed ar current data in bytes 1 to 7 is not Messsage buffer full valid Job message buffer full bytes 1 to 7 contain the current clock data CP services CPU request CP stores the following in transfer memory Status of the CP 523 in byte 0 Status of the printer and current clock data in bytes 1 to 7 Figure 6 7 Schematic Representation of Job Request Processing EWA 4NEB 811 6044 02a 6 33 Print Mode CP 523 6 6 Status of the CP 523 and the Printer and Reading the Current Clock Data When you have written to word O of the transfer memory the module makes the following current data available in the transfer memory which you can read with direct peripheral access e The status of the module in byte 0 e The status of the printer and the current day in byte 1 e The remaining current clock data in bytes 2 to 7 Reading the status of the module in Print mode byte 0 The Status of the module byte O is divided into two half bytes Each half byte is independent of the other They can be combined in any way Table 6 15 Status of the Module in Print Mode Byte 0 X 1 Memory submodule defective X 2 No text No message texts have been configured on the memory submodule X 3 Entries in job buffer X 7 No backup battery The battery in the power supply module is either not inserted or defective X Job message buffer The module cannot process any further print full requests at
58. sequence Interpretive mode i e data transmission with receiver side end identifier sequence Data transmission with protocol 3964 R mode Your application program detemines the modes you want to use You can also evaluate the module s real time clock in your program for date and time dependent tasks The FE 200 SEND and FB 201 RECEIVE function blocks allow user friendly bidirectional transfer of message frames with a length of up to 256 bytes A thorough description with examples is given of how to use the function blocks If you decide to forego the convenience of the FB 200 and FB 201 function blocks in favour of higher data transmission speeds you can communicate with the CP 523 direct from the user program This method of data exchange is also described in detail with examples wal pens ie RATE SS A Figure 1 2 S5 115U Programmable Controller with CP 523 and Terminal 1 2 EWA4NEB811 6044 02a EWA 4036 3 1 System Overview Principle of the CP 523 Technical Specifications Serial Interface CP Peripheral Device Print Mode Communications Mode Memory Submodule Memory Submodule Evaluation Integral Hardware Clock Accessories List and Ordering Data Hardware Installation Notes on Operation Address Assignment Print Mode Communications Mode Using the SEND and RECEIVE Function Blocks COND OF WO EWA 4NEB 811 6044 02a Schematic Representation of the CP 523
59. signal 0 4 RS 232 C V 24 interface 14 7 data bits 0 11 bit frame Handshaking OFF 0 S XON XOFF protocol Parameter block 2 KS 2 XON character DC 1 114 KH 1113 XOFF character DC 3 13 S Message text printout Parameter block 5 KS 5 64 lines page 40 10 characters left KH 400A margin OA KS B Page number at bottom S Headers and footers Parameter block 6 KS 6K1lTest mode Header 1 Test mode S FlLaboratoryS Footer 1 Laboratory 6 14 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 4 Configuring Message Texts Store the message texts on the memory submodule in data blocks 2 to 255 under a message text number in the range 1 to 4095 Each message text may comprise up to 136 characters including variables Memory submodule capacity must be taken into account The message texts can be distributed over several data blocks in any sequence e You can store the message texts in any data blocks e g message text 13 in DB 20 message texts 5 and 18 in DB 7 e You can enter the DBs on the programmer in any order DB 17 DB 3 e The message texts within a DB should be continuous Your message texts will be clearer if you separate the message texts from each other by pressing the enter key Figure 6 4 e The DBs on the memory submodule are independent of the DBs in the CPU For example you can store message texts in DB 54 on the memory submodule while simu
60. xa soot Print all configured messages request EWA 4NEB 811 6044 02a 6 47 Print Mode CP 523 Load old value Load new value Compare for equal Block End if equal Update old value if not equal transfer flag word byte by byte to the peripheral word Block end 6 7 8 Transferring the Parameter Setting Data Job Number 904 You can transfer data for a parameter block to the CP 523 with a Transfer parameter setting data request e Data for the serial interface corresponds to parameter block 0 on the memory submodule e Characters for XON XOFF protocol corresponds to parameter block 2 on the memory submodule e Setting the mode and the parameters corresponds to parameter block 7 on the memory submodule Transfer parameter setting data job is almost without significance in Print mode since the parameter setting data for Print mode are stored in DB 1 on the memory submodule A typical application might be if you want to replace a defective printer temporarily with another printer whose interface has been configured differently The job does not change the contents of the memory submodule plugged into the CP 523 After a warm restart the CP continues to use the data on the memory submodule See 7 3 2 for a detailed description 6 48 EWA 4NEB 811 6044 02a System Overview Technical Description Hardware Installation Notes on Operation Address Assignment Print Mode oahWND General 3964 and 3964R
61. 1 bit character 10 bit character HW handshaking Waiting time after XON character XOFF character End of text character Function character 7 data bits yes frame 8 data bits yes 8 data bits no 7 data bits no frame 7 data bits yes 8 data bits no 110 baud 200 baud 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud even odd mark space No Yes TTY Parity 00 to FF 25ms ASCII character 01 to 7Fy ASCII character 01 to 7Fy ASCII character 01 to FF ASCII character 01 to FF OA 0 250 s OA 0 250 s AO 4s FF no XON XOFF protocol FF no XON KOFF protocol 24n 224 EWA 4NEB 811 6044 02a Summary CP 523 Table A 1 Parameter Setting Data for Print Mode Continued Date and time of day display Any combination of year TMY 4 Order for date month and day is permissible JY Year M Month T D Day Separator for date ASCII character 20 to 7Fy 2E Order for time of day HMS HSM MSH MHS SHM HMS H Hours SMH M Minutes S Seconds Separator for time of day ASCII character 20 to 7Fy SAp 24h clock German d D 12h clock English e E D 24h clock Page format Lines page Left margin Page number Top Bottom None Header and footer Header 1 Header 2 Footer 1 Footer 2 Character conversion table Correction value for integral clock 14 to FF 00 to 3C
62. 3 7 4 1 Reading the Status Byte the Status of the Peripheral Device and the Current Clock Data As soon as job request 0000 has been transferred to the CP the CP writes the following into the transfer memory e The status byte byte 0 e The status of the peripheral device byte 1 e The current clock data bytes 1 to 7 The return info is the same for job requests e 1000 Set clock e 90XX Transfer parameter setting Table 7 22 Status Information and Current Clock Data Po feast Status of the peripheral device Bits 4 to 7 Peripheral device ready OXecp Peripheral device not ready 1XBcp Bits 0 to 3 Current day of the week X1 cp to X7gcp 01 pep tO 31 pep 1 Sunday 2 Monday 3 Tuesday 4 Wednesday 5 Thursday 6 Friday 7 Saturday Olpep tO 125 p O0gep to 99Bcp 24 h clock O0gcp tO 23gcp 12 hclock a m Olgcp tO 125 p 12 hclock p m 81bcp tO 92gcp Current second 00scp to 59gcp Status byte byte 0 The status byte provides information on e errors during data interchange between CP and I O device e the status of a CPU job e the status of the CP 523 e battery backup The status byte is divided into two half bytes Both half bytes are independent of each other They can be combined in any way 7 44 EWA 4NEB 811 6044 02a CP 523 Communications Mode Table 7 23 Status Byte Byte 0 in Communications Mode Following Coordinate Data Transfer ae ee ae No error Memory submodule defect
63. 4 R mode you enter your data in blocks 0 and 7 Enter your data in the same way as in the other modes 3964 R mode requires additional parameters in parameter block 7 Table 7 7 Parameter Block Assignments for 3964 R Mode Baud rate BUSY signal Interface Data format 11 bit character frame 10 bit character frame HW handshake 110 Bd 200 Bd 300 Bd 600 Bd 1200 Bd 2400 Bd 4800 Bd 9600 Bd even odd mark space no parity check No TTY V 24 RS 232 C 7 data bits 8 data bits 8 data bits 7 data bits 7 data bits 8 data bits RWONMD O ONOOaRWND O EWA 4NEB 811 6044 02a 7 21 Communications Mode CP 523 Table 7 7 Parameter Block Assignments for 3964 R Mode Continued Moge 0 for memory Print mode 0 submodule con Transparent mode 1 figured with message texts l d 1 no memory J submodule 2 Character delay time ZVZ 00001pto 65535p 22p 1 to 65535 10 ms Time out QVZ 00001 to 65535 00200 1 to 65535 10 ms Block delay time BWZ 00001 to 65535 00400 1 to 65535 10 ms Transfer with block check character 3964R Transfer without block check character 3964 Low 0 1 Priority High 1 Connection buildup attempts 001 to 255 6 No of Send attempts 001 to 255p 6 Example Setting parameters on the MEMORY SUBMODULE for 3964 R MODE over the PG 685 Start address 128 is set on the CP 523
64. 44 02a 2 3 Technical Description 2 2 Technical Specifications For environmental mechanical and electromagnetic conditions see control ler manual 2 4 EWA 4036 2 Galvanic isolation Memory submodule Serial Interface Transmission mode Transmission rate Permissible cable length TIY active TIY passive RS 232 C V 24 Battery backup time Degree of protection Permissible a m bient temperature vertical horizontal Relative hum idity Current consumption from 5 V Power losses of the module typ Weight approx LEDs 2 green LEDs RCV SEN CP 523 the relevant programmable TIY signals are floating EPROM E EPROM V 24 RS 232 C TTY Asynchronous 10 bit character frame 11 bit cha racter frame 110 to 9600 baud 10 m 33 ft 1000 m 3280 ft Voltage drop Receiver typ 15V Sender typ 0 9 v at 20 mA 15 m149 ft Dependent on the battery backup inthe central controller at least 1 year IP 20 Oto 60 C o to 40 C 1 5 to 95 typ 130mA 1 2 w 300 g CP 523 receiving data CP 523 sending data EWA4NEB8116044 02a CP 523 Technical Description 2 3 Serial Interface CP Peripheral Device The CP 523 is equipped with an RS 232 C V 24 interface and a TTY interface You can set the serial interface parameters in two ways e In the user program with job number 90 Set interface parameters parameter block 7 3 2 The CP 523 copies the parameter setting
65. 523 TTY active CP 521 TTY IN 6 NN TTY OUT 10 D TTYOUT 12 Shield 25 at Ground Ground 25 Shield Figure 3 10 Pin Assignments for CP 523 TTY Passive to CP 523 TTY Active 3 10 EWA 4NEB 811 6044 02a CP 523 Hardware Installation CPU 944 TTY active CP 523 TTY passive CPU 944 CP 523 6 TTY IN TTY OUT 6 TTY OUT 10 TTY OUT TTY IN 9 12 TTY OUT Shield 8 25 Shield Figure 3 11 Pin Assignments for CPU 944 TTY Active to CP 523 TTY Passive EWA 4NEB 811 6044 02a 3 11 Hardware Installation CP 523 Zero modem operation Connecting two DTEs taking the CP 523 to CP 523 example CP 523 CP 523 Shield Shield Figure 3 12 Zero Modem Operation Taking the CP 523 to CP 523 as Example Connecting a DTE to a DCE taking the CP 523 to modem SIEMENS 2425 B DX as example CP 523 Modem V 24 RXD 5 3 Modem RXD V 24 TXD 11 Modem TXD Modem RTS Modem CTS Modem DTR Modem DSR 1 Shield Shield 8 Figure 3 13 Pin Assignments for CP 523 to Modem Only relevant in the case of communications using an RS 232 C V 24 interface The 3964 R communications mode data transmission procedure does not support control lines DSR DTR CTS RTS 3 12 EWA 4NEB 811 6044 02a 1 System Overview Technical Description 3 Hardware Installation Restart Characteristics Checking t
66. 6 8 6 5 Page Format peti aonni vied ahd gas Ge dae Geel eee eels 6 9 6 6 Correction Value for the Integral Clock Parameter Block 9 6 13 6 7 Overview of Spaceholders Configurable in Message Texts 6 18 6 8 Data Formats for Variables 0 00 ccc nee eens 6 26 6 9 Typical Printouts of the KT Data Format wk ee 6 27 6 10 Typical Printouts of the KF Data Format wee 6 27 6 11 Value Ranges for the Number of Characters to be Printed and Places After the Point KFa b Format 6 eee 6 27 12 Typical KFa b Data Format Printouts 0 0 c eee ee 6 28 6 13 Value Ranges for the Number of Characters to be Printed and Decimal Places siz vied wa eae ee dae iam tee aie a EERE es 6 29 6 14 Typical KGa b Data Format Printouts 0 cece eee 6 29 6 15 Status of the Module in Print Mode Byte 0 6k ee eee 6 34 6 16 Status of the Printer and Day of the Week 2 2 0 eee eee 6 35 6 17 Status of the Printer Date and Time of Day 1 eee ee 6 36 6 18 Permissible Job Requests to the CP 523 in Print Mode 6 38 6 19 Transferring Additional Information for Print Message Text 0 2 ce tees 6 39 6 20 Transferring Additional Information for Print Message Text alec naites pew dy bbed ad nea ike bebe a Leben 6 39 6 21 Contents of the Transfer Memory for Print Message Text Snee dyer en Sa eed
67. 7 oO KFa b Constant Fixed point number 32768 to 32767 Configurable KFa b a Number ofcharacters to be printed 9 9 b Decimal places KG Constant Floating point number 1 7E38 to 1 4E 37 13 KG 1 4E37 to 1 7E 38 KGa b Constant Floating point number 999 999 to 999 999 Configurable KGa b a Number ofcharacters to be printed 9 0 000001 to 9999999 9 b Decimal places 6 The time is printed out in seconds s 6 26 EWA 4NEB 811 6044 02a CP 523 Print Mode KB data format The CP evaluates the low order byte of a 16 bit variable as the value for the variable in the Constant byte KB format e Byte3 Value of the 1st variable e Byte5 Value of the 2nd variable e Byte 7 Value of the 3rd variable KT data format You can use the KT format to insert the values of internal timers in a message text To do so use LD TX to load the time in BCD into the accumulator and then transfer it to the CP Four digits are always printed out without the seconds unit rae 6 9 Typical Printout of the KT Data Format KF data format Space If you configure the KF data format six digits are printed out Table 6 10 Typical Printout of the KF Data Format Space KFa b data format You can set the following parameters e Specify the total number of characters to be printed with a The sign and the decimal point each count as one character e Specify the number of places afer the point wi
68. 7 and 8 data bits within the character frame 10 bit character frame e 1 start bit 7 data bits 2 stop bits Data format 3 in parameter block 0 e 1 start bit 7 data bits 1 parity bit 1 stop bit Data format 4 in parameter block 0 e 1 start bit 8 data bits 1 stop bit Data format 5 in parameter block 0 11 bit character frame e 1 start bit 7 data bits 1 parity bit 2 stop bits Data format 0 in parameter block 0 e 1 start bit 8 data bits 1 parity bit 1 stop bit Data format 1 in parameter block 0 e 1 start bit 8 data bits 2 stop bits Data format 2 in parameter block 0 The default is the 11 bit character frame 1 start bit 7 data bits 1 parity bit 2 stop bits 7 14 EWA 4NEB 811 6044 02a CP 523 Communications Mode Hardware handshake HW handshake This parameter is only significant for the RS 232 C V 24 interface If you set HW handshaking ON the RTS CTS DTR and DSR control signals of the RS 232 C V 24 interface are evaluated The XON XOFF protocol is not possible The default is HW handshake OFF i e the control signals are not evaluated The HW handshake signals are neither evaluated nor affected in 3964 R mode Parameter for XON XOFF character If you use the XON XOFF protocol you have a free choice of the XON XOFF character ASCII code provides the codes 114 DC1 for the XON character and 13 DC3 for the XOFF character You may not use the same values for the XON and XOFF characters Data transfer is
69. 7 and 9 in the user program with Transfer parameter setting data Parameter blocks 1 3 to 6 and 8 are only significant in Print d Reader s note You will find a list of parameters Tables 7 9 to 7 12 in Section 7 3 2 For editorial reasons the parameter blocks are discussed in the order 0 7 2 9 The parameter tables are followed by the subsections e Setting parameters for TRANSPARENT MODE page 7 28 Setting parameters for INTERPRETIVE MODE page 7 32 Setting parameters for 3964 R MODE page 7 38 When you have selected the mode you want you can limit your reading to the appropriate subsection EWA 4NEB 811 6044 02a 7 23 Communications Mode CP 523 Table 7 9 Transfer Memory Assignments for Transfer Initialization Data for Parameter Block 0 Job number Transfer parameter setting data Bit O to 3 Only significant for parameters block 7 and 9 Baud rate 110 baud 200 baud 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud even odd mark space no parity check BUSY signal No Interface TTY 6 Data format Parity 11 bit character 7 data bits yes 00 00x frame 8 data bits yes O14 8 data bits no 02 10 bit character 7 data bits no 034 frame 7 data bits yes 04 8 data bits no O54 7 HW handshake OFF 00 004 ON Olp 7 24 EWA 4NEB 811 6044 02a CP 523 Communications Transparent Mode Description Bits 4 to 7 Parameter block nu
70. 811 6044 02a CP 523 Print Mode Access to the CP 523 transfer memory The CPU can read the transfer memory at any time with L PW statements and write to it with T PW statements The CP 523 must be able to detect the instant at which the data transferred by the CPU is valid Data in the transfer memory is recognized as valid by the CP 523 whenever the CPU transfers a print request in word 0 of the transfer memory As soon as word 0 has been written the CP 523 evaluates all the transfer memory data and overwites it with the current data words 0 to 6 This has the following consequences for the order in which data is transferred from the CPU to the transfer memory e First words 2 4 and 6 in the transfer memory must be written if the job request requires it If you want to print a message text into which three variables are to be inserted for example the current values must be transferred to words 2 4 and 6 e Finally the job number must be written into word O of the transfer memory special feature of the CPU 944 5 2 If you do not adhere to this order the new job request will be executed with the wrong values Function of the job buffer The CPU stores print requests in the job buffer immediately without checking them a full eight bytes from the transfer memory in each case The CP then empties the job buffer into the message buffer It can happen that the CPU updates the transfer memory faster than the CP writes requests fro
71. 88 Active TTY without BUSY Signal CP 523 passive TTY to PT 88 active TTY with BUSY signal Printer setting Printer not ready to receive no current CP 523 PT 88 TTY OUT 10 10 TTY IN A C A 20 mA Ex v a TTY OUT 12 9 TTY IN Shield 24 1 Shield Shield 25 TTY IN 6 21 TTY OUT ww Y TTYIN 8 4 18 TTY OUT Q Sonn T ONN Figure 3 7 Pin Assignments for CP 523 Passive TTY to PT 88 Active TTY with BUSY Signal 3 8 EWA 4NEB 811 6044 02a CP 523 Hardware Installation RS 232 C V 24 interface Printer setting Printer not ready to receive no current CP 523 PT 88 V 24 TXD 11 TXD Shield V 24 RXD 5 Shield 24 25 GND 2 21 23 Figure 3 8 Pin Assignment of the RS 232 C V 24 Interface Print Mode EWA 4NEB 811 6044 02a 3 9 Hardware Installation CP 523 3 4 2 Terminal Diagrams Communications Mode The CP 523 assumes the following as peripheral device e Data terminal equipment e g CP 521 CP 523 CPU 944 e Data communications equipment e g a MODEM CP 523 to CP 523 TTY interface CP 523 TTY passive TTY IN 6 TTY OUT 10 TTY OUT 12 Shield Shield 24 25 CP 523 TTY active 22 20 mA 10 TTY OUT 12 TTY OUT 2 24 Shield 25 Shield Figure 3 9 Pin Assignments for CP 523 to CP 523 TTY Interface CP 521 TTY passive CP
72. Assignments for Transfer Parameter Setting Data for Parameter Block 0 EWA 4NEB 811 6044 02a Transfer Memory Assignments for Transfer Initialization Data for Parameter Block 7 6 nee nena 7 30 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block O 6 keene eee nas 7 32 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 2 6 een eens 7 34 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 7 0 keene eens 7 36 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block O lt aegea o e eet dee Pinder eee 7 38 Transfer Memory Assignments for Job Number 9073 Transfer Memory Assignment for Follow up Job Request 907A Job Requests and the Associated Feedback Information Status Information and Current Clock Data Status Byte Byte 0 in Communications Mode Following Coordinate Data Transfer eens 7 45 Coordination Information after Coordinate Data Transfer Status Byte Byte 0 in Communications Mode after Coordinate Data Transfer estana sket iN ee E EER 7 48 CP 523 Status Information for AQ00 wwe ee 7 52 Status Information for Send Request A001 Status Information for Receive Request A080 Return Info and Error Flags in the Coordination Byte Send CBS in 3694 R Mode 0 eens 7
73. BLOCK9 Load job number and parameter block BE number into ACCUM 1 and transfer to CP in bytes 0 and 1 ree 6 2 FB 99 waits until the CP 523 can accept job requests 4 1 7 42 EWA 4NEB 811 6044 02a CP 523 Communications Mode 7 4 CP 523 Feedback Information The CP 523 has an eight byte transfer memory for data exchange with the CPU The CP 523 reads the data from the transfer memory and updates the transfer memory with current values only when the start address of the module has been written into word O of the transfer memory with T PW in the user program The current data can then be read in the user program with L PW statements CPU transfers job CP reads bytes 0 to CP writes current CPU can read the request in word 0 of 7 of the transfer data into bytes 0 current data from the transfer memory memory to 7 of the transfer the transfer T PW X memory memory L PW X D2 Figure 7 6 Using the Transfer Memory The meaning of the data written into the transfer memory by the CP depends on e the job number that was transferred to the CP in word 0 and e the initialized mode Table 7 21 Job Requests and the Associated Feedback Information 0000 Read status byte status of I O device and current clock data 7 4 1 1000 Set clock 6 7 2 90XX Transfer parameter setting data 7 3 2 AOXXy Coordinate data transfer 7 6 and 7 7 EWA 4NEB 811 6044 02a 7 43 Communications Mode CP 52
74. E parameter register Z DB LAE Auxiliary register for storing length of destination DB BADR IND Module address index register for word serial reading from CP Register for Z DB start address for DWs DO FW ZANF RE register store data words in Z DB B AN E Number of message blocks register FW 240 ANZ E W Number of words to be received FW 242 BADR REG Module address register DO FW register for CP access FW 244 W LE BL Number of words in last message block 8 28 EWA 4NEB 811 6044 02a CP 523 Segment 1 NAME DES DES DES DES DES DES 0017 EMPFANG BADR Z DB ZANF ZLAE STAT KBE Segment 2 0018 0019 00 00 00 00 00 OO1F 0020 0021 0022 0023 0024 0025 0027 0028 0029 002A 002B 002C 002E 002F 0030 0031 0032 0033 0034 0035 0036 0037 0038 0000 I Q D B T C I Q D B T C I Q D B T C 1 Q D B T C I Q D B T C 1 Q D B T C EWA 4NEB 811 6044 02a Using the SEND and RECEIVE Function Blocks KM KH KY KC KF KT KZ KG KM KH KY KC KF KT KZ KG BI BY W D BY BI BY W D BY BI BY W D BY For CPUs 941 942 943 Save RLO Load and store module address Write Read status KOOR ID to bytes 0 and 1 of the CP 523 Fetch acknowledgement to Read status from CP and buffer Set pointer back to module base address Does CP report Data available N O 8 29 Using the SEND and RECEIVE Function B
75. EWA 4NEB 811 6044 02a CP 523 Print Mode 6 7 6 Clearing the Message Buffer Job Number 7000 When prompted by the CPU the CP 523 cancels all CPU requests stored in the message buffer Specify Job number 7000 in word 0 Example Clearing the message buffer with the Programmer s FORCE VAR function You can force a peripheral I O word PW using the programmer FORCE VAR function only when you have written it into a flag word FW For this purpose store PW 128 in FW 128 of FY 10 6 7 7 FW 128 can then be forced in the FORCE VAR screen form FW 228 is an auxiliary word for old new value comparison The module is set to start address 128 6 7 7 Printing All Configured Message Texts Job Number 8000 When prompted by the CPU the CP 523 prints out all the configured message texts stored on the memory submodule This job is used for defining and checking the message texts stored on the user submodule Spaceholders are not evaluated Specify Job number 8000 in word 0 Example Printing all configured messages with the programmer FORCE VAR function You can force a peripheral I O word PW using the programmer s FORCE VAR function only when you have written it into a flag word FW For this purpose store PW 128 in FW 128 of FY 10 6 7 7 FW 128 can then be forced in the FORCE VAR screen form FW 228 is an auxiliary word for old new value comparison The module is set to start address 128 ew 128
76. Program Gunter Wellenreuther Dieter Zastrov Braunschweig 1987 Contents Method of operation of a programmable controller Theory of control technology using the STEP 5 programming language for the SIMATIC S5 programmable controllers Order No ISBN 3 528 04464 0 Automating with the S5 115U SIMATIC S5 Programmable Controllers Hans Berger 2nd Edition Berlin and Munich Siemens AG 1989 Contents STEP 5 programming language Program scanning Integral program blocks O interfaces Order No ISBN 3 8009 1526 X EWA 4NEB 811 6044 02a Ix CP 523 Introduction Conventions The following conventions are used in this book and are listed for your reference Convention EWA 4NEB 811 6044 02a Definition Example A box that indicates a type of hazard describes its implications and tells you how to avoid the hazard is a cautionary statement Some cautionary statements include a graphic symbol representing an electrical or radio frequency hazard All cautionary statements have one of the following levels of caution A danger indicates that loss of life severe personal injury or substantial property damage will result if proper precautions are not taken A warning indicates that loss of life severe personal injury or substantial property damage can result if proper precautions are not taken A caution indicates that minor personal injury or property damage can result if proper precautio
77. Protocols relevant in 3964 R mode only Prerequisites for Operation in Communications Mode Setting the CP 523 Parameters in Communications Mode Setting the CP 523 Parameters with the Memory Submodule Setting the CP 523 Parameters in the User Program CP 523 Feedback Information 0 0 c cece eee eee 7 43 Reading the Status Byte the Status of the Peripheral Device and the Current Clock Data Reading Coordination Information after Coordinate Data Transfer 6 eee 7 47 Overview of Permissible Job Requests in Communications Mode Sending Message Frames to a Peripheral Device Job Number A001 Sending Message Frames with the Message Frame Length Specification sasaaa aaaea 7 64 Sending Message Frames with End of Text Character Specification Sending Message Frames with 3964 R Protocol Receiving a Message Frame from a Peripheral Device A080 Receiving Message Frames with Evaluation of the Specified Message Frame Length Receiving Message Frames with Evaluation of the Specified End of Text Characters Receiving Message Frames with 3964 R Protocol 8 Using the SEND and RECEIVE Function Blocks EWA 4NEB 811 6044 02a Example of an 11 Bit Character Frame 0 0 00 cee eee nee Z Error Free Data Interchange Send 0000 cece eee eens 7 Error Free Data Interchange Receive 00 cece eee eee 7 Resolving an Initiation Conflict Schematic for Entering Parameter Blocks
78. SIMATIC S5 CP 523 Serial I O Module Manual Order No 6ES5 998 0DD21 EWA 4NEB 811 6044 02a Siemens has developed this document for its licensees and customers The information contained herein is the property of Siemens and may not be copied used or disclosed to others without prior written approval from Siemens Users are cautioned that the material contained herein is subject to change by Siemens at any time and without prior notice Siemens shall not be responsible for any damages including consequential damages caused by reliance on material presented including but not limited to typographical electronic arithmetic or listing errors N WARNING Hazardous voltage Can cause death severe personal injury or substantial property damage Restrict use to qualified ersonnel ee safety instructions Only qualified personnel should install or maintain this equipment after becoming thoroughly familiar with all warnings safety notices and maintenance procedures contained in this manual The successful and safe operation of this equipment is dependent upon proper handling installation operation and maintenance The following are definitions of the terms qualified person applicable for this document danger warning and caution as Qualified Person One who is familiar with the installation construction and operation of this equipment and ial the hazards involved In addition t
79. Setting parameters for INTERPRETIVE MODE via the MEMORY SUBMODULE When you have decided to transmit your data in Interpretive mode you enter all parameter setting data in parameter blocks Table 7 5 Parameter Block Assignments for Interpretive Mode Baud rate 110 Bd 200 Bd 300 Bd 600 Bd 1200 Bd 2400 Bd 4800 Bd 9600 Bd even odd mark space no parity check eating ONOOaRWN Data format 11 bit character 7 Data bits frame 8 Data bits 8 Data bits 10 bit character 7 Data bits frame 7 Data bits 8 Data bits HW handshake XON character 01 to 7E H no XON XOFF XOFF character 01 to 7Ey protocol 7 18 EWA 4NEB 811 6044 02a CP 523 Communications Mode Table 7 5 Parameter Block Assignments for Interpretive Mode Continued 7 0 for memory Print mode submodule con figured with message texts no memory submodule Character delay time 0001 to 3000p 0001 6 10 ms 1 to 3000 10 ms Frame length 0 bytes 000p 000 One byte 7 or two bytes 6 and 7 end of text characters must be specified when the frame length is 0 bytes End of text characters only when frame length 0 1 end character 0001 to OOFF 2 end character 0101 to FFFF Example Using the PG 685 to set data parameters on the MEMORY SUBMODULE for INTERPRETIVE MODE Start address 128 is set on the CP 523 The module is to be operated in Interpretive mode You can set the module par
80. The relevant user manual contains a detailed description of programming procedures with this programmer e The Reader s Note in Section 7 provides references to various subsections thus making it easier to find the subsections relevant to your application or specific requirements Manuals can only describe the current version of the device or unit Should modifications or sup plements become necessary in the course of time a supplement will be prepared and included in the manual the next time it is revised The relevant version or edition of the manual appears on the cover The present manual is edition 1 In the event of a revision the edition number will be incremented by 1 At the end of the manual you will find correction forms Please enter in these forms any suggestions you may have in the way of improvements or corrections and send them to us Your comments will help us to improve the next edition viii EWA 4NEB 811 6044 02a CP 523 Introduction Courses Siemens provide SIMATIC S5 users with extensive opportunities for training For more information please contact your Siemens representatives Reference Literature This manual is a comprehensive description of the CP 523 serial I O module Topics not specific to the CP 523 however are only briefly dealt with You will find more detailed information in the following literature Programmable Controllers Volume 1 Logic and Sequencing Control From the Task to the
81. Y SUG Hing saqaunu aor l l HNR iaqwnu qor l 406 406 saquinu qol 0 Ssa uondu s q uondus q ara sanjenineyag ayqissimag sanjenzneyag aiqissiwad usnduosaq sanjeayneyaq aajqissimag a sanjeaznejyag ajqissiusag L ysanbay dy moj o4 apo 4 P96E apo aanaidsayu apo juasedsues PON Y v96E L 20 4elaWeseg IPON SUOIZeE gt UNWWOD U 420 g Ja aWUeVed I4 4O SjpuaWUBIssY EZ AQEL Summary EWA4NEB8116044 02a A 8 CP 523 Summary A 5 Job Requests in Communications Mode Table A 8 Permissible Job Requests to the CP 523 in Communications Mode Read status byte status of the peripheral device and current clock data Set clock settings in bytes 1 to 7 Day of the week setting Transfer parameter setting data Initialize serial interface Set the XON XOFF parameters Select Interpretive mode Select 3964 R Mode Select 3964 R Mode Follow Up Request Coordinate data transfer Read status byte and coordination info EWA 4NEB 811 6044 02a A 9 Summary CP 523 Send fixed length message frame or send with 3964 R 7 6 1 Table A 9 Transfer Memory Assignments for Send Fixed Length Message Frame CPU to CP i orl Job number for Coordinate data transfer AOp Send message frame identifier 01 Send length in bytes 0001 to 0100 Not significant 00 to FF Send frame with end of text character 7 6 2 Table A 10 Transfer Memory Assignments for Sen
82. a CP 523 Communications Mode Message frames exceeding 256 bytes 5C The peripheral device has sent a message frame that is longer than 256 bytes The CP flags error 5C if it has not detected an end of text character after receiving 256 characters The message frame is not transferred to the CPU and not stored in the Receive mailbox Permanent wire break in the peripheral device cable 5Dp During the transmission the peripheral device must e hold the RXD line constantly at logic 1 or e hold the CTS line constantly at ON when using MODEM control signals ON V 3 V Otherwise an error is flagged After a permanent break has been remedied the sender can resume transmission when the receiver has returned XON Data arriving at the receiver before the XON may be lost Receive mailbox overflow 5E The following can be stored in the Receive mailbox e Up to 1024 bytes of data e Up to 99 message frames If these values are exceeded when receiving a message frame from the peripheral device the CP flags an error The message frame is not transferred to the CPU and not stored in the Receive mailbox EWA 4NEB 811 6044 02a 7 49 Communications Mode CP 523 Example Reading coordination information after Send message frame Start address 128 is set on the CP 523 A four byte message frame is to be sent The message frame is stored in DB 20 in DW O Flag 100 3 is to be set if the CP 523 accepts the job The program doe
83. ad number of message blocks to be sent from the CP r 8 8 EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks SEGMENT 7 Transferring Send data to the CP 523 ee ee ee Vee 4 ey ee ee eS ee ee ee oe Is data to be sent in fixed length message frames Yes Calculate message frame remainder register Decrement message block number by 1 Yes Set pointer to start of message block Transfer data word Prepare transfer of next to CP DW Are the contents of the DW also the end of text character Set auxiliary No flag Yes Last message block Prepare for Prepare for transfer of transfer of last message message block block Transfer last word of the No Prepare Transfer message block transfer of data word next DW to CP Yes No Last word of the message block transferred Auxiliary flag set Yes Last message block END END EWA 4NEB 811 6044 02a 8 9 Using the SEND and Receive Function Blocks CP 523 8 1 6 Flags in SEND FB 200 Explanation of the flags used by SEND FB y Auxiliary flag for buffering the BEPEAGA RLO at jump Auxiliary flag for STAT bit SEND executing Auxiliary flag for detecting end of text characters oer a flag byte for buffering CBS e H BYTE 1 Auxiliary flag byte for buffering STAT flag byte for buffering STAT FW HILFREG Auxiliary flag word for buffering the data word
84. akarta P T Dian Graha Elektrika Jakarta Bandung Medan Surabaya iran Siemens Sherkate Sahami Khass Teheran iraq Samhiry Bros Co W L L Baghdad or Siemens AG Iraq Branch Baghdad Japan Siemens K K Tokyo B 4 Jordan Siemens AG Jordan Branch Amman or A R Kevorkian Co Amman Korea Republic Siemens Electrical Engineering Co Ltd Seoul Pusan Kuwait National amp German Electrical and Electronic Service Co INGEECO Kuwait Arabia Lebanon Ets F A Kettaneh S A Beirut Malaysia Siemens AG Malaysian Branch Kuala Lumpur Oman Waleed Associates Muscat or Siemens Resident Engineers Dubai Pakistan Siemens Pakistan Engineering Co Ltd Karachi Islamabad Lahore Peshawer Quetta Rawalpindi People s Republic of China Siemens Represen tative Office Beijing Guangzhou Shanghai CP 523 Philippine Islands Maschinen amp Technik Inc MATEC Manila Qatar Trags Electrical Engineering and Air Conditioning Co Doha or Siemens Resident Engineer Abu Dhabi Saudi Arabia Arabia Electric Ltd Equipment Jeddah Damman Riyadh Sri Lanka Dimo Limited Colombo Syria Siemens AG Damascus Branch Damascus Taiwan Siemens Liaison Office Taipei TAI Engineering Co Ltd Taipei Thailand B Grimm amp Co R O P Bangkok United Arab Emirates Electro Mechanical Co Abu Dhabi or Siemens Resident Engineer Abu Dhabi Scientechnic Dubai or Siemens Resident En
85. ame 00h e Handshake OFF 00 JU FB 99 SYNC H Handshake OFF JU FB 115 1 7 data bits 11 bit character frame BLOCKO H No BUSY signal BE 1 V 24 RS232C interface H 2400 baud Even parity Transfer job number for Parameter setting data for parameter block 0 52 FB 99 waits until the CP 523 can accept job requests 4 1 IS processed only wnen Special features pertaining to parameter setting of 3964 R mode in the user program As in Transparent and Interpretive mode you transfer all parameter setting data to the CP with job number 90XX Transfer parameter setting data You enter the parameter setting data in the same way as in the other modes except that you must transfer a number of additional parameters for 3964 R mode These added parameters are defined in parameter block 7 Since it is not possible to transfer all required parameters in 8 bytes the parameter setting of parameter block 7 is divided into two steps The job numbers for these steps are 9073 1st job request and 907A follow up job request The contents of the transfer memory for job numbers 9073 and 907A are listed in Tables 7 19 and 7 20 EWA 4NEB 811 6044 02a 7 39 Communications Mode Transfer parameter setting data for parameter block 7 CP 523 Table 7 19 Transfer Memory Assignments for Job Number 9073 2 3 4 5 6 7 Job number Transfer initializat
86. ameter Block 7 Job number Transfer parameter setting data 1 7 Bits 4 to 7 Parameter block number Bits 0 to 3 Mode If a memory sub i module with message texts is plugged in 3964 R mode Without 3964 R mode memory Follow up request submodule Character delay time 0001 to OBB8 0001 6 10 ms 1 to 3000 10 ms Frame length 1 to 256 bytes 0001 to 0100 0040 Am Only possible in Interpretive mode 7 30 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Transferring the parameter setting data for parameter block 7 Start address 128 is set on the CP 523 The module is to be operated in Transparent mode The message frames to be transferred have a length of 6 bytes An end of text character is not required The character delay time may be 3 s 3 s 001E JU FB BLOCK7 SYNC iL H Load no end of text characters into JU FB T PW ACCUM 1 and transfer to the CP in bytes 6 and 7 BLOCK7 Load frame length into ACCUM 1 and BE 1 transfer to the CP in bytes 4 5 Load character delay time into ACCUM 1 and transfer to the CP in bytes 2 3 T i52 The program in FB 99 waits until the CP 523 can accept job requests 4 1 The status byte can be scanned approx 30 ms after the request was issued in order to check whether correct parameter values were forwarded X4 is returned if values are false 7 4 1 EWA 4NEB 811 6044 02a 7 31 Communica
87. ameters as follows e Parameters for the serial interface parameter block 0 2400 baud 6 Even parity 0 No BUSY signal 0 RS 232 C V 24 interface 1 7 data bits 11 bit frame 0 Handshake OFF 0 e Parameters XON XOFF parameter block 2 XON character DC1 XOFF character DC3 e Parameters for Communications mode parameter block 7 Character delay time 300 ms 0030 Variable frame length with two end of text characters ODOD EWA 4NEB 811 6044 02a 7 19 Communications Mode CP 523 The following procedure is recommended 1 Enter the parameter setting data on the programmer in DB 1 and include sufficient comments 2 Store DB 1 on diskette or hard disk 3 Transfer DB 1 to the memory submodule Table 7 6 Setting the CP 523 Parameters in Interpretive Mode on the Memory Submodule Parameters for the serial Parameter block 0 Interface 2400 baud 0600100 Even parity No BUSY signal RS 232 C V 24 interface 7 data bits 11 bit frame Handshaking OFF Parameters XON XOFF Parameter block 2 227 DC1 XON character 1113 DC3 XOFF character Parameters for ASCII Parameter block 7 mode 720030000 Character delay time 300 ms Message frame length 0 ODOD End of text characters two carriage returns 7 20 EWA 4NEB 811 6044 02a CP 523 Communications Mode Setting Parameters for 3964 R MODE via the MEMORY SUBMODULE When you have decided upon 396
88. and store Set module address register to CP 523 base address and load into module address index register EWA 4NEB 811 6044 02a 8 33 Using the SEND and RECEIVE Function Blocks CP 523 Open destination DB Retrigger scan time Access word 0 on CP 523 for transferring a message block Set pointer back to base address Decrement no of message blocks for Receive message frames and store Fetch a data word from CP 523 and store in Z DB Last message block N O Increment auxiliary register by 1 and store shows the number of the word received in the last message block and compare with the number of words in the last message block to see if the last word was received NO Increment ZLAE register by 1 0 o m o a DOB N OO and store In 115 CPUs only if required 8 34 EWA 4NEB 811 6044 02a CP 523 Using the SEND and RECEIVE Function Blocks Increment ZLAE register by 1 and store Increment ZANF register by 1 and store ZANF register gt DB length N O Buffer Z DB too small for total Receive data error message Last message block Y E S gt END Access word 0 on CP 523 for transferring a message block Set pointer to base address Decrement message block counter register by 1 and store 01 0 0 0 01 01 01 0 01 0 01 01 01 01 01 01 01 01 0 01 01 0 01 01 01 0 01 01 01 01 01 01 0
89. anda Burundi SOGECOM Bujumbara Egypt Siemens Resident Engineers Cairo Mohandessin Alexandria Centech Zamalek Cairo Ethiopia Addis Electrical Engineering Ltd Addis Abeba B 2 Ivory Coast Siemens AG Succursale C te d lvoire Abidjan Kenya Achelis Kenya Ltd Nairobi Libya Siemens AG Branch Office Libya Tripoli Mauritius Rey amp Lenferna Ltd Port Louis Morocco SETEL Soci t Electrotechnique et de T l communica tions S A Casablanca Mozambique Siemens Resident Engineer Maputo CP 523 USSR Siemens AG Agency Moscow Yugoslavia General Export OOUR Zastupstvo Belgrade Ljubljana Rijeka Sarajewo Skopje Zagreb Namibia Siemens Resident Engineer Windhoek Nigeria Electro Technologies Nigeria Ltd Eltec Lagos Rwanda Etablissement Rwandais Kigali Simbabwe Electro Technologies Corporation Pvt Ltd Harare South Africa Siemens Ltd Johannesburg Cape Town Durban Middleburg Newcastle Port Elizabeth Pretoria EWA 4NEB 811 6044 02a CP 523 Sudan National Electrical amp Commercial Company NECC Khartoum Swaziland Siemens Pty Ltd Mbabane Tanzania Tanzania Electrical Services Ltd Dar es Salaam Tunesia Sitelec S A Tunis Zaire SOFAMATEL S P R L Kinshasa Zambia Electrical Maintenance Lusaka Ltd Lusaka Mining projects General Mining Industries Ltd Kitwe America Argentina Siemens S A Buenos Aires Bahia Blanca Cordoba M
90. area on the CP The job number for Print all configured message texts 8000 is to be transferred to word 0 using the FORCE VAR function Only when you convert a peripheral I O word PW to a flag word FW can you force it with the FORCE VAR function For this reason store PW 128 in FW 128 of FY 10 FW 128 can then be forced in the FORCE VAR screen form FW 228 is an auxiliary word for comparing the old new values Write the Print all configured message texts job number 8000 to bytes 0 80 and 1 00 of the transfer memory Load old value Load new value Compare for equal Block end if equal Update old value if not equal and Transfer flag word byte by byte to the peripheral I O word Block End 5 4 EWA 4NEB 811 6044 02a System Overview Technical Description Hardware Installation Notes on Operation Address Assignment arRWND General Prerequisites for Operation in Print Mode Setting the CP 523 Parameters in Print Mode Setting the Serial Interface Parameters Parameter Blocks 0 1 and 2 Configuration Data for Entering Message Texts Parameter Block 3 Configuration Data for Message Text Printout Parameter Blocks 4 to 6 Configuring the Character Conversion Table Parameter Block 8 Configuring the Correction Value for the Integral Clock Parameter Block 9 Example for Configuring the CP 523 in Print Mode Configuring Message Texts Structure of a Message Text Entering Spaceholders Spa
91. ation of Print message text Prerequisite is that a configured memory submodule is plugged into the CP Transfer variables 1 to 3 in words 2 4 and 6 to the CP where applicable Transfer the job number and message text number to the CP in word 0 Read the CP status in byte 0 Job message buffer full CP services request End Figure 6 8 Schematic for Print Message Text The CP 523 can report further errors to the CPU 6 6 For example e Default clock time set e Printer not ready e No battery backup 6 42 EWA 4NEB 811 6044 02a CP 523 Print Mode Example Initiation of one off message text printout Start address 128 is set on the CP 523 A memory submodule configured with message text 9 is plugged into the CP 6 4 3 Message text 9 is to be printed if flag 20 0 is set The following program prints message text 9 once The program is terminated if flag 20 0 is not set Load job number 0 and message text 9 into accumulator 1 and transfer in word 0 to the CP Block end Example Using the KV spaceholder three times You have configured the following message texts on the memory submodule 6 4 5 Message text 80 The KV has KV because of KV Message text 81 Motor Message text 82 Water loss Message text 83 Thermal problems Start address 128 is set on the CP 523 You have programmed the following statements in the user program Load ACCUM 1 with the message text number o
92. atus of the Printer and Day of the Week 1 Sunday 2 Monday 3 Tuesday 4 Wednesday 5 Thursday 6 Friday 7 Saturday xX Printer ready xX Printer not ready X Signal state irrelvant for other half byte EWA 4NEB 811 6044 02a 6 35 Print Mode CP 523 Example Evaluating the status of the printer The module is set to start address 128 If the printer is not ready output 4 1 is to be set ERROR2 L KH Transfer nonrelevant data to the CP The CP then updates the PW transfer memory with current data KH Evaluation of Status of the printer byte PY Compare status byte with 10 If not equal block End Otherwise set output 4 1 Block end Date and time of day bytes 1 to 7 The CP 523 supplies the current clock data in BCD The status of the printer is specified in byte 1 bit 4 This information is independent of the current day of the week which is specified in byte 1 bits 0 to 3 Table 6 17 Status of the Printer Date and Time of Day BitOto3 1 Sunday 2 Monday 3 Tuesday 4 Wednesday 5 Thursday 6 Friday 7 Saturday Bit 4 0 Printer ready Bit 4 1 Printer not ready O1pcp tO 31 p Day 01 gen tO 1286p Month OOgcn tO 99gcp Year OOgep tO 23gcp Hour 24h clock O1gep tO 12gcp 12h clock a m Bit 7 0 81 scp tO 92gcp 12h clock p m Bit 7 1 O0zgcp to 59gcp Minute OOgcpn tO 59gcp Second 6 36 EWA 4NEB 811 6044 02a CP 523 Print Mode Example Reading the current clock data Th
93. be converted 2 The character O 5C of the German character set The character with the ASCII code 5C of the international character set must be converted Selecting the German character set 1By 284 4By ASCII character ESC K Selecting the international character set 1B 284 40 ASCII character ESC s 8 Block separator Parameter block 8 H 5B2E Character to be converted Point period H 1B28 Code sequence for German character set H 4B5B Code cont character H 1B28 Code sequence for international character set H 402C Code cont comma H 5C2E Character to be converted Point period H 1838 Code sequence for German character set H 4B5C Code cont character O H 1828 Code sequence for international character set H 402C Code cont comma The comma tells the CP 523 that conversion of the previous character is complete 6 12 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 3 5 Configuring the Correction Value for the Integral Clock Parameter Block 9 You can configure a correction value to increase the accuracy of the clock The correction value is printed in s month A month is defined as 30 days Table 6 6 Correction Value for the Integral Clock Parameter Block 9 400 to 400 s month 0000 The correction value must always be specified as a four digit number incl sign Example De
94. c of Germany continued Hanover Cologne Mannheim Munich Nuremberg Saarbr cken Stuttgart Finland Siemens Osakeyhti Helsinki France Siemens S A Paris Saint Denis Lyon Caluire et Cuire Marseilles Metz Seclin Lille Strasbourg Great Britain Siemens Ltd London Sunbury on Thames Birmingham Bristol Clevedon Congleton Edinburgh Glasgow Leeds Liverpool Newcastle Greece Siemens A E Athens Thessaloniki Hungary SICONTACT GmbH Budapest Iceland Smith amp Norland H F Reykjavik Ireland Siemens Ltd Dublin Italy Siemens S p A Milan Bari Bologna Brescia Casoria Florence Genoa Macomer Padua Rome Turin Luxemburg Siemens S A Luxembourg Malta J R Darmanin amp Co Ltd Valletta Netherlands Siemens Nederland N V The Hague Norway Siemens A S Oslo Bergen Stavanger Trondheim Poland PHZ Transactor S A Warsaw Gda sk Letnica Katowice Portugal Siemens S R A L Lisbon Faro Leiria Porto B 1 SIEMENS Addresses Worldwide Romania Siemens birou de consulta ii tehnice Bukarest Spain Siemens S A Madrid Sweden Siemens AB Stockholm Eskilstuna G teborg J nk ping Lule Malm Sundsvall Switzerland Siemens Albis AG Z rich Bern Siemens Albis S A Lausanne Renens Turkey ETMA Istanbul Adana Ankara Bursa Izmir Samsun Non European Companies and Representatives Africa Algeria Siemens Bureau Alger Algier Angola Tecnidata Lu
95. ced by the current time of day e g 15 00 00 8 characters The message text printed out is thus 141 characters long A message text of more than 136 may corrupt the print format depending on printer line feed page makeup The following can be entered as ASCII characters e Text The text can contain all printable characters see the manual for the printer e Spaceholders You can insert the following in a message text by configuring spaceholders The date The time of day Variables Further message texts In addition you can enter spaceholders for control parameters double width characters subscript 6 16 EWA 4NEB 811 6044 02a CP 523 Print Mode Example Configuring message texts without spaceholders You want to store the following message texts in DB2 Message text 4 Excess temperature Message text 5 Coolant loss KS 4 Excess temperature Message text number 4 Separator Message text End of text character 5 Coolant loss Message text number 5 Separator Message text End of text character 6 4 2 Entering Spaceholders Spaceholders are used for inserting the date time of day variables control parameters and further message texts Some spaceholders can also be used in headers and footers The headers and footers are configured on the memory submodule in data block 1 parameter block 6 6 3 3 A spaceholder is enclosed between function characters
96. ceholders for Date and Time of Day Spaceholders for Control Parameters Spaceholders for Message Text Spaceholders for Variables 0 00 c eee eee eee eed 6 Processing Job Requests in Print Mode Status of the CP 523 and the Printer and Reading the Current Clock Data Overview of Permissible Jobs in Print Mode Print the Message Text Job Numbers 0 3 and 4 Setting Time and Date Job Number 10 Setting the Page Number Job Number 20 Form Feed Job Number 5000 Line Feed Job Number 6000 Clearing the Message Buffer Job Number 7000 Printing All Configured Message Texts Job Number 8000 Transferring the Parameter Setting Data Job Number 90 Communications Mode Using the SEND and RECEIVE Function Block CON EWA 4NEB 811 6044 02a Schematic for Entering Parameter Blocks in DB 1 Schematic for Entering Headers and Footers Schematic for Configuring the Character Conversion Table Structure of a Message Text Structure of a Spaceholder Schematic Representation of Job Order Processing in Print Mode Schematic Representation of Job Request Processing Schematic for Print Message Text 6 1 Contents of the Parameter Blocks 0 0 e teens 6 3 6 2 Parameter Setting Data for the Serial Interface ee eee 6 5 6 3 Configuration Data for Entering Message Texts Parameter Block 3 6 7 6 4 Configuration Data for Message Text Printout Parameter Blocks 4to6
97. configured as followes if you want to output your message texts to screen e without page number parameter block 5 e without header parameter block 6 e without footer parameter block 6 You will get so a continous printout of all message texts 6 10 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 3 4 Configuring the Character Conversion Table Parameter Block 8 Up to sixteen ASCII characters from the printer character set can be converted to another character set for the purpose of adapting to special national characters Block 8 must be configured according to the following schematic When converting several ASCII characters Block Parameter ASCII separa block character Code tor number to be sequence 3A 8 38y converted q Consists of a maximum of 7 characters Code Code for Code sequence sequence for character to for selecting the desired be converted previously valid character set character set Figure 6 3 Schematic for Configuring the Character Conversion Table EWA 4NEB 811 6044 02a 6 11 Print Mode CP 523 Example Configuring the character conversion table for the PT 88 89 The printer is initialized for the international character set It also contains the character sets of other languages among them German You want to print the following 1 The character A 5B of the German character set The character with the ASCII code 5B of the international character set must
98. ction Blocks Jump to Send with fixed length TKK KK RK KK KK OK KK OK OK KK SEND WITH END OF TEXT CHARACTERS TK KK RK KKK OK KK OK Ok KK Increment QANF register by 3 and store QANF register to DWINDEX register Set pointer to base address 6 byte 6 and store Open source DB Load the data word to be transferred into the ACCUM and buffer Transfer 1st word to CP 523 Check whether word transferred is EOT char Set aux flag for EOT char recognition Last word of message block Using the SEND and Receive Function Blocks CP 523 FW 240 2 QLAE FW 248 KH 0004 FW 248 FW 248 0 01 01 01 01 01 01 0 01 0 01 01 01 01 01 0 0 01 0 01 01 01 01 0 01 01 0 01 0 01 01 01 01 0 01 01 01 01 01 01 01 0 0 01 transferred Preparations for next message block Did this message block contain the end of text character gt END Increment QANF register by 1 and store NEXT MESSAGE BLOCK Decrement current CP 523 address by 2 and store Decrement data word index register by 1 and store NEXT WORD TKK KK KKK KK KK KK KK Ke SEND WITH FIXED FRAME LENGTH TKK KKK KK KK OK KK KK KK Compute frame remainder register Number of message blocks 4 number in words Buffer number of words Subtract message frame length from number of message frames in words and store Decrement number of message blocks by 1
99. d 1 of the CP Message text 84 is printed as follows y space Motor yy20 went down at 17 15 30 as a result of EMERGENCY OFF 6 44 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 7 2 Setting the Time and Date Job Number 10 Specify e The new settings in bytes 1 to 7 e Job number 10 in byte 0 In each case you must transfer the settings first and the Set clock request last to the CP 523 Settings You must note the following as regards the settings e The settings must be transferred to the CP 523 in BCD e Ifyou enter FF in a setting the current clock data is retained e Specify the days of the week as follows 01 Sunday 02 Monday 03 Tuesday 04 Wednesday 05 Thursday 06 Friday 07 Saturday e AM PM flag only in the case of the 12h clock When specifying the Hours setting in byte 5 you must take account of the AM PM flag bit 7 in the case of the 12h clock bit7 1 p m and bit 7 0 a m Table 6 22 Contents of the Transfer Memory for Set Clock Job Job number for Set Clock 1 Day of the week 01 Sunday 02 Monday 07 Saturday O1gcp O7gcp Day O1scp 31 pep M Ot gepice 12Bc0 OOscp 998cp 24 h clock 12 h clock a m 12 h clock p m 6 Minutes 6 7 3 Setting the Page Number Job Number 20 When configuring the memory submodule you can define whether and where a page number is to be printed in parameter block 5 The default is pagination be
100. d Message Frame with End of Text Characters CPU to CP o Job number for Coordinate data transfer AOp Send message frame identifier Olh Send length in bytes 0000 4 2nd end of text character 01 to FFy no 2nd end of text character 00 1st end of text character 01 to FFy Not significant 00 to FFy Receive message frame 7 7 Table A 11 Transfer Memory Assignments for Receive Message Frame CPU to CP 0 Job number for Coordinate data transfer AOp Receive message frame identifier C Not significant 00 to FF A 10 EWA 4NEB 811 6044 02a CP 523 Summary A 6 Feedback Information in Communications Modes 1 and 2 Table A 12 Coordination Information for Coordinate Data Transfer CP to CPU 7 4 Po femme Permission to send and receive CPU can neither send nor receive CPU can send CPU can receive CPU can send and receive 2 3 Message frame length in bytes 0000p to 0100 Not significant Not significant 0000 Number of message blocks of the next message frame in the 00 to 20 Receive mailbox Number of message frames in the Receive mailbox 00 to 64 Only after Receive message frames request A0804 Table A 13 Status Information and Current Clock Data CP to CPU Status byte Status of the peripheral device Bits 4 to 7 Peripheral device ready OXeecp Peripheral device not ready 1Xegep Bits 0 to 3 Current day of the week X1 cp to X7gcp 1 Sunday 2 Monday 3 Tuesday 4 W
101. d in a data block source data block before calling SEND FB 200 When you invoke the SEND FB 200 you must specify the following e The start address of the CP 523 e The number of the source data block from which the message frame is to be transferred to the CP 523 e The number of the source data word beginning in which the message frame is stored e The length of the message frame to be transferred number of source data words or of two end of text characters e A byte address where SEND FB 200 is to store the status byte e A byte address where SEND FB 200 is to store the coordination byte for send CBS 3964 R only e Specification as to whether with or without computer computer link Send is initiated when the RLO is 1 when FB 200 is invoked EWA 4NEB 811 6044 02a 8 1 Using the SEND and Receive Function Blocks CP 523 8 1 1 Calling SEND FB 200 SEND FB 200 can be called in cyclic programs and in programs servicing timed interrupts and process interrupts Table 8 1 Block Parameters for SEND FB 200 Start address of the module Number of the source data block Number of the first source data word Number of data words to be transferred message frame length max 128 data words Forwarding of a number in KF format in the relevant byte Hexadecimal pattern for the end of text character ASCII character Status byte Coordination byte send CBS 0 For Interpretive and Transparen
102. data from the submodule into a RAM area on the CP during startup If the CPU transfers new parameter setting data to the CP during operation the CP continues with the new data e In data block 1 parameter block 0 on the user submodule Print mode 6 3 1 Communications mode 7 3 1 Data is transferred between the CP and the peripheral device in a 10 bit or 11 bit character frame Three data formats are available for each character frame 10 Bit character frame e 1 start bit 7 data bits 2 stop bits data format 3 in parameter block 0 e 1 start bit 7 data bits 1 parity bit 1 stop bit data format 4 in parameter block 0 e 1 start bit 8 data bits 1 stop bit data format 5 in parameter block 0 11 Bit character frame e 1 start bit 7 data bits 1 parity bit 2 stop bits data format 0 in parameter block 0 e 1 start bit 8 data bits 1 parity bit 1 stop bit data format 1 in parameter block 0 e 1 start bit 8 data bits 2 stop bits data format 2 in parameter block 0 1st example Character frame 10 bit Data format 7 data bits 1 start bit 7 data bits 1 parity bit 1 stop bit 1 start 1 pari 1 stop bit ty bit bit 7 data bits Bit no Figure 2 3 10 Bit Character Frame with 7 Data Bits 1 Parity Bit and 1 Stop Bit EWA 4NEB 811 6044 02a 2 5 Technical Description CP 523 2nd example Character frame 11 bit Data format 8 data bits 1 start bit 8 data bits 2 stop bits Bit no 82777777700 1 start SS
103. dgement 0038 L Read status 0039 T from CP 523 and store 003A 003B iL Reset auxiliary flag byte 003D 003E EWA 4NEB 811 6044 02a 8 11 Using the SEND and Receive Function Blocks CP 523 no computer link Set pointer to base address 2 byte 2 CBS for computer link Read CBS when computer link output and buffer Set pointer back to module base address 1 Set pointer back to module base address Does CP523 report send in progress NO KH 0002 Load STAT bit Send in progress STAT jump to STAT KH 0000 STAT bit Send mailbox empty STAT Output STAT flag FY 238 Error code in CBS KH 007F when computer link KBOK CBS ok KH 0088 Output error code for STAT CBS error computer link RLO 0 on jump or Send mailbox occupied End of program 8 12 EWA 4NEB 811 6044 02a CP 523 Segment 3 OO6F 0070 0071 0072 0073 0074 KH E400 0076 0077 0078 0079 007A 007B 007C 007D 007E 0080 0081 0083 0084 0085 0086 0087 0088 0089 008A 008B 008C 008D 008E 0008F 0090 0091 QLAE 0092 KB 0 0093 0094 7 CONT 0095 0096 3 ENDZ 0097 KH 0000 0099 009A 009B 009C 009D 009E EWA 4NEB 811 6044 02a Using the SEND and Receive Function Blocks Check whether Q DB available Load Q DB parameter Isolate DB number from Q DB parameter Calculate start address of the
104. dress space before putting the module into service CAUTION When using the module in the 5 1 15F you must separate the jumpers in the jumper header gt Figure 5 1 if the device connected e g printer has no safe electrical isolation to VDE 0160 This ensures safe electrical Isolation between the peripheral device and the 5 115F 3 4 EWA 4NEB811 6044 02a CP 523 Hardware Installation 3 2 Wiring The module hasa serial interface port You can configure either the TTY interface or the RS 232 C V 24 interface D Section 6 The cables from both interfaces are run to a 25 pin Cannon subminiature D female connector 3 2 1 Connections Laney ey Backplane connector XI 4 ce Cannon subminiature D female connector 25 pin e eo hn Shield ag Fastening screw 4 40 VNC 28 thread ao ro ise ta 4 i Figure 3 3 Connectors Permissible conductor cross section for the Cannon subminiature D connector up to 0 5 mm2 20 AWG EWA 4NEB 81 16044 02a 3 5 Hardware Installation CP 523 3 2 2 Pin Assignments of the 25 Pin D Subminiature Connector 3 6 Shield Shield Ground 20 mA send Ground 20 mA receive RTS TTY OUT V 24 TXD TTY OUT CTS TTY IN DSR TTY IN V 24 RXD Ground Figure 3 4 Pin Assignments of the 25 Pin D Subminiature Connector EWA 4NEB 811 6044 02a CP 523 Hardware Installation 3 2 3 Pin Assignments of Backplane Connector
105. dule plugged in X may assume different values 4 2 EWA 4NEB 811 6044 02a CP 523 Notes on Operation 4 1 3 Clock Test The module s real time clock is tested The clock is set when the battery back up fails during PLC POWER OFF The clock has the default setting 12 00 00 01 01 90 Errors and the default setting are provided an appropriate number in byte 0 Module status and can be evaluated in the control program Table 4 3 Clock Test Errors Clock defective Replace module 2X4 Clock set Transfer the correct time to the CP with the Default setting programmer FORCE VAR Junction X may assume different values 4 2 Performance during Operation You must note the following if you want to modify the configuration during operation e The CP 523 may be plugged in or unplugged only when the power is switched off e The memory submodule may only be plugged in or unplugged when the power is OFF e To guarantee trouble free printing make sure the 25 pin subminiature D female connector is only unplugged when the CPU is in STOP mode and data transfer between the CP and the printer has been completed When the power is switched off the battery provides backup for the clock data EWA 4NEB 811 6044 02a 4 3 Notes on Operation 4 2 1 Print Mode CP 523 Operation in Print mode may be interrupted for various reasons The following table lists the effects of faults Table 4 4 Faults in Operation Print Mode Ac
106. e Frames to a Peripheral Device Job Number A001 The CPU can forward up to 256 bytes to the CP 523 with one Send request This data is referred to as a message frame in the following Schematic for sending a message frame 5 CPU CP 523 Peripheral device Serial Receive interface message 8 byte frame Send message transfer Send frame memory mailbox 256 bytes Internal bus Figure 7 7 Sending Message Frames to a Peripheral Device Data transfer between the CPU and the CP is always initiated by the CPU with a job request for Coordinate data transfer for sending a message frame When the CP has accepted the send job the CPU transfers the message frame in message blocks of eight bytes The CP 523 has a Send mailbox of 256 bytes for storing the data from the CPU The CP 523 accepts data from the transfer memory in the Send mailbox if the CPU has written the relevant data into word 0 of the transfer memory _ gt After the CP has received the complete message frame it transfers the message frame autonomously from the Send mailbox to the peripheral device via the serial interface pb The CP can only accept another Send request when it has transferred the complete message frame to the peripheral device The following two pages contain a graphic representation of this procedure Send message frame flowchart e Transfer memory assignments from the user program and from the CP 523 for servicing the
107. e change the mode or e reinvoke the programmed mode the send and receive buffers and all print requests will be deleted To change the operating mode forward the job number for Transfer parameter setting data 90XX to the CP 523 Remember that the parameters must agree with the settings on your peripheral device 6 2 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 3 Setting the CP 523 Parameters in Print Mode The CP 523 can only be operated in Print mode if an initialized memory submodule has been plugged in Store the following in the memory submodule e Parameter setting data for the CP 523 in data block DB 1 e Message texts in DB 2 to 255 6 4 The CP 523 has default values for all parameters e Parameters for the printer interface baud rate type of interface BUSY signal e Configuration data for entering message texts function character end of text character e Configuration data for the message text printout output format for date and time of day headers and footers If you want to configure the CP 523 with other data you must store the configuring data on a memory submodule in DB 1 This data is subdivided into ten parameter blocks to simplify entry as much as possible Table 6 1 Contents of the Parameter Blocks Setting the serial interface parameters Serial interface parameters Waiting times after CR LE and FF only relevant if BUSY signal 0 and no XON XOFF protocol has been con
108. e format Lines per page Left margin Page number top bottom none Header and footer 6 Header 1 Header 2 Footer 1 Footer 2 Any combination of year month and day is permissible lowercase also permissible ASCII character 20 to 7F HMS HSM MSH MHS SHM SMH lowercase also permissible ASCII character 20 to 7Fp d D e E 3A D 24h clock 14 to FF 00 to 3C 0 O h H u U f F other characters No header or K1 Text H1 Text footer K2 Text H2 Text F1 Text F2 Text 6 8 EWA 4NEB 811 6044 02a CP 523 Print Mode Page format The page format is defined by the information given in parameter blocks 5 and 6 Table 6 5 Page Format Blank line if page number header or footer has been configured Blank line if page number header or footer has been configured Page No at top Blank line if page number configured at top Header 1 Header2 Blank line if header s configured Blank line if header s have been configured Lines for message texts A maximum of 4095 message texts can be configured A message text may not exceed 136 characters Configuration is described in 6 4 Blank line if footer s configured Blank line if footer s configured Footer 1 Footer 2 Blank line if the page number is configured at bottom Page number at bottom Blank line if page number header or footer has been configured Blank line if page number
109. e module is set with to start address 128 The clock data is to be output on digital output modules beginning address 8 NAME CLOC iL Load nonrelevant data into accumulator 1 and transfer it to word r 0 of the CP so that the CP transfers current data to the transfer memory Read current clock data and transfer it to digital output modules You can also evaluate the following in connection with the integral clock e Module in restart routine XFy The clock data is invalid e Default time of day set 2X This evaluation is relevant if you are operating your programmable controller without battery backup Time of day or date error 3X This error evaluation is relevant after you have set the clock e Clock fault 1X This error evaluation is only relevant after a restart EWA 4NEB 811 6044 02a 6 37 Print Mode CP 523 6 7 Overview of Permissible Jobs in Print Mode The CPU transfers the job request to the CP 523 in word 0 The job number is stored in byte 0 Table 6 18 Permissible Job Request to the CP 523 in Print Mode Read status byte status of the printer and current clock data Message text number Print message text with CR LF at end Weekday setting Set clock settings in bytes 1 to 7 LI erin seem Transfer parameter setting data 9 0 0 0 Set serial interface parameters 9 0 2 0 Set XON XOFF character parameters 9 0 7 0 Select Print mode T Print requests These are written to t
110. e scan time may be exceeded if several message blocks are received Remedy Program OB 31 Set scan time in FB 201 address OOFO network 6 Please note that FB 201 uses scratch flags EWA 4NEB 811 6044 02a 8 21 Using the SEND and RECEIVE Function Blocks CP 523 8 2 2 Structure of the Status Byte The status bytes for SEND FB 200 and RECEIVE FB 201 are identical The status byte contains information about whether e Receive data is available bit 0 1 e The Send mailbox is empty bit 1 1 If the Send mailbox is occupied the Send job initiated by calling SEND FB 200 is not executed e Errors have occurred bit 3 1 If bit 3 is set bits 4 to 7 contain the error code 0 0 1 1 SEND FB 1 Receive data Parameter error A a an IVi RECEIVE FB 1 0 0 available Parameter error na T DB 1 Permission to send a d 1 0 1 0 No permission to send receive data too small 1 Bits 4 to 7 contain Error flagged error code 1 0 0 0 in CBR 0 No errors Figure 8 3 Structure of the STAT Status Byte 8 2 3 Schematic Representation of the Method of Operation of RECEIVE FB 201 This section is intended merely to explain how RECEIVE FB 201 works You do not require this information to use RECEIVE FB 201 8 22 EWA 4NEB 811 6044 02a CP 523 Using the SEND and RECEIVE Function Blocks The FB 201 services the Receive request according to the following schematic Read CP 523 status Segmen
111. ecified in two ways e The number is specified when the message is configured e The number is transferred to the CP as a variable in the user program Direct entry of the message text number KPa a is the number of the message text to be inserted You must specify a when configuring the message text The values 1 to 4095 are allowed for a If the message text called contains space holders these are treated as text and printed out You can use the KPa spaceholder several times in one message text In this way you can combine several message texts and print them out together Example Configuring message texts with spaceholders for inserting message text KPa You want to store the following message texts in DB 7 Message text 70 The following overview indicates lt Insert message text 73 gt lt Insert message text 74 gt and lt Insert message text 75 gt Message text 73 the problems that have arisen during the monitoring period Message text 74 the countermeasures taken Message text 75 the length of the resulting downtimes 70 The following over Message text number separator view indicates KP73 message text with spaceholder for Insert message text 73 KP74 and KP75 8 Message text end of text character 73 the problems that Message text number separator Message text have arisen during Message text the monitoring periods Message text end of text character
112. ects e If you specify values for a and b outside the value range the spaceholder is treated as text and printed as configured e If you configure a with a value too small for the variable values to be printed characters will be printed instead of the variable value Table 6 14 Typical KGa b Data Format Printouts 3 141593E 01 31 4159 31 415930 31 416 EWA 4NEB 811 6044 02a 6 29 Print Mode CP 523 6 5 Processing Job Requests in Print Mode The CP 523 handles data transfer with the printer autonomously Data transfer between the CPU and the CP 523 must always be initiated by the CPU The CP 523 has an eight byte transfer memory which can be used by the CPU and the CP 523 Peripheral 5 CPU CP 523 device Serial interface Job Message buffer buffer Figure 6 6 Schematic Representation of Job Order Processing in Print Mode Receive print requests Transfer Send memory print requests lis Internal bus The CPU transfers the following in the transfer memory e Word 0 the job request e g Print message text No 20 e Words 2 4 6 further necessary or possible information on the job e g value of a variable to be inserted in the message text at printout The CP 523 writes the following to the transfer memory after a job has been executed e Byte 0 Status of the module e Byte 1 Status of the printer and current day e Byte 2 to 7 The remaining current clock data 6 30 EWA 4NEB
113. ednesday 5 Thursday 6 Friday 7 Saturday Current day O1g p tO 31 Ben Current month 01 pep to 128cp Current year O0gep tO 99gcp Current hour 24 h clock O0gcp tO 23gcp 12h clock a m O1gcp tO 12gcp 12h clock p m 81acp tO 92gcp Current minute O0zgep tO 59gcp Current second O0zgep tO 59gcp EWA 4NEB 811 6044 02a A 11 Summary CP 523 Table A 14 Status Byte in Communications Mode CP to CPU 7 4 No error No memory submodule Entries in job buffer for parameter setting requests only No battery backup Job buffer full for parameter setting requests only CP restart in progress Clock defective Default time of day set Time of day date error Illegal job request Hardware fault Coordination information only after Coordinate data transfer request ee Character delay time exceeded Parity error O B Receive after XOFF or receive after DTR 0 Message frame exceeds 256 bytes E Permanent break in peripheral device cable Receive mailbox overflow X signal state not significant for other half byte These errors are not flagged until a coordinate data transfer request to receive data has been serviced for this message frame A 12 EWA 4NEB 811 6044 02a CP 523 Summary A 7 Feedback Information in Communications Mode 3 Table A 15 Status Info from the CP 523 for Job Number A000 0 Status byte 1 Permission to send and receive CPU can neither send nor recei
114. en updates the transfer memory 5 Return to step 3 Example Receiving a message frame with the end of text character ODODy Start address 128 is set on the CP 523 The message frame is to be stored in DB 22 beginning DW 0 Flag 101 1 is to be set if a message frame is stored in DB 22 The STL does not explain how flag 101 1 is reset You could reset the flag when you have evaluated the message frame and it can be overwritten in DB 22 FB 126 can be assigned the relevant parameters You have a free choice of start address of the module and end of text characters These must be specified when the FB is called FB 126 receives only one message frame and does not evaluate byte 7 of the transfer memory number of message frames in the Receive mailbox 7 78 EWA 4NEB 811 6044 02a CP 523 Prepare to receive message block Read word from the transfer memory Word end of text character Store word in DB No Store word in DB Prepare Last word of the transfer of message block next word Prepare transfer of next message block Figure 7 16 Flowchart for FB 126 RECEIVE 3 EWA 4NEB 811 6044 02a Communications Mode 7 79 Communications Mode CP 523 NETWORK 1 0000 NAME RECEIVE4 DES BADR I Q D B T C D KM KH KY KC KF KT KZ KG KF DES ENZE I Q D B T C D KM KH KY KC KF KT KZ KG KH Open target data block Message frame in DB If yes then Block End Load and store module start address
115. endoza Rosario Bolivia Sociedad Comercial e Industrial Hansa Ltd La Paz EWA 4NEB 811 6044 02a Brazil Siemens S A Sao Paulo Bel m Belo Horizonte Brasilia Campinas Curitiba Florianopolis Fortaleza Porto Alegre Recife Rio de Janeiro Salvador de Bahia Vitoria Canada Siemens Electric Ltd Montreal Qu bec Toronto Ontario Chile INGELSAC Santiago de Chile Colombia Siemens S A Bogota Baranquilla Cali Medellin Costa Rica Siemens S A San Jos Ecuador Siemens S A Quito OTESA Guayaquil Quito El Salvador Siemens S A San Salvador Guatemala Siemens S A Ciudad de Guatemala SIEMENS Addresses Worldwide Honduras Representaciones Electro industriales S de R L Tegucigalpa Mexico Siemens S A M xico D F Culiac n G mez Palacio Guadalajara Le n Monterrey Puebla Nicaragua Siemens S A Managua Paraguay Rieder amp Cia S A C I Asunci n Peru Siemsa Lima Uruguay Conatel S A Montevideo Venezuela Siemens S A Caracas Valencia United States of America Siemens Energy amp Automation Inc Roswell Georgia B 3 SIEMENS Addresses Worldwide Asia Bahrain Transitec Gulf Manama or Siemens Resident Engineer Abu Dhabi Bangladesh Siemens Bangladesh Ltd Dhaka Hong Kong Jebsen amp Co Ltd Hong Kong India Siemens India Ltd Bombay Ahmedabad Bangalore Calcutta Madras New Dehli Secundarabad Indonesia P T Siemens Indonesia J
116. er Memory Assignments for Transfer Parameter Setting Data for Parameter Block 7 Job number Transfer parameter setting 1 Bits 4 to 7 Parameter block number Bits 0 to 3 Mode Print mode Transparent mode Character delay time 1 to 3000 10 ms Message frame length 1 to 256 bytes One Byte 7 or two bytes 6 and 7 end of text characters must be specified if message frame length is 0 bytes 7 0 when memory submodule with message texts is J plugged in 1 no memory subm 0001 to OBB8 0001 6 10 ms End of text characters only when message frame length 0 1 end of text character Byte 6 0 2 end of text characters Possible in Interpretive mode only 7 36 No end of text character 0001 to OOFF 0101 to FFFF EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Transferring parameter setting data for parameter block 7 Start address 128 is set on the CP 523 The module is to be operated in Interpretive mode The message frames to be transmitted have different lengths the end of the message frame is therefore signalled with ODOD ODOD y two carriage returns The character delay time may be 300 ms 300 ms 001E JU FB BLOCK7 SYNC H ODOD Load end characters into ACCUM 1 and JU FB PW 134 transfer to CP in bytes 6 and 7 BLOCK7 H 0000 Load message frame length into BE PW 132 ACCUM 1 and transfer to CP in bytes 4 H 001E and 5 PW 130 Load character
117. er is reserved because the preceding Send request is still being serviced If byte 1 is O14 bit 7 1 means that the request was accepted the Send buffer is now reserved The receiver acknowledged with NAK during Receive data invalid connection cleardown the receiver acknowledged with NAK during Receive data invalid connection buildup Transmission aborted by receiver Receive data invalid a QVZ time out during connection buildup No data is transmitted QVZ time out during connection cleardown Receive data invalid Initiation conflict both link partners have high No data is transmitted priority Break Transmission is aborted Initiation conflict both link partners have low No data is transmitted priority No errors see error message A 14 EWA 4NEB 811 6044 02a CP 523 Summary Table A 19 Return Info and Error Flags in the Coordination Byte Receive CBR in 3964 R Mode 1 XX Request accepted 0 No frame to fetch Parity error Data is rejected Message frame length 0 a Receive buffer full Data is rejected Too many message frames received Buffer full subse quent message frames will be rejected Bh Message frame too long 256 bytes Data is rejected De DLE not doubled or no ETX after DLE Data is rejected 11 STX error handshaking not started Data is rejected with STX No errors see error message EWA 4NEB 811 6044 02a A 15 aye pneq 0001X Ouez Jojoeseuo ul syiqy
118. er submodule e EPROM submodule A UV erasing facility is required for erasing the submodule contents e EEPROM submodule Submodule contents can be overwritten using a programmer Table 2 3 Overview of Permissible User Submodules EPROM 6ES5 375 OLA15 8 Kbyte 2 4 1 Memory Submodule Evaluation Several error flags can be stored by the CP in byte 0 in conjunction with the memory submodule Table 2 4 Error Flags in Conjunction with the Memory Submodule Memory submodule defective 1 PLC POWER OFF 2 Plug in new memory submodule 3 PLC POWER ON No message texts configured Configure message texts Wrong or defective user submodule plugged in X Value for other half byte irrelevant 2 10 EWA 4NEB 811 6044 02a CP 523 Technical Description 2 5 Integral Hardware Clock The CP incorporates a hardware clock which is backed up by the battery of the PLC power supply module Using the clock data You can use the clock data in two ways e The current clock data can be inserted in a message text You can insert spaceholders for date and time of day for this purpose when configuring the message texts 6 4 e The current clock data can be read out by the CPU and used in the user program 6 6 or 7 4 2 Battery backup of the clock data The clock is backed up by the battery of the PLC power supply module The clock starts with the default values Sunday 1 1 90 12 00 00 on power up The power supply module battery should only
119. erface message Transfer frame Receive memory P Receive mail message 8 bytes box 1K bytes frame Internal bus Figure 7 12 Receiving a Message from a Peripheral Device The CP 523 receives message frames from the peripheral device via a serial interface and stores them in the Receive mailbox A maximum of 99 message frames with a total length of 1024 bytes can be stored there When the CP 523 is receiving message frames from the peripheral device it can simultaneously e Receive a message frame from the CPU e Send a message frame to the CPU The CP outputs message frames to the CPU in the order in which they were received from the peripheral device The CP 523 transfers new data from the Receive mailbox to the transfer memory if the CPU has written the relevant data into word 0 of the transfer memory Data transfer between the CPU and the CP is always initiated by the CPU with Coordinate data transfer for receiving a message frame request As coordination information the CP 523 indicates if there are message frames in the Receive mailbox bit 7 1 The CPU can also fetch message frames from the CP which have been fragmented because the character delay time ZVZ was exceeded In these cases all data received up until the instant of error is forwarded as message frame to the CPU except in 3964 R mode in which case the error is flagged in the CBR The CP 523 transfers the following to the CPU together with the coordination in
120. ers for variables in the message text You must enter the data in the format in which you configured it in the message text on the memory submodule 6 4 5 At printout the spaceholders are replaced by the current variable values Table 6 21 Contents of the Transfer Memory for Print Message Text 4to 7 Job number Ou Print message text with CR LF ys Print message text with CR LF 4 Print message text without CR LF 0103 to 3 0103 Message text number 001 to FFF 1 to 4095 2 0 to 7 Value of the variable 0000 to FFFFy or Depending on the configured data format number of the message text to 001 to FFF 1 to 4095 be inserted 4 0 to 7 Value of the variable 0000 to FFFFy or Depending on the configured data format number of the message text to 001 to FFF 1 to 4095 be inserted ae ee Value of the variable 0000 to FFFFy or Depending on the configured data format number of the message text to 001 to FFF 1 to 4095 be inserted EWA 4NEB 811 6044 02a 6 41 Print Mode CP 523 Permissible insertions when printing the message text You can enter spaceholders in the message text when configuring message texts on the memory submodule These spaceholders are replaced accordingly on printout You can enter spaceholders for the following e Date and time of day e Further message texts e Variables e Control characters for the printer double width type bold type Figure 6 8 is a schematic represent
121. essage text with a spaceholder for control parameters entry You want to store the following message text in DB 5 Message text 50 lt Double width type on gt Monthly overview lt Double width type off gt KS 50 8 Monthly overview lt Message text number 50 separator select character string for double width type deselect character string for double width type 6 20 EWA 4NEB 811 6044 02a CP 523 Print Mode Entry with the spaceholders Sa b If you use the spaceholders Sa b you must enter the control character in ASCII code in decimal form If you want to enter several control characters consecutively you must separate them with commas You can enter a maximum of 50 control characters consecutively Example Deselecting the subscript on the PT 88 The subscript on the PT 88 printer is deselected with the ESC16 command ESC corresponds to the ASCII code 1By 27p You must enter S27 16 Example Configuring a message text with a spaceholder for control parameters entry with Sa b You want to store the following message text in DB 6 Message text 60 The proportion of H lt Select subscript gt 2 lt Deselect subscript gt 0 is 50 KS 60 The proportion of Message text number separator Message text H S27 18 2 527 16 O Message text H spaceholder for on Message text 2 spaceholder for off Mesage text O KS tis 50 8 Message text end of text
122. executed with the XON XOFF protocol when valid values are used for XON and XOFF XON XOFF is not possible in Transparent mode mode 1 or 3964 R mode mode 3 Reader s note Section 7 3 1 is arranged so that the parameter list Table 7 2 and the parameter descriptions which follow it are succeeded by the subsections Initializing TRANSPARENT MODE page 7 16 Initializing INTERPRETIVE MODE page 7 18 Initializing 3964 R mode page 7 21 When you have chosen the mode you want to use you can limit your reading to the appropriate subsection The description of parameter block 9 applies for all modes and was therefore presented only once on page 7 42 EWA 4NEB 811 6044 02a 7 15 Communications Mode CP 523 Setting gt TRANSPARENT MODE parameters via the MEMORY SUBMODULE When you want to use Transparent mode to tranfer your datas you must enter all parameter setting data in parameter blocks 0 and 7 Table 7 3 Contents of the Parameter Blocks for Transparent Mode 110 Bd 200 Bd 300 Bd 600 Bd 1200 Bd 2400 Bd 4800 Bd 9600 Bd Baud rate even odd mark space no parity check BUSY signal Interface Data format 7 data bits 8 data bits 8 data bits 11 bit character frame 7 data bits 7 data bits 8 data bits 10 bit character frame HW handshaking Mode Printer mode ol A Interpretive mode 3964 R mode Character delay time 0001 to 3000p 1 to 3000 10 ms
123. f text If the partner in the link replies with DLE data link escape before time out QVZ the protocol goes to Send mode If the partner responds with NAK negative acknowledgement or a random character other than DLE or if no response comes before time out the connection cannot be established After a total of six unsuccessful attempts the procedure is aborted and the cause of error flagged in coordination byte CBS Default value in 3964 R mode 2000 ms Default other values can be entered in parameter block 7 7 2 EWA 4NEB 811 6044 02a CP 523 Communications Mode If the connection can be established the useful data in the output buffer is transmitted to the partner in the link at the specified baud rate The partner in the link monitors the interval between incoming characters which may not exceed the character delay time ZVZ Each DLE character found in the buffer is transmitted as two DLE characters double DLE i e 10 is transmitted twice for each DLE character in the output buffer When the buffer is empty the CP appends DLE ETX in 3964 mode and DLE ETX BCC in 3964R mode as end of text identifier and waits for an acknowledgement A DLE character from the partner within the allotted time QVZ indicates that the data was received without error If the partner in the link responds with NAK a random character or not at all the CP once again transmits STX After a total of six unsuccessful attempts to tran
124. f the 1st message text to be inserted and transfer it to bytes 2 and 3 of the CP Load ACCUM 1 with the message text number of the 2nd message text to be inserted and transfer it to bytes 4 and 5 of the CP Load ACCUM 1 with the message text number of the 3rd message text to be inserted and transfer it to bytes 6 and 7 of the CP Load ACCUM 1 with the message text number of the message text to be inserted and the Print message text request and transfer to bytes 0 and 1 of the CP Printout of message text 80 if message texts 81 82 and 83 are inserted The motor has thermal problems because of water loss EWA 4NEB 811 6044 02a 6 43 Print Mode ao OP 5B Example Simultaneous use of the KV spaceholder the KH spaceholder for variables and the spaceholder for the time of day You have configured the following message texts on the memory submodule 6 4 5 Message text 84 The motor went down as a result of KV at T Message text 85 EMERGENCY OFF Motor 20 went down at 17 15 30 Start address 128 is set on the CP 523 You have programmed the following statements in the user program Load motor number 20 into ACCUM 1 and transfer to bytes 2 and 3 of the CP Load the message text number of the message text to be inserted into ACCUM 1 and transfer to bytes 4 and 5 of the CP Load ACCUM 1 with the message text number of the message text to be printed and the Print message text request and transfer to bytes 0 an
125. fer Memory Switch Settings on Switch Bank S1 for Defining the Start Address Settings on Switch Bank S1 for Defining the I O Area EWA 4NEB 811 6044 02a CP 523 Address Assignment 5 Address Assignment This section describes e how to set the module address 5 1 e when the CP accepts data from the CPU 5 2 e when the CP supplies current data for the CPU 5 2 5 1 Setting the Start Address and the I O Area The CP incorporates an eight byte transfer memory All data between the CPU and the CP is exchanged via this area which can be read and written to by the CPU You must set the following with the DIP switches on the S1 switch bank e The desired start address with switches S1 1 to S1 5 e The desired I O area with switches S1 6 to 1 8 Jumper header Jumper X7 closed Jumper X9 open Jumper X8 open Jumper X6 closed beginning revision level 2 Switch bank 1 for address setting Figure 5 1 Address Switch Locations y startup that there are not several modules reserving the same address space The byte and word numbers specified in this manual always refer to the start address that you have set Example You have set start address 128 using DIP switches 1 1 to 1 5 Word 0 has address 128 0 128 word 6 address 128 6 134 EWA 4NEB 811 6044 02a 5 1 Address Assignment CP 523 Table 5 1 Switch Settings on Switch Bank S1 for Defining the Start Address eo mim mim ee ee ee i ee ee
126. fer memory 0080 Check that the Receive mailbox is empty 128 Read the coordination data If the Receive mailbox is empty Block End If it is not empty open DB 21 and read out message frame data Read word 2 of the transfer memory and store in DW 1 Read word 0 of the transfer memory and store in DW 0 Block End Example Parity check Start address 128 is set on the module FB 120 is to be invoked when a parity error is detected The error is processed in FB 120 for instance by requesting the peripheral device to retransmit the frame Fetch data frame from CP 523 128 Read module status OF00 Blank error L KH oaoo Has a parity error been detected F If yes jump to FB 120 JC FB 120 If no block end PARCHECK gt BE EWA 4NEB 811 6044 02a 7 51 Communications Mode CP 523 Special features of 3964 R mode In 3964 R mode you receive different return info after submitting a Coordinate data transfer request than you receive in Transparent or Interpretive mode The return info for 3964 R mode is presented separately in the following In 3964R mode there are three job requests which provide different return info 1 Job request A000 interrogates the status of the CP 523 2 Job number A001 is a Send request 3 Job number A080 is a Receive request Job number A000 which checks the status of the CP 523 should be submitted prior to every Send and Receive request The f
127. ffset of 0 to 7 Only when word 0 of the transfer memory has been overwritten with T PW lt Initial address of the module gt does the CP 523 read the data from the transfer memory and update the transfer memory with current values These current values can then be read by the user program with L PW statements CPU transfers new job CP reads out bytes CP overwrites bytes CPU can read the request to word 0 of 0 to 7 of the 0 to 7 of the transfer actual data from the transfer memory transfer memory memory with the the transfer T PW X current data memory LPW X Figure 2 2 Using the Transfer Memory You can transfer additional information to the CP in words 2 4 and 6 before the request is sub mitted This depends on the job in question See the job descriptions for the precise explanation Serial interface The CP 523 has an RS 232 C V 24 interface and a TTY interface The following are examples of peripheral devices that you can connect to the serial interface of the CP 523 e Printer with passive or active TTY interface e Printer with RS 232 C V 24 interface e Barcode reader e Keyboard e Terminal e MODEM e Another CP 523 e CPU 944 ASCII interface e CP 521 e PC 2 2 EWA 4NEB 811 6044 02a CP 523 Technical Description EPROM EEPROM You can use EPROM and EEPROM memory submodules of up to 32K bytes The EPROM EEPROM is configured with the programmer e Print mode In Print mode the parameter setting
128. fic continues between CP and peripheral STOP device This can lead to overflow of the Receive mailbox POWER OFF Send and receive message frame data is lost CPU Battery backup available Clock data is retained not available Clock data is lost Fault in CP Data is corrupted during transmission in both peripheral directions device CP error message connection e Character time out e Peripheral device not ready after 20 s e Permanent line break POWER OFF Bad message frames in Receive mailbox peripheral device or The data transfer between CPU and CP Send or Receive is aborted The job must be restarted following transition from STOP to RUN This is of particular relevance for the S5 135U 150U 155U Data cannot be corrupted in 3964 R mode as the message frames are transmitted in a protocol message frame 7 4 If you operate the RS 232 C V 24 interface without handshaking Handshake OFF the CP 523 cannot detect a break in the connection between the CP and the peripheral device EWA 4NEB 811 6044 02a 4 5 System Overview Technical Description Hardware Installation Notes on Operation ROD 5 1 Setting the Start Address and the I O Area 5 2 Access to the Transfer Memory 20 00 e eee eee eee 5 Print Mode Communications Mode Using the SEND and RECEIVE Function Blocks CN EWA 4NEB 811 6044 02a Address Switch Locations Using the Trans
129. figured XON XOFF protocol only relevant if XON XOFF protocol is in use The XON XOFF protocol has priority over the BUSY signal Configuring data for entering message texts Text parameters Output format for date and time of day Page format Headers and footers only relevant if headers and footers are to be printed Setting the mode Parameters for Communications mode Character conversion table Correction value for the integral clock 0 1 2 Configuring data for message text printout 4 5 6 7 8 EWA 4NEB 811 6044 02a 6 3 Print Mode CP 523 Dividing the parameters into ten parameter blocks enables you to initialize only the parameter block you want to modify However this parameter block must be entered in its entirety even if individual parameters within the block are to retain their default values Entering the parameter blocks You must first enter all the parameter blocks you want to change in DB 1 using the programmer Then transfer DB1 to the memory submodule Proceed as follows to change a DB in the memory submodule 1 Transfer total contents of the memory submodule from the memory submodule to the programmer diskette hard disk 2 Delete memory submodule 3 Change DB 4 Transfer total memory contents back to the memory submodule Further tips for input e When entering text alternate between data format KS and S for each line This increases the clarity of presentation on the progra
130. formation e The length in bytes of the next message frame in word 2 e The number of message blocks in the next message frame in byte 6 e The number of message frames in the Receive mailbox in byte 7 If a message frame has been received the CPU can read it out in message blocks of eight bytes The next two pages contain a graphic representation of this procedure e Receive message frame flowchart e Transfer memory assignments from the user program and from the CP 523 for a Receive request The statement list of the RECEIVE function block is explained in 8 2 The function block is a user friendly interface for handling Receive message frame Use of the function block is also 7 72 EWA 4NEB 811 6044 02a CP 523 Communications Mode START CPU forwards a Receive message request to CP s transfer memory word 0 CPU reads transfer memory and evaluates coordination information and coordination byte word 0 message frame in the Receive mailbox bit 7 in byte 1 1 CPU writes word 0 CP transfers data from Receive mailbox to transfer memory CPU reads message block from CP s transfer memory Read further message blocks from transfer memory Figure 7 13 Schematic for Receive Message EWA 4NEB 811 6044 02a 7 73 Communications Mode CP 523 CPU user program CP functions CPU issues Receive message request Orr ED Word 2 Word 4 Word 6 Not Not Not significant significant sig
131. ge Frames with Evaluation of the Specified Message Frame Length You can receive a fixed length message frame from the CP with a Receive request Prerequisites e You must specify the fixed length in parameter block 7 when initializing the CP 523 e You must also make sure that the peripheral device sends only message frames of this length to the CP Schematic for Receiving message frames with evaluation of the specified message frame length 1 The CPU transfers the Coordinate data transfer for receive message frame request A080 to word 0 of the transfer memory 2 The CPU reads the coordination information from word O of the transfer memory If there is no message frame in the Receive mailbox bit 7 in byte 1 0 no message frame can be received The following information is available in the transfer memory together with the coordination information Word 2 Length of the next message frame to be received in bytes Byte 6 Number of message blocks in the next message frame to be received Byte 7 Total number of message frames in the Receive buffer 3 The CPU writes word 0 of the transfer memory The CP updates the transfer memory 4 The CPU reads the message frame from the transfer memory in message blocks of eight bytes The CPU reads the 1st message block from the transfer memory eight bytes 5 The CPU writes word 0 of the transfer memory The CP updates the transfer memory 6 CPU reads further message bloc
132. ge blocks of eight bytes The CP 523 can detect the end of a message frame sent by the peripheral device in three ways e You define the message frame length in parameter block 7 during configuring e You specify one or two end of text characters in parameter block 7 when you set the parameters in the parameter block In this case the message frame size must be 0 bytes The CP 523 must be initialized for Interpretive mode The setting of parameters is explained in 7 3 e In 3964 R mode the procedure automatically computes the message frame size on the basis of end identifier string DLE ETX BCC Transferring the message frame After the CP 523 has accepted the Receive request it transfers the first message block from the Receive mailbox to the transfer memory After the CPU has read a message block it must write word 0 of the transfer memory The CP then updates the transfer memory Example Receiving a message frame with a length of 12 bytes Start address 128 is set on the CP 523 The message frame is to be stored in data block 20 beginning DW 0 DB 20 on the CPU of the CP 0 A53Dy Message 128 A53Dy Message block 1 block 1 1 34E1 130 34E1 Receive mailbox of the CP Transfer memory 87654 Message 194 7654 Message 6ED4 block 2 ED4 block 2 lt ___ lt Figure 7 15 Data Interchange with Receive Message Frame 130 ODODy EWA 4NEB 811 6044 02a 7 75 Communications Mode CP 523 7 7 1 Receiving Messa
133. gineer Dubai EWA 4NEB 811 6044 02a CP 523 Asia continued Yemen Arab Republic Tihama Tractors amp Engineering Co o Ltd Sanaa or Siemens Resident Engineer Sanaa Australasia Australia Siemens Ltd Melbourne Brisbane Perth Sydney New Zealand Siemens Liaison Office Auckland EWA 4NEB 811 6044 02a SIEMENS Addresses Worldwide B 5 System Overview Technical Description Hardware Installation Notes on Operation Address Assignment Print Mode Communications Mode Using the SEND and RECEIVE Function Blocks Appendix Siemens Worldwide Wranounwn EWA 4NEB 811 6044 02a CP 523 Index A Accuracy of the real time clock Addressing ASCII character message text B Battery backup Baud rate Block check character Buffering clock data BUSY BUSY signal Byte 1 Cc Cable length permissible Cannon subminiature D connector Central controller Character conversion table configuring Character delay time exceeded 10 bit 11 bit Character frame 10 bit 11 bit Character time out Clock accuracy integral setting Clock data battery backup read Clock test Communications mode 3964 R faults illegal job requests interpretive permissible job requests transparent Configuration CP 523 EWA 4NEB 811 6044 02a AR a for ay 7A my D ER Pu a ije r 9 rielelellels hoo Oo Bios wl lol N Co oO 3 P TIE O o gt
134. ginning with page number 1 printed at the bottom centre of the page Specify e The page number in byte 1 01 to FFy e Job number 20 in byte 0 EWA 4NEB 811 6044 02a 6 45 Print Mode CP 523 6 7 4 Form Feed Job Number 5000 When prompted by the CPU the CP 523 instructs the printer to execute a form feed A form feed is implemented by executing the number of line feeds configured parameter block 5 Page format lines per page Headers footers and page numbers are also printed depending on the configuration Specify Job number 5000 in word 0 Example Form feed Start address 128 is set for the module A from feed is to be executed when flag 25 0 is set FORMFEED AN F 25 0 The program is terminated if flag 25 0 is not set BEC L KH 5000 Load ACCUM 1 with the job number for Form feed and transfer T PW 128 to the CP in word 0 Job accepted by CP Reset F 25 0 Block End 6 7 5 Line Feed Job Number 6000 When prompted by the CPU the CP 523 instructs the printer to execute a line feed Specify Job number 6000 in word 0 Example Line feed The module is set to start address 128 A line feed is to be executed when flag 25 1 is set LINEFEED AN F 25 1 The program is terminated if flag 25 1 is not set BEC L KH 6000 Load ACCUM 1 with the job number for Line feed and transfer T PW 128 to the CP in word 0 R F 25 1 Job accepted by CP Reset F 25 1 BE Block End 6 46
135. he Module Memory Submodule Evaluation Clock Test Performance during Operation Print Mode Communications Mode Address Assignment Print Mode Communication Mode Using the SEND and RECEIVE Function Blocks CON OD OI EWA 4NEB 811 6044 02a 4 5 Module Errors FaultS 0 00 c eee tenes 4 1 Memory Submodule Faults 0000 cece eee 4 2 Clock Test Errors 0 00 c cette eee 4 3 Faults in Operation Print Mode ok eee 4 4 Faults in Operation Communications Mode 2 eee ed 4 5 EWA 4NEB 811 6044 02a CP 523 Notes on Operation 4 Notes on Operation 4 1 Restart Characteristics The CP 523 executes a restart routine when the power supply is restored POWER ON The restart procedure consists of the following e Clearing the Send and Receive mailboxes e Checking the module 4 1 1 e Memory submodule evaluation 4 1 2 e Clock test 4 1 3 If errors occur during the restart procedure the CP 523 forwards an error flag to the CPU in byte 0 Module status Print mode 6 6 Communications mode 7 4 The message buffer is not deleted on restart in Print mode if the module was battery backed and the memory submodule has not been replaced 4 1 1 Checking the Module In this part of the restart procedure the proper functioning of the hardware is checked Errors are assigned an appropriate number in byte 0 Module status and can be evaluated in the control program o
136. he Send request in word 4 The CP detects the end of a message frame autonomously through these end of text characters The end of text characters of the message frame sent by the CPU may differ from the end of text characters configured in parameter block 7 7 3 The end of text characters configured in parameter block 7 refer to the message frames received by the CP from a peripheral device Procedure for sending message frames with end of text characters 1 The CPU transfers the following to the transfer memory The end of text characters word 4 Message frame length of 0 bytes word 2 e The Coordinate data transfer for sending message frame job number A001 word 0 2 The CPU reads the coordination information from word 0 of the transfer memory If the CP has not accepted the job bit 0 0 no message frame can be sent 3 The CPU transfers the message frame to the transfer memory in message blocks of eight bytes The CP stores the number of message frames in the Receive mailbox in byte 7 so you can also determine after a Send job whether you can receive a message frame Example Sending a message frame with end of text characters ODODy Start address 128 is set on the CP The message frame is stored in DB 20 beginning DWO Flag 100 1 is set if the CP has accepted the job The program does not describe how F 100 1 is reset You could reset F 100 1 when another job request has been transferred to the CP FB
137. he message buffer as required Printing out message texts with and without CR LF at the end job numbers 0 3 and 4 You must specify the message text number in binary code in byte 0 bit 3 and in byte 1 You can print more than one message text on one line with Print message text without CR LF If your configured message texts contain no variables for example you can use this job order to generate tables The CP 523 counts the lines on a page on the basis of the line feeds sent to the printer If you want to print 15 message texts without CR LF for example the CP counts 15 lines The CP does not count the additional lines printed in those cases where a message text is longer than one line and the printer has consequently inserted an automatic line feed 6 38 EWA 4NEB 811 6044 02a CP 523 Print Mode Additional information for Print message text job numbers 0 3 and 4 The following can be additionally transferred to the CP 523 in words 2 4 and 6 for Print message text job numbers 0 3 and 4 e Values of variables When printing the message text the value transferred to the CP 523 is inserted instead of the first spaceholder for variables configured in the message text e Number of a message text to be inserted into a message text When printing a message text the message text with the number transferred to the CP 523 is inserted in place of the spaceholder for message texts Table 6 19 Transferring Additional Informat
138. he person substantial property damage will result if should have the following qualifications proper precautions are not taken e Be trained and authorized to use and tag circuits and equipment in accordance with Indicates loss of life severe personal injury or established safety practices substantial property damage can result if proper precautions are not taken Indicates loss of life severe personal injury or e Be trained in the proper care and use of protective equipment in accordance with CAUTION established safety practices Indicates minor personal injury or property damage can result if proper precautions are not taken e Be trained in rendering first aid STEP 5 and SIMATIC are registered trademarks of Siemens AG Copyright Siemens AG 1989 Second Printing march 1991 Printed in the Federal Republic of Germany Introduction System Overview Technical Description Hardware Installation Notes on Operation Address Assignment Print Mode Communications Mode Using the Function Blocks Appendices EWA 4NEB 811 6044 02a CP 523 Preface Preface This manual is a revised updated edition of the original CP 523 manual The revision was necessary because the CP 523 has been equipped with an additional communication control procedure thus upgrading the number of transmission modes in Communications mode from two to three e Transparent mode e Interpretive mode e 3964 R mode new The
139. ia oda ween apes 6 41 6 22 Contents of the Transfer Memory for Set Clock Job ee eee ee eee 6 45 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 Print Mode 6 1 General The CP 523 enables the output of message texts to a printer in Print mode e Output of message texts defined by you in data blocks DB 2 to 255 on the memory sub module e Insertion of the actual time of day and date in the message text to be printed out The clock data is supplied by the integral real time clock e Insertion of current variables in the printout The variable values can be transferred from the CPU to the CP 523 6 2 Prerequisites for Operation in Print Mode The following conditions must be met in order to operate the CP 523 in Print mode 1 Printer settings The printer settings must agree with your configured settings on the memory submodule para meter blocks in DB 1 If you have set a baud rate of 1200 baud on the printer for example you must set the same baud rate in DB 1 Set the parameters for the serial interface as required and then set the parameters in DB 1 in the memory submodule e See 3 4 1 for configuration examples with terminal diagrams e Parameter setting in DB 1 is explained in 6 3 2 Setting the CP 523 parameters Store all parameter setting data in DB 1 on the memory submodule e Parameters for the printer interface baud rate type of interface BUSY signal e Configuration data for enter
140. ic Representation of the CP 523 Print mode The Print message text XY job request causes the message text stored in the memory submodule under the number XY to be transferred to the printer via the serial interface Current values of variables time of day and date can be entered in the message text during this process You can configure up to 4095 different message texts and store them in the memory submodule You can also include control commands for the printer in the message text These are then executed on printout double width type on off EWA 4NEB 811 6044 02a 2 1 Technical Description CP 523 Communications mode In Communications mode message frames of up to 256 bytes in length can be transferred bet ween the CPU and a peripheral device connected to the CP 523 When it receives a SEND request from the CPU the CP 523 transfers the data from the transfer memory to a Send mailbox The CP 523 then transfers the data autonomously from the Send mailbox to the peripheral device Data received from the peripheral device is first stored by the CP in a Receive mailbox On receiving a RECEIVE request from the CPU the data is forwarded to the transfer where it can be read out by the CPU S5 bus and transfer memory Data is transferred between the CPU and CP 523 via the S5 bus Data is stored in an eight byte transfer memory in the CP 523 Addresses for the transfer memory are derived from the initial address of the module and an o
141. ided it has not been overwritten by the user program Illegal job orders in Print mode If you write a job number into word O of the transfer memory other than the numbers listed above the CP flags Illegal job request 4X in the status byte The Coordinate data transfer request A001 for example is permissible in Communications mode but not in Print mode In Print mode this request would result in error flag 4X in the status byte This error will also be flagged if you transfer illegal parameter setting data with Transfer para meter setting data 6 40 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 7 1 Print Message Text Job Numbers 0 3 and 4 The CP 523 forwards message text XY to the printer when it receives a Print out message text XY request You can specify whether the printer is to execute a line feed LF or carriage return CR after printing message text XY Prerequisites e You must have configured the message text on the memory submodule Assign a number to each message text when configuring it e You must have plugged the configured memory submodule into the CP 523 Specify e The message text number in binary in byte 0 bits 0 to 3 and in byte 1 e The job number in byte 0 bits 4 to 7 Job numbers Oand3 Print message text with CR LF Job number 4 Print message text without CR LF Additional specificaitons You can store a further three 16 bit variables in bytes 2 to 7 if you have configured spacehold
142. in progress 01D6 T STAT Output STAT bit 01D7 3 01D8 A F 237 0 Reset auxiliary flag 01D9 RWO P2370 for end of text character 01DA 01DB BE 8 20 EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks 8 2 Using RECEIVE FB 201 RECEIVE FB 201 transfers message frames from the CP 523 to the CPU You must specify the following when calling RECEIVE FB 201 e The start address of the CP 523 e The number of the target data block in which the message frame is to be stored on the CP 523 e The number of the target data word starting from which the message frame is to be stored e A byte address where RECEIVE FB 201 can store the number of data words received e A byte address where RECEIVE FB 201 is to store the status byte e A byte address where RECEIVE FB 201 is to store the CBR KBE Receive enable is RLO 1 8 2 1 Calling and Setting RECEIVE FB 201 Parameters RECEIVE FB 201 can be called in cyclic programs and in programs servicing timed interrupts and process interrupts eg PB 20t RECEIVE BADR KF 2 Z DBi B ZANE KF ZLAE MB STAT MB KBE Table 8 3 Block Parameters for RECEIVE FB 201 Initial address of the module Number of the destination data block Number of the 1st destination data word Number of data words received destination length Status byte Coordination byte receive relevant only in 3964 R mode OOO UWS Th
143. ing message texts function character end of text character e Configuration data for the message text printout output format for date and time of day headers and footers e Correction factor for the accuracy of the integral real time clock Set the memory submodule parameters using a programmer in off line mode EWA 4NEB 811 6044 02a 6 1 Print Mode CP 523 3 Configuring message texts You must configure at least one message text in one of the DBs 2 to 255 on the memory sub module If you have configured a message text in a DB you can configure further message texts later in other DBs and store them on the memory submodule See 6 4 for information on configuring message texts 4 Establishing connections You must take the following measures when the programmable controller is switched off e Install the CP 523 in the central controller or the expansion unit e Establish a connection between the CP 523 and the printer e Plug the configured memory submodule into the CP 523 You can then power up the programmable controller POWER ON 5 Startup of the CP 523 in Print mode If the CP 523 has a memory submodule it is automatically in Print mode after power up If the CP 523 has no memory submodule it is automatically in Transparent mode Changing operating modes during operation You can change back and forth between Print mode Transparent mode and Interpretive mode during operation If you
144. inter interface can be configured baud rate BUSY signal etc e The format of the page to be printed can be configured headers footers margins etc Configuration of up to 4095 different message texts in data blockson a memory submodule e You can provide for the following when configuring message texts Insertion of the date or time of day in the printout Insertion of Current variables in the printout pressure temperature etc Transfer of printer control parameters double width type on off boldface type etc i saans SOMATIC 85 kod fe a Figure 1 1 S5 1 15U Programmable Controller with CP 523 and Printer EWA4NEB811 6044 02a SIEMENS L o mamana te 1 1 EWA 4036 1 System Overview CP 523 Communications Mode In Communications mode the CP 523 can communicate over the i O interface with an I O unit terminal CP 523 CPU 944 etc equipped with a V 24 RS 232C or TIY interface This mode enables the transfer of data frames between the CPU and an O device connected to the CP 523 The CP 523 provides a total of three communication control procedures i e two protocol free procedures and one with a standardized protocol Protocol free data transmission Transparent mode i e data transmission without receiverside end identifier
145. ion data Bits 4 to 7 Parameter block number Bits 0 to 3 Mode Print mode Transparent mode Interpretive mode 3964 R mode Follow up request Character delay time ZVZ 1 to 65535 10 ms Time out QVZ 1 to 65535 10 ms Message delay time BWZ 1 to 65535 10 ms Bits 4 to 7 Parameter block number Bits 0 to 3 Mode Print mode Transparent mode Interpretive mode 3964 R mode Without block check character With block check character 0 Memory submodule with message texts No memory submodule 0001 to FFFF 220 ms 0001 to FFFF 00C8 2s 0001 to FFFFy 0190 4s Memory submodule with message texts No memory submodule Priority Connection buildup attempts 00 to FFy 7 40 Number of Send attempts 00 to FFy EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Transferring parameter setting data for parameter block 7 Start address 128 is set on the CP 523 Set the parameters as follows in 3964 R mode e Message frame delay time 4000 ms e Time out 2000 ms e Character delay time 220 ms e Connection buildup attempts 6 e Number of Send attempts 6 e Transmission with block check character BCC e Priority low JU FEB 99 BLOCK7 SYNc L KH Load message frame delay time JU FB 116 T PW 400 10 ms into ACCUM 1 and transfer BLOCK7 to CP in bytes 6 and 7 BE Load acknowledge delay time 200 10 ms into ACCUM 1 and
146. ion for Print Message Text Value of the variables 0000 to FFFF or Dependent on the configured data format number of the message text to be inserted 0000 to OFFF Value of the variables 0000 to FFFF or Dependent on the configured data format number of the message text to be inserted 0000 to OFFF Value of the variables 0000 to FFFF or Dependent on the configured data format number of the message text to be inserted 0000 to OFFFy Setting the time of day job number 10 Specify the variables in BCD in bytes 1 to 7 Specify weekdays as digits between 1 and 7 1 Sun day 2 Monday 7 Saturday If an item of clock data is to remain unchanged enter the value FFH in the relevant byte If a variable is outside the permissible range the clock will not be set The CP flags the Time of day date error Table 6 20 Transferring Additional Information for Print Message Text 01pcp tO 31Bcp O1gcp tO 12gcp O0gcp tO 23gepin the case of the 24h clock Config of the 12h clock or the 24hclock O1pepto 12g p inthe case of the 12h clock a m onthe memory submodule in DB 1 81ecptO 92ecp inthe case of the 12h clock p m O00 gen tO 59gcp O0gep tO 59 pcp Bit 7 1 in the case of the 12h clock EWA 4NEB 811 6044 02a 6 39 Print Mode CP 523 Setting the page number job number 20 Specify the page number in binary code in byte 1 Execute form feed job number 5000 If the Output line feed
147. ive Entries in job buffer init requests only No battery backup 8 Job buffer full init requests only CP restart in progress Clock defective Default time set Time data error X X Illegal job request Hardware fault No battery backup X7 Either e no battery has been inserted in the power supply module or e the battery is defective Default time set 2X The clock is set to Sunday 01 01 90 12 00 00 Data time error 3X At least one variable is out of range The new data were rejected and the clock retains the old setting Illegal job request 4X A job number not permitted in Communications mode was entered in word O of the transfer memory See 7 5 for a list of permissible job numbers for Communications mode This error code is also used to flag invalid parameters in a parameter setting request EWA 4NEB 811 6044 02a 7 45 Communications Mode CP 523 Example Evaluating the status of the peripheral device Start address 128 is set on the module If the peripheral device is not ready for operation output 4 1 is set NAME ERROR3 L KH 0000 Transfer nonrelevant data to the CP The CP then updates the T PW 128 transfer memory with the current data L KH 0010 Status of the peripheral device evaluation L PY 129 AW Set bits 0 to 3 to 0 gt lt F Compare ACCUM 1 and ACCUM 2 If not equal BEC Block End S Q 4 1 Otherwise set output 4 1 BE Block End 52
148. ive message frames with the 3964 R protocol 1 The CPU forwards a Coordinate data transfer for receive message frame request job number A080 in word 0 of the transfer memory The CPU reads out the coordination info from word 0 of the transfer memory and the CBR coordination byte receive A message frame can be received only when the Receive mail box contains one bit 7 of the CBR 0 when there is no message frame in the Receive mailbox Together with the coordination info the following information is made available to the user in the transfer memory Word 2 Length in bytes of the message frame that is to be received next Byte 6 Number of message blocks in the next message frame to be received Byte 7 Total number of message frames in the Receive buffer The CPU writes to word 0 of the transfer memory The CP updates the transfer memory The CPU reads the message frame out of the transfer memory in message blocks of 8 bytes each The CPU reads the first message block 8 bytes out of the transfer memory The CPU writes to word 0 of the transfer memory The CP updates the transfer memory The CPU reads out the next message block Steps 5 and 6 are repeated until the CPU has read out the last message block 7 82 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Receiving a 12 byte message frame with 3964 R protocol Base address 128 is set on the CP The message frame is to be stored in
149. ks from the transfer memory 7 Steps 5 and 6 are repeated until the CPU has read the last message block 7 76 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Receiving a message frame with a length of 12 bytes Start address 128 is set on the module The message frame is to be stored in data block 21 beginning DWO Flag 101 0 is to be set if a message frame is in DB 21 The STL does not explain how flag 101 0 is reset You could reset the flag when you have evaluated the message frame and it can be overwritten in DB 21 RECEIVE2 F 101 0 Flag 101 0 is set if a message frame is in DB 21 Then conditional Block End aoso Load Receive message frame request in ACCUM 1 128 transfer to word 0 of the transfer memory 0080 and check if the Receive mailbox is empty 128 Read and evaluate coordination information If Receive mailbox is empty then conditional Block End If not empty then set flag 101 0 and open DB 21 Read word 6 of the transfer memory and store in DW3 Read word 4 of the transfer memory and store in DW2 Read word 2 of the transfer memory and store in DW1 Read word 0 of the transfer memory and store in DWO Write word 0 of the transfer memory Read word 2 of the transfer memory and store in DW5 Read word 0 of the transfer memory and store in DW4 Block End EWA 4NEB 811 6044 02a 7 77 Communications Mode CP 523 7 7 2 Receiving Message Frames with Evaluation of the Specified End of Text
150. ledge with error l l l l l l l l l l l I Output error l l l l l l l l l l l l l l l Lsa a a a ee wl l 8 26 EWA 4NEB 811 6044 02a CP 523 Using the SEND and RECEIVE Function Blocks Segment 6 Fetch Receive data from CP 523 Buffer number of message blocks given in acknowledgement and process Buffer message frame length given in acknowledgement and process Calculate the number of words in the last message block Further program preparations Access word 0 on CP Decrement number of message blocks by 1 Fetch a DW from the CP Yes Last message block Has the last DW been received Increment ZLAE by 1 ZANF gt Z DB Y es Output error message Increment ZLAE by 1 Last DW of the message block Last message Last message No block block Access word 0 on CP END Decrement number of message blocks by 1 Lessenaar ee ee ee a ee l EWA 4NEB 811 6044 02a 8 27 Using the SEND and RECEIVE Function Blocks CP 523 8 2 5 Flags in RECEIVE FB 201 Explanation of the flags used by RECEIVE FB 201 Table 8 4 Overview of the Flags Used by RECEIVE FB 201 Auxiliary flag for buffering the RLO at jump Auxiliary flag for STAT bit Data available FY 254 H BYTE 1 Auxiliary flag byte for buffering STAT H BYTE 2 Auxiliary flag byte for processing the last message block Number of data words fetched from the CP ZLAE RE j ZLA
151. line protocol retries the transmission where necessary fatal errors are flagged in the coordination byte Data coming from the parameter in the link is entered in input buffers If the data is received without error it can be fetched by the CPU for post processing The 3964 and 3964R protocols are asynchronous bit serial transmission procedures All parameters on the module and on the partner in the communications link except for the priority must be identical Control information and useful data are transmitted over the connecting cables In order to enable the receiver to recognize each character and to be able to check for error free trans mission additional bits are prefixed or appended to each character transmitted The character frame is initialized in the parameter block Sample character frame Start bit Data bit no Parity bit Figure 7 1 Example of an 11 Bit Character Frame When the 3964R protocol is used a block check character BCC is transmitted at the end of each data frame to increase transmission reliability and ensure data integrity The BCC is the even longitudinal parity EXORing of all data bits of the frame transmitted or received Its generation begins with the first useful data byte 1st byte in the frame following connection buildup and ends on connection cleardown after the DLE ETX character Sending In order to build up a connection the CP transmits the STX control character start o
152. locks CP 523 Load STAT bit Data available and KH 0001 jump to output STAT STAT STAT bit No data KH 0000 Output STAT bit STAT KBE Reset KBE 7 Request KH 007F accepted but do not reset error flags RLO 0 at jump or no data available Program End NETWORK 3 004F Check whether Z DB is available 0050 Load Z DB parameter 0051 Isolate the DB number from 0052 the Z DB parameter specification 0053 0054 KH E400 Calculate the start address 0056 of the Z DB using the 0057 block address list 0058 0059 Z DB available 005A 005B ERROR 005C s 005D Calculate length of the Z DB 005E 0060 Gross length in words 0061 Subtract length of block header 0063 and store 0064 0065 Check ZANF information 0066 ZANF less than 0 0067 E 0068 ERROR 8 30 EWA 4NEB 811 6044 02a CP 523 FW 232 PAOK KH 0048 STAT NETWORK 4 007B 007B KH 00A0 007D FW 242 007E FE 007F 4 FW 24 0080 0081 24 0082 00 0084 24 0085 0086 0087 0088 0089 008A NETWORK 5 008B 008C 008D 008E 0008F 0090 0091 EWA 4NEB 811 6044 02a Using the SEND and RECEIVE Function Blocks ZANF greater than 255 ERROR ZANF gt Z DB length N O Output FB parameter error PROGRAM END Write KOOR ID RECEIVE to CP 523 word 0 Set pointer back to module base address Read byte 0
153. ltaneously using a DB 54 in the user program 6 4 1 Structure of a Message Text When configuring message texts you must keep to the following structure otherwise a correct printout cannot be guaranteed Message text Separator ASCII characters of End of text number character 1 to 4095 Me the message text Default can consist of Spaceholders for Text date time variables and message texts as well as control parameters for the printer CR LF bold type double width type etc sA Enter key only when entering several message texts Figure 6 4 Structure of a Message Text EWA 4NEB 811 6044 02a 6 15 Print Mode CP 523 Message text number The message text is stored in the DB under a message text number 1 to 4095 If you want to print a message text transfer the message text number and a Print message text request to the CP 523 in the user program 6 7 1 Separators After the message text number you must enter the separator ASCII characters in the message text You can enter up to 136 ASCII characters of message text Characters exceeding 136 are not evaluated The printout of the configured message text on the printer may be longer than 136 characters Example You configure a message text which is longer than 136 characters The message text includes spaceholders for the time of day This requires an entry of only three ASCII characters e g t On output the spaceholder is repla
154. ly in Inter pretive XOFF character 01 to 7E mode EWA 4NEB 811 6044 02a 7 11 Communications Mode CP 523 Table 7 2 Parameter Block Assignments on the Memory Submodule Continued 7 Mode Print mode Transparent mode Interpretive mode 3964 R mode Character delay time 1 to 3000 10 ms Message frame length 1 to 256 bytes One byte 7 or two bytes 6 and 7 end characters must be specified for a length of 0 bytes Character delay time 1 to 3000 10 ms Message frame length 0 byte One byte 7 or two bytes 6 and 7 end characters must be specified for a length of 0 bytes End characters only when frame length 0 1 end character 2 end character 0001 to 3000 000 to 256p 0001pto 3000 0001 to OOFF 0101 to FFFFy 0 for memory submodule con figured with message texts no memory submodule 0001 6 10 ms 0001 6 10 ms 7 12 EWA 4NEB 811 6044 02a CP 523 Communications Mode Table 7 2 Parameter Block Assignments on the Memory Submodule Continued Character delay time ZVZ 00001 to 65535 225 1 to 65535 10 ms Time out QVZ 00001 to 65535 00200 1 to 65535 10 ms Block delay time BWZ 00001 to 65535 1 to 65535 10 ms Transfer with block check character 3964R Transfer without block check character 3964 Priority Connection buildup attempts 001 to 255p No of send attem
155. m the job buffer into the message buffer The number of job requests in the job buffer in creases as a result of this The job buffer can hold a maximum of 31 job requests Additional requests cannot be accepted The CP reports Job buffer full 08 in the transfer memory This can happen if you send more than 31 print requests consecutively to the CP If you nevertheless want to send more than 31 print requests you can proceed in one of the following ways e Scan the status of the module for Job buffer empty 03 after 31 print requests If the CP stores this response 00 in the status byte you can send a further 30 requests e f the Entries already in the job buffer message 03 appears you can issue at least one further print request e Scan the status of the module for Job buffer full 08 4 after 31 print requests If the CP stores this response in the status byte the job request must be reissued EWA 4NEB 811 6044 02a 6 31 Print Mode a OP 5B Function of the message buffer The CP 523 is equipped with a message buffer Job requests to the printer print requests are stored in this message buffer The CP forwards the print requests to the printer from the message buffer The print requests are sent in the same order as they are received from the CPU FIFO The print request is deleted in the message buffer once the CP 523 has serviced it If the CPU sends a large number of print requests within a short time the nu
156. mber Bits O to 3 Mode Character delay time 1 to 3000 10 ms Frame length 1 to 256 bytes Irrelevant EWA4NE8811 6044 02a Default Values on the CP 523 Permissible Values Mode CP 523 Communications Mode Table 7 10 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 7 Interpretive Mode Description Default Values on the CP 523 Permissible Values 0001 to OBB8 0001 to O100 Jobno its 4 to 7 arameter block umber its O to 3 ode haracter delay ime 1 to 3000 10 ms Frame length O bytes ind of text charac ters 1 end of text character in byte 7 Byte 6 O or2 end of text cha racters in bytes 6 and 7 9001 to OBB8 0001 10 ms 0000 0001 to OOFFy 0101 to FFFF 7 25 3964 R Mode Hi Default D ipti Permissible escription Values cP Job no hits 4 to 7 arameter block umber sits Oto 3 lode tharacter delay ime ZVZ 1 to 65535 10 ms 0001 to FFFF 16 220 ms ime out QYZ 1 to 65535 0001 to FFFF 00c8 2000 ms 10 ms Block delay time 0001 to FFFF 0190 BWZ 1 to 65535 10 ms EWA4NEB8116W 02a Values on the 523 4s 3964 R Mode Follow Up Request Default Values or the CP 523 Permis sible Values Description 1 Bits 4 to 7 Parameter block p Number l Bits O to 3 4 Mode Transmiss without l block
157. mber of pending requests will in crease If there are 255 job requests waiting to be serviced and the CPU sends another request the CP 523 cannot process this last request In this case the CP 523 flags Job message buffer full 08 to the CPU in byte 0 Status of the module The CP reports Job message buffer full 08 in the following two cases 1 The job buffer is full because more than 31 print requests have been sent consecutively from the CPU to the CP CPU faster than CP 2 The message buffer is full because more than 255 print requests are waiting to be serviced CPU and CP faster than printer If you have to issue a large number of print requests within a short period check to make sure that the message buffer still has capacity See 6 6 for a description of how to 6 32 EWA 4NEB 811 6044 02a CP 523 Print Mode The following is a schematic of job request processing Entry of the print request in the message buffer is not shown in the figure It is only important for the user to know if a job request has been accepted by the CP 523 and will be serviced CPU transfers new data to the CP 523 in words 2 4 and 6 if required CPU transfers the new job request to the CP 523 in word 0 CPU reads byte 0 of the transfer memory evaluates the error flags and reenters the request in word 0 CP flags the following error message in x l byte 0 of the transfer memory CP checks Last job not CP in restart
158. meter setting data e Parameters for the interface to the peripheral device baud rate type of interface handshake mode e Specifications pertaining to the XON XOFF protocol optional e Parameter setting data for data transfer in Communications mode message frame length end of text character e Correction value for the integral clock optional If the CP 523 and its communications partner have different restart characteristics data may be lost during the restart phase Check that your peripheral device is ready to receive before you EWA 4NEB 811 6044 02a 7 7 Communications Mode CP 523 3 Establishing connections The programmable controller must be switched off to carry out the following measures e Install the CP 523 in the central controller or expansion unit e Establish the connection between the CP 523 and the peripheral device e f you have stored the parameter setting data in a memory submodule plug the memory submodule into the CP 523 You can then switch the PLC on 4 CP 523 startup in Communications mode After power recovery the CP 523 is automatically in Transparent mode when e No memory submodule is plugged in e Amemory submodule initialized for Transparent mode is plugged in e Transparent mode has been forwarded to the CP 523 from the user program You can set Interpretive or 3964 R mode in the following ways e Transfer Interpretive or 3964 R mode to the CP 523 in the user program e Plug
159. mmer screen e You can enter comments in addition to the parameter blocks Schematic for entering parameter blocks The parameter blocks can be entered in DB 1 according to the following schematic Block separator Parameter block Configuration 3A number data Figure 6 1 Schematic for Entering Parameter Blocks in DB 1 Parameter blocks 0 2 and 7 can also be initialized in the user program Parameters set in the user program have priority over those set on the memory submodule 7 6 4 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 3 1 Setting the Serial Interface Parameters Parameter Blocks 0 1 and 2 Store the data for the serial interface in parameter blocks 0 1 and 2 If you enter an illegal value it will be replaced by the default value Table 6 2 Parameter Setting Data for the Serial Interface Baud rate 110 Bd 200 Bd 300 Bd 600 Bd 1200 Bd 2400 Bd 4800 Bd 9600 Bd even odd mark space no parity check BUSY signal no yes Interface TTY V 24 Data format 11 bit character 7 data bits frame 8 data bits 8 data bits 10 bit character 7 data bits frame 7 data bits 8 data bits Hardware handshaking OFF ON Waiting time after XON character XOFF character EWA 4NEB 811 6044 02a 1 2 3 4 5 6 7 8 0 1 2 3 4 0 1 0 1 0 1 2 3 4 5 0 1 00 to FF 25ms ASCII character FF no XON XOFF 01 7Fy protocol ASCII characte
160. mory submodule EPROM 8 Kbytes 6ES5 375 0LA15 g 16 Kbytes 6ES5 375 0LA21 p j 32 Kbytes 6ES5 375 0LA41 Memory submodule EEPROM 5 y 8 Kbytes 6ES5 375 0LC31 j 16 Kbytes 6ES5 375 0LC41 Printer connecting cable You can use the same printer connecting cable that you use for connecting the pro grammer to the PT printer PT 88 RS 232 C V 24 3 2 m 6ES5 735 2BD20 PT 88 TTY 3 2m 6ES5 735 1BD20 Printers See S5 115U Programmable Controller Catalog ST 52 3 and or 5 135U and 5 150U Programmable Controller Catalog ST 54 1 2 12 EWA 4NEB 811 6044 02a 1 System Overview Technical Description Mechanical Assembly Compatible Programmable Controllers and Expansion Units Installing the CP 523 Settings on the Module Connections Pin Assignments of the 25 Pin D Subminiature Connector Pin Assignments of Base Connector X1 Cable Length Terminal Diagrams Terminal Diagrams for Print Mode Terminal Diagrams for Communications Mode Notes on Operation Address Assignment Print Mode Communications Mode Using the SEND and RECEIVE Function Blocks ONO EWA 4NEB 811 6044 02a Installing the CP 523 in the Adapter Casing 6ES5 491 0LB11 Installing the CP 523 in the S5 135U Central Controller Connectors Pin Assignments of the 25 Pin D Subminiature Connector Pin Assignments of Backplane Connector X1 Pin Assignments for CP 523 Passive TTY to PT 88 Active TTY without BUSY Signal Pin Assignments for CP 523 Passive TTY t
161. nificant CP reads job request from transfer memory and writes coordination information nae into transfer memory CPU reads coordination information Word 0 Word 2 Word4 Word 6 Coordination Message Not Byte 6 byte 7 information frame signifi No of message and CBR length cant blocks No of Coordination in bytes message byte receive frames CPU writes word 0 8 byte If no message frame in Word 0 CP transfers 1st message Receive mailbox end here Data block from Receive mailbox to transfer memory CPU reads 1st message block 8 bytes Word 0 Word 2 Word 4 Word 6 Data Data Data Data CPU writes word 0 Word 0 Data CP transfers further message blocks from Receive mailbox to transfer memory i CPU reads further message blocks 8 bytes each Word 0 Word 2 Word 4 Word 6 Data Data Data Data CPU writes word 0 gt Word 0 CP transfers last message Data block from Receive mailbox to transfer memory CPU reads last message block 8 byte Wordd Word2 Word4 Word6 Data Data Data Data Relevant only in 3964 R mode Figure 7 14 Transfer Memory Assignments for Receive Message Frame 7 74 EWA 4NEB 811 6044 02a CP 523 Communications Mode Message frame structure A message frame is defined as all data transferred after a Send or Receive request A message frame can be up to 256 bytes in length in the case of the CP 523 The CPU sends and receives message frames in messa
162. ns are not taken xi Technical Description Hardware Installation Notes on Operation Address Assignment Print Mode Communications Mode Using the SEND and RECEIVE Function blocks OND OR W P EWA 4NEB 811 6044 02a 1 5 115U Programmable Controller with CP 523 and Printer 2 5 115U Programmable Controller with CP 523 and Terminal 1 1 EWA 4NEB 811 6044 02a CP 523 System Overview 1 System Overview Intelligent input output modules 1 0s expand the application area of 51 MATICS5 programmable controllers They are technology oriented and offload the central processing unit by preprocessing input signals The CP 523 serial I O module is an intelligent 1 0 module which can be used in the 5 1 15U 5 135U S5 150U S5 155U and 5 1 15F programmable controllers It can be operated without special COM software and offers applications which until now could only be implemented with expensive and functional y complex modules The CP 523 can be used in Print mode and Communications mode It has a built in real time clock which can be backed up by the battery of the power supply unit The clock data can be read by the CPU and used in the user program for date dependent and time dependent tasks Print mode Message texts can be printed out in this mode This allows you to list process states and process faults Printers with TTY or RS 232 C V 24 interfaces can be connected e The pr
163. nstallation Notes on Operation Address Assignment Print Mode Communications Mode 8 1 8 1 1 8 1 2 8 1 3 8 1 4 8 1 5 8 1 6 8 2 8 2 1 8 2 2 8 2 3 8 2 4 8 2 5 8 2 6 Using SEND FB 200 0 000 tees 8 1 G lli g SEND FB 200 si caeu eutidne ss a Medals Deed RAG a ede eee 8 2 Setting SEND FB 200 Parameters 0 00 cee ee aeeee 8 3 Structure of the Status Byte 0 2 ceed 8 4 Schematic of the Principle of Operation of SEND FB 200 8 5 Flowchart of SEND FB 200 0 cece ee 8 6 Flags in SEND FB 200 0000 cee ee 8 10 Using RECEIVE FB 201 ret hited ae Se peed Wee DEEE 8 21 Calling and Setting RECEIVE FB 201 Parameters 8 21 Structure of the Status Byte 2 1 2 ed 8 22 Schematic Representation of the Method of Operation of RECEIVE FB 204 Tietaa Wiebe one bauer e a anil aly 8 22 Flowchart of RECEIVE FB 201 00 00 e eee eee 8 24 Flags in RECEIVE FB 201 00 00 c eee eee 8 28 Execution Times for FB 200 and 201 0 0 e eee 8 37 EWA 4NEB 811 6044 02a Structure of the STAT Status Byte Schematic for Send Frame FB 200 Structure of the STAT Status Byte Schematic for Receive Frame FB 201 8 1 Block Parameters for SEND FB 200 000 cece eee eens 8 2 8 2 Setting the ENDZ and QLAE Parameters naaa aaa eee eee 8 3 8 3 Block Parameters fo
164. o PT 88 Active TTY with BUSY Signal Pin Assignment of the RS 232 C V 24 Interface Print Mode Pin Assignments for CP 523 to CP 523 TTY Interface Pin Assignments for CP 523 TTY Passive to CP 523 TTY Active Pin Assignments for CPU 944 TTY Active to CP 523 TTY Passive Zero Modem Operation Taking the CP 523 to CP 523 as Example Pin Assignments for CP 523 to Modem EWA 4NEB 811 6044 02a CP 523 Hardware Installation 3 Hardware Installation 3 1 Mechanical Assembly 3 1 1 Compatible Programmable Controllers and Expansion Units The CP 523 can be used in the S5 115U S5 115F in both cases with adapter casings S5 135U 5 150U and S5 155U programmable controllers central controllers CCs or expansion units EUs without fans The permissible module locations are as follows Use in the S5 115U e Central controller CR 700 0LA subrack CR 700 1 subrack CR 700 2 subrack CR 700 3 subrack e Expansion unit ER 701 2 subrack ER 701 3 subrack Possible locations EWA 4NEB 811 6044 02a 3 1 Hardware Installation CP 523 Use in the S5 135U S5 150U and S5 155U e 5 135U central controller Only in the normal I O i e P area e 5 155U central controller Only in the normal I O i e P area e 5 185U expansion unit e 5 186U expansion unit Possible locations Possible locations without battery backup 3 2 EWA 4NEB 811 6044 02a CP 523 Hardware installation 3
165. o ou xe ZAZ UOIPEPUBLULUODEY JOYJOUR UO 0 UONEJ I g qeuoseel ul aq jsnw ayer pneq pue ZAZ jJugpuedepiejul jou sisjoweleg p yoddns jou s J U OUE 9UO 329E JOU OP sYaJeWeIeY p zIeniu eq Jouueg sw u juspusdap spow aie syeyspuey MH pue jeubis Asng Aywoud sey ewo eyeq Mod sey 44OX NOX Auoud sey eyeyspuey MH AJUO pow Jud U IN OR oo OAD Ea E EA 4 L re LE iy ra za Ea E ey EA E EA eleje e SIDJOWILIEY JUPLOCUW JSOW 3y JO suoneurqwog Vv System Overview Technical Description Hardware Installation Notes on Operation Address Assignment Print Mode Communications Mode Using the SEND and RECEIVE Function Block Summary POAONOOAWDY EWA 4NEB 811 6044 02a CP 523 SIEMENS Addresses Worldwide B SIEMENS Addresses Worldwide European Companies and Representatives Austria J Siemens AG Osterreich Vienna Bregenz Graz Innsbruck Klagenfurt Linz Salzburg Belgium Siemens S A Brussels Li ge Siemens N V Brussels Antwerp Gent Bulgaria RUEN office of the INTERPRED corporation agency of the Siemens AG Sofia Sofia Czechoslovakia EFEKTIM Engineering Consultants Siemens AG Prague Denmark Siemens A S Copenhagen Ballerup Hojbjerg Federal Republic of Germany Branch offices of the Siemens AG Berlin West Bremen Dortmund D sseldorf Essen Frankfurt Main Hamburg EWA 4NEB 811 6044 02a Federal Republi
166. o the transfer memory in word 0 CPU transfers CPU transfers CP reads the CP writes CPU can read data to words data to word 0 transfer current data to current data 2 4 and 6 of of the transfer memory the transfer from the the transfer memory memory transfer memory T PW X memory T PWX L PW X Figure 5 2 Using the Transfer Memory If you do not observe this order the new job may be executed with the wrong values Special feature of the CPU 944 when accessing the transfer memory If you are using the CPU 944 you may not write data to word 0 of the transfer memory with T PW lt Start address of the module gt You must write the data to word 0 byte for byte in the following order 1 T PY lt Start address of the module gt byte 0 2 T PY lt Start address of the module 1 gt byte 1 EWA 4NEB 811 6044 02a 5 3 Address Assignment CP 523 Example Writing to word 0 of the transfer memory with the CPU 944 in the user program Initial address 128 is set in the P area on the CP The job number for Print message text No 20 is to be written to word 0 KH 0030 Load ACCUM 1 with the job number Print message text PY 128 Transfer the low byte of ACCUM 1 to the CP KF 20 Load messsage text number into ACCUM 1 PY 129 Transfer the low byte of ACCUM 1 to the CP Example Writing to word O of the transfer memory with the CPU 944 using the programmer s FORCE VAR function Start address 128 is set in the P
167. ogic 1 on the RXD line otherwise the CP 523 will send the following error flags to the CPU in byte 0 Permanent line break XDy and in byte 1 Peripheral device not ready 1X Transparent mode No XON XOFF protocol is possible in Transparent mode Message frames received by a peri pheral device must be of fixed length Interpretive mode If you have programmed an XON XOFF protocol in Interpretive mode the CP sends XOFF to the peripheral device when only 20 more bytes are available in the 1 Kbyte Receive buffer The CP then only sends XON to the peripheral device again when the receive buffer contains more than 256 free bytes If the peripheral device sends more than 20 bytes to the CP after an XOFF the message frame data already received is rejected The CP forwards the Receive buffer overflow error message flag XB to the CPU 3964 R mode This communication control procedure makes it possible to connect peers which also use the 3964 R line procedure to the CP 523 3964 R mode enables comparatively reliable data transmission as the receiver must signal its readiness to receive data connection buildup and acknowledge once it has done so Relia bility and data integrity are enhanced in 3964 R mode by an additional block check character For the TTY interface logic 1 means Current For the RS 232 C V 24 interface logic 1 means V 3 V EWA 4NEB 811 6044 02a 2 7 Technical Description CP 523 RS 232 C
168. ollowing tables list the status information returned by the CP 523 in all three cases Table 7 26 CP 523 Status Information for A000 Permission to send and receive CPU can neither send nor receive 00 CPU can send Olh CPU can receive 80 CPU can send and receive 814 Coordination byte send CBS Table 7 30 orpo 7 52 EWA 4NEB 811 6044 02a CP 523 Communications Mode Table 7 27 Status Information for Send Request A001 oust Send request accepted Olh Send request rejected 00 Not significant Number of message blocks in Send message frame 00 to 20 Number of message frames in Receive mailbox 00 to 64 Table 7 28 Status Information for Receive Request A080 e Status byte 1 Coordination byte receive CBR Table 7 31 ma E ae 3 Message frame length in bytes 0000 to 0100 relevant SS Number of message blocks in Receive message frames 00 to 20 Number of message frames in Receive mailbox 00 to 64 EWA 4NEB 811 6044 02a 7 53 Communications Mode CP 523 All information presented in the next three tables 7 29 7 30 7 31 is relevant in 3964 R mode only Table 7 29 Return Info and Error Flags in the Coordination Byte Send CBS in 3964 R Mode Send buffer free Send buffer not free The information returned in the CBS following submission of a Send request A001 depends on the value in byte 1 If byte 1 contains 00 CBS bit
169. om the length configured in parameter block 7 7 3 The length configured in parameter block 7 refers to message frames received by the CP from a peripheral device Procedure for Send message frames with message frame length specification 1 The CPU transfers the following in the transfer memory e The message frame length in bytes in word 2 The Coordinate data transfer for sending message frames job number into word 0 2 The CPU reads the coordination information from word 0 of the transfer memory If the CP has not accepted the job bit 0 in byte 1 0 no message frame can be sent The CPU can read the number of message blocks to be sent from byte 6 of the transfer memory The number is calculated by the CP using the length specified in the job request If you specify a message frame length of 12 bytes for example the CP stores the value 02 in byte 6 for two message blocks 3 CP transfers message frame in 8 byte message blocks to the transfer memory The CP stores the number of message frames in the Receive mailbox in byte 7 so you can also determine after issuing a Send request whether you can receive a message 7 64 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Sending a message frame with a length of 12 bytes Start address 128 is set on the CP The message frame is stored in data block 20 beginning from DW 0 Flag 100 0 is set if the CP has accepted the job The STL does not describe h
170. ord 0 Word 2 Word 4 Word 6 Coordina Byte 2 CBS Not Bye oye tion oe re No torma ae significant euibtramed tion yte number of for Send message frames End here if CP has not accepted the Send request CPU transfers 1st message block 8 bytes E i Word 0 Word 2 Word 4 Word 6 Data Data Data Data CP reads data from the transfer memory and stores it in the Send mailbox CPU transfers further message block 8 bytes each E Word 0 Word 2 Word 4 Word 6 Data Data Data Data CP reads data from the transfer memory and stores it in the Send mailbox CPU transfers last message block 8 bytes Word 0 Word2 Word4 Word6 Data Data Data Data CP CP reads data from the transfer memory and stores it in the Send maibox transfers message frames autonomously from the Send mailbox to the peri pheral device accepts no Send requests during this time only if Send length 0 bytes relevant only in 3964 R mode Figure 7 9 Contents of the Transfer Memory for Send Message Frame 7 62 EWA 4NEB 811 6044 02a CP 523 Communications Mode Message frame structure A message frame consists of all the data transferred in response to a Send or Receive request In the case of the CP 523 a message frame can be up to 256 bytes long The CPU sends and receives a message frame in message blocks of eight bytes The CP 523 can detect the end of a message frame sent by the CPU in two ways e You specify the message f
171. ow F 100 0 is to be reset You could reset F 100 0 when another job request has been forwarded to the CP NAME SEND2 tA F BEC iL KH T PW KH a PW ele KH EL PW AW LKE BEC S F C DB DW ST PW L DW FT PW L DW ET PW DW T PW iL DW sE PW L DW zr PW 100 0 000C 130 A001 128 0001 128 100 0 128 128 The CP 523 has accepted the job if flag 100 0 is set then Block End Load length 12 bytes into ACCUM 1 and transfer to word 2 of the transfer memory Load Send frame job A001 into ACCUM 1 and transfer to word 0 of the transfer memory Check that Send request has been accepted If no then Block End If yes then set flag 100 0 and send message frame Open DB 20 Transfer DW 3 to word 6 of the transfer memory Transfer DW 2 to word 4 of the transfer memory Transfer DW 1 to word 2 of the transfer memory Transfer DW 0 to word 0 of the transfer memory The CP transfers the contents of the transfer memory to the Send mailbox Transfer DW 5 to word 2 of the transfer memory Transfer DW 4 to word 0 of the transfer memory The CP transfers the contents of words 2 and 0 in the transfer memory to the Send mailbox The CP then sends the message frame from the Send mailbox to the peripheral device EWA 4NEB 811 6044 02a 7 65 Communications Mode CP 523 7 6 2 Sending Message Frames with End of Text Character Specification Specify one or two end of text characters with t
172. present The job request must be repeated F CP in restart routine Message only occurs at startup The clock data is invalid and the module cannot accept any job request Clock defective Replace module 2 x Default time set The clock has been set with the values Sunday 1 1 90 12 00 00 Time of day date At least one setting is outside the permissible range error The clock has not accepted the new clock data and is continuing with the current data ee job request You have issued a request to the CP which is not permissible in Print mode 6 7 fall ba Hardware fault Replace module X Signal state irrelevant for other half byte 6 34 EWA 4NEB 811 6044 02a CP 523 Print Mode Example Scanning the status of the module The module is set to start address 128 An unconfigured memory submodule is plugged into the module When the error is detected output 4 0 is to be set ERROR1 L KH Transfer nonrelevant data to the CP The CP then updates the transfer memory with current data Evaluation of Status of the module byte Compare status byte with 0002 If not equal block End Otherwise set output 4 0 Block End Status of the printer and day byte 1 Byte 1 is divided into two half bytes The status of the printer is specified in bits 4 to 7 of the left the current day is in bits O to 3 of the right half byte The half bytes are independent of each other They can be combined in any way Table 6 16 St
173. pts 001 to 255p Correction value s month 400 to 400 EWA 4NEB 811 6044 02a 7 13 Communications Mode CP 523 Explanation of data transmission parameters Baud rate You have a choice of eight baud rates The default is 600 baud If you are using the RS 232 C V 24 interface you must take the load capacitance of cables longer than 15 m 29 ft into account If you operate the CP 523 with the active TTY interface cable lengths of up to 10 m 330 ft are possible Cable lengths of up to 1000 m 3280 ft can be implemented using the passive TTY interface Longer cables can be used if the baud rate is reduced Parity You have a choice of five types of parity e Even parity The parity bit is set when the number of data bits with a 1 value is odd e Odd parity The parity bit is set when the number of data bits with a 1 value is even Mark The parity bit is always 1 e Space The parity bit is always 0 e No parity check The signal state of the parity bit is not significant Parity is not checked when data is received but is always set to 1 when sending The default is even parity Interface You can choose between the RS 232 C V 24 interface or the TTY interface See 2 3 for the interface characteristics The default is the TTY interface Data format Characters are transmitted between the CP and the peripheral device in a 10 bit or 11 bit charac ter frame You can choose between
174. r If two DLE characters are received in succession only one is entered in the input buffer After each character the CP waits until the character delay ZVZ has elapsed If no character is received during this time the CP sends a NAK to the partner in the link How the CP terminates reception depends on whether it is set for 3964 or 3964R mode 3964 mode If the CP detects a DLE ETX string it terminates reception and sends DLE if the message frame was received without error or NAK if it was not to the link partner 3964R mode The CP terminated reception when it receives DLE ETX BCC The CP then compares the block check character with the longitudinal parity it has generated internally If the BCC is correct and no other receive error occured the CP transmits DLE If the BCC is in correct the CP sends NAK and waits for a retry If the frame cannot be received without error after a total of six attempts or if the link partner does not initiate a retry with the block frame delay time of 4 s the CP aborts reception Default value Other values can be initialized in parameter block 7 7 4 EWA 4NEB 811 6044 02a CP 523 Communications Mode If transmission errors occur during reception characters are lost framing error parity error the CP continues receiving until the connection is cleared down transmits NAK to the link partner and waits for a retry as described above Example of error free data interchange CP 523
175. r RECEIVE FB 201 0 0 00 ccc eee eee 8 21 8 4 Overview of the Flags Used by RECEIVE FB 201 0 000005 8 28 8 5 Execution Times for FB 200 and 201 in ms EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks 8 Using the SEND and RECEIVE Function Blocks The SEND and RECEIVE function blocks FB 200 and FB 201 offer you a user friendly interface which considerably simplifies use of Send message frame to peripheral device job A001 and Receive message frame from peripheral device A080 You can initiate the transfer of a message frame immediately by calling FB 200 or FB 201 instead of having to program the send or receive program yourself To transfer messages frames you need only assign the relevant FB parameters The next two sections 8 1 and 8 1 1 describe FB parameter setting Transfer of a message frame is initiated by calling FB 200 or FB 201 The FBs have a status byte containing information on the CP the peripheral device and data transfer These FBs can execute on CPU 941 to CPU 944 They can also execute in the 135U 150U and 155U if network 3 is omitted or reprogrammed for other PLCs Normally network 3 can be itted wh fficient ded in th d destination DB 8 1 Using SEND FB 200 SEND FB 200 transfers a message frame of fixed or variable length from the CPU to the peri pheral device You must store the message frame to be transferre
176. r FFy no XON XOFF 01 7Fy protocol 6 5 Print Mode CP 523 Baud rate You have a choice of eight baud rates The default is 600 baud If you use the RS 232 C V 24 interface you must take the load capacitance of cables longer than 15 m into account If you operate the CP 523 with an active TTY interface a cable length of up to 10 m 33 ft is possible With a passive TTY interface cable lengths of up to 1000 m 3280 ft are possible Longer cables can be implemented in general in conjunction with reduced baud rates Parity You have a choice of five types of parity e Even parity The parity bit is set when the number of data bits with a value of 1 is uneven e Odd parity The parity bit is set when there is an even number of data bits with a value of 1 e Mark The parity bit is always 1 e Space The parity bit is always 0 e No parity check The signal state of the parity bit is not significant Parity is not checked when receiving however the parity bit is always set to 1 when sending Even parity is the default BUSY signal The BUSY signal is only relevant if you operate the module in Print mode without XON XOFF protocol The waiting times for CR LF and FF are not significant when evaluating the BUSY signal Interface You can choose between the RS 232 C V 24 and TTY interfaces here See 2 3 for the characteris tics of the interfaces The TTY interface is the default Data format Charac
177. r with the programmer Table 4 1 Module E F Clock defective Replace module Hardware fault Replace module No battery backup Insert new battery in the power supply module CP in restart routine Scan the status byte for XF before issuing the first job request X can assume different values EWA 4NEB 811 6044 02a 4 1 Notes on Operation CP 523 During the restart procedure the CP signals Module busy XFy in the status byte The CP cannot accept any jobs during this time For this reason you must scan the module s status byte byte 0 for the XFy before issuing the first job request JU FB99 Wait loop until the CP 523 has completed the restart routine F JC M001 BE e restart organization block OB 22 is only processed if the CPU is in switch from POWER OFF to POWER ON Variations in the restart behaviour of the CP 523 or its communications partner can lead to the loss of data during the restart phase UN mode before you 4 1 2 Memory Submodule Evaluation The serial interface parameters and message texts specified on the module are checked in this routine Errors are assigned an appropriate number in byte 0 Module status and can be evalu ated in the control program Table 4 2 Memory Submodule Faults Memory submodule PLC POWER OFF plug in functional defective memory submodule PLC POWER ON No message texts Configure message texts 6 4 configured Wrong or defective memory submo
178. rame size in bytes with the Send message frame request e You specify one or two end of text characters with the Send message frame request You must specify 0 bytes as the Send message frame size The end of text characters must be identical to those defined when setting the CP 523 parameters 7 3 Transferring a message frame After the CP 523 has accepted a Send request the CPU transfers the message frame to the transfer memory in message blocks of eight bytes After the CPU has written word 0 the CP accepts the data from the transfer memory and stores it in the Send mailbox This means you transfer words 2 4 and 6 to the transfer memory first and then word 0 Example Transferring a message frame with a length of 12 bytes Start address 128 is set on the CP 523 The message frame is stored in data block 20 beginning from DW 0 DB 20 on the CPU Send mailbox of the CP Transfer memory of the CP A53Dy Message 128 A53Dy Message BREE block 1 block 1 34E1y 130 34E1 gt gt 2 9002 87654 Message Message 6ED4 block 2 block 2 j Figure 7 10 Forwarding Data with Send Message Frame EWA 4NEB 811 6044 02a 7 63 Communications Mode CP 523 7 6 1 Sending Message Frames with the Message Frame Length Specification You specify the message frame length in bytes with the Send request in word 2 The length of the message frame sent by the CPU can vary fr
179. rameter block 7 The data received up until this point is transferred as message frame to the CPU This is advantageous when you want to receive message frames of varied lengths although a fixed message frame size has been specified This works when an I O device sends variable length data message frames without specific end of text characters and when the message frames arrive at long intervals manual entry Parity error 5A The parity of received characters does not agree with the parity configured in parameter block 0 The message frame is not transferred to the CPU and is not stored in the Receive mailbox Receive after XOFF or receive after DTR OFF 5By In the case of XON XOFF protocol The CP 523 sends XOFF to the peripheral device if e less than 20 bytes are free in the Receive mailbox e the CP has received 99 message frames The CP 523 sends XON again only when more than 256 bytes are free in the Receive mailbox When using MODEM control signals The CP 523 sends DTR OFF to the peripheral device if e less than 20 bytes are free in the Receive mailbox e the CP has received 99 message frames The CP 523 sends DTR ON again only when more than 256 bytes are free in the Receive mailbox Error XB is flagged if the peripheral device has sent more characters than the CP can accommodate in the Receive mailbox The message frame is not transferred to the CPU and not stored in the Receive mailbox 7 48 EWA 4NEB 811 6044 02
180. rder to improve the readability of the manual a menu style breakdown has been used i e e The individual chapters can be quickly located by means of a thumb register e There is an overview containing the headings of the individual chapters at the beginning of the manual e Each chapter is preceded by a breakdown of its subject matter The individual chapters are subdivided into sections and subsections Boldface type is used for further subdivisions e Pages figures and tables are numbered separately in each chapter The page following the chapter breakdown contains a list of the figures and tables appearing in that particular chapter Certain conventions were observed when writing the manual These are explained below Anumber of abbreviations have been used Example Central processing unit CPU e Footnotes are identified by superscripts consisting of a small digit e g or The actual footnote is generally at the bottom left of the page or below the relevant table or figure e Cross references are shown as follows 7 3 2 refers to subsection 7 3 2 No references are made to individual pages e All dimensions in drawings etc are given in millimetres inches mm in e Information of particular importance is framed in e All program examples have been generated in statement list form and always refer to the same slot e All data in connection with the programmer refers to the German version of the PG 685
181. re to be transferred with or without a block check character The block check character BBC increases transmission reliability A distinction is made between 3964R and 3964 mode depending on whether you want to transfer data with or without a block check character With block check character 3964R Without block check character 3964 The CP 523 handles data transfer with the peripheral device autonomously The CPU initiates data exchange between the CPU and the CP by sending a job request See 7 6 and 7 7 for a detailed description of the data exchange procedure See Chapter 8 for a description of function blocks which allow user friendly handling and control of data exchange The time of day can be read from the integral clock by the CPU in Communications mode and used in the application program for date dependent and time dependent tasks Message text printout and editing as in Print mode is not possible in Communications mode For this reason no memory submodule is required in Communications mode EWA 4NEB 811 6044 02a 7 1 Communications Mode CP 523 7 1 1 3964 and 3964R Protocols relevant in 3964 R mode only Protocol data The 3964 and 3964R protocols control the flow of data between your programmable controller and the partner in the communications link The data to be transmitted must be entered in the CP 523 s output buffer and is then forwarded to the partner in the link together with the 3964 or 3964R protocol The
182. rned when these same job requests are issued This info is discussed at the end of this section Table 7 24 Coordination Information after Coordinate Data Transfer Permission to send and receive CPU can neither send nor receive CPU can send CPU can receive CPU can send and receive Message length in bytes 0000 to 0100 Number of message frames 00 to 20 calculated by the CP after a send request with fixed message length Number of message frames in Receive mailbox 00 to 64 The CP can buffer up to 100 message frames in the Receive mailbox The sum of the length of these messages may not exceed 1024 bytes When a message has been entered in the Receive mailbox bit 7 of byte 1 is 0 Only after Receive message A080 in the case of an illegal Send request FFOO Status byte byte 0 In the status byte bits 4 to 7 always have the value 5 following a Coordinate data transfer request Bits 0 to 3 contain error flags EWA 4NEB 811 6044 02a 7 47 Communications Mode CP 523 Table 7 25 Status Byte Byte 0 in Communications Mode after Coordinate Data Transfer Character delay time exceeded Parity error B Receive after XOFF or after DTR 0 Frame exceeds 256 bytes oD Continuous break in line to I O device Receive mailbox overflow Signal state irrelevant for the other half byte Character delay time exceeded 594 The interval between two characters exceeds the value set in pa
183. rrors have occurred bit 3 1 If bit 3 is set bits 4 to 7 contain the error code 0 0 1 1 SEND FB 1 Receive data Parameter error oe pe o receive data PECENE TB 0 1 0 0 available Parameter error ae Target DB too 1 Permission to send small for 0 1 0 1 0 No permission to send Receive data s i 1 Bits 4 to 7 contain error Error flagged in code the CBS 0 No errors Figure 8 1 Structure of the STAT Status Byte 8 4 EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks 8 1 4 Schematic of the Principle of Operation of SEND FB 200 This section is intended merely to explain the method of operation of SEND FB 200 You do not require this information to use the SEND FB 200 FB 200 services the Send request according to the following schematic Read status of the CP 523 Segment 2 Send mailbox occupied No Check the SEND FB parameters Segment 3 Parameter error No Calculate the number of Send frames Segment 4 Establish SEND connection to the CP 523 Segment 5 Read job acknowledgement from CP 523 Segment 6 Acknowledge ment with error No Flag error in status byte Transfer send data to CP 523 Segment 7 END Figure 8 2 Schematic for Send Frame FB 200 EWA 4NEB 811 6044 02a 8 5 Using the SEND and Receive Function Blocks 8 1 5 Flowchart of SEND FB 200 SEGMENT 2 8 6 Note
184. s 4 1 The status byte can be scanned approx 30 ms after issuing the job request to check on whether correct parameter values were forwarded X4 is returned to indicate false values 7 4 1 EWA 4NEB 811 6044 02a 7 33 Communications Mode CP 523 Transferring parameter setting data for parameter block 2 Table 7 16 Transfer Memory Assignments for Transfer Parameter Setting Data for Parameter Block 2 Job number Transfer parameter setting data 1 Bits 4 to 7 Parameter block number 20 Bits 0 to 3 Relevant for parameter blocks 7 and 9 only XON character 01 to 7E FFFF No XON XOFF E XOFF character 01 to 7E protocol CD a 7 34 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Transferring parameter setting data for parameter block 2 JU FB NAME BLOCK2 Load ASCII codes for XON and XOFF SYNC L KH character into ACCUM 1 transfer to CP JU FB PW in bytes 2 and 3 BLOCK2 KH Load ACCUM 1 with job number and BE PW parameter block number and transfer to CP in bytes 0 and 1 5 2 FB 99 waits until the CP 523 can accept job requests 4 1 The status byte can be scanned approx 30 ms after the request was issued to check whether correct parameter values were forwarded X4 is returned to indicate false values 7 4 1 EWA 4NEB 811 6044 02a 7 35 Communications Mode CP 523 Transferring parameter setting data for parameter block 7 Table 7 17 Transf
185. s not describe how F100 3 is reset F 100 3 could be reset when another job request is forwarded to the CP NAME SEND1 If flag 100 3 is set the CP 523 has accepted the job request then Block End Load message frame length 4 bytes into ACCUM 1 and transfer to word 2 of the transfer memory Load Send message frame A001 into ACCUM 1 and transfer to word 0 of the transfer memory Check whether the send request has been accepted If no conditional Block End If yes set flag 100 3 and Send message frame Open DB 20 Transfer DW 1 to word 2 of the transfer memory Transfer DW 0 to word 0 of the transfer memory Block End The program can only run if DB 20 has been generated on the CPU You should create DB 20 as follows since it is also accessed in the following examples DWO KH A53D DW1 KH 34E1 DW2 KH 9002 DW3 KH 8765 DW4 KH 6ED4 DW5 KH 0D0D DW6 KH 0000 7 50 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Reading coordination information after Receive message frame Start address 128 is set on the CP 523 If the CP has received message frames from the peripheral device these are to be transferred to the CPU The message frames transferred from the peripheral device have a fixed length of four bytes The message frame is to be stored on the CPU in DB 21 beginning DW 0 RECEIVEL L KH A080 Load Receive message frame into ACCUM 1 and transfer T 128 to word 0 of the trans
186. s to be transferred FW 240 B AN S Number of send frames register BADR REG Module address register DO FW register for CP access QAMF register auxiliary register data word block pn ae SORES pointer for Q DW IND Dw Q data word index register DO FW register for FIN 2248 ORIN fetching data words from the Q DB EW B REST R Frame remainder register number of data words in the last message block BYTE1IND Byte 1 index register CP byte address register for data transfer between CPU and CP DOFW register Byte 2 index register CP byte address register for By lEeNe data transfer between CPU and CP DO FW register HILFSREG Auxiliary flag word for calculating Q DB lengths 8 10 EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks Segment 1 NAME SEND DES BADR D B T C DES Q DB D B T C DES QANF D B T C DES QLAE D B T C DES ENDZ D B T C DES STAT D B T C DES KBS D B T C DES RKPL D B T C 001 KM KH KY KC KF KT KZ KG KM KH KY KC KEF KT KZ KG BI BY W D BY KM KH KY KC KF KT K2Z KG BI BY W D BY BI BY W D BY BI BY W D BI H O OH ow Segment2 001E 001F For CPUs 0020 941 0021 942 0022 943 0023 0024 0025 Save RLO 0026 0027 Load CP 523 module address 0028 and store 0029 002A Write KOOR ID 002B Read status 002D to CP 523 word 0 002E 002F 0030 0031 0032 0034 0035 0036 z 0037 Fetch acknowle
187. smit the message frame the CP aborts the procedure enters an error flag in the CBS and transmits NAK to the partner in the data link If the partner in the link sends a NAK character during an in progress transmission the CP aborts the message frame and attempts a retry as described above If the partner transmits another character the CP waits until the character delay time ZVZ has expired and then sends NAK to bring the partner to the idle state before once again transmitting STX Example of error free transmission CP 523 Partner in the link Communications mode 3964 R STX lt DLE 1st character __ SE eee Ee el nth character 27 gt DLE _ gt ETX A gt BCC 1 ___________ lt DLE 1 Only in 3964R mode Figure 7 2 Error Free Data Interchange Send Default value in 3964 R mode 220 ms Value can be initialized in parameter block 7 Default value Other values can be initialized in parameter block 7 EWA 4NEB 811 6044 02a 7 3 Communications Mode CP 523 Receiving When no Send request is pending in 3964 R mode the CP waits for the link partner to establish a connection If the CP receives a character other than STX while in the idle state it waits until the character delay time has expired ZVZ and then sends NAK If the CP receives an STX from the partner and the input buffer is not full it replies with DLE Incoming characters are now entered in the input buffe
188. t T S Message text end of text character 8 This is the daily Message text number 8 separator listing for D Message text spaceholder for date end of text character 9 The entire plant Message text number 9 separator in Shop 3 was switched off Message text with spaceholder for date and time of day Message text end of text character EWA 4NEB 811 6044 02a 6 19 Print Mode CP 523 6 4 4 Spaceholders for Control Parameters You can configure printer control parameters in three ways in the message text e Entry with the character CTRL key e Entry with the spaceholder Sa b e Direct entry with data format KH Entry with the 4 character If the module encounters the character when evaluating the message texts it automatically subtracts 40y from the next character Example Selecting double width type on the PT 88 Double width type is selected on the PT 88 printer with the ESC 8 command The ESC control character has the ASCII code 1By Find the ASCII character with the code 1B 40 5B in the ASCII code table It is the character Entry in message text 8 Explanation The module detects the character 40 is subtracted from the ASCII code of the next character 5B 5Buy 40y 1By 1B is the ASCII code for the control character ESC The module instructs the printer to execute the ESC 8 job i e select double width type Example Configuring a m
189. t 2 No Data available Yes Check the RECEIVE FB parameters Segment 3 Parameter error No Establish RECEIVE connection to the CP 523 Segment 4 Read job acknowledgement from CP 523 Segment 5 Acknow ledgement with error Yes No Fetch Receive data from CP 523 Segment 6 Flag error in status byte Store number of DWs received Segment 6 END Figure 8 4 Schematic for Receive Frame FB 201 EWA 4NEB 811 6044 02a 8 23 Using the SEND and RECEIVE Function Blocks 8 2 4 Flowchart of RECEIVE FB 201 8 24 Buffer RLO at jump Issue Read STATUS request to CP 523 Display CP 523 STATUS Display CBR relevant only in 3964 R mode RLO 0 or SEND executing CP 523 Evaluate RLO and read status EWA 4NEB 811 6044 02a CP 523 Segment 3 r Using the SEND and RECEIVE Function Blocks Z DB available No Q DB length gt QANF QLAE Output error message EWA 4NEB 811 6044 02a 8 25 Using the SEND and RECEIVE Function Blocks CP 523 Segment 4 Establish RECEIVE connection to CP 523 ee Oe ie en ee en ee ee ee ee ee ee ee a ee ee oe oe a i a e dig a ea a E a 2 l l l l l l l l Le e e e e e e e e o o o e o o e e e o e o o i o l Segment 5 Evaluate job acknowledgement from CP 523 Dee ay AEN ae a e e e A Ges Py ne ge N eS Pe q1 l l l l l l l l l l l l l l l Acknow
190. t mode no flagging in CBS 1 For 3964 R mode flagging in CBS Please note that FB 200 uses scratch flags 8 2 EWA 4NEB 811 6044 02a CP 523 Using the SEND and Receive Function Blocks 8 1 2 Setting SEND FB 200 Parameters If you want to send a message frame of specific size specify the length of the message frame to be sent in words in the QLAE parameter The ENDZ parameter is not significant here In 3964 R mode the message frame size must be specified If you want to send a message frame with end of text characters variable length specify Zero in the QLAE parameter and two end of text characters in the ENDZ parameter Both end of text characters must be in the same data word Example End of text character OD 0D valid DW n KH 44 44 invalid DW n KH 44 0D DW n 1 KH ODOD DW n 1 KH 0D 00 Table 8 2 Setting the ENDZ and QLAE Parameters Message frame of specific length Message frame of specific length NOT PERMISSIBLE Message frame with end of text characters EWA 4NEB 811 6044 02a 8 3 Using the SEND and Receive Function Blocks CP 523 8 1 3 Structure of the Status Byte The status bytes of SEND FB 200 and RECEIVE FB 201 are identical The status byte gives information on whether e Receive data is available bit 0 1 e The Send mailbox is empty bit 1 1 If the Send mailbox is occupied the Send job initiated by calling SEND FB 200 can not be executed e E
191. termining the correction value You have observed that the clock loses 12 s in 4 days This would amount to 90 s in 30 days The correction value is then 090 s month Block separator Parameter block number 9 Correction value 090 EWA 4NEB 811 6044 02a 6 13 Print Mode CP 523 6 3 6 Example for Configuring the CP 523 in Print Mode Start address 128 is set on the CP 523 Configure the CP as follows e Parameters forthe serial interface wk ke eee parameter block 0 2400 baud Even parity No BUSY signal RS 232 C V 24 interface 7 data bits 11 bit frame Handshake OFF e Parameters for waiting times we eee parameter block 1 Not significant since XON XOFF protocol is to be used e XON XOFF protocol _ ct eee parameter block 2 XON character DC 1 114 XOFF character DC 3 13 e Configuration data for entering message texts ee eee parameter block 3 No change with respect to default values e Configuration data for message text printout Time of day and date unchanged with respect to default values tte eee parameter block 4 Page format 64 lines page 05 parameter block 5 10 characters left margin Page number at bottom Header Test mode es eee eee eee parameter block 6 Footer Laboratory KS Parameters for the serial Parameter block 0 S interface 2400 baud 6 Even parity Op KS 0600100 No BUSY
192. ters are transmitted between the CP and the peripheral device in a 10 bit or 11 bit charac ter frame You can choose between seven and eight data bits within the character frame 10 bit character frame e 1 start bit 7 data bits 2 stop bits data format 3 in parameter block 0 e 1 start bit 7 data bits 1 parity bit 1 stop bit data format 4 in parameter block 0 e 1 start bit 8 data bits 1 stop bit data format 5 in parameter block 0 11 bit character frame e 1 start bit 7 data bits 1 parity bit 2 stop bits data format 0 in parameter block 0 e 1 start bit 8 data bits 1 parity bit 1 stop bit data format 1 in parameter block 0 e 1 start bit 8 data bits 2 stop bits data format 2 in parameter block 0 The default is an 11 bit character frame 1 start bit 7 data bits 1 parity bit 2 stop bits 6 6 EWA 4NEB 811 6044 02a CP 523 Print Mode Parameters for waiting times These parameters are only significant if you are not using an XON XOFF protocol in Print mode and if you are not evaluating the BUSY signal You can set waiting times for Carriage Return CR Line Feed LF and Form Feed FF in multiplex of 0 25 s Parameters for XON XOFF character If you have an XON OFF protocol you have a free choice of XON XOFF characters Code 11 DC1 is reserved in ASCII code for the XON character and code 13 DC3 for the XOFF character You must not use the same values when initializing the XON XOFF characters If the XON XOFF
193. th b This is the same as correcting the variable by a factor of 10 5 e In the case of data format KFa b a comma between thousands is printed out and in the case of KFa b a decimal point Table 6 11 Value Ranges for the Number of Characters to be Printed and Places After the Point K Fa b Format EWA 4NEB 811 6044 02a 6 27 Print Mode CP 523 Errors occurring when setting the KFa b or KFa b format parameters have the following effects e If you specify values outside the value range for a and b the spaceholder is treated as text and printed as configured e If you configure a with a value too small for the variable values to be printed characters will be printed instead of the variable value Table 6 12 Typical KFa b Data Format Printouts 123 45 123 45 123 45 123 45 222 222 27 2 2 27 27 0 00001 0 00008 0 12345 0 12345 0 00045 0 00045 0 0345 2222222 0 00008 0 12345 0 00045 2222222 0 00345 Space KG and KGa b data formats You can print out a 32 bit floating point number in the message text A floating point number requires four bytes of memory In the S5 135U floating point numbers have only a 16 bit mantissa Bits 0 to 7 byte n 3 are always 0 Floating point numbers can be used in the S5 115U if the standard function blocks for floating t arithmet d The value for the floating point number can be transferred as follows e In bytes 2 to 5
194. the permissible range The clock has not accepted the new clock data and is continuing with the current data Illegal job request You have submitted a request to the CP which is not permissible in Print mode 6 7 Se Hardware fault Replace module X Signal state not significant for other half byte EWA 4NEB 811 6044 02a A 5 Summary CP 523 Table A 6 Status of the Printer Date and Time of Day 01 pcp t0 07 gen 11 gcp t0 17B8cp Bits 0 to 3 1 Sunday 2 Monday 3 Tuesday 4 Wednesday 5 Thursday 6 Friday 7 Saturday Bit 4 0 Printer ready Bit 4 1 Printer not ready Olpep t0 31gcp Day Olgep to 12scp Month OOgcn t0 99gco Year O0gep tO 23gcp Olpep to 12 p 81 pcp to 92ecp Hour in 24h clock in 12h clock a m bit 7 0 in 12h clock p m bit 7 1 O0gen t0 59gco Minute O0gcp tO 59gcp Second EWA 4NEB 811 6044 02a CP 523 A 4 Summary Setting Parameters in Communications Mode Setting parameters via the memory submodule Enter the data in DB 1 7 3 1 Setting parameters via the user program block X 7 3 2 Transfer parameter setting data for parameter Table A 7 Assignments of the Parameter Blocks in Communications Mode Parameter Blocks 0 2 and 9 Baud rate BUSY signaal CN BUSY signaal CN Interface Data format 11 bit character frame 10 bit character frame HW handshake XON character XOFF character see Table A 7a 110 baud
195. the spaceholders in the message text e The first spoaceholder in the message text is replaced by the data in bytes 2 and 3 e The second spaceholder in the message text is replaced by the data in bytes 4 and 5 e The third spaceholder in the message text is replaced by the data in bytes 6 and 7 Special rules apply to the use of spaceholders for Insert floating point number 6 4 5 6 18 EWA 4NEB 811 6044 02a CP 523 Print Mode 6 4 3 Spaceholders for Date and Time of Day When printing out a message text the following takes place e The spaceholder D for the date is replaced by the current date e The spaceholder T for the time of day is replaced by the current time The output format of the date and the time of day can be configured You must do this in data block 1 parameter block 4 on the memory submodule 6 3 3 The following is the default output format e For the date lt Day gt lt Month gt lt Year gt e For time of day lt Hour gt lt Minute gt lt Second gt Example Configuring message texts with spaceholder for date and time of day You want to store the following message texts in DB 3 Message text 7 The motor went down at lt time of day gt Message text 8 This is the daily listing for lt date gt Message text 9 The entire plant in Shop 3 was switched off on lt date gt at lt time of day gt 7 The motor went down Message text number 7 separator with spaceholder for time of day Ya
196. tions Mode Setting parameters for INTERPRETIVE MODE in the USER PROGRAM Transferring the parameter setting data for parameter block 0 CP 523 Table 7 15 Transfer Memory Assignment for Transfer Parameter Setting Data for Parameter Block 0 Job number Transfer parameter setting data Bits 4 to 7 Parameter block number Bits 0 to 3 Relevant for parameter blocks 7 and 9 only Baud rate 110 baud 200 baud 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud Data format 11 bit character frame 10 bit character frame 7 32 even odd mark space no parity check 7 data bits 8 data bits 8 data bits 7 data bits 7 data bits 8 data bits EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Transferring parameter setting data for parameter block 0 Start address 128 is set on the CP 523 Set CP parameters as follows Parameters for the serial interface parameter block 0 e 2400 baud 06y e Even parity 00y e No BUSY system 00 e V 24 RS 232C interface Olp e 7 data bits 11 bit character frame 00h e Handshake OFF 00 JU FB 99 SYNC H Handshake OFF JU FB 112 1 7 data bits 11 bit character frame BLOCKO H No BUSY signal BE 1 V 24 RS 232C interface H 2400 baud Even parity Transfer job number for Parameter setting data for parameter block 0 52 FB 99 waits until the CP 523 can accept job request
197. tivated print jobs are completed CPU goes to STOP POWER OFF CPU Battery backup available not available Activated print jobs are not continued Clock data and print jobs are retained Clock data and print jobs are lost 25 pin submin BUSY line available Activated print jobs are completed after the D connector and BUSY signal connection is re established unplugged or configured Perfect print quality is not guaranteed e g smudged cable fault characters otherwise Activated print jobs are not continued after the connection is re established POWER OFF BUSY line available Activated print jobs are completed after the printer and BUSY signal configured otherwise XON XOFF protocol configured not configured connection is re established Perfect print quality is not guaranteed e g smudged characters Activated print jobs are not continued after the connection is re established Activated print jobs are completed after the connection is re established Activated print jobs are not continued after the connection is re established Print jobs 6 5 Characters in the internal printer buffer are lost 4 4 EWA 4NEB 811 6044 02a CP 523 Notes on Operation 4 2 2 Communications Mode Operation may be interrupted for various reasons in Communications mode The following table lists the effects of faults Table 4 5 Faults in Operation Communications Mode CPU goes to Data traf
198. transfer to CP in bytes 4 and 5 Load character delay time 22 10 ms into ACCUM 1 and transfer to CP in bytes 2and3 Load job number 90 parameter and into ACCUM 1 and Load connection buildup attempts 6 and number of Send attempts 6 into ACCUM 1 and transfer to CP in bytes 4 and 5 Load with BCC 01 and low priority 00 into ACCUM 1 and transfer to CP in bytes 2 and 3 Load job number 90 parameter block number 7p and ACCUM 1 and transfer to CP FB 99 waits until the CP 523 can accept job requests 4 1 5 2 The status byte can be scanned approx 30 ms after the job request is issued to check whether correct initialization values were forwarded X4 is returned to indicate errored values 7 4 1 EWA 4NEB 811 6044 02a 7 41 Communications Mode CP 523 Transfer parameter setting data for parameter block 9 Job number Transfer parameter setting data 1 Bits 4 to 7 Parameter block number Bits 0 to 3 Sign for correction value O0 positive 1 negative Correction value s month Opto 400 0000 4to7 Not significant Example Transferring parameter setting data for parameter block 9 You have discovered that the clock loses 12 seconds in 4 days which totals to 90 seconds in 30 days The correction value is thus 90 s month JU FB 99 NAME BLOCK9 SYNC iL Load correction value into ACCUM 1 and JU FB 117 transfer to CP in bytes 2 and 3
199. ve 00 CPUcansend Olh CPU can receive 80 CPU can send and receive 814 2 Coordination byte send CBS Table A 18 3 7 Not significant Table A 16 Status Info for Send Request A0014 Status byte 0 1 Send request accepted Send request rejected 2 Coordination byte send CBS Table A 18 3 5 6 Number of message blocks in message frame 7 Number of message frames in Receive mailbox Table A 17 Status Info for Receive Request A080p Not significant 00 to 20 00 to 64 Status byte 0 1 Coordination byte receive CBR 2 3 Message frame length in bytes 4 5 Not significant 6 7 Table A 19 0000 to 0100 00 to 20 Number of message blocks in the Receive message frame Number of message frames in the Receive mailbox 00 to 64 EWA 4NEB 811 6044 02a A 13 Summary CP 523 Table A 18 Return Info and Error Flags in the Coordination Byte Send CBS in 3964 R Mode The info returned in the CBS following issue of Send request A0004 depends on the value in byte 1 If byte 1 is 00 0 in bit 7 of the CBS means that either a parameter error was detected or that the Send buffer is free but the current Send request cannot be serviced because a Send request was issued following transfer of a message frame which was not preceded by a Check module status request If bit 7 in the CBS is 1 the Send buff
200. when you submit the request Send message frames with the 3964 R protocol 1 The CPU forwards the following in the transfer memory e The message frame length in bytes in word 2 e The job number for Coordinate data transfer for sending message frame in word 0 2 The CPU reads the coordination info out of word 0 of the transfer memory No message frame can be transmitted if the CP rejects the request bit 0 in byte 1 0 Together with the coordination info the following is made available to the CPU e The coordination byte send CBS including error flags in byte 2 e The number of message blocks comprising the frame in byte 6 On the basis of the length specification given in the job request the CP automatically computes the number of message blocks in the frame to be transmitted If for example you specified a message frame length of 12 bytes the CP enters the value 02 in byte 6 i e 2 message blocks 3 The CPU transfers the message frame in 8 byte message blocks to the transfer memory The CP enters the number of message frames in the Receive mailbox in byte 7 thus making it possible for you to ascertain whether you can receive a message frame even after a Send request has been submitted 7 70 EWA 4NEB 811 6044 02a CP 523 Communications Mode Example Sending a 12 byte message frame with 3964 R protocol Base address 128 is set on the CP The message frame is in data block 20 beginning data word DW 0
201. xample Configuring a message text with spaceholders for inserting message text You want to store the following text in DB 9 Message text 90 The following table privides a general overview of lt Insert message text 91 gt lt Insert message text 92 gt and lt Insert message text 93 gt Message text 91 the faults occurring in the press controller with associated downtimes Message text 92 the resulting waiting times to be observed by the next press controller Message text 93 the average press controller downtime in the course of the last twelve months KS 90 The following table Message text 90 with a length of S provides a general 78 characters KS overview of KP91 KS KPIZ T and KP93 KS 91 the faults occurring in Message text 91 with a length of S the press controller 71 characters KS with associated downtim S es KS 92 the resulting waiting Message text 92 with a length of S times to be observed by 72 characters KS the next press controll S er KS 93 the average press Message text 93 with a length of gs i 88 characters KS KS This text is not printed out Final printout The following table provides a general overview of the faults occurring in the press controller with associated downtimes the resulting waiting times to be observed by the next press controller and the average press controller downtime 250
202. zation blocks are used for this purpose 7 3 2 No memory submodule is required for operating the CP 523 In order to transfer the parameter setting data as simply as possible the data is divided into parameter blocks This subdivision is the same as in Print mode Parameter blocks 1 3 4 5 6 and 8 are only significant in Print mode and are not included in the table Table 7 1 Parameter Blocks in Communications Mode ae Serial interface parameters XON XOFF protocol only relevant if XON XOFF protocol is used in Interpretive mode Desired mode Parameter setting data for data transfer in Communications mode Correction value for the integral clock Reader s note Refer to Section 7 3 1 or 7 3 2 depending on whether you want to set your CP 523 parameters via a memory submodule or in the user program Section 7 3 1 Setting the CP 523 parametersvia a memory submodule Section 7 3 2 Setting the CP 523 parametersin the user program EWA 4NEB 811 6044 02a 7 9 Communications Mode CP 523 7 3 1 Setting the CP 523 Parameters with the Memory Submodule You can store the parameter setting data on a memory submodule in data block DB 1 The procedure for setting the memory submodule parameters Communications mode almost identical to the procedure in Print mode The only difference is in configuring parameter block 7 in which additional data must be specified in Communications mode Entering the parameter blocks First

Download Pdf Manuals

image

Related Search

Related Contents

  PR082 取扱説明書  Transcend Information TS-RDS1 User's Manual  取扱説明書  PicoDiagnostics User's Guide  Operating instructions - Basic functions of electronic lock SELO-C  User`s Manual - Safety Guide Read this Safety Guide first.  SCC60MPPT - AIMS Power  エコノライトHGシリーズ取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file