Home

Modicon XMIT Function Block User Guide

image

Contents

1. 80 5 2 3 Master PLC Setup 81 5 2 4 Ladder LoglC xx edo ed 82 5 2 5 Conclusion isis xil ke RE BE AX a RA EGRE ed ES 88 Appendix A Technical References 89 A 1 Modbus Query Response Parameter Limits 90 A2 PINUS lise ted eee redde o ER Ee AEN ME 93 A 2 1 9 RS 232 to 25 pin Modem with noRTS CTS 93 A 2 2 9 pin RS 232 to 25 pin Modem with RTS CTS 94 A 2 3 9 pin to 9 pin 95 A 2 4 9 pin to 9 Modem 96 A 2 5 9 pin to 25 pin Null Modem 97 26 RJ45 8x8 to 25 pin Null Modem 110XCA 20401 98 A 2 7 RJ 45 8x8 A 2 8 RJ 45 8x8 to 9 pin Null Modem 110XCA20301 99 to 25 pin Modem 110XCA20401 100 A 2 9 RJ 45 8x8 to 25 pin Modem 110XCA20401 101 A 2 10 RJ 45 8x8 to RJ 45 8x8 102 A 2 11 9 pin to RJ 45 8x8 Modem 110XCA20301 103 840 USE 113 00 Contents vii viii A 2 12 9 pin to RJ 45 8x8 Modem 110XCA20301 104 CableAdapter Kits 105 4 Configuration using Hayes Compatible Dial Up Modems Only 106 A 4 1 Initialization Message 106
2. 15 16 20 21 Technical References Force Single Register lRegister Force Multiple Coil 800 Coils Force Multiple Register 100 Registers Read General R efer NOT Supported ences Write General Refer NOT Supported ences Read General R efer ences 6x Write General R efer ences 6x Maximum length of the entire message can NOT exceed 256 bytes Maximum length of the entire message can NOT exceed 256 bytes Response 2000 Coils 2000 Inputs 125 Registers 125 Registers 1 Coil 1 Register 800 Coils 100 Registers NOT Supported NOT Supported Response 2000 Coils 2000 Inputs 125 Registers 125 Registers 1 Coil 1 Register 800 Coils 100 Registers Maximum length of the entire message can NOT exceed 256 bytes Maximum length of the entire message can NOT exceed 256 bytes 840 USE 113 00 840 USE 113 00 484 PLC Maximum Parameters Function Code Description Query 512 Coils 512 Inputs 254 Registers 32 Registers Read Coil Status Read Input Status Read Holding Registers Read Input Registers Force Single Coil 1 Coil Force Single Register 1 Register 800 Coils 60 Registers NOT Supported Force Multiple Coil Force Multiple Register Read General R efer ences Write General R efer ences NOT Supported 184 384 PLC Maximum Parameters Function Code Force Single Register 1 Register Force Multiple Coil 800 Coils Force Multiple Register 100 Regist
3. XMIT Function Block User Guide 840 USE 113 00 Version 3 0 GROUPE SCHNEIDER E Modicon W Square D Telemecanique Modicon XMIT Function Block User Guide 840 USE 113 00 Ver 3 0 August 1998 GROUPE SCHNEIDER m Modicon m Square D W Telemecanique Schneider Automation Inc One High Street North Andover MA 01845 840 05 113 00 Preface The data and illustrations found in this book are not binding We reserve theright to modify our products in line with our policy of continuous product development The information in this document is subject to change without notice and should not be construed as a commitment by Schneider Automation Inc Schneider Automation assumes no responsibility for any errors that may appear in this document If you have any suggestions for improvements or amendments or have found errors in this publication please notify us by using the form on the last page of this publication No part of this document may be reproduced in any form or by any means electronic or mechanical including photocopying without express written permission of the Publisher Schneider Automation Inc Caution All pertinent state regional and local safety regulations must be observed when installing and using this product For reasons of safety and to assure compliance with documented system data repairs to components should be performed only by the manufacturer MODSOFT 9 is a registered trademark o
4. Destination b byte 8b Source conta Destination b advanced to 400104 low ins ock at 400301 high byte 66 XMIT Conversion Block Initia Convers character count is with lower to upper selected Desti Final Desti byte nation block is loaded with character countis reduced to nation block advanced to 400305 high ion control has case sensitivity off Data you enter ABCDEF 0x0006 BADCFE 0x0000 ABcdeF GH 0x0006 ABcdeF 0x0000 abCdeF 12 0x0008 ABCDEF12 0x0000 840 USE 113 00 4 3 3 1 Description of Opcode 7 Example Opcode 7 uses a source register block of 16bit integers and a destination register block of 16bit integers Each source word from the source register block is read bytes swapped and then written into the destination register block Theinitial ASCII string character count register 4x 7 specifies the number of registers to be converted must be an even number between 2 1024 4 3 3 2 Description of Opcode 8a and 8b Example Opcode 8 copies the ASCII string in the source register block into the destination register block Theinitial ASCII string character count 4x 7 specifics the number of characters to be copied When case sensitivity in the data conversion control register 4x 3 Bit 8 is off then the selected lower to upper case or upper to lower case conversion 3 Bit 7 is performed on the destination
5. 2d 9 Pin Connec TXD RXD RTS CTS DSR DTR GND Technical References Front Vi tor Adapter 9 Connector Pinouts tiv 9 Pin Connector 2 TXD 3 RXD 7 RTS 8 CTS 4 DSR 6 DTR 5 GND 840 USE 113 00 840 USE 113 00 A 2 5 9 to 25 pin Null Modem 9 pin Male Adapter Pin 9 Pin 1 25 pin Male Adapter Connector Pinouts Pin 1 ne Front View 9 Pin Connector RXD 2 4 TXD 3 4 RTS 7 4 5 8 4 DSR 4 4 DTR 6 lt GND 5 4 25 Front View 25 Pin D shell 2 TXD 3 RXD m gt 4 RTS 5 CTS 6 DSR 20 DTR 7 GND Technical References 97 A 2 6 RJ45 8x8 to 25 pin Null Modem 110XCA20401 25 pin Male Adapter QOH Pin 25 RJ 45 connector Rd 8x8 Pin1 1000000 2 Pin1 Front View Connector Pinouts RJ 45 Connector 25 Pin D shell RXD 4 2 TXD 3 3 RXD RTS 6 6 pm 4 RTS CTS 7 4 5 CIS GND 5 4 7 GND DSR 2 6 DSR 20 DTR Chassis 8 1 Chassis Ground 4 Ground Caution Pin1 of the RJ 45 receives 5V from the PLC 840 USE 11300 98 Technical References 840 USE 113 00 A 2 7 RJ 45 8x8 to 9 pin Null Modem 110XC
6. 4 DTR gt gt Chassis 8 Case of the Ground 4 Connector Caution Pin1 of the RJ 45 receives 5V from the PLC 840 USE 11300 104 Technical References Cable Adapter Kits You may want to purchase Cable Adapter Kits for your RJ 45 8x8 requirements rather than make them The table below provides a list of available kits Cable Adapter Kits Modicon PartNumber 110XCA20401 110XCA20301 110XCA20302 110XCA20402 Description Technical References 105 4 Configuration using Hayes Compatible Dial Up Modems Only There are three commands that you need to become familiar with when interfacing dial up modems to XMIT These commands are nitialize modem Dial modem angup modem Before an ASCII message or a Modbus message goes through the modem you must first send an initialization string and then a dial string to the modem Oncethe modem has dialed the telephone number and made a connection to the remote modem may send an unlimited number of ASCII messages or Modbus messages through the modem To send multiple messages you increment the message pointer to the next message after each successful XMIT operation When all messages are sent you may then send the hangup string to the modem A 4 1 Initialization Message The initialization message is just like any other ASCII message and may be a maximum of 512 characters long although 50 characters is usually more th
7. 840 USE 11300 108 Technical References 840 USE 113 00 4 Expert Because it takes so long for a local modem to make a connection to a remote modem the timeout value in register 4x 11 should be as very long when sending a dial message to a modem For example set the timeout for 30 000 mS when sending a dial message When the timeout value is too short XMIT issues a message timeout You may have to try several settings before finding the optimal time Hangup Message The hangup message is used to hangup the modem Only AT commands related to hanging up the modem should be used in this message An example of a typical hangup message is shown below For example hangup modem message Message AT HO lt CR gt lt LF gt Length 2 characters Characters within parentheses are automatically sent When the hangup message is sent to a modem that is already connected to a remote modem XMIT must first set the local modem in command mode XMIT does this by sending a escape sequence to the modem assumes that sets the modem in command mode Some modem manufactures let the owner changethis default escape sequence For XMIT to function properly the modem should be set to accept the escape sequence To have XMIT send a hangup message to the modem bit 7 and bit 14 of the command word must be ON When bit 14 is ON bits 16 and 15 must not be ON or XMIT will not complete the operation successfully
8. 4 2 8 Source Register 4 5 Enter the 4x register desired This is the first register in the source block that is read Ensure you select where you want the read to begin high or low byte The selection beside this register in the DX zoom screen is the same as bit 15 in 4x 3 Destination Register 4x 6 Enter the 4x register desired This is the first register in the destination block that is saved Ensure you select where you want the saveto begin high or low byte The selection beside this register in the DX zoom is the same as bit 16 in 4x 3 ASCII String Character Count 4x 7 Enter the search area This register defines the search area When either automatic advance source Bit 13 or automatic advance destination Bit 14 are ON and no ASCII character is detected the block automatically adjusts the character count XMIT Conversion Block 61 4 3 XMIT Conversion Opcode Examples This section provides you with examples using all eleven conversion options opcodes 1 11 Individual examples come with complete settings and data information along with a descriptions 4 3 1 ASCII Input Related Conversion Examples Opcodes 1 3 convert ASCII input data into binary data The ASCII input data is received via the PLC port and XMIT communication block The ASCII data is then converted into binary data At this point the converted binary data is ready to be used by the PLC based upon your application needs
9. 137 No Ascii Number Present 138 Illegal Configuration Data bits Data rate Parity or Stop bits 139 Numerical Overflow Detected 140 String Mismatch Error 141 String Not Found Error 142 Invalid Error Check Detected 143 Invalid Conversion Opcode END XMIT CONVERSION COMMUNICATION Figure 19 Conversion Zoom Screen 3 of 3 20 Introduction 840 USE 113 00 840 USE 113 00 1 5 Customer Service Schneider Automation telephone numbers are as follows V To call us from anywhere in North America except from within the state of Massachusetts 1 800 468 5342 V To call us from within Massachusetts or from outside North Ameri Ca 1 978 975 5001 V To fax us 1 978 975 9301 Customer Service When calling the Schneider Automation telephone number ask for service from the list below When calling the 800 number you will get a recording asking you to enter a one digit code for the type of service you want listed below However this only works with a touch tone phone If using a dial phone hang on and the operator will intercept after a short pause The service categories and extra digit code responses for push button phones are 1 Technical support 2 Service order administration 3 Modfax 4 Training course registration inquiries 5 General information other than above Note MODFAX For available hardware data sheets application notes and software information Recommended catalogue MC FAX DIR which is
10. 2 00 executive or higher Introduction 3 Communication media For example dialup type modem lease line modems Refer to the list of tested modems and printers in the Modicon 309 COM 455 00 XMIT Loadable Read Me F irst GI XMIT RMF 4 Introduction 840 USE 113 00 840 USE 113 00 1 1 3 Reference Documents V Modi con Modbus Protocol Reference Guide PI MBUS 300 984 A120 Compact Programmable Controllers User Guide 890 USE 108 00 Modicon TSX Quantum Automation Series Hardware Reference Guide 840 USE 100 00 Modicon TSX Momentum M 1 Processor Adapter and Option Adapt User Manual 870 USE 101 00 Modicon 512 612 Micro PLC Hardware User Manual 890 USE 145 00 Modicon Micro Controllers Ladder Logic Manual 890 USE 146 00 Modi con Modsoft Programmer Software User Guide 890 USE 115 00 Modicon Ladder Logic Block Library User Guide 840 USE 101 00 Modicon 309 COM 455 XMIT Loadable Read MeFirst GI XMIT RMF Introduction 5 1 2 Loadable Functions ThePLC has within its configuration data tables the ability to have Loadable F unction Blocks added to the controller These Loadable Functions are application specific programmable blocks that are loaded and allow you to set the opcode through M odsoft panel software and then configure them into the larger control program The executable software code is programmed into the application in the format of a standard three node ladder
11. Description XMIT Revision Number Fault Status Available to User Data Rate Data Bits Parity Stop Bits Available to User Command Word Pointer to Message Table Length of Message Response timeout mS Retry Limit Start of Transmission Delay mS End of Transmission Delay mS Current retry Register 40001 40002 40003 40004 40005 40006 40007 40008 40009 40010 40011 40012 40013 40014 40015 40016 Value 201 or current revision 0 0 May be used as pointers for instructions like TBLK 9600 8 0 1 0 May be used as pointers for instructions like TBLK 0000 0010 0000 0010 514 Dec 150 3000 3 0 0 0 Network 4 resets the XMIT instruction when a fault occurs 840 USE 113 00 Application Examples 87 88 5 2 5 Initiate Message Error Occurred in Using XMIT Message Transmission Transmission Transmission in Progress 0035 0018 0017 0037 10001 Error Occurred Reset XMIT inUsing XMIT Fault N J 0037 fox 0034 All Messages Sent Figure 31 Network Reset XMIT Faults In network 4 coil 00037 goes ON and remains ON until a reset is W 0038 Finished Sending Message performed As always based upon your application you should determine how to address faults and reset your application Coil 00038 goes ON when all three messages M odem and M odbus are successfully sent to the s
12. exceeding 16 characters and the XMIT block remains ACTIVE indefinitely Only when the next Xon character is received will the ASCII output resume sending all remaining output packets The following pertains to the input mode Xon Xoff may be used to BLOCK or UNBLOCK sending devices When ASCII Receive FIFO Bit 9 is set the Xon Xoff Control Flow Bit 12 works in the input mode When ASCII Receive FIFO Bit 9 is set and neither of the two ASCII inputs set Simple ASCII Input Bit 6 or Terminated ASCII Input XMIT Communication Block 37 38 2 2 10 Bit 5 the received characters will fill the FIFO which they inserted When the FIFO is morethan three quarter full with characters and additional characters are received the FIFO state variable is set to send XOFF character out the serial port after a delay of up to 16 character times BLOCKING the sender and clearing the FIFO state variable When all ASCII output functions are Bits 8 13 14 15 and 16 OFF and the Xon Xoff Flow Control Bit 12 is ON the delay time defaults to 1 character time In contrast when all ASCII output functions are Bits 8 13 14 15 and 16 ON and the Xon Xoff Flow Control Bit 12 is ON then the ASCII output is broken up into 16 byte packets Thus pending Xoff characters DO NOT haveto wait more than 16 character times before BLOCKING the sender Once the sender has stopped transmission the PLC eventually removes the characters form the F
13. 113 00 Chapter 4 XMIT Conversion Block V XMIT Conversion Block V XMIT Conversion Control Table XMIT Conversion Examples V Other Conversion Types 840 USE 113 00 XMIT Conversion Block 53 4 1 XMIT Conversion Block The purpose of the XMIT conversion block is to take data and convert it into other usable forms based upon your application needs The convert block performs eleven different functions Some functions include ASCII to binary integer to ASCII byte swapping searching ASCII strings and others The block allows internal conversions using 4x source blocks to 4x destination blocks 4 1 1 Characteristics Size Three nodes high PLC Compatibility V Quantum PLCs 140 CPU 113 02 140 CPU 213 04 140 CPU 113 03 with 2 12 executive or higher 140 CPU 424 02 with 2 10 executive or higher and 140 CPU 434 12 140 CPU 534 14 with 1 01 executive or higher V Compact PLCs PC E984 241 PC E984 245 PC E984 251 and PC E984 255 with 1 02 executive or higher V Micro PLCs 110 CPU 612 04 with 1 00 executive or higher V Momentum PLCs 171 CCS 700 00 171 CCS 700 10 171 CCS 760 00 171 CCS 780 00 171 CCC 760 10 and 171 CCC 780 10 with 2 00 executive or higher 4 1 2 Representation Block Structure Start XMIT operation Not Used Not Used Operation terminated unsuccessfully Not Used Operation successful 54 XMIT Conversion Block 840 USE 113 00 840 USE 113 00 Inputs XMIT has one possib
14. 171 CCS 760 00 171 CCS 780 00 171 CCC 760 10 and 171 CCC 780 10 with 2 00 executive or higher 3 1 2 Representation Block Structure Start XMIT operation Not Used Not Used Operation terminated unsuccessfully Not Used Operation successful Inputs XMIT has one possible control input The input to the top node begins an XMIT operation and it should remain ON until the operation has 48 Port Status Block 840 USE 11300 840 USE 113 00 completed successfully or an error has occurred The input to the middle node is not used on the XMIT port status block Note Toreset an XMIT fault and dear the fault register the top input must go OFF for at least one PLC scan Outputs XMIT may produce two possible outputs The output from the top node is not used on the XMIT port status block The output from the middle node goes ON when XMIT has detected an error or was issued an abort The output from the bottom node goes ON when an XMIT operation has been successfully completed Top Node Content The top node must contain one of the following constants either 0001 to select PLC port 1 or 0002 to select PLC port 2 Theloadable version does accept 4x registers in the top node whereas the builtin does NOT Middle Node Content The 4x register entered in the middle node is the first a group of seven 7 contiguous holding registers that comprise the port status display block as shown below XMIT Port Status
15. 2 9 2 for more details Set to 1 when you want to send ASCII messages out of the PLC XMIT sends ASCII strings up to 1024 charac ters in length You program each ASCII message into contiguous 4x registers of the PLC Two characters allowed per register Only use Bit 7 OR Bit 8 do not try to use both Set to 1 when you want to send Modbus messages out of the PLC Modbus messages may be in either RTU or ASCII formats When data bits 8 XMIT uses Modbus RTU format When data bits 7 XMIT uses Modbus ASCII format Only use Bit 7 OR Bit 8 do not try to use both Setto 1 to allow the XMIT block to take control over the selected port 1 or 2 from the PLC The block begins to receive ASCII characters into an empty 512 byte circu lar FIFO Refer to 2 2 9 3 for more details Setto 1 to allow special handling of ASCII back space character BS 8Hex When using either Simple ASCII Input Bit 6 or Terminated ASCII Input Bit5 each back space character is removed from FIFO and may or may NOT be stored into a 4x register destination block Re fer to 2 2 9 4 for more details Setto 1 to allow full duplex hardware flow control using the RTS and CTS handshaking signals for ASCII mas saging The RTS CTS operates in both the input and output modes Refer to 2 2 9 5 for more details XMIT Communication Block Bit 12 Enable Xon Setto 1 to allow full duplex software flow control using Xoff flow control the ASCII Xon character DC1 11 Hex and
16. 4 2 57 4 2 4 Data Conversion Control Bits Ax 3 58 4 2 5 Data Conversion Opcodes 4 4 60 4 2 6 Source Register 4 5 61 4 2 7 Destination Register 4 6 61 4 2 8 ASCII String Character Count Ax 7 61 Contents 840 USE 113 00 4 3 Conversion Opcode 62 4 3 1 ASCII Input Related Conversion Examples 62 4 3 2 ASCII Output Related Conversion Examples 64 4 3 3 ASCII String Related Conversion Examples 65 44 Other Conversion Types 70 4 4 1 Binary to BCD Conversion 70 4 4 2 BCD to Binary Conversion 70 Chapter 5 Application Examples 11 5 1 Multiple Modbus Commands Transmission from PLC to PLC slave 72 5 1 1 Hardware Configuration 72 5 1 2 Master PLC Setup 73 5 1 3 Ladder LOGIC re br or op Rod 74 5 1 4 CONCIUSION 24 6 79 52 Fault Word Transmission to Slave PLC via Dialup Modems 80 5 2 1 Hardware Configuration 80 5 2 2 Modem
17. 40106 Utility Hex Dec Bin Goto F1 MIKE F3 F4 DX Zoom Editor XMIT GET STATUS PORT 0000 4X 1 Fault Status XMIT Fault Codes Continued 119 120 121 122 123 124 125 126 127 128 129 130 131 XMIT Could Not Set PLC UART User Issued an Abort Command Top node of XMIT is not equal to one Undefined Internal state DCE did not Assert CTS Invalid Command Word Combination Command Word Changed While Active Invalid Character Count Quit F7 Lev 8 F8 OFF F9 DEC DEC DEC DEC DEC DEC 04 04 08 08 16 16 09 09 10 10 12 12 11 11 UINT Uu wu ou n goH How Screen 1 of 3 F7 Lev 40101 UINT XMIT Could Not Enable PLC Port Receiver Bottom Node of XMIT is not equal to sixteen Broadcast Mode not Allowed with this Modbus Function Page up down for prev next screen Figure 15 XMIT Port Status Zoom Screen 2 of 3 18 Introduction PAGE 1 OF 3 Quit 8 8 9 Page 2 3 0 Illegal configuration Data bits Data rate Parity or Stop bits Unexpected Response Received from Modbus Slave 840 USE 113 00 Utility Hex Dec Bin Goto Quit 1 4 DX Zoom Editor F7 Lev 8 F8 O0FF XMIT GET STATUS Page 3 3 PORT 0000 4X 1 Fault Status 40101 UINT 0 DEC XMIT Fault Codes Continued 132 Invalid Register Block 133 Ascii Input FIFO Overflow Error 134 Invalid numbe
18. A Application example Radio lease line modem 72 Telephone dial up modem 80 Bit definitions Command word 31 Cable Adapter Kit 110XCA20301 99 103 104 110 20401 98 100 101 Cable Adapter Kits Available Quick Reference 105 Command word Bit definitions 31 Communication control table Valid ranges 25 840 USE 113 00 Conversion control table Valid ranges 55 D Data rate ranges Data rate register 29 Data rate register Data rate ranges 29 DXF DT SYS Installation 7 F Fault codes Fault status register 50 Fault codes XMIT communication Fault status register XMIT communication 27 Fault codes XMIT conversion Fault status register XMIT conversion 57 Fault status register XMIT communication Fault codes XMIT communication 27 Fault status register XMIT conversion Fault codes XMIT conversion 57 Fault status register XMIT port status Fault codes XMIT port status 50 Installation DXFDT SYS file 7 NSUP EXE file 8 XMIT EXE file 9 XMIT ZMM 7 XMIT1968 HLP 8 M M84 PLC parameter limits 92 Modbus function codes lthrough 6 15 16 40 20 and 21 43 8 42 Modem cable pin outs 9 pin RS 232 to 25 pin Modem 93 94 9 pin to 25 pin Null Modem 97 9 pin to 9 pin Modem 96 9 pin to 9 pin Null Modem 95 9 pin to RJ 45 8x8 Modem 110XCA20301 103 104 Index 111 RJ 45 8x8 to 25 pin M odem 110XCA 20401 100 101 RJ 45 8x8 to 25 pin Null Mod
19. Control Table Description Description No Valid Entries XMIT Revision Number Read Only Fault Status Read Only Slave login status 4x 2 Read Only Slave port active status Slave transaction 4x 3 Read Only counter Port state Read Only Input FIFO status bits Read Only Input FIFO length Read Only Warning DO NOT modify the address in the middle node of the XMIT block or delete it from the program while it is active This locks up the port preventing communications Bottom Node Content The bottom node must contain a constant equal to 0007 Thisisthe number of registers used by the XMIT port status instruction XMIT Port Status Block 49 3 2 Port Status Display Table Thefollowingis a detail description of each of the 7 XMIT display table registers 3 2 1 Revision Number 4x Read Only Displays the current revision number of XMIT block This number is automatically loaded by the block and the block over writes any other number entered into this register 3 2 2 Port Status Fault Status 4x 1 Read Only This field displays a fault code generated by the XMIT port status block A complete list is shown in the table below Fault Status 4x 1 Fault Code Fault Description 118 XMIT could not gain access to PLC commu nications port 1 or port 2 122 Top node of XMIT not equal to zero one or two 123 Bottom node of XMIT is not equal to seven eight or sixteen 3 2 3 Slave Login Status Slav
20. RTS CTS is NOT in control In this situation the entered time value determines how long XMIT waits before it sends a message out of the PLC port 1 You may usethis as a pre message delay timer The valid range is 0 65535 mS End of Transmission Delay mS 4x 14 You enter thetime value in milliseconds mS when RTS CTS control is enabled to determine how long XMIT keeps RTS asserted once the message is sent out of the PLC port 1 After thetime expires XMIT deassert RTS Also you may usethis register even when RTS CTS is NOT in control In this situation the entered time value determines how long XMIT waits after it sends a message out of the PLC port 1 You may use this as a post message delay timer The valid range is 0 65535 mS Current Retry 4x 15 The value displayed here indicates the current number of retry attempts made by the XMIT block This register is read only XMIT Communication Block 45 2 3 XMIT Communication Functions The XMIT communication block performs six functions shown below For each function certain bits of the command word 4x 8 must be set 4x 8 Command Word Functions in Relation to Bits 4x 8 Command Command word Bits that MUST be set to 0 Word Function bits that must be setto 1 Terminated ASCII 2 3 9 10 11 12 6 7 8 13 14 15 16 input Bit 521 Simple ASCII input 2 3 9 10 11 12 5 7 8 13 14 15 16 Bit 6 1 Simple ASCII out 2 3 9 10 11 12 5 6 8 13 14 15 16 put B
21. a BS is detected it is NOT stored into the 4x register destination block in fact it deletes the previous character and thus decreases the Terminated Bit 5 Character Counter 4x 4 of the ASCII Input Definition Table In contrast when a regular ASCII character is XMIT Communication Block 35 detected it is stored into the 4x register destination block and the Terminated Bit 5 Character Counter 4x 4 of the ASCII Input Definition Tableis increased t Note Back spaces CANNOT delete characters from an empty 4x register destination block thus the Terminated Bit 5 Character Counter 4x 4 of the ASCII Input Definition Table never goes below 0 This special back space functionality along with internal echo enabled at the terminal are very useful for dealing with dumb terminals A single Terminated ASCII Input XMIT block searching for cr is activated with ASCII Receive FIFO Bit 9 and back space Bit 10 set No additional ladder logic is required while the you type and edit characters using the back space on the fly When you type cr XMIT activates the bottom output Operation Successful and the corrected data is all lined up properly in the 4x register destination block 2 2 9 5 Enable RTS CTS Flow Control The following pertains to the output mode The XMIT state variable is set to BLOCKED when CTS is OFF the receiving device indicates it cannot process additional characters Likewise The XMIT state variable is se
22. are sent Block 1 Block 4 The SUB instruction verifies that the source table transfer is complete t checks after each block transfer The XOR instruction clears all registers in the 40009 40012 range 76 Application Examples 840 USE 113 00 840 USE 113 00 Network 3 sends the Modbus message from the master PLC to the 0016 slave PLC Send All New Messages Message ent 0001 0036 0034 40001 0017 Message Transmission ir 0037 Error Occurred in Using XMIT Message A 0017 1 815 1155101 0018 Transmission Error XMT 0019 Transmission Successful Figure 24 Network 3 Send Modbus Commands Using XMIT In network 3 the Modbus message is formed using the XMIT instruction so that it may be sent from the master PLC to the slave PLC Thetop input of the XMIT instruction remains ON until the Modbus message is successfully sent The XMIT control tableis 16 registers long In this example the XMIT control table starts with register 40001 and ends with register 40016 The contents of these registers are shown in the table below XMIT Control Table Description XMIT Revision Number Fault Status Available to User Data Rate Data Bits Parity Stop Bits Available to User Command Word Pointer to Message Table Register Value 40001 40002 40003 40004 40005 40006 40007 40008 40009 40010 201 or current revisio
23. character transferred from FIFO is stored in the high byte of the first 4x register The second character is transferred from FIFO is stored in the low byte of the first register Thethird character is stored in the high byte of the second 4x register and so on The Message Length Register 4x 10 contains the length of the message 1 1024 Therefore the Message Length Register 4x 10 decreases as the characters are transferred from FIFO into the contiguous 4x register block Once the entire message is transfered the Message Length Register 4x 10 restores its initial value and the 5 Operation Successful output is activated 34 XMIT Communication Block 840 USE 113 00 2 2 9 3 2 2 9 4 840 USE 113 00 Note When Simple ASCII Input Bit 6 ASCII Receive FIFO Bit 9 remain set new characters are constantously transferred from FIFO into the same 4x register block thus constantly over writing the previous characters stored into the 4x register block By clearing Simple ASCII Input Bit 7 before the next scan in your ladder logic and setting ASCII Receive FIFO Bit 9 you can still collect new characters and avoid this continuous overwriting of the 4x register block By clearing both Simple ASCII Input Bit 7 and ASCII Receive FIFO Bit 9 using ladder logic you return control of the port 1 or 2 back to the PL C When the M essage Length Register 4x 10 is 0 or morethan 1024 or the 4x register block is outs
24. contents of the source tables Blocks 1 Block 3 and the description of the XMIT control table are shown in the table below Application Examples 83 40008 1 destination source block table 40009 Block 1 40200 40010 40201 40011 40202 40012 40203 Block 2 40204 40205 40206 40207 Block 3 40208 40209 40210 40211 Figure 29 TBLK Operation 84 Application Examples 840 USE 113 00 840 USE 113 00 Contents of Source Tables and XMIT Control Table Source Block 1 40200 00000010 00000010 Tables Dial Message 256 Dec Sentto modem 40201 150 40202 7 40203 30000 Block 2 40204 00000001 00000000 Modbus Message 256 Dec Sentto slave PLC 40205 100 40206 5 40207 3000 Block 3 40208 00000010 00000100 hangup Message 256 Dec Sentto Modem 40209 170 40210 2 40211 30000 XMIT Control 4x 8 40009 Command Word Table 4x 9 40010 Pointer to Message Table 40011 Length of Message 4x 11 40012 Response timeout mS Block 1 is the Dial Messagethat is sent to the dialup modem The first register contains the Command Word Bit 7 is ON indicating a ASCII message and Bit 15 is ON indicating a dial message The second register contains a pointer to the dial message starting at 40150 Thethird register contains the dial message length 7 characters The fourth register cont
25. dependent on the PLC model Refer to Appendix A for complete details on limits Enter the slave Modbus PLC address Typically the Modbus address range is 1 247 Function code 20 and 21 do NOT support Broadcast Mode Address 0 For a read command the slave PLC data area is the source of the data Fora write command the slave PLC data area is the destination for the data For ex ample when you want to read registers 600300 600399 from a slave PLC enter 300 in this field When you want to write data from a master PLC and place it into register 600100 of a slave PLC enter 100 in this field Depending on the type of Modbus command write or read the source and destination data areas must be as defined in the Source and Des tination Data Areas table below The lowest extended register is addressed as register zero 600000 The lowest holding register is addressed as register one 400001 For a read command the master PLC data area is the destination for the data returned by the slave Fora write command the master PLC data area is the source of the data For example when you want to write registers 40016 40032 located in the master PLC to 6x registers in a slave PLC enter 16 in the filed When you wantto read 6x registers 600001 600100 from a slave PLC and place the data into the master PLC data area 40100 40199 enter 100 in this field Depending on the type of Mod bus command write or read
26. is shown in the table below 840 USE 113 00 XMIT Communication Block 41 Modbus Definition Table Function Codes 08 Modbus function code 4 XMIT supports the following function code 08 Diagnostics Diagnostics 4y 1 Enter the diagnostics subfunction code decimal value in this filed to perform the specific diagnostics function desired The following diagnostic subfunctions are supported Code Description 00 Return query data 01 Restart comm option 02 Return diagnostic register 03 Change ASCII input delimiter 04 Force listen only mode 05 09 Reserved 10 Clear counters amp diagnostics registers in 384 484 11 Return bus messages count 12 Return bus comm error count 13 Return bus exception error count 14 15 Notsupported 16 Return slave NAK count 17 Return slave busy count 18 Return bus Char overrun count 19 21 Notsupported Slave PLC address 4y 2 Enter the slave Modbus PLC address Typically the Modbus address range is 1 247 Function code 8 dose NOT support Broadcast Mode Address 0 Diagnostics function data field You must enter the decimal value needed for the data content 4y 3 area ofthe specific diagnostic subfunction For sub functions 02 04 10 11 12 13 16 17 and 18 this val ue is automatically set to zero For subfunctions 00 01 and 03 you must enter the desired data field value For more details refer to Modicon Modbus Protocol Reference Guide PI MBUS 300 M
27. loadable and builtin XMIT blocks and the details of the XMIT block are found in Chapter Two There arethree types of zoom screens eight screens for XMIT communication mode three for XMIT port status mode and three for XMIT conversion mode DX Communication Screens Eight Hex Dec Bin Goto F3 _____F4___ DX Zoom Editor XMIT Communication XMIT Revision Number 4X 1 Fault Status 4X42 Available To User 4X 3 Data Rate 50 75 110 134 150 300 600 1200 1800 2000 2400 3600 4800 7200 9600 19200 40103 4X 4 Data Bits 7 8 4X 5 Parity 0 1 044 2 even 4X 6 Stop Bits 1 4X 7 Available To 4X 8 Command Word B2 RTS CTS Modm C B5 Term d Asc Inp B7 ASCII Strng Ms B9 Asc Recv FIFO 11 RTS CTS Flow 2 User trl ENABLED ut NO ging DISABLED DISABLED Ctrl DISABLED B13 Puls Dial Modm ATDP NO B15 Tone Dial Modm ATDT NO 840 USE 113 00 40100 40101 40102 40104 40105 40106 40107 40108 F7 Lev UINT UINT UINT UINT UINT UINT UINT UINT UINT RS485 MODE B6 Simple Asc Input B8 Modbus Msging B10 Backspace B12 Xon Xoff Flow Ctrl DISABLED B14 Hang up Modm AT B16 Init Modem AT Page up down for prev next screen Figure 6 XMIT Communication Zoom Screen 1 of 8 8 F8 OFF _F9 Page 1 8 Quit 201 0 0000 9600 8 2 1 0000 0100000000000000 DISABLED NO DISABLED DISABLED NO NO DEC DEC HEX DEC DEC DEC DEC H
28. logic instruction block The basic logic subroutine structure of a loadable is shown in Figure 1 Start Opcode Process Memory References INPUTS OUTPUTS Define Length Figure 1 Loadable Code Logic Flow These functions can be added to existing control logic in a field environment and offer a software solution to specific application problems 6 Introduction 840 USE 113 00 1 3 Step 1 Step 2 Step 3 Step 4 1 3 1 Step 1 1 3 2 Step 1 840 USE 113 00 XMIT Installation as a Loadable This information assumes that you are familiar with M odsoft have configured the PLC and are about to load XMIT When the loadable is transferred to the panel Modsoft converts XMIT EXE to a DX file named XMIT 1968 EXE The next few figures are examples of the screens you see as you transfer the XMIT Loadable from the disk to the 984 controller When you have concluded the transfer to the panel the DX will be downloaded to the controller when you download the configuration Insert the XMIT Loadable Function Block Disk Part Number 309 COM 455 0x into disk drive A Go to the Offline 2 selection on the Main Menu Select either Sdect Program or New Program from the menu Select Configuration F5 from the menu Note Remember the README TXT NSUP EXE XMIT1968 HLP XMIT EXE files plus two sub directories MS 25 that contains the DXFDT SYS file and 5 26 that contains the XMIT ZMM file are pre
29. message We therefore recommend that you use this method in all future applications implementing the XMIT instruction 840 USE 113 00 Application Examples 79 5 2 5 2 1 Master PLC PC E984 2xx or 140 CPU xxx xx Fault Word Transmission to Slave PLC via Dialup Modems The ladder logic in this example shows how to send a single fault word 40800 to a slave PLC using telephone dialup H ayes compatible modems This logic or a variation of it may be used for applications requiring report by exception fault handling When a fault occurs the master PLC uses XMIT to send a dial string to the modem When the local modem connects to remote modem the master PLC uses XMIT to send a Modbus message to the slave PLC The Modbus message writes the contents of fault register 40800 in the master PLC to 40001 in the slave PLC When the master PLC gets a valid response from the slave PLC the master PLC uses XMIT to send a hangup string to the local modem Thus three messages are transmitted from the master PLC dial Modbus command and hangup Hardware Configuration Slave PLC PC E984 2xx 8 or DialUp Modem DialUp Modem 5 2 2 140 CPU xxx xx RS 232 Cable RS 232 Cable Figure 26 Hardware Configuration for Fault Word Transmission Note This application works with telephone dialup modems only Modem Setup You must first initialize your dialup modem to ensure prope
30. not the XMIT instruction will not operate Select Loadable F 7 then Dir F3 then Load F1 A prompt appears asking for the filename Type XMIT EXE and then hit return Re fer to Figure 3 Introduction 9 Load Delete 1 2 5 DX Loadable Configuration Name Rev Size Opcode NSUP 196 3072 ff 6 8 8 9 DX Memory Used 614 Total Memory Avail 14843 Fitename a xmit exe Press Enter to view current Figure3 Loadable Screen loadable selection list Sample Screen Step 2 System message appears telling you that you can now access this load able Move cursor below the name of the previous loadable to an open spot Step3 Hit Shift to display all available loadables The Loadable should now appears in 10 Introduction this list Refer to Figure 4 840 USE 113 00 Dir Edit Quit NSUP 196 C F3 F4 F5 F6 F7 Lev 8 F9 XMIT 196 DX Loadable Configuration DX Memory Used 300 Total Memory Avail 7138 Name Rev Size Opcode NSUP 196 3000 ff Press Enter or to view current loadable selection list Figure4 List of Available Loadables Sample Screen Step 4 Place your cursor onto and press enter This displays the revision size and opcode of the XMIT Loadable Its Opcode is 1e
31. of Transmission Delay mS 4x 14 45 2 2 16 Current Retry 4 15 45 23 XMIT Communication Functions 46 Chapter 3 XMIT Port Status Block 20222222774 2 24 04 4 47 31 AMIT Port Status Bleck 220222522222 te dere pee sacan 48 3 11 Characteristics Gate 48 3 12 Representation 48 32 Port Status Display Table 50 3 2 1 XMIT Revision Number 4x Read Only 50 3 2 2 Port Status Fault Status 4x 1 Read Only 50 3 2 3 Slave Login Slave Port Active Status 4x 2 ReadOnly 50 3 2 4 Slave Transaction Counter 4 3 Read Only 51 3 2 5 Port State 4x 4 Read 51 3 2 6 Input FIFO Status Bits 4x 5 Read Only 51 3 2 7 Input FIFO Length 4 6 Read Only 52 Chapter 4 XMIT Conversion 53 4l XMIT Conversion Block 52255520505 exe Re D de edes 54 4 1 1 Characteristics 54 4 1 2 Representation 54 42 XMIT Conversion Control Table 57 4 2 1 XMIT Revision Number 4x Read Only 57 4 2 2 Conversion Fault Status 4x 1 Read Only 57 4 2 3 Available to User
32. 001 4X 1 Fault Status 40101 UINT 0 DEC XMIT Fault Codes Continued 132 Invalid register block 133 Ascii input FIFO overflow error 134 Invalid number of start chars or termination chars 135 Invalid destination register block 136 Invalid source register block 137 No Ascii number present 138 Illegal configuration Data bits Data rate Parity or Stop bits 139 Numerical overflow detected 140 String mismatch error 141 String not found error 142 Invalid error check detected 143 Invalid conversion Opcode END XMIT COMMUNICATION Figure 13 XMIT Communication Zoom Screen 8 of 8 840 USE 113 00 Introduction 17 1 4 2 DX Port Status Screen Three Utility Hex Dec Bin Goto F1 F4 DX Zoom Editor XMIT GET STATUS PORT 0000 XMIT Revision Number 40100 UINT Fault Status 40101 UINT 40102 40102 40103 01 08 09 16 UINT Slave Logged In 0 No 1 Yes Slave Active 0 No 1 Yes Slave Transaction Counter Port State 40104 01 16 40105 UINT Port Owned By 0 PLC 1 XMIT Ascii Output Blocked By Recvr 0 No 1 Yes Ascii Inpt Has Blockd Send Dev 0 No 1 Yes Ascii Input FIFO Revd New Char 0 No 1 Yes Ascii Input FIFO Empty 0 No 1 Yes Ascii Input FIFO Enabled No 1 Yes Input FIFO Overflow Error 0 No 1 Yes Input FIFO Length Input FIFO Status Bits Figure 14 XMIT Port Status Zoom 201 0 0 0 8 0000000000000010 40105 40105 40105 40105 40105 40105 40105
33. 00101 4x 4 Counter counts the number of received characters written into the 4x storage destination registers The XMIT block becomes ACTIVE and then discards from the input FIFO theinitial five characters AMScrIf because they do not match the first starting character set to On thelogic scan after the is received the XMIT block remains ACTIVE and it copies the and subsequent characters into the 4x destination storage updating 4x 4 of the ASCII Input Definition Table with the count done so far as the characters come in After the final termination character is received the bottom output Operation Successful is activated and 4x 4 of the ASCII Input Definition Table contains the total length equal to 0x0016 The 4x destination storage block starting at 400101 contains w ei gh t 12 45 G RA MS cflf On the scan that the bottom output Operation Successful is activated the already received characters from the next message wei that came in after the termination string remains in the ASCII input FIFO This givesthe ladder logic the opportunity to turn off the Terminated ASCII input 4x 8 Bit 5 beforethe next scan solve of XMIT for this port keeping those characters in the FIFO until the PLC completes processing the current message that might take several scans 2 2 9 2 Simple ASCII Input Function Two characters are stored in each 4x register Thefirst
34. A 4 2 Dial Message 108 A 4 3 Hangup 109 nee Rad Rc Contents 840 USE 113 00 840 USE 113 00 Chapter 1 Introduction V XMIT Specific Functionality V Loadable Functions V XMIT Installation as a Loadable V Customer Service Introduction 1 2 1 1 1 1 1 Introduction XMIT Specific Functionality The XMIT Transmit function block sends Modbus messages from master PLC to multiple slave PLCs or sends ASCII character strings from the PLC s Modbus slave port 1 or port 2 to ASCII printers and terminals XMIT sends these messages over telephone dialup modems radio modems or simply direct connection XMIT comes with three modes a communication mode port status mode and a conversion mode XMIT performs general ASCII input functions in the communication mode including simple ASCII and terminated ASCII You may use an additional XMIT block for reporting port status information into registers while another XMIT block performs the ASCII communication function You may import and export ASCII or binary data into your PLC and convert it into various binary data or ASCII to send to DCE devices based upon the needs of your application Refer to Chapter T wo for details about the XMIT communication block Chapter Three for XMIT port status block and Chapter Four f
35. A20301 9 pin Male Adapter Pin WT RJ 45 Connector RXD TXD RTS CTS GND DSR lind Chassis Ground RJ 45 connector 8x8 Pin 1 9 Front View Connector Pinouts 9 Pin D shell TXD RXD RTS CTS GND DTR DSR A Ui CO N UJ Case of the Connector Caution Pin1 of the RJ 45 receives 5V from the PLC Technical References 99 2 8 RJ45 8x8 to 25 pin Modem 110XCA20401 25 pin Male Adapter RJ 45 connector Pin 25 8x8 Pind 1 Front View Connector Pinouts RJ 45 Connector 25 Pin D shell RXD 4 4 E n gt 2 TXD RTS 6 a4 4 RTS CTS 7 5 CTS GND 5 4 22 DSR 2 lt gt 6 DSR s 20 DTR pie 8 1 Chassis Ground 4 ced Caution Pin1 of the RJ 45 receives 5V from the PLC 840 USE 11300 100 Technical References A 2 9 45 8x8 to 25 Modem 110XCA20401 25 Male Adapter Pin 2 RJ 45 connector nga Pin1 Front View Connector Pinouts RJ 45 Connector 25 Pin D shell RXD 4 4 p 3 TXD 3 4 2 RTS 6 4 p 4 RTS CTS 7 p 5 CTS GND 5 4 7 GND 6 DSR gt 20 DTR Chassis 4 j Chassis Ground 4 Gro
36. DIALTONE 112 Modem returned BUSY 113 Invalid LRC checksum from slave 114 Invalid CRC checksum from slave 115 Invalid Modbus function or subfunction 116 Modbus response message time out 117 Modem reply time out 118 XMIT could not gain access to PLC comm port Page up down for prev next screen Figure 11 XMIT Communication Zoom Screen 6 of 8 Utility PlcOps Hex Dec Bin Goto Quit F1 ___F 2 _______F 3 ___F4 _ DX Zoom Editor F7 Lev 8 F8 0ON F9_ R1 XMIT Communication Page 7 8 PORT 0001 4X 1 Fault Status 40101 0 DEC XMIT Fault Codes Continued 119 XMIT could not enable PLC port receiver 120 XMIT could not set PLC UART 121 User issued an abort command 122 Top node of XMIT is not equal to one 123 Bottom node of XMIT is not equal to sixteen 124 Undefined internal state 125 Broadcast mode not allowed with this Modbus function 126 DCE did not assert CTS 127 Illegal configuration Data bits Data rate Parity or Stop bits 128 Unexpected response received from Modbus slave 129 Invalid command word combination 130 Command word changed while active 131 Invalid character count Page up down for prev next screen Figure 12 XMIT Communication Zoom Screen 7 of 8 16 Introduction 840 USE 113 00 Utility PlcOps Hex Dec Bin Goto Quit Fi F2 F3 F4 DX Zoom Editor F7 Lev 8 8 0 F9 R1 XMIT Communication Page 8 8 PORT 0
37. EX Introduction 13 Utility PlcOps Hex Dec Bin Goto Quit Fl1 F2 4 DX Zoom Editor F7 Lev 8 F8 ON F9 R1 XMIT Communication Page 2 8 PORT 0001 4X 9 Message Pointer 40109 UINT 150 DEC Function 01 06 15 16 4Y Function code 4Y 1 Quantity 4Y 2 Slave PLC address 4Y 3 Slave data area 4Y 4 Master data area Modbus 4Y 4 1 4Y 2 4 3 4Y 4 Modbus 4y 4 1 4Y 2 4 3 4Y 4 4Y45 function 08 Function code Subfunction Code Slave PLC address Diag funct data Master data area Modbus Function Code Definitions Read Coil Status Read Holding Registers Force Single Coil Diagnostics Force Multiple Coils Read general Reference 6X 02 Read Input Status Page up down for prev next screen Figure7 XMIT Communication Zoom Screen 2 of 8 functions 20 21 Function code Quantity Slave PLC address Slave data area Master data area File number 04 Read Input Registers 06 Preset Single Register 16 Preset Multiple Registers 21 Write General Reference 6X Utility PlcOps Hex Dec Bin Goto Quit F1 F2 4 DX Zoom Editor 7 8 8 F9 R1 XMIT Communication Terminated Ascii Input Page 3 8 PORT 0001 Ascii Message Pointer 40109 UINT 150 DEC Ascii Message Length 40110 UINT 13 DEC When Activated Message pointer reg the start of Ascii input definition table 4x 9 must have register offset to The table always has 5 wo
38. Enable Message Transmission Figure 27 Network 1 Modbus Commands to Slave PLC 840 USE 113 00 82 Application Examples 840 USE 113 00 Network 1 sends the Modbus commands to the slave PLC when coil 00033 comes ON Coil 00035 remains ON until all three messages M odem and M odbus are sent to the slave PLC When an XMIT error occurs during a Modbus transmission to the slave PLC it unlatches coil 00035 Network 3 2 sets the XMIT control table 40001 40016 for a new message Refer to Figure 28 Enable XMIT Send Message Transmission New Transmission S uccessful Message P 40200 _ 0035 0019 40008 0036 0035 Enable 0004 Al Message M Transmission essages Sent 40008 40008 0004 40008 0034 SUB XOR 40018 0004 Figure 28 Network 2 Setup XMIT Control Table Two registers 4x 2 and 4x 7 within the XMIT control table 16 register length are designated as Available to User so that pointer values for other instruction blocks like TBLK may be held in these registers In this example the TBLK instruction block uses register 40008 4x 7 as the pointer TheTBLK copies data from source tables See Figure 29 below into the XMIT control table In this example three source tables Blocks 1 Block 3 each four registers long are copied into the XMIT control table Destination Block four registers long 4x 8 4x 11 The
39. Hex Ensure that this opcode does not conflict with any other opcodes that may be in use The opcode shown on the screen may vary Refer to Figure 5 840 USE 113 00 Introduction 11 Ut F1 Press Enter or 12 ility F2 F 3 F4 F5 F6 F7 Lev 8 F8 O0FF F9 DX Loadable Configuration Name Rev NSUP 196 XMIT 196 Step 5 Step 6 Step 7 Step 8 Step 9 Step 10 Introduction Dir Edit Quit DX Memory Used 2266 Total Memory Avail 13191 3072 ff 8264 le to view current loadable selection list Figure5 Installed Loadables Sample Screen Press Escape twice The Segment Status Display appears Select a segment a network and press enter Select Element from menu Select Loadable F 5 from menu to access the Loadable Pick your XMIT Loadable Place your cursor onto the XMIT block and hit ALT Z to pull up the XMIT zoom screens At this point you may set your parameters based upon your application and the details of the XMIT Block found in Chapter Two There are fourteen zoom screens for the XMIT block Refer to Figure 6 through Figure 19 Note UseALT H to access the help screen for XMIT 840 USE 113 00 1 4 XMIT Zoom Screens 1 4 1 Utility F1 MIKE Ten zoom screens are used to set your parameters for both the
40. IFO using either Simple ASCII Input Bit 6 or Terminated ASCII Input Bit 7 When FIFO becomes less than one quarter full with characters the FIFO state variable is set to send XON Thus sending a Xon character out the serial port to UNBLOCK the sender Note To prevent lockup due to a disconnected cable or other intermittent communication errors when the sender is BLOCKED and did NOT receive the Xon character correctly we use the following algorithm When becomes empty and no characters subsequently received then a steady stream of Xon characters are transmitted at the rate of once every 5 seconds Note The Xon Xoff Flow Control Bit 12 is different from the RTS CTS Control Flow Bit 11 The former uses transmitted Xon and Xoff characters to prevent receive buffer overflow in full duplex mode The latter uses hardware shaking signals to accomplish the same goal Therefore it is illegal to simultaneously request both of these flow control algorithms because RTS CTS Flow Control Bit 11 Modem Control implies a half duplex network while Xon Xoff Flow Control Bit 12 implies a full duplex network Message Pointer Word 4x 9 You enter a pointer that points to the beginning of the message table For ASCII character strings the pointer is the register offset to the first register of the ASCII character string Each register hold up to two XMIT Communication Block 840 USE 113 00 2 2 10 1 840 USE 113 00 ASCII
41. Modbus Protocol Reference Guide PI MBUS 300 Parity Bits 4x 5 XMIT supports the following parity none odd and even Enter a decimal of either 0 no parity 1 odd parity or 2 even parity When an invalid parity is entered the block displays an illegal configuration error error code 127 in the Fault Status 4x 1 register Stop Bits 4x 6 XMIT supports one or two stop bits Enter a decimal of either 1 one stop bit or 2 two stop bits When an invalid stop bit is entered the block displays an illegal configuration error error code 127 in the Fault Status 4x 1 register Available to User 4x 7 The XMIT block does not usethis register However it may be used in ladder logic as a pointer An efficient way to usethe XMIT block is to place a pointer value of a TBLK instruction intothis register For a example refer to Chapter Five Application Examples Command Word 4x 8 The XMIT interprets each bit of the command word as a function to perform If bit 7 and 8 are on simultaneously or if any two or more of bits 13 14 15 or 16 are on simultaneously or if bit 7 is not on when bits 13 14 15 or 16 areon error 129 will be generated Other restrictions apply For more details refer to Section 2 3 Theindividual bit definitions are shown in the table below 30 Communication Block 840 USE 113 00 840 USE 113 00 Command Word 4x 8 Bit Definitions Bit 1 msb Bit 2 Enable RTS CTS mod
42. SE 113 00 840 USE 113 00 Terminated ASCII Input Definition Table Word High Byte 4x 0 Number of starting characters allowed content 0 1 2 Low Byte Number of terminator characters allowed content 1 2 4 1 First starting character Second starting character 4x 2 First terminator character Second terminator character 4x 3 First 4x storage destination register 4x 4 Counter counts the number of received characters written into the 4x storage destination registers During the process 4x 4 of the ASCII input definition table holds running count of characters written into the 4x destination register block Oncethe terminated string is received the bottom output on the XMIT block goes ON and 4 of the ASCII input definition table holds the total length of the received string including the starting and terminator strings At this point the XMIT block stills owns the port and continues to save newly received characters into the ASCII receive FIFO because the enable ASCII receive FIFO 4x 8 Bit 9 is ON Using ladder logic you can dear the simple ASCII input 4x 8 Bit 6 before the next scan while leaving the enable ASCII receive FIFO 4x 8 Bit 9 ON Thus the current 4x register destination block is NOT over written by newer FIFO data which is still collected in the FIFO Using ladder logic you can dear both bits for enable ASCII receive FIFO 4x 8 Bit 9 and terminated ASCII input 4
43. These opcodes parse variable length ASCII string data starting at the source register high or low byte as selected by 4x 3 Bit 15 data conversion control register The ASCII string character count register 4x 7 defines the maximum number of characters that can be parsed from the source string and must initially contain a value between 1 1024 The data conversion control register 4x 3 also selects the conversion length of 16bit or 32bit 4x 3 Bit 12 and selects signed or unsigned 4x 3 Bit 13 conversion For opcodes 1 3 theinitial ASCII string character count 4x 7 is reduced by the total number of characters parsed from the ASCII source string and the source string pointer 4x 3 Bit 13 is advanced to one character past the last character parsed during the conversion s Note An error occurs when no hex or decimal digits are present or when the destination register 4x 6 block is greater than 512 registers or runs past the end of the PLCs state RAM configuration 62 XMIT Conversion Block 840 USE 113 00 4 3 11 840 USE 113 00 ASCII Input Related Conversion Examples Opcode Actions Data you enter 1 Source block starting at 400201 high byte 001234567crf Initial character count 0x000C Conversion control selection 32bit signed conversion 32bit signed destination register pair is OxF FED2979 loaded with Source block advanced to 400206 high cri byte now aims at ASCII string charact
44. To actually send the message the top input of XMIT must come ON and stays ON until the operation is complete or an error occurs When XMIT determines the message was successfully sent to the modem it turns ON the bottom output When an error occurs the middle output comes ON Thetop output is ON while the message is being sent to the modem Expert Because it takes so long for local modem to hangup once it receives the hangup command the timeout value in register 4x 11 should be as very long when sending a dial message to a modem For example set the timeout for 30 000 mS when sending a dial message When the timeout value is too short XMIT issues a message timeout You may have to try several settings before finding the optimal time Technical References 109 Index Numbers 1through 6 15 and 16 Modbus function codes 40 110XCA20301 Cable Adapter Kit 99 103 104 110XCA 20401 Cable Adapter Kit 98 100 101 184 384 PLC parameter limits 91 20 and 21 Modbus function codes 43 484 PLC parameter limits 91 584 984 PLC parameter limits 90 8 Modbus function codes 42 884 Quantum PLC parameter limits 90 9 pin RS 232 to 25 pin Modem Modem cable pin outs 93 94 9 pin to 25 pin Null Modem Modem cable pin outs 97 9 pin to 9 pin Modem Modem cable pin outs 96 9 pin to 9 pin Null Modem Modem cable pin outs 95 9 pin to RJ 45 8x8 Modem 110XCA20301 Modem cable pin outs 103 104
45. a Conversion Character Count 40107 UINT 0 DEC Figure 17 XMIT Conversion Zoom Screen 1 of 3 840 USE 113 00 Introduction 19 Utility Hex Dec Bin Goto Quit Fi1 MIKE F3 F4 DX Zoom Editor F7 Lev 8 F8 OFF F9 XMIT CONVERSIONS Page 2 3 PORT 0000 4X 1 Fault Status 40101 UINT 0 DEC XMIT Fault Codes Continued 119 XMIT Could Not Enable PLC Port Receiver 120 XMIT Could Not Set PLC UART 121 User Issued an Abort Command 122 Top node of XMIT is not equal to one 123 Bottom Node of is not equal to sixteen 124 Undefined Internal state 125 Broadcast Mode not Allowed with this Modbus Function 126 DCE did not Assert CTS 127 Illegal configuration Data bits Data rate Parity or Stop bits 128 Unexpected Response Received from Modbus Slave 129 Invalid Command Word Combination 130 Command Word Changed While Active 131 Invalid Character Count Page up down for prev next screen Figure 18 Conversion Zoom Screen 2 of 3 Utility Hex Dec Bin Goto Quit 1 4 DX Zoom Editor 8 F8 OFF F9 XMIT CONVERSIONS Page 3 3 PORT 0000 4X 1 Fault Status 40101 UINT 0 DEC XMIT Fault Codes Continued 132 Invalid Register Block 133 Ascii Input FIFO Overflow Error 134 Invalid number of Start chars or Termination chars 135 Invalid Destination Register Block 136 Invalid Source Register Block
46. ains the timeout for the dial message 30 000mS A lot of time 15 required when a local modem dials a remote modem because local modem goes through a process to determine a connection Therefore we recommend a timeout of approximately 3000mS When the timeout is too short the XMIT issues a modem reply ti meout Block 2 is the Modbus Messagethat is sent to the slave PLC The first register contains the Command Word Bit 8is ON indicating a Modbus message The second register contains a pointer to the Modbus definition table starting at 40100 XMIT uses the information stored here to form a Modbus message The third register contains the Modbus definition table length 5 registers The fourth register contains the Application Examples 85 timeout for the slave PLC response message 3000mS Theslave PLC response time maybe changed based upon your specific application Block 3 is the hangup Messagethat is sent to the slave PLC Thefirst register contains the Command Word Bit 14 is ON indicating a hangup message The second register contains a pointer to the hangup message starting at 40170 Thethird register contains the hangup message that is two characters long The fourth register contains the timeout for the hangup message 30 000mS When the timeout is not long enough XMIT issues a modem reply timeout Thehangup time maybe changed based upon your specific application When coil 00035 goes ON for thefirst time TBLK copies the co
47. alid register block ASCII input FIFO overflow error Invalid number of start characters or ter mination characters 2 2 3 Available to User 4x 2 The XMIT block does not usethis register However it may be used in ladder logic as a pointer An efficient way to usethe XMIT block is to place a pointer value of a TBLK instruction intothis register For a example refer to Chapter Five Application Examples 28 XMIT Communication Block 840 USE 113 00 2 2 4 Data Rate 4x 3 XMIT supports the following data rates 50 75 110 134 150 300 600 1200 1800 2000 2400 3600 4800 7200 9600 and 19200 To configure a data rate enter its decimal number into this field When an invalid data rate is entered the block displays an illegal configuration error error code 127 in the Fault Status 4x 1 register 840 USE 113 00 XMIT Communication Block 29 2 2 5 2 2 6 2 2 7 2 2 8 2 2 9 Data Bits 4x 4 XMIT supports the following data bits 7 and 8 To configure a data bit Size enter its decimal number into this register Modbus messages may be sent in ASCII mode or RTU mode ASCII mode requires 7 data bits while RTU mode requires 8 data bits When sending ASCII character message you may use either 7 or 8 data bits When an invalid data bit is entered the block displays an illegal configuration error error code 127 in the Fault Status 4x 1 register For more details on Modbus message formats refer to M odicon
48. an enough to initialize a modem You may implement any Hayes AT command as part of the initialization string We recommend the following commands when initializing a modem for use with XMIT Initialization Message for Dial Up Modem Initialization Message AT amp F amp KO amp Q0 amp DOV1IQOX0E1 AT Self calibrate Modem amp F Recall factory configuration as active configuration amp K0 Disable local flow control amp 00 Communicate in asynchronous mode amp D0 Ignore status of DTR signal 1 Display result codes as words If V1 is not used or if modem is not capable of returning ver bose responses the XMIT block returns error 117 modem re play time out 00 Return result codes X4 Provide basic call progress re sult codes Connect No Carrier and Ring 840 USE 11300 106 Technical References 840 USE 113 00 El Echo characters from the key board to the screen in com mand state These parameters must always be part of the initialization string for XMIT to function properly These parameters should be part of the initialization string for XMIT to transmit a message to remote modem properly Only a experienced modem user should change or not use these parameters Note While some modem manufactures state full compatibility with Hayes they may still be slightly different Therefore we recommend using only those commands that have the same definition as those stated above The
49. aster PLC data area 4 4 Forall subfunctions the master PLC data area is the destination for the data returned by the slave You must specify a 4x register that marks the beginning of the data area where the returned data is placed For example to place the data into the master PLC data area starting at 40100 enter 100 in this field Sub function 04 does NOT return a response For more details refer to Modicon Modbus P rotocol Reference Guide PI MBUS 300 2 2 10 3 Modbus Function Codes 20 21 For Modbus messages the pointer is the register offset to the first register of the Modbus definition table The Modbus definition table for Modbus function codes 20 and 21 is six registers long and you must program it for successful XMIT operation The Modbus definition table is shown in the table below 42 XMIT Communication Block 840 USE 113 00 Modbus Definition Table Function Codes 20 21 Modbus function code 4y Quantity 4y 1 Slave PLC address 4y 2 Slave PLC data area 4y 3 Master PLC data area 4y 4 File number 4 5 840 USE 113 00 XMIT supports the following function codes 20 Read general reference 6x 21 Write general reference 6x Enter the amount of data you want written to the slave PLC or read from the slave PLC For example enter 100 to read 100 holding registers from the slave PLC or enter 32 to write 32 coils to a slave PLC There is size limitation on quantity that is
50. ble in two forms Either as aloadable or a builtin block When using the Quantum Compact or Micro PLCs it is a loadable When using the Momentum PLCs it is a builtin Loadable Form V Modsoft Version 2 5 or lower Part Number SW MSxD 9SA Refer to Section 1 3 1 for details Modsoft Version 2 6 or higher Part Number SW MSxD 9SA Re fer to Section 1 3 2 for details XMIT Loadable Function Block Part Number 309 COM 455 0x This includes README TXT NSUPEXE 1968 XMIT EXE files plus two sub directories MS 25 that contains the DXFDT SYS file and 5 26 that contains the XMIT ZMM file Note Theseare not PC executable programs V Quantum PL Cs 140 CPU 113 02 140 CPU 213 04 140 CPU 113 03 with 2 12 executive or higher 140 CPU 424 02 with 2 10 executive or higher and 140 CPU 434 12 140 CPU 534 14 with 1 02 executive or higher V Compatible Compact PLCs PC E984 241 PC E984 245 PC E984 251 and PC E984 255 with 1 02 executive or higher V Compatible Micro PLCs 110 CPU 612 04 with 1 00 executive or higher Communication media For example dialup type modem lease line modems Refer to the list of tested modems and printers in the Modicon 309 COM 455 00 XMIT Loadable Read Me First GI XMIT RMF Builtin Form V Modsoft Version 2 6 or higher Part Number SW MSxD 95 V Momentum PLCs 171 CCS 700 00 171 CCS 700 10 171 CCS 760 00 171 CCS 780 00 171 CCC 760 10 and 171 CCC 780 10 with
51. block during the copy ASCII String Related Conversion Examples Opcode Data you enter Source block advanced to 400203 low byte fgh now aims at Final character count is reduced to 0x0003 Operation successful bottom output goes on because destination string matched in source string 10 Destination block contains defo Source block at 400201 high byte contains abcdefgh Initial character count is 0x0008 Source block advanced to 400202 low byte defgh now aims at Final character count is reduced to 0x0005 Operation successful bottom output goes on because destination string found in source string 11 Source block at 400201 high byte contains 0x0103 0x0001 0x0008 0x1234 Initial character count is 0x0006 Conversion control selects LRC8 must be appended Source block at 400201 low byte now con 0x0103 0x0001 tains 0x0008 0xF 334 840 USE 113 00 XMIT Conversion Block 67 Source block remains at 400201 high byte Final character countis increased to 0x0007 Operation successful bottom output goes on because destination string found in Source string 4 3 3 3 Description of Opcode 9 Example Opcode 9 takes the ASCII string defined in the destination register block and compares it to the source register block Theinitial ASCII string character count 4x 7 specifics the maximum number of characters to be compared it must be between 1 1024 The ma
52. blocks using different 4x references that do not overlap When using byte swap opcode 7 or string copy opcode 8 with case conversion the source and destination blocks may be the same When using byte swap opcode 7 or string copy opcode 8 the destination block is loaded the destination pointer 4x 3 Bit 14 is advanced past XMIT Conversion Block 65 thelast character written and the ASCII string character count 4x 7 is reduced to zero When using string compare opcode 9 or string search opcode 10 the source pointer 4x 3 Bit 13 is advanced and the ASCII string character count 4x 7 is reduced Note In general The source pointer auto advance 4x 3 Bit 13 and the destination pointer auto advance 4x 3 Bit 14 must be on in the conversion control register 4x 3 or else these pointers retain their original values as well as the initial character count 4x 7 ASCII String Related Conversion Examples Opcode Actions 7 Source contai Destination b 2 ock at 400001 low byte Initial character count is Destination b ock is loaded with Final character countis reduced to Destination b byte 8a Source conta advanced to 400004 low ins Destination b ock at 400101 low byte Initial character count is Conv ct 5 Destination b ion control has case sensitivity on ock is loaded with Final character countis reduced to
53. byte 0xD14F 0 478 Final character count is 0x0000 Destination block advanced to 400205 high byte Description of Opcode 4 and 5 Example Opcodes 4 and 5 generate variable length ASCII output data when the data conversion control register 4x 3 Bit 10 is 0 variable Then the number of ASCII output characters generated subtracted from the initial ASCII string character count register 4x 7 and the destination pointer 4x 3 Bit 14 is advanced When the data conversion control register 4x 3 Bit 10 is 1 fixed Then enough leading zeros or blanks based on the state of the data conversion control register 4x 3 Bit 9 is loaded into the destination register block 4x 6 in front of the conversion data to force the total number of characters to be exactly the requested amount The ASCII string character count 4x 7 is set to zero and the destination pointer 4x 3 Bit 14 is advanced An error occurs when the binary source value generates more decimal characters than can fit in the defined destination register block Description of Opcode 6 Example Opcode 6 converts an array of binary registers from the source block into ASCII hex digit characters that are loaded into the destination block ASCII String Related Conversion Examples Opcodes 7 11 perform five different ASCII string operations within the PLC based upon your application needs We recommend you define your source and destination
54. characters Each ASCII string may be up to 1024 characters in length For example when you want to send 10 ASCII messages out of the PLC you must program 10 ASCII characters strings into 4x registers of the PLC and then through ladder logic set the pointer to the start of each message after each successful operation of XMIT Modbus Function Codes 01 06 15 and 16 For Modbus messages the pointer is the register offset to the first register of the Modbus definition table The Modbus definition table for Modbus function code 01 02 03 04 05 06 15 and 16 is fiveregisters long and you must program it for successful XMIT operation The Modbus definition table is shown in the table below XMIT Communication Block 39 Modbus Definition Table Function Codes 01 06 15 and 16 Modbus function code 4y Quantity 4y 1 Slave PLC address 4y 2 Slave PLC data area 4 3 Master PLC data area 4y 4 XMIT supports the following function codes 01 Read multiple coils 0x 02 Read multiple discrete inputs 1x 03 Read multiple holding registers 4x 04 Read multiple input registers 3x 05 Write single coil 0x 06 Write single holding registers 4x 15 Write multiple coils 0x 16 Write multiple holding registers 4x Enter the amount of data you want written to the slave PLC or read from the slave PLC For example enter 100 to read 100 holding registers from the slave PLC or enter 32 t
55. d in control table register 4x 9 and the length ofthe message in 4x 10 Tone dial numbers are sent to the modem automatically preceded by ATDT and with carriage return CR and line feed lt LF gt appended Since the dial message is an ASCII string bit 7 must be ON prior to sending the number to be dialed Bit 16 Initialize mo dem Setto 1 when using a Hayes compatible dial up modem and you wantto initialize the modem You program the initialization message into contiguous 4x registers of the PLC A pointer to the initialization message must be placed in control table register 4x 9 and the length of the message in 4x 10 All messages are sentto the modem automatically preceded by AT and with a car riage return CR and line feed LF appended Since the initialization message is an ASCII string bit 7 must be ON prior to sending the message 2 2 9 1 Terminated ASCII Input Function When 4x 8 Bit 5 is actived for terminated ASCII Input messages the message pointer 4x 9 is the register offset to the first register of the ASCII input definition table The terminated ASCII definition table is five registers long Therefore set the message length register 4x 10 to five for successful XMIT operation The terminated ASCII input definition table is shown in the table below Enter your data into your ASCII input definition table using the reference section of M odsoft 32 Communication Block 840 U
56. e Port Active Status 4x 2 Read Only This register displays status on two items generated by the XMIT port status block Ladder logic may be ableto usethis information to reduce or avoid collisions on a multi master Modbus network 4x 42 high byte Slave Login Status 4x 2 low byte Port Active Status Yesz When a programming device is When observed port is owned by currently logged ON to this PLC slave the PLC and currently receiving a Mod port bus command OR transmitting a Mod bus response Noz When a programming device is No When observed port is NOT owned currently NOT logged ON to this PLC by the PLC and currently receiving Mod Slave port bus command OR transmitting a Mod NOTE A Modbus master can send bus response commands but notbe logged ON 50 XMIT Port Status Block 840 USE 113 00 840 USE 113 00 3 2 4 3 2 5 3 2 6 Slave Transaction Counter 4x 3 Read Only This register displays the number of slave transactions generated by the XMIT port status block The counter increases every time the PLC Modbus slave port receives another command from the Modbus master Ladder logic may be able to use this information to reduce or avoid collisions on a multi master Modbus network Port State 4x 4 Read Only This register displays ownership of the port and its state It is generated by the XMIT port status block AX 4 Port State Options Owns Port AciveState Value PLC PLC Modbus sla
57. ed below A 2 1 9 pin RS 232 to 25 pin Modem with no RTS CTS Control 25 pin Male Adapter 25 1 gt 89 2 99 Pin 1 7 Front View Front View Connector Pinouts 9 Pin Connector 25 Pin D shell RXD 2 4 gt 3 TXD 3 gt 2 TXD lt 8 Ex E OTS DSR 4 4 6 DSR DIR 6 l p 20 DTR GND 5 4 7 GND Technical References 93 A 2 2 9 RS 232 to 25 Modem with RTS CTS Control 25 pin Male Adapter 9 pin Male 25 9 1 Front View Front View Connector Pinouts 9 Pin Connector 25 Pin D shell RXD 2 3 RXD TXD 3 2 TXD RTS 7 RTS DSR 4 4 6 DSR DIR 6 20 DTR GND 5 4 R 7 GND 840 USE 11300 94 Technical References 2 3 9 to 9 pin Null Modem 9 pin Male Adapter Pin 9 Pin 1 Front View Connector Pinouts 9 Pin 9 Pin Connector Connector RXD 2 4 3 TXD TXD 3 4 2 RXD RTS 7 4 m gt 7 5 5 8 8 CTS DSR 4 4 4 DSR DTR 6 4 l p 6 DTR GND 5 4 5 GND Technical References 95 96 A 2 4 9 to 9 pin Modem 9 pin Ma Pin 1
58. em 110CXA20401 98 RJ 45 8x8 to 9 pin Null Modem 110XCA 20301 99 RJ 45 8x8 to RJ 45 8x8 Modem 102 M odsoft zoom screens XMIT communication Control table 14 15 Fault codes 15 16 17 Modbus function codes 13 14 XMIT conversion 19 Fault codes 20 XMIT port status 18 Fault codes 18 19 N NSUP EXE Installation 8 PLC parameter limits 184 384 91 484 91 584 984 90 884 Quantum 90 M84 92 Port status control table Valid ranges 49 Q Quick Reference Cable Adapter Kits Available 105 R Radio lease line modem Application example 72 112 Index RJ 45 8x8 to 25 pin Modem 110XCA20401 Modem cable pin outs 100 101 RJ 45 8x8 to 25 pin Null Modem 110XCA20401 Modem cable pin outs 98 RJ 45 8x8 to 9 pin Null Modem 110XCA20301 Modem cable pin outs 99 RJ 45 8x8 to RJ 45 8x8 Modem Modem cable pin outs 102 T Telephone dial up modem Application example 80 V Valid ranges Communication control table 25 Conversion control table 55 Port status control table 49 X XMIT communication Modsoft zoom screens Control table 14 15 Fault codes 15 16 17 Modbus function codes 13 14 XMIT conversion Modsoft zoom screens 19 Fault Codes 20 Fault codes 20 port status Modsoft zoom screens 18 Fault codes 18 19 Installation 9 XMI T ZMM Installation 7 XMIT 1968 HLP Installation 8 840 USE 113 00
59. em control Bit 3 Enable RS 485 mode Bit 4 Bit 5 Terminated ASCII input Bit 6 Simple ASCII input Bit 7 Enable ASCII string messaging Bit 8 Enable Mod bus messaging Bit 9 Enable ASCII receive FIFO Bit 10 Enable back space Bit 11 Enable RTS CTS flow control Reserved Setto 1 when DCE connected to the PLC requires hardware handshaking using RTS CTS control This bit may be used in conjunction with values contained in 4x 13 and 4x 14 Start of transmission delay 4x 13 keeps RTS asserted for X mS before XMIT sends message out of PLC port 1 Likewise end of transmis sion delay 4x 14 keeps RTS asserted for X mS after XMIT has finished sending a message out of the PLC port 1 Once the end of transmission delay ex pires XMIT de assert RTS Set to 1 when the selected port should operate in RS 485 mode Otherwise it defaults to 0 which is RS 232 mode Reserved Set to 1 to remove and discard all characters from FIFO until the starting string is matched then these starting characters and subsequent characters are written into a contiguous 4x register destination block until the termi nator sequence is matched The terminator string is also written into the 4x register destination block Refer to 2 2 9 1 for more details Set to 1 to remove the ASCII characters from FIFO for writing into a contiguous 4x register block The Mes sage pointer 4x 9 specifics the 4x register block Refer to 2
60. er count is reduced to 0x0002 2 Source block starting at 400201 high byte 301 23 cat Initial character count 0 000 Conversion control selection 32bit unsigned conver sion 32bit signed destination register pair is 0 0 01 23 loaded with Source block advanced to 400205 high cat byte now aims at ASCII string character count is reduced to 0x0004 32bit signed destination register pair is 0 0 01 23 loaded with Source block advanced to 400306 high cri byte now aims at ASCII string character count is reduced to 0x0002 Description of Opcode 1 Example Opcode 1 skips initial white space and then looks for optional sign or at least one decimal digit 0 to 9 terminated by something other than white space or decimal digit Then the binary equivalent value of the string is written into the destination register for 16bit conversion or into the destination register pair for 32bit conversion The 32bit destination register pair has least significant word LSW stored in the lower register number and most significant word MSW stored in the higher register number An error occurs when no decimal digit is present or when so many digits are present that the converted binary equivalent is too largeto fit in the requested storage type XMIT Conversion Block 63 64 4 3 1 2 Description of Opcode 2 Example Opcode 2 skips initial white space a
61. ers Read General R efer NOT Supported ences Write General R efer NOT Supported ences Technical References Response 512 Coils 512 Inputs 254 Registers 32 Registers 1 Coil 1 Register 800 Coils 60 Registers NOT Supported NOT Supported Response 800 Coils 800 Inputs 100 Registers 100 Registers 1 Coil 1 Register 800 Coils 100 Registers NOT Supported NOT Supported 91 92 M84 PLC Maximum Parameters Function Code Technical References Description Read Coil Status Read Input Status Read Holding Registers Read Input Registers Force Single Coil Force Single Register Force Multiple Coil Force Multiple Register Query 64 Coils 64 Inputs 32 Registers 4 Registers 1 Coil 1 Register 64 Coils 32 Registers Response 64 Coils 64 Inputs 32 Registers 4 Registers 1 Coil 1 Register 64 Coils 32 Registers 840 USE 113 00 2 Cable Pinouts You need to build an interface cable between your PLC and the modem or printer The actual cable is connected to Port 1 of the PLC and to the RS232 port of the modem or printer or direct to another PLC s Modbus port Becausethe XMIT supports many modems and printers the pinouts are going to vary A list of the devices that have been tested with the Modbus master PLC port 1 along with a cable pin out reference are provided in the Modicon 309 COM 455 Ox XMIT Loadable Read MeFirst GI RMF The actual pinouts are provid
62. estination Register 4x 46 ASCII String Character 4x 7 Count High or Low byte 4x register begin read at High or Low byte Defines the search area XMIT Conversion Block 55 Warning DO NOT modify the address in the middle node of 60 the XMIT block or delete it from the program while it is active This locks up the port preventing communications Bottom Node Content The bottom node must contain a constant equal to 0008 This is the number of registers used by the XMIT conversion instruction 56 XMIT Conversion Block 840 USE 113 00 4 2 XMIT Conversion Control Table Thefollowing is a detail description of each of the 8 XMIT conversion control table registers 4 2 1 XMIT Revision Number 4x Read Only Displays the current revision number of XMIT block This number is automatically loaded by the block and the block over writes any other number entered into this register 4 2 2 Conversion Fault Status 4x 1 Read Only This field displays a fault code generated by the XMIT conversion block A complete list is shown in thetable below Fault Status 4x 1 Fault Code Fault Description 122 Top node of XMIT not equal to zero one or two 123 Bottom node of XMIT is not equal to seven eight or sixteen 131 Invalid character count 135 Invalid destination register block 136 Invalid source register block 137 No ASCII number present 138 Multiple sign characters present 139 Numerical overflow detected 140 Str
63. f Schneider Automation Inc The following are trademarks of Schneider Automation Inc Modbus Modbus Plus Modicon 984 DIGITAL andDE CGareregisteredtrademar ksofDigitalE quipment Corporation IBM and ATO are registered trademarks of International Business Machines Corporation Microsoft and MS DOSQ are registered trademarks of Microsoft Corporation ProcommQ is a registered trademarks of Datastorm Technologies Corporation Copyright 1998 Schneider Automation Inc Printed in U S A Preface iii Contents Chapter 1 INTOGUCHON zaauwkxra ak dua waa dura E RR Rec e 1 11 Specific 2 111 RestrictioriS 2 112 Software Hardware Required 3 1 1 3 Reference Documents 5 12 PLCLoadableFunctions 2 2 22 6 13 XMIT Installation asaLoadable 7 1 3 1 DX Zoom Screens Loading DXFDT SYS 7 1 3 2 DX Zoom Screens Loading XMIT ZMM 7 1 3 3 Loading XMIT1968 HLP Help Screen File 8 1 3 4 LoadingNSUPEXE 8 1 3 5 LoadingXMIT EXE 9 L4 XMIT Zoom Screens tasas e rm Rx a Ow aha ea 13 1 4 1 DX Communication Screens Eight 13 1 4 2 DX Port Status Scree
64. function in relation to the selected conversion Therefore they are just ignored Conversion to Pertinent Bits Relationship Conversion Type opcode Pertinent Bit State software sets bit state Illegal opcode displayed when illegal opcode is detected ASCII decimal to integer 1 16 0 11 12 13 15 721 8 0 ASCII hex to integer 2 16 0 11 12 13 15 721 8 0 58 Conversion Block 840 USE 11300 840 USE 113 00 ASCII hex to integer array 3 Integer to ASCII decimal 4 Integer to ASCII hex 5 Integer array to ASCII hex 6 S wap source bytes to destination 7 Copy source block to destination 8 Compare source amp destination blocks 9 Search source block for defined string de fined in destination 10 Validate or append error check in source block 11 13 15 16 none 15 9 10 11 12 14 16 none 15 9 10 11 12 14 16 none 14 15 16 8 14 15 16 8 7 8 14 15 16 none 7 8 13 15 16 none 7 8 13 15 16 none 2 3 4 13 15 8 yes 14 16 1 0 XMIT Conversion Block 59 4 2 5 Data Conversion Opcodes 4x 4 Select the type of conversion you want to perform from the list of eleven options listed the table After picking the type of conversion refer to Data Conversion Control Bits 4x 3 for additional control options that relate to the specific conversion type selected 4x 4 Data Conversion Opcodes and their Definitions Data Type 4x block Data Type 4x bloc
65. ide the allowed range for the configured PLC an error is reported in Fault Status 4x 1 Enable ASCII Receive FIFO Setting this bit to 0 ends this function When the FIFO receives 512 characters an internal overflow is set When this occurs all subsequent characters are discarded all ASCII input operations simple and terminated are ended and the block returns an error until you toggle Bit 9 When Bit 9 is toggled all data in the FIFO is discarded both ASCII input control bits are ignored Simple ASCII Bit 6 Terminated ASCII Bit 5 and when no ASCII output controls are selected then the control of the port 1 or 2 is returned back to the PLC You need to set either Terminated ASCII Bit 5 or Simple ASCII Bit 6 to remove the ASCII characters from FIFO for processing No than one of the following three bits can be set simultaneously Terminated ASCII Bit 5 Simple ASCII Bit 6 or ASCII Output Bit 7 Full duplex operation may be achieved by setting both ASCII Receive FIFO BIT 9 and ASCII Output Bit 7 This allows simple ASCII transmission out of the PLC while still receiving ASCII characters into FIFO This is useful when working with dumb terminals When ASCII Receive FIFO Bit 9 is set none of the following ASCII output controls are allowed Modbus Master Messaging Bit 8 Pulse Dial Modem Bit 13 Hangup Modem Bit 14 Tone Dial Modem Bit 15 and Initialize Modem Bit 16 Enable Back space When
66. ing mismatch error 141 String not found 142 Invalid error check detected 143 Invalid conversion opcode 4 2 3 Available to User 4x 2 The XMIT conversion block does not use this register However it may be used in ladder logic as a pointer An efficient way to use the XMIT block is to place a pointer value of a TBLK instruction into this register For a example refer to Chapter Five Application Examples 840 USE 113 00 XMIT Conversion Block 57 4 2 4 Data Conversion Control Bits 4x 3 This 16 bit word relates to the Data Conversion 4x 4 word These bits provide additional control options based on which of the eleven conversions you select 4x 3 Data Conversion Control Bits and their Definitions Bit 4 Definition 1 0 1 Not Used 2 CRC 16 seed 0x0000 OxFFFF 3 Error check type LRC 8 CRC 16 5 amp 6 Not Used 7 Upper to Lower to lower upper 10 Fixed Variable 11 Unsigned Signed 13 Automatic advance source Yes No pointer points to the next char acter after the last character purged 14 Automatic advance destination Yes No pointer points to the next char acter after the last character purged 15 Begin reading ASCII at source Low byte High byte beginning with normal 16 Begin saving ASCII at destina Low byte high byte tion beginning with normal Certain bits relate to certain conversions Those bits not mentioned are not validated or modified by the selected conversion and they have no
67. initialization message must always start with Hayes standard AT command The XMIT block automatically precedes modem command messages with AT and appends the message with carriage return OxOD and line feed Ox0A characters since these are required by all modem control messages Other non controlling ASCII messages do not have to end with a carriage return and line feed For example a typical initialization message that XMIT sends to the modem Message AT amp F amp K0 amp QO amp DOV 1X0Q0 lt CR gt lt LF gt Length 17 characters For example the initialization message may also be used to set S registers of the modem Message AT SOZ1 CR LF2 Length 4 characters Characters within parentheses are automatically sent To have XMIT send an initialization message to the modem bit 7 and bit 16 of the command word must be ON When bit 16 is ON bits 15 and 14 must not be ON or XMIT will not complete the operation successfully To actually send the message the top input of XMIT must come ON and stays ON until the operation is complete or an error occurs When XMIT determines the message was successfully sent to the modem it turns ON the bottom output When an error occurs the middle output Technical References 107 comes Thetop output is whilethe message is being sent to the modem Cp Expert To eliminate some ladder logic programming you may initialize the modem with parameters via a terminal prog
68. into the PLC BEFORE the XMIT EXE file If not the XMIT instruction will not operate correctly and all three outputs turn on Load Delete F1 print F3 F4 F5 8 8 9 DX Loadable Configuration DX Memory Used 0 Total Memory Avail 3107 Name Rev Size Opcode Filename a nsup exe Press Enter or to view current loadable selection list Figure 2 Loadable Screen Sample Screen 8 Introduction 840 USE 113 00 Step 2 Step 3 Step 4 840 USE 113 00 1 3 5 Step 1 A system message appears telling you that you can now access this loadable Hit Shift to display all available loadables The NSUP EXE Loadable should now appear in this list Place your cursor onto NSUP EXE and press enter This displays the revision size and opcode of the NSUP Loadable Its Opcode is ff Hex Ensure that this opcode does not conflict with any other Op codes that may be in use If so select a new opcode from the available list Note To obtain the latest revisions to your NSUP Loadable contact Customer Service Loading XMIT E XE Caution When the NSUP loadable is not installed or installed after the XMIT loadable or installed in a Quantum PLC with an older executive than specified in Section 2 1 1 all three outputs turn on regardless of the input states Caution The NSUPEXE file MUST be loaded into the PLC BEFORE the XMIT EXE file If
69. it 721 Modem output B it 2 3 13 14 15 16 5 6 8 9 10 11 12 plus one but 7 1 ONLY one of the following bits is setto 1 13 14 15 or 16 while the other three bits must be set to 0 Modbus master 2 3 5 6 7 9 10 11 12 13 14 15 16 messaging output Bit 8 1 Enable ASCII re 2 3 10 11 12 5 6 7 8 13 14 15 16 ceive input FIFO ONLY Bit 9 1 When using either of these functions you MUST set Enable ASCII receive FIFO 4x 8 Bit 9 to 1 46 XMIT Communication Block 840 USE 113 00 Chapter 3 XMIT Port Status Block V XMIT Port Status Block V XMIT Port Status Display Table 840 USE 113 00 XMIT Port Status Block 47 3 1 XMIT Port Status Block The XMIT port status block shows the current port status Modbus slave activity ASCII input FIFO and flow control information that may be used in ladder logic for some applications The XMIT port status block is totally passive It does not take release or control the PLC port 3 1 1 Characteristics Size Three nodes high PLC Compatibility V Quantum PLCs 140 CPU 113 02 140 CPU 213 04 140 CPU 113 03 with 2 12 executive or higher 140 CPU 424 02 with 2 10 executive or higher and 140 CPU 434 12 140 CPU 534 14 with 1 02 executive or higher Compact PLCs PC E984 241 PC E984 245 PC E984 251 and PC E984 255 with 1 02 executive or higher V M Micro PLCs 110 CPU 612 04 with 1 00 executive or higher V Momentum PLCs 171 CCS 700 00 171 CCS 700 10
70. k Illegal opcode displayed Not applicable when illegal opcode is detected Received ASCII deci Converted to 16bit or 32bit signed or un mal character string 1 signed binary integer Received ASCII hex 16bit or 32bit unsigned character string 2 binary integer Received ASCII hex 16bit unsigned binary inte character string 3 ger array 16bit or 32bit signed or ASCII decimal character unsigned integer 4 string for transmission 16bit or 32bit unsigned ASCII hex character string binary integer 5 for transmission 16bit unsigned integer ASCII hex character string array 6 for transmission High and low bytes from Swapped to ASCII destination register saved ASCII source block register block 7 ASCII string from Copied to ASCII destination register source register block block with or without case 8 conversion ASCII source register Compared to ASCII string defined in des block 9 tination register block with or without case sensitivity ASCII source register Search for ASCII string defined in des block 10 tination block with or without case sensitivity Error check 8bit LRC or Validated or ASCII string in source regis 16bit CRC 11 Appended ter block on s Binary to BCD and BCD to binary conversions may be performed using more than one XMIT conversion block For details refer to Section 4 4 Other Conversion Types 60 XMIT Conversion Block 840 USE 113 00 840 USE 113 00 4 2 6 4 2 7
71. lace the data into the master PLC data area 40100 40199 enter 100 in this field Depending on the type of Modbus command write or read the source and destination data areas must be as defined in the Source and Destination Data Areas table below 40 Communication Block 840 USE 113 00 Source and Destination Data Areas for Function Codes 01 06 15 and 16 Function Code Master PLC Data Area Slave PLC Data Area 03 Read multiple 4x 4x destination 4x source 04 Read multiple 3x 3x source 01 Read multiple Ox Ox destination Ox source 02 Read multiple 1x Ox destination 1x source 16 Write multiple 4x 4x destination 15 Write multiple 0x Ox source Ox destination 05 Write single 0x Ox source Ox destination 06 Write single 4x 4x source 4x destination When you want to send 20 Modbus messages out of the PLC you must program 20 Modbus definition tables and then through ladder logic increment the pointer to each definition table after each successful operation of XMIT or you may program 20 separate XMIT blocks and then activate them one at a time through ladder logic 2 2 10 2 Modbus Function Code 08 For Modbus messages the pointer is the register offset to the first register of the Modbus definition table The Modbus definition table for Modbus function code 08 is five registers long and you must program it for successful XMIT operation The Modbus definition table
72. lave PLC In order to reset clear the fault the XMIT instruction blocks top input must be toggled OFF for one PLC scan Conclusion The four networks of ladder logic in this application example shows how easy it isto use a XMIT instruction to communicate between a PLC and a modem Programmed ASCII messages stored in the master PLC command the modem to dial and hangup The XMIT sends the message and waits for a reply using the commands you programmed into its control table Programming multiple instances of the XMIT control table into the source table of a TBLK is an excellent method to setup XMIT for a new message Wetherefore recommend that you usethis method in all future applications implementing the XMIT instruction Also recall that certain parameters must be part of the modem initialization string for XMIT to transmit a message to remote modems properly Application Examples 840 USE 113 00 Appendix Technical References V Modbus Query Response Parameter Limits V Cable Pinouts V Adapter Kits V Configuration using Hayes Compatible Dialup Modems Only Technical References 89 90 1 Modbus Query Response Parameter Limits The query response parameters are limited based upon the type of PLC you areusing Refer to the applicabletable below 884 Quantum PLC Maximum Parameters Function Code 584 984 PLC Maximum Parameters Force Multiple Register Function Code 1
73. le control input Theinput tothe top node begins an XMIT operation and it should remain ON until the operation has completed successfully or an error has occurred Theinput to the middle node is not used for the XMIT conversion block Note Toreset an XMIT fault and dear the fault register the top input must go OFF for at least one PLC scan Outputs XMIT may produce two possible outputs The output from the top node is not used on the XMIT conversion block The output from the middle node goes ON when XMIT has detected an error or was issued an abort The output from the bottom node goes ON when an XMIT operation has been successfully completed Top Node Content The top node must contain a constant 0000 since conversions do not deal with the PLCs port Theloadable version does accept 4x registers in the top node whereas the builtin does NOT Middle Node Content The 4x register entered the middle node is the first in a group of eight 8 contiguous holding registers that comprise the control block as shown below XMIT Conversion Control Table Description Description Valid Entries XMIT Revision Number Read Only Fault Status Read Only Available to User 4x 2 0 May be used as pointers for instructions like TBLK Data Conversion Con 4x 3 Refer to the bit definition trol Bits table for 4x 3 Data Conversion Op 4x 4 Refer to the definition table code for 4x 4 Source Register 4x 45 4x register begin read at D
74. ly a experienced modem user should change or not use these parameters These parameters are automatically added by XMIT AT before and CR gt LF after to the message programmed by you Note While some modem manufactures state full compatibility with Hayes they may still be slightly different Therefore we recommend using only those commands that have the same definition as those stated above Master PLC Setup The XMIT must transmit three messages from the master PLC port 1 tothe slave PLC two modem messages Dial and Hangup and one modbus message You must program these messages into the master Application Examples 81 PLC holding registers The actual messages their content is provided in the table below Modem Messages Dial Message hangup Mes sage Modbus Message Modbus Function Code Quantity Slave PLC Address Slave PLC Data Area Master PLC Data Area NOTE The ATDT header and CR LF trailers are automat ically sent and are NOT included in the length of message control register 4x 10 5 2 4 Ladder Logic Network 1 sends the Modbus commands to the slave PLC The references to holding registers coils and inputs may be changed based upon your application Refer to Figure 27 Initiate XMIT Finished Enable Data Transmission Sending Message Transmission Error Messages Transmission A Nu 0033 0037 0038 0035 0035
75. middle node of 62 the XMIT block or delete it from the program while it is active This locks up the port preventing communications Bottom Node Content The bottom node must contain a constant equal to 0016 This is the number of registers used by the XMIT instruction 26 Communication Block 840 USE 113 00 840 USE 113 00 2 2 XMIT Communication Control Table 2 2 1 2 2 2 Thefollowing is a detail description of each of the 16 XMIT communication control table registers XMIT Revision Number 4x Read Only Displays the current revision number of XMIT block This number is automatically loaded by the block and the block over writes any other number entered into this register Communication Fault Status 4x 1 Read Only This field displays a fault code generated by the XMIT block A complete list is shown in thetable below Fault Status 4x 1 Fault Code mn ST BY 100 101 102 103 104 105 106 107 108 109 99 Fault Description Modbus exception Illegal function Modbus exception Illegal data address Modbus exception Illegal data value Modbus exception Slave device failure Modbus exception Acknowledge Modbus exception Slave device busy Modbus exception Negative acknowledge Modbus exception Memory parity error Reserved Slave PLC data area cannot equal zero Master PLC data area cannot equal zero Coil Ox not configured Holding regi
76. n 0 0 May be used as pointers for instructions like TBLK 9600 8 0 1 0 May be used as pointers for instructions like TBLK 0000 0001 0000 0000 256 Dec 100 Application Examples 77 Length of Message Response timeout mS Retry Limit Start of Transmission Delay mS End of Transmission Delay mS Current retry Network 4 resets the XMIT instruction when a fault occurs Initiate XMIT Data Transmission Error Occurred Transmission Error in Using XMIT D wu 0035 0018 0037 0037 10001 Error Occurred Reset XMIT inUsing XMIT Fault a 0034 0038 All Finished Messages Sending Sent Message Figure 25 Network 4 Reset XMIT Faults In network 4 coil 00037 goes ON and remains ON until a reset is performed As always based upon your application you should determine how to address faults and reset your application Coil 00038 goes ON when all four Modbus commands are successfully sent to the slave PLC In order to reset clear the fault the XMIT instruction block s top input must be turned OFF for one PLC scan 78 Application Examples 840 USE 113 00 5 1 4 Conclusion The four networks of ladder logic in this application example shows how easy it is to send multiple Modbus commands to a slave PLC from a master PLC using only one XMIT instruction Programming multiple instances of the XMIT control table into the sourcetable of a TBLK is an excellent method to setup XMIT for a new
77. n Three 18 1 4 3 DX Conversion Screen Three 19 15 Custome Savice 322222222202 beh e dud ERE qa e ds 21 Chapter 2 XMIT Communication 23 21 Communication Block 24 2 11 Characteristics 24 2 1 2 Representation 24 22 XMIT Communication Control 27 2 2 1 XMIT Revision Number 4x Read Only 27 2 2 2 Communication Fault Status 4x 1 Read Only 27 2 2 3 Available to User 4x 2 28 2 2 4 Data Rate 4 3 29 2 2 5 Data Bits 4 4 30 2 2 6 Parity Bits 4X 5 30 2 2 7 Stop Bits 4 6 30 2 2 8 Available to User 4 7 30 2 2 9 Command Word 4 8 30 840 USE 113 00 Contents 2 2 10 Message Pointer Word 4 9 38 2 211 Message Length 4 10 44 2 2 12 Response Time Out mS 4x 11 44 2 2 13 Retry Limit 4 12 44 2 2 14 Start of Transmission Delay mS Ax 13 45 2 2 15 End
78. nd then looks for optional sign or and at least one hex digit 0 to 9 or A to F or a to f terminated by something other than white space or hex digit Then the binary equivalent value of the string is written into the 16bit or 32bit destination 4 3 1 3 Description of Opcode 3 Example Opcode 3 converts ASCII hex characters into an array of 16bit binary equivalents with 4 ASCII characters packed into each 16bit storage word 4 3 2 ASCII Output Related Conversion Examples Opcodes 4 6 convert PLC binary data into ASCII data Oncethe PLC binary data is converted into ASCII data it is then transmitted via the PLC port and XMIT communication block At this point the converted ASCII data is ready to be used by the field device based upon your application needs Note n opcodes 4 6 error occurs when the destination register block is greater than 512 registers or runs past the end of the PLCs state RAM configuration ASCII Output Related Conversion Examples Initial character count is 0x000C Conversion control selects 16bit signed fixed output format using leading zeroes Destination block is loaded with 000000040158 Destination block advanced to 400107 high byte Conversion control selects 32bit unsigned variable output format XMIT Conversion Block 840 USE 113 00 4 3 2 1 4 3 2 2 840 USE 113 00 4 3 3 Final character count 0x0009 Destination block advanced to 400005 high
79. ntents of the first source table Block 1 or 40200 40203 to the XMIT control table 40009 40012 U pon successful completion the next source table is copied Thus TBLK copies the second source table Block 2 or 40204 40207 to the XMI T control table 40009 40012 The TBLK continues until all three Modbus commands are sent Block 1 Block 3 The SUB instruction verifies that the source table transfer is complete t checks after each block transfer The XOR instruction clears all registers in the 40009 40012 range Network 3 sends the Modbus message from the master PLC to the slave PLC Send All New Messages Message ent M 0001 Message _ Transmission 0036 9034 40001 0017 pe XMIT 810 Transmission Error 0017 A Transmission 0019 Transmission Successfu 0037 Error Occurred in Using XMIT Figure 30 Network 3 Send Modbus Commands Using XMIT In network 3 the Modbus message is formed using the XMIT instruction so that it may be sent from the master PLC to the slave PLC 86 Application Examples 840 USE 113 00 Thetop input of the XMIT instruction remains ON until the Modbus message is successfully sent The XMIT control tableis 16 registers long In this example the XMIT control table starts with register 40001 and ends with register 40016 The contents of these registers are shown in the table below XMIT Control Table
80. o write 32 coils to a slave PLC There is a size limitation on quantity that is dependent on the PLC model Referto Appendix A for complete details on limits Enter the slave Modbus PLC address Typically the Modbus address range is 1 247 To send a Modbus message to multiple PLCs enter 0 forthe slave PLC address This is referred to as Broadcast Mode Broadcast Mode only supports Modbus function codes that writes data from the master PLC to slave PLCs Broadcast Mode does NOT support Modbus function codes that read data from slave PLCs For a read command the slave PLC data area is the source of the data Fora write command the slave PLC data area is the destination for the data For ex ample when you want to read coils 00300 00500 from a slave PLC enter 300 in this field When you want to write data from a master PLC and place it into register 40100 of a slave PLC enter 100 in this field Depending on the type of Modbus command write or read the source and destination data areas must be as defined in the Source and Destination Data Areas table below For a read command the master PLC data area is the destination for the data returned by the slave Fora write command the master PLC data area is the source ofthe data For example when you want to write coils 00016 00032 located in the master PLC to a slave PLC enter 16 in the field When you want to read input registers 30001 30100 from a slave PLC and p
81. of the input states Caution The NSUP EXE file MUST be loaded into the PLC BEFORE the XMIT EXE file If not the XMIT instruction will not operate correctly and all three outputs turn on Top Node Content The top node must contain one of the following constants either 0001 to select PLC port 1 or 0002 to select PLC port 2 Theloadable version does accept 4x registers in the top node whereas the builtin does NOT Middle Node Content The 4x register entered in the middle node is the first in a group of Sixteen 16 contiguous holding registers that comprise the control block as shown below XMIT Communication Control Table Description Description Valid E ntries XMIT Revision Number Read Only Fault Status Read Only Available to User 4x 2 0 May be used as pointers for instructions like TBLK Data Rate 4x 33 50 75 110 134 150 300 600 1200 2400 9600 and 19200 XMIT Communication Block 25 Data Bits 4x 4 7 8 Stop Bits 0 1 2 Available to User 4x 7 0 May be used as pointers for instructions like TBLK Command Word 4x 48 0000 0001 0000 0000 256 Pointer Message 4x 9 Limited by the range of 4x Table registers configured Length of Message 0 1024 Response Time Out 4x 11 0 65535 mS Retry Limit 0 65535 Start of Transmission 4x 13 0 65535 Delay mS End of Transmission 4x 14 0 65535 Delay mS Current Retry Read Only Werning DO NOT modify the address in the
82. on Master PLC Slave PLC PC E984 2xx RS 232 Cable PC E984 2xx or gt gt or 140 CPU xxx xx 140 CPU xxx xx Master PLC Slave PLC 984 2 984 2 or yee Radio Modem Radio Modem o 140 CPU xxx xx 140 CPU xxx xx RS 232 Cable RS 232 Cable Figure 20 Hardware Configuration for Master to Slave PLC Application 840 USE 113 00 72 Application Examples 5 1 2 840 USE 113 00 Note modems Master PLC Setup The XMIT must transmit four Modbus messages from the master PLC port 1 The XMIT forms these messages from the four Modbus message definition tables as defined in the master PLC TheModbus definition tables are shown below Modbus Message Definition Tables Definition Table 1 Definition Table 2 Definition Table 33 Definition Table 4 This application works with both radio modems and lease line Contents N co 5 10 800 Contents Contents m 97 Contents m 113 Application Examples 73 5 1 3 Ladder Logic Network 1 sends the Modbus commands to the slave PLC The references to holding registers coils and inputs may be changed based upon your application Refer to Figure 21 Initiate XMIT Finished Enable Data Transmission Sending Message Transmission Error Messages Transmission gt 0033 0037 0038 0035 0035 Enable Message T
83. or XMIT conversion block The block has builtin diagnostics that checks to make sure no other XMIT blocks are active in the PLC Within the XMIT block a control table allows you to control the communications link between the PLC and DCE Data Communication E quipment devices attached to M odbus port 1 port 2 of the PLC The XMIT block does NOT activate the port LED when it is transmitting data Expert Remember the M odbus protocol is a master slave protocol Modbus is designed to have only one master polling multiple slaves Therefore when using the XMIT block in a network with multiple masters contention resolution and collision avoidance is your responsi bility and may easily be addressed through ladder logic programming Restrictions This function block controls Modbus port 1 of the 140 CPU 113 02 140 CPU 213 04 140 CPU 113 03 140 CPU 424 02 and PC E984 2xx PLCs The XMIT does not control Modbus port 2 of these PLCs In contrast this function block controls Modbus port 2 of the 110 CPU 61204 XMIT does not control Modbus port 1 of this PLC This function block does NOT operate on Modicon Micro models 110 CPU 512 xx 110 CPU 612 00 03 and Compact models PC A984 1xx PC 0984 1xx PLCs Limits exist for Modbus query response parameters based upon the PLC model Refer to Appendix A 840 USE 113 00 840 USE 113 00 1 1 2 1 1 2 1 1 1 2 2 Software and Hardware Required The XMIT function block is availa
84. ow Bit 11 remains cleared until either Simple ASCII Input Bit 6 or Terminated ASCII Input Bit 5 have removed enough characters from the FIF O whereby reducing it to less than one quarter full of characters at which point the RTS Control Flow Bit 11 is tuned ON Note TheRTS CTS Flow Control algorithm is different from RTS CTS Modem Control The former is related to full duplex receive buffer overflow The latter deals with the transmit process gaining access to a shared transmission medium Therefore it is illegal to simultaneously request both of these RTS CTS algorithms Note You CANNOT select any type of RTS CTS Flow Control Bit 11 handshaking when the port is in RS 485 Mode Bit 3 because these signals do NOT exist in RS 485 mode Enable Xon Xoff Flow Control The following pertains to the output mode The XMIT state variable is set to BLOCKED when Xoff character is received Likewise the XMIT state variable is set to UNBLOCKED when Xon character is received In neither case will Xon or Xoff be inserted into the FIFO When transmission is UN BLOCKED and Simple ASCII Output Bit 7 Xon Xoff Flow Control Bit 12 set then the transmit output data is sent out in 16 byte packets After all output packets are sent then the bottom output on the XMIT block goes ON Operation Successful If during a transmission it suddenly becomes BLOCKED only the remaining characters in the current output packet are sent never
85. r of Start chars or Termination chars 135 Invalid Destination Register Block 136 Invalid Source Register Block 137 No Ascii Number Present 138 Illegal Configuration Data bits Data rate Parity or Stop bits 139 Numerical Overflow Detected 140 String Mismatch Error 141 String Not Found Error 142 Invalid Error Check Detected 143 Invalid Conversion Opcode END XMIT GET STATUS COMMUNICATION Figure 16 XMIT Port Status Zoom Screen 3 of 3 1 4 3 DX Conversion Screen Three Utility Hex Dec Bin Goto Quit F1 MIKE F3 F4 DX Zoom Editor F7 Lev 8 8 9 XMIT CONVERSIONS PAGE 1 OF 3 XMIT Revision Number 40100 UINT 201 DEC Fault Status 40101 UINT 0 DEC Register Avail to User 40102 UINT 0000 HEX Data Conversion OpCode COPY SRC BLK gt DEST Data Conversion Control Bits 40103 UINT 0010010110000000 B2 CRC Seed OxFFFF B3 Err Chk Type LRC 8 B4 Error Check APPEND B7 Conv Case UPPR gt LOWR B8 Case Sens NO B9 Format Leading ZEROS B10 Output Format VARIABLE Bil Conv Type SIGNED B12 Conv Word 16 BIT B13 Auto Adv Src NO B14 Auto Adv Dest NO B15 Begin Read Src HI BYTE B16 Begin Save Dest HI BYTE SRC Register Offset 40105 UINT 2 DEC Begin Read At HI BYTE e g 100 gt 40100 Must be non zero DEST Register Offset 40106 UINT 1 DEC Begin Save At HI BYTE e g 200 40200 Must be non zero Dat
86. r operation with the XMIT instruction Program an initialization message or a communication program in the master PLC and send it the the modem via the XMIT function We recommend using a terminal program to initialize the modem that simplifies the ladder logic In this example communication program named P rocomm by DataStrom was used to initialize the modem When possible initialize all dialup modem in the 80 Application Examples 840 USE 113 00 840 USE 113 00 5 2 3 system using the same initialization message The actual initialization message and a definition of each parameter is provided in the table below Initialization Message for DialUp Modem Initialization Message AT amp F amp KO amp DO amp QOQOVIXO Attention amp F Recall factory configuration as active configuration amp K0 Disable local flow control amp D0 Ignore status of DTR signal amp Q0 Communicate in asynchronous mode 00 Return result codes 1 Display result codes as words 4 Provide basic call progress sult codes Connect No Carrier and Ring El Echo characters from the key board to the screen in com mand state lt CR gt Carriage return lt LF gt Line feed These parameters must always be part of the initialization string for XMIT to function properly These parameters should be part of the initialization string for XMIT to transmit a message to remote modem properly On
87. ram and not use XMIT Once the parameters are in the modem memory they may be saved to non memory with an AT command usually amp W 4 2 Dial Message The dial message is used to send a telephone number to the modem Only AT commands related to dialing a number should be included with the message Examples of typical dial messages used with XMIT shown below For example dial telephone number using tone dialing Message AT DT 6800326 CR LF gt Length 7 characters For example dial telephone number using pulse dialing Message AT DP 6800326 lt CR gt lt LF gt Length 7 characters For example dial telephone number using tone dialing wait to hear dial tone before dialing number and pause before dialing the rest of the number Message AT DT W 6800326 lt CR gt lt LF gt Length 9 characters Characters within parentheses are automatically sent To have XMIT send atone dial message to the modem bit 7 and bit 15 of the command word must be ON When bit 15 is ON bits 16 and 14 must not be ON or XMIT will not complete the operation successfully To actually send the message the top input of XMIT must come ON and stays ON until the operation is complete or an error occurs When XMIT determines the message was successfully sent to the modem it turns ON the bottom output When an error occurs the middle output comes ON Thetop output is ON while the message is being sent to the modem
88. ransmission Figure 21 Network 1 Modbus Commands to Slave PLC Network 1 initiates the Modbus commands to the slave PLC when coil 00033 comes ON Coil 00035 remains ON until all four Modbus commands are sent to the slave PLC When an XMIT error occurs during a Modbus transmission to the slave PLC it unlatches coil 00035 Network 2 sets up the XMIT control table data 40001 40015 for new message Refer to Figure 22 Enable XMIT Send Message Transmission New Transmission Successful Message 40202 0035 0019 40008 0036 0035 Enable 0004 Messa All ge M Transmission essages Sent ox 40008 0005 SUB 40018 40008721 40008 0034 XOR 0005 Figure 22 Network 2 Setup XMIT Control Table 74 Application Examples 840 USE 113 00 840 USE 113 00 Two registers 4x 2 and 4 7 within the XMIT control table 15 register length are designated as Available to User so that pointer values for other instruction blocks like TBLK may be held in these registers In this example the TBLK instruction block uses register 40008 4x 7 as the pointer TheTBLK copies data from source tables See Figure 23 below into the XMIT control table In this example four source tables Blocks 1 Block 4 each four registers long are copied into the XMIT control table Destination Block four registers long 4x 8 4x 11 The contents of the sou
89. rce tables Blocks 1 Block 4 and the description of the XMIT control table are shown in the table below pointer 40008 1 destination source block table 40009 Block 1 40200 40010 40201 40011 40202 40012 40203 Block 2 40204 40205 40206 40207 XMIT Control Table Block 3 40208 40209 40210 40211 Block 4 40212 40213 40214 40215 Figure 23 TBLK Operation Application Examples 75 Contents of Source Tables and XMIT Control Table Source Block 1 40200 00000001 00000000 Tables 256 Dec 40201 100 40202 5 40203 3000 Block 2 40204 00000001 00000000 256 Dec 40205 105 40206 5 40207 3000 Block 3 40208 00000001 00000000 256 Dec 40209 110 40210 5 40211 3000 Block4 40212 00000001 00000000 256 Dec 40213 115 40214 5 40215 3000 XMIT Control 4 8 40009 Command Word Table 4x 9 40010 Pointer to Message Table 40011 Length of Message 4x 11 40012 Response timeout mS When coil 00035 goes ON for the first time TBLK copies the contents of the first source table Block 1 or 40200 40203 to the XMIT control table 40009 40012 U pon successful completion the next source tableis copied Thus TBLK copies the second sourcetable Block 2 or 40204 40207 to the XMI T control table 40009 40012 The TBLK continues until all four Modbus commands
90. rds and the message length register 4 10 must contain the length of 5 The internal format of the Ascii input definition table is as follows Word 0 High Byte Low Byte High Byte Low Byte number of starting chars number of terminator chars First starting char Second starting char High Byte First terminator char Low Byte Second terminator char Input storage destination reg offset e g 123 40123 Number of received chars written into input storage destination registers given by word 3 Word 1 Word 2 Word 3 Word 4 Page up down for prev next screen Figure8 XMIT Communication Zoom Screen 3 of 8 840 USE 113 00 14 Introduction Utilit F1 PORT 00 01 02 03 04 10 y PlcOps Hex Dec Bin Goto 2 4 DX Zoom Editor F7 Lev 8 8 XMIT Communication 0001 Diagnostics Code Definitions Quit F9 Ri Page 4 8 Return Query 11 Return Bus Message Count Restart Comm Option 12 Return Bus Comm Error Cnt Return Diagnostic Register 13 Return Bus Exception Count Change ASCII Input Delimiter 16 Return Slave NAK Count Force Listen Only Mode 17 Return Slave Busy Count Clear Counters 18 Return Bus Char Message Length 40110 UINT Response Time Out ms 40111 UINT Retry Limit 40112 UINT Start of Transmission Delay ms 40113 UINT End of Transmission Delay ms 40114 UINT Current Retry 40115 UINT Page up down for prev next screen Figure 9 XMIT Comm
91. sent on the disk The NSUP and LSUP loadables are used to interface EXE loadables with the PLC operating system DX Zoom Screens Loading DXFDT SYS Only load DXF DT SYS when using M odsoft 2 5 or lower for DX zoom screens This fileisin the MS 25 sub directory the DXF DT SYS file to the Modsoft runtime directory DXFDT SYS file replaces the existing DXFDT SYS file DX Zoom Screens Loading XMIT ZMM Only load XMIT ZMM when using Modsoft 2 6 or higher for DX zoom screens This fileisin the MS 26 sub directory the XMIT ZMM file to the directory in which the program files re side This file MUST be in the same directory as the program files for the program using XMIT or the DX zoom screens will not be available Introduction 7 1 3 3 Loading XMIT1968 HLP Help Screen File Step1 the 1968 file to the directory in which the program files reside This file MUST be in the same directory as the program files for the program using XMIT or the help screen will not be avail able 1 3 4 Loading NSUP EXE Step 1 Select Loadable F 7 then Dir then Load F1 A prompt appears asking for the filename NSUPEXE and then hit return t Note Either NSUPEXE file or LSUP EXE file must be loaded order to run the XMIT Block on the PLC Therefore if you already have LSUP EXE loaded you need not load NSUP EXE Refer to Figure 2 A Caution The NSUPEXE file MUST be loaded
92. ster 4x not configured Data length cannot equal zero Pointer to message table cannot equal zero Pointer to message table is outside the range of configured holding registers 4x Transmit message time out This error is gener ated when the UART cannot complete a transmission in 10 seconds or less This error bypasses the retry counter and will activate the error output on the first error Undefined error Modem returned ERROR XMIT Communication Block 27 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 Modem returned NO CARRIER Modem returned NO DIALTONE Modem returned BUSY Invalid LRC checksum from the slave PLC Invalid CRC checksum from the slave PLC Invalid Modbus function code Modbus response message time out Modem reply time out XMIT could not gain access to PLC commu nications port 1 or port 2 XMIT could not enable PLC port receiver XMIT could not set PLC UART User issued an abort command Top node of XMIT not equal to zero one or two Bottom node of XMIT is not equal to seven eight or sixteen Undefined internal state Broadcast mode not allowed with this Mod bus function code DCE did notassert CTS Illegal configuration data rate data bits parity or stop bits Unexpected response received from Mod bus slave Illegal command word setting Command word changed while active Invalid character count Inv
93. t to UNBLOCKED when CTS is ON and the receiving devices indicates it CAN process additional characters When transmission is UN BLOCKED and Simple ASCII Output Bit 7 and RTS CTS Flow Control Bit 11 are set then the transmit output data is sent out in 16 byte packets After all output packets are sent then the bottom output on the XMIT block goes ON Operation Successful If during a transmission it suddenly becomes BLOCKED only the remaining characters in the current output packet are sent never exceeding 16 characters and the XMIT block remains ACTIVE indefinitely Only when the CTS in ON will the ASCII output resume sending all remaining output packets Thefollowing pertains to the input mode Since RTS is an output signal it can be used independently of the ASCII output transmit process to BLOCK or UNBLOCK sending devices When ASCII Receive FIFO Bit 9 is set the RTS CTS Flow Control works in the input mode When ASCII Receive FIFO Bit 9 is set and neither of the two ASCII inputs are set Simple ASCII Input Bit 6 or Terminated ASCII Input Bit 5 the received characters will fill the FIFO in which they are inserted 36 Communication Block 840 USE 113 00 2 2 9 6 840 USE 113 00 Mean timethe RTS Flow Control Bit 11 is ON allowingthe sending device to proceed When the FIFO is morethan three quarters full with characters the RTS Control Flow Bit 11 is cleared to BLOCK the sending device The RTS Control Fl
94. tch stringis contained in the destination block and must be terminated by a 0x00 character The source pointer 4x 3 Bit 13 is advanced past the last matching character and the character count 4x 7 is reduced by the number of characters that matched When all characters in the source string match the destination string up to the NULL terminator then the bottom output goes on operation successful Otherwise the middle output goes on error 4 3 3 4 Description of Opcode 10 Example Opcode 10 takes the ASCII string defined in the destination register block and searches the source register block Theinitial ASCII string character count 4x 7 specifics the maximum number of characters to be searched it must be between 1 1024 The match stringis contained in the destination block and must be terminated by a 0x00 character When the match string is present in the source block then the source point 4x 3 Bit 13 is advanced to the start of the matching string The character count 4x 7 is reduced by the number of characters skipped over at the beginning of the source block and the bottom output goes on operation successful Otherwise the source pointer and character count are not changed and the middle output goes on error 4 3 3 5 Description of Opcode 11 Example Opcode 11 performs an error check computation for LRC 8bit CRC 16bit with seed FFF or CRC 16bit with seed 0 0000 When conversion control register 4
95. the ASCII Xoff character DC3 13 Hex The Xon Xoff operates in both the input and output modes Refer to 2 2 9 6 for more details Bit 13 Pulse dial modem Setto 1 when using a Hayes compatible dial up modem and you wish to pulse dial a telephone number You program the phone number into contiguous 4x registers of the PLC A pointer to these registers must be placed in control table register 4x 9 and the length of the message in 4x 10 Pulse dialed numbers are sent to the modem automatically preceded by ATDP and with carriage return CR gt and line feed lt LF gt appended Since the dial message is an ASCII string bit 7 must be ON prior to sending the number to be dialed Bit 14 hangup mo dem Setto 1 when using a Hayes compatible dial up modem and you want to hangup the modem You must use ladder logic to turn this bit ON Since the hangup mes sage is an ASCII string bit 7 must be ON prior to send ing the message Hang up messages are sent to the modem automatically preceded by and with car riage return CR and line feed LF appended XMIT looks for a correct disconnect response from the mo dem before it turns ON the bottom output noting a suc cessful completion Bit 15 Tone dial mo dem Setto 1 when using a Hayes compatible dial up modem and you wish to tone dial a telephone number You pro gram the dial message into contiguous 4x registers of the PLC A pointer to the dial message must be place
96. the master of all available catalogues only twelve pages lists all catalogues available on the MODFAX system Note BBS Schneider Automation s Customer Service Bulletin Board For Modsoft updates conversion utilities hardware and soft ware help field service bulletins Modbus and Modbus Plus help soft ware revision levels FLASH EXEC updates for 984E controllers load able updates and more Parameters are up to 14 4k baud no parity 8 data 1 stop phone 1 978 975 9779 Note Schneider Automation web page www modicon com provides user documentation file updates access to MODFAX and other online services Introduction 21 Chapter 2 XMIT Communication Block XMIT Communication Block V XMIT Communication Control Table V XMIT Communication Functions 840 USE 113 00 XMIT Communication Block 23 2 1 XMIT Communication Block The purpose of the XMIT communication block is to receive and transmit ASCII messages and Modbus Master messages using your PLC ports 2 1 Characteristics Size Three nodes high PLC Compatibility V Quantum PLCs 140 CPU 113 02 140 CPU 213 04 140 CPU 113 03 with 2 12 executive or higher 140 CPU 424 02 with 2 10 executive or higher and 140 CPU 434 12 140 CPU 534 14 with 1 02 executive or higher V Compact PLCs PC E984 241 PC E984 245 PC E984 251 and PC E984 255 with 1 02 executive or higher V Micro PLCs 110 CPU 612 04 with 1 00 executive or higher V Moment
97. the source and destina tion data areas must be as defined in the Source and Destination Data Areas table below The lowest ex tended register is addressed as register zero 600000 The lowest holding register is addressed as register one 400001 Enter the file number for the 6x registers to be written to or read from 1 10 depending on the size of the extended register data area 600001 is 60001 file 1 and 690001 is 60001 file 10 as viewed by the R efer ence Data Editor in Modsoft XMIT Communication Block 43 Source and Destination Data Areas for Function Codes 20 21 Function Code Master PLC Data Area Slave PLC Data Area 20 Read general reference 6x 4x destination 6x source 21 Write general reference 6x 4x source 6x destination When you want to send 20 Modbus messages out of the PLC you must program 20 Modbus definition tables and then through ladder logic increment the pointer to each definition table after each successful operation of XMIT or you may program 20 separate XMIT blocks and then activate them one at a time through ladder logic 2 2 11 Message Length 4x 10 You enter the length of the current message When XMIT is sending Modbus messages for function codes 01 02 03 04 05 06 08 15 and 16 the length of the message is automatically set to five When XMIT is receving Terminated ASCII input the length of the message must be set to five or an error results When XMIT is sending Modb
98. to perform this conversion type Thefirst XMIT conversion block uses opcode 5 to convert the 32bit BCD source integer into an 8 digit fixed place ASCII hexadecimal character string saved to a 4x register block The second XMIT conversion block uses opcode 1 to convert a decimal ASCII character string read from the same 4x register block into a 32bit binary destination integer When all 8 characters are parsed then the BCD source integer is a valid BDC number 70 XMIT Conversion Block 840 USE 113 00 Chapter 5 Application Examples V Multiple Modbus Commands Transmission from PLC master to PLC slave V Fault Word Transmission to Slave PLC via Dialup Modems 840 USE 113 00 Application Examples 71 5 1 Multiple Modbus Commands Transmission from PLC master to PLC slave Theladder logic in this example shows how to send multiple M odbus commands to a slave PLC using one XMIT block The example specifically sends four Modbus commands to a slave PLC with Modbus address 3 The commands perform the following functions V Read 25 holding registers 4x starting at 40010 in slave PLC and place into master PLC starting at 40800 V Write 25 holding registers 4x starting at 40825 in master PLC to slave PLC starting at 40010 V Read 16 coils Ox starting at 00001 in slave PLC and place into master PLC starting at 00097 V Write 16 coils Ox starting at 00113 in master PLC to slave PLC starting at 00001 5 1 1 Hardware Configurati
99. um PLCs 171 CCS 700 00 171 CCS 700 10 171 CCS 760 00 171 CCS 780 00 171 CCC 760 10 and 171 CCC 780 10 with 2 00 executive or higher 2 1 2 Representation Block Structure Start XMIT operation Operation is active Operation terminated unsuccessfully Operation successful Inputs XMIT has two possible control inputs Theinput to the top node begins an XMIT operation and it should remain ON until the operation has completed successfully or an error has occurred The input to the middle node aborts any active XMIT operation and forces the port to 24 XMIT Communication Block 840 USE 113 00 840 USE 113 00 slave mode An abort code 121 is placed into the fault status register The port remains closed as long as this input is ON Note Toreset an XMIT fault and dear the fault register the top input must go OFF for at least one PLC scan Outputs XMIT may produce three possible outputs The outputs from the top node goes ON while an XMIT operation is in progress The output from the middle node goes ON when has detected an error or was issued an abort The output from the bottom node goes ON when an XMIT operation has been successfully completed The following two cautions apply to loadables only Caution When the NSUP loadable is not installed or installed after the XMIT loadable or installed in a Quantum PLC with an older executive than specified in Section 2 1 1 all three outputs turn on regardless
100. und Caution Pin1 of the RJ 45 receives 5V from the PLC Technical References 101 A 2 10 45 8x8 to RJ 45 8x8 Modem RJ 45 connector 6x8 Pin 1 Connector Pinouts RJ 45 RJ45 Connector Connector RXD 4 4 4 RXD TXD 3 4 3 TXD RTS 6 4 6 RTS CTS 7 4 gt 7 CTS GND 5 5 GND DSR 2 2 DSR Chassis 8 8 Chassis Ground 4 Ground A Caution 102 Technical References Pin1 of the RJ 45 receives 5V from the PLC 840 USE 113 00 A 2 11 9 to RJ 45 8x8 Modem 110XCA 20301 9 pin Male Adapter RJ 45 connector 8x8 EL o FI Pin 1 1 Front View Connector Pinouts RJ 45 9 Pin Connector Connector RXD 4 2 RXD TXD 3 3 TXD RTS 6 7 RTS CTS 7 8 CTS GND 5 4 gt 5 GND DSR 2 6 DSR d 4 DTR Chassis 8 Case of the Ground 4 Connector Caution Pin1 of the RJ 45 receives 5V from the PLC 840 USE 113 00 Technical References 103 A 2 12 9 to RJ 45 8x8 Modem 110XCA20301 9 pin Male Adapter RJ 45 connector 8 8 9 Pin 1 00000000 Pin1 09 Front View Connector Pinouts RJ45 9 Pin Connector Connector RXD 4 2 RXD TXD 3 3 TXD RTS 6 7 RTS CTS 7 gt 8 CTS GND 5 4 gt 5 GND 6 DSR L
101. unication Zoom Screen 4 of 8 u n wu HH Ho Overrun Cnt Utility PlcOps Hex Dec Bin Goto Quit F1 F2 F3 F4 DX Zoom Editor F7 Lev 8 8 F9 R1 XMIT Communication Page 5 8 PORT 0001 4 1 Fault Status 40101 UINT 0 DEC XMIT Fault Codes Modbus exception Illegal function Modbus exception Illegal data address Modbus exception Illegal data value Modbus exception Slave device failure Modbus exception Acknowledge Modbus exception Slave device busy Modbus exception Negative acknowledge Modbus exception Memory parity error Slave PLC data area can not equal zero Master PLC data area can not equal zero Coil 0x not configured Holding register 4x not configured Data length can not equal zero Pointer to message table can not equal zero Page up down for prev next screen Figure 10 XMIT Communication Zoom Screen 5 of 8 840 USE 113 00 Introduction 15 Utility PlcOps Hex Dec Bin Goto Quit FIL F2 F3 F4 DX Zoom Editor F7 Lev 8 8 F9 R1 XMIT Communication Page 6 8 PORT 0001 4X 1 Fault Status 40101 UINT 0 DEC XMIT Fault Codes Continued 106 Pointer to message table outside the range of configured registers 107 Transmit message time out 108 Undefined error 109 Modem returned ERROR 110 Modem returned NO CARRIER 111 Modem returned NO
102. us messages for function codes twenty and twenty one the length of the message is automatically set to six When is sending ASCII messages the length may be 1 1024 ASCII characters per message 2 2 12 Response Time Out mS 4x 11 You enter the time valuein milliseconds mS to determine how long XMIT waits for a valid response message from a slave device PLC modem etc addition the time applies to ASCII transmissions and flow control operations When the response message is not completely formed within this specified time XMIT issues a fault The valid range is 0 65535 mS The timeout is initiated after the last character in the message is sent 2 2 13 Retry Limit 4x 12 You enter the quantity of retries to determine how many times sends a message to get a valid response from a slave device PLC modem etc When the response message is not completely formed within this specified time XMIT issues a fault and a fault code The valid rangeis 0 65535 of retries This field is used in conjunction with response ti me out 4x 11 44 XMIT Communication Block 840 USE 113 00 2 2 14 2 2 15 2 2 16 840 USE 113 00 Start of Transmission Delay mS 4x 13 You enter thetime value in milliseconds mS when RTS CTS control is enabled to determine how long XMIT waits after CTS is received before it transmits a message out of the PLC port 1 Also you may usethis register even when
103. ve 0 XMIT Tone dial modem 1 XMIT Hangup modem 2 XMIT Modbus messaging 3 XMIT Simple ASCII output 4 XMIT Pulse dial modem 5 XMIT Initialize modem 6 XMIT Simple ASCII input 7 XMIT Terminated ASCII input 8 XMIT ASCII input FIFO is ON but NO 9 XMIT function is active Input FIFO Status Bits 4x 5 Read Only Theregister displays the status of seven items related to the input FIFO is generated by the XMIT port status block Ax 5 Input FIFO Status Bits and their Definitions 1 3 Not Used Portowned by XMIT Not Used Unblocked by receiving device ASCII output transmission Blocked by receiv ing device ASCII input received XMIT Port Status Block 51 NO new character 52 3 2 7 10 ASCII input FIFO is ASCII input FIFO is Overflowing error ASCIl input FIFO Not Used ASCII input reception XMIT Blocked sen ding device Not empty Not overflowing error 13 15 ing device Input FIFO Length 4x 6 Read Only This register displays the current number of characters present in the ASCII input FIFO Theregister may contain other values based on the state of the input FIFO and if the length is empty or overflowing It is generated by the XMIT port status block 4x 6 Other Possible Values When Input FIFO Then Length ON amp Empty ON amp Overflowing XMIT Port Status Block 840 USE
104. x 8 Bit 5 to return port control back to the PLC When too many characters are written into the 4x register destination block with NO terminator detected or the 4x register destination block is outside the allowed range for the configured PLC an error is reported in Fault Status 4x 1 The character limit is the smaller of 1024 or two times the sizes of the 4x register destination block We recommend you placethe 4x register destination block for terminated ASCII input 4x 8 Bit 5 past all other 4x registers used in the application to avoid being over written by ASCII input in casethe terminator is absent Also you could allocate 512 registers for the 4x register destination block Terminated ASCII Example Assume that XMIT is activated with the command word 4x 8 Bit 9 and 5 set Enable ASCII FIFO and terminated ASCII The following ASCII string is received by the port AMScrlf weight 1245 GRAMScrlf wei Refer to the ASCII Input Definition Table that shows the contents denoted by used in this example XMIT Communication Block 33 Terminated ASCII Input Definition Table Example contents Word High Byte Low Byte 4x 0 Number of starting charac Number of terminator char ters 0x01 acters 0x02 4x 1 First starting character Second starting character NotUsed 4x 2 First terminator character Second terminator character cr if 4x 3 First 4x storage destination register 101 4
105. x 3 Bit 4 is set validate the selected error check at the end of the ASCII string in the source block with its given length defined by the ASCII string character count is validated When the error check is valid then the bottom output goes on operati on successful Otherwise the middle output goes on error When conversion control register 4x 3 Bit 4 is 0 append then the selected error check is computed and appended to the end of the ASCII 68 XMIT Conversion Block 840 USE 113 00 string in the source block The character count is increased by the byte Size of the error check the source pointer is not advanced and the bottom output goes on operation successful 840 USE 113 00 XMIT Conversion Block 69 4 4 Other Conversion Types Additional conversion types are possible using two XMIT conversion blocks 4 4 1 Binary to BCD Conversion Two conversion blocks must be used to perform this conversion type Thefirst XMIT conversion block uses opcode 4 to convert the 32bit binary source integer into a 10 digit fixed place ASCII decimal character string saved to a 4x register block The second XMIT conversion block uses opcode 2 to convert a hexadecimal ASCII character string read from the same 4x register block into 32bit BCD destination integer The binary source integer must be smaller than OxO5F 5E OF which is 99999999 deci mal 4 4 2 BCD to Binary Conversion Two XMIT conversion blocks must be used

Download Pdf Manuals

image

Related Search

Related Contents

    DCM3155/12 Philips Sistema micro de música  LED TV - Migros  I2269VWM /I2269VW/I2369V I2369VM/I2769V/I2769VM  Clam AntiVirus 0.80 User Manual  TRF4903 w/MSP430 Demonstration  Panas。nーc 取扱説明書 倒 性宅用照明器具 (キッチン  MANUAL DE SERVICIO (Código de máquina: C231)  

Copyright © All rights reserved.
Failed to retrieve file