Home
Chapter 6 - P2 Comms R2b.indd
Contents
1. E GND Logic Ground 6 Hime 2 1 LS Enim munem wares The CPU is considered a DTE device Most Modbus or ASCII devices being connected tothe CPU will ako be considered a DTE device and will need to swap TX and RX but you should always consult the documentation of thar device ro verify 1f a communication device such as a Modem is placed berween the CPU and another Modbus or ASCII device will most likely require connecting the signals across TX to TX and RX to RX Again this can differ fiom manufacturer to manufacturer so always consul he documentation before wiring the devices together e RTS signal on pin 5 of the RS 232 Port will um on when the TX signal is turned on and the S signal wil ur off when the TX signal ure off The amount of time thar the RTS signal um on before the TX signal tune and the amount of time dar the RTS signal waits before rurning off afier the TX signal urs of is adjustable in the 2 550 CPU Module Configuration for the RS 232 Pore The RTS signal is very ote required for media converters such as a RS 232 to RS 422 485 converter much like the FA ISOCON The RTS signal is sometimes required for use with radio modems as well Key on and off control There is also 5VDC 210mA on pin 2 available for powering an external device such as the Comore Micro panel Productivityzs
2. en ae X on oom nimm EERE x 6 62 Productivity eat tse saison ne ms ck ach bate th ab om tenet dea ae om renean om ata kid ot Tc cone te documentation of he dei to This occurs when the target devin canat LEN LEN Seren Conon Pats conte Coa Peterman Sec Support te efor perdet Sega Not i erer can E aei oot Oii Second Resource Secondary connection request is unable to duplicate bi Bl E E b len casas 2 code for the ever coon Consult ax x CO XX mace Con Tech om ommo Sot Pris om pointe non amabis corsen coments rs M Hue ar Mem te Eton 6 63 P2000 EtherNeVIP Error Codes case tnr Cru ES oat 10000 eter Link The Link path valid ar not eae m Applicaton has valid produce mm oat sinea the value configured nhe crat om Net Contigua tor connection fora consumer on a dierent ooma amsaa Rete nates rere Pay elah sor Target device dows not nave the resources
3. COMMUNICATIONS In This Chapter Communication Communication Ports Communications Connectivity Port Connections Communications ASCII and Custom Protocol Functionality ASCII Instructions Custom Protocol Instructions Communications Ethernet and UDP Port Numbers IP Addressing and Subnetting PC Setup CPU Setup Connection Behavior with Modbus TCP and Network Instructions Communications Modbus Functionality Master Client Function Code and Data Type Support Slave Server Function Code and Data Type Support Assigning Modbus Addresses to Tags Modbus Options Modbus Instruction Network Instructions Automatic Poll versus Manual Polling and Interlocking Message Queu EtherNet IP for the Productivity Series Terminology Definitions Network Layer Chart EtherNet IP Data Table of Contents Class 1 and Class 3 Connections 637 Example Setup Productivity2000 as EtherNet IP Adapter 637 Example Setup Productivity2000 as EtherNet IP Scanner 2 640 Troubleshooting Tips 643 Communications GS Drives Things to Consider for The Design of Remote GS Drives Configuration GS Drive Connections 646 646 6 51 6 51 6 52 6 53 6 54 6 54 6 57 6 57 6 58 Communications Port Configuratio Ethernet Configuration External Ethernet Port Settings Remote Access Configuration Serial Configuration RS 232 and RS
4. aa User Manual Ist Edition Rev A Chapter 6 Communications 2 550 Communication Ports cont d See Communications Configuration for port configuration Communications Connectivity for connection information and Communications Ethernet for Ethernet set up 6 Local Ethernet This RJ45 Ethernet Port supports remote I O Located on the underside of the CPU icis he rear pore The Remote is only used for connections 16 GS Series Drives Remote is treated as local by the CPU and is completly scan oynchronous The is automatically detected on power up 7 GS Drive Devices The P2550 CPU can connect to 16 GS EDRVI0O Modules The P2550 will auno detec all GS EDRVIOO modules har have unique addres configured by the bank of dipswtches on the module The configuration can be managed in the Hardware Configuration in he Productivity Suite programming software See Communications Remote and GS Drives for configuration information and Communications Connectivity for connection information Chapter 6 Communications Communications Connectivity 2 550 Port Connections The AutomationDirect Procuctivity2000 2 550 CPU is provided with six communications port The Connectivity for cach ofthese ports is described in the following sections The Communication Ports available are 1 Micro SD Card Slot For program transfer and data logging Micro S
5. appear Another great vool dar can be used is Wireshark Wireshark is a free nenverk analyzer tool that ean downloaded from wi witeshatk com Nale Using this toal implies some knowledge of how networking protocols function Using Wireshark wil ao require that you have a true Ethernet hub not an unmanaged switch managed switch with Port mirroring capabiity You may also use the following basie steps to check your EtherNed IP Setup EtherNet IP VO Message Troubleshooting Does che IP Address set up in the Scanner march the Adapter IP Addres 2 lathe enable tag entered ino the Scanner tumed ON 3 Does the connection point entered ineo the Message Data Block match the connection point ofthe Adapter 4 Does the number of elements match the Adapter 5 Does the data type match the Adapter Steps 4 amp 5 importane because the number of bytes being read from or written the Adapter have zo match the Adapter bye allocated EtherNevIP Explicit Message Troubleshooting Does de IP Address set up in the Scanner match the Adapter IP Addres 2 Is the enable tag entered into the Scanner tumed ON when noc using the Unconnected MSG connection ype 3 Make sue the logic for the EdheeNe IP Explicit Message EMSC is TRUE so the instruction is enabled 4 When using Ger or Ser single in the Service field make sure the Instance ID matches the Instance ID of the Adapter 5 When using Generic in the
6. Chapter 6 Communications a 4 RS 485 Port The RS 485 multipurpose serial communications port requires a removable 3 pin connector See below This portis useful for connecting muliple Modbus and ASCII devices on one network and or connecting devices tothe CPU at distances greater than 50 feer RS 232 limit The RS 485 standard supports distances of up to 1000 meters without requiring a repeater The RS 485 Port an the CPU can support up 50 devices depending on each device s load this assumes 19K Ohm load for cach device This number can be increased by placing an RS 485 repeater on the nerwork if necessary This por only supports RS 485 2 wire connections For 4 RS 485 or RS 422 a converter such FA ISOCON should be wich the RS 232 Port 10 er ian M a DOS ae TR P emren Tae Gor Par No 2 or may used te or 0120500 Por 2 6 10 Productivity Have user Manual Ean Rev A Chapter 6 Communications 5 External Ethernet Port The 10 100 Base T Ethernet port with RJ45 connector is for programming and Modbus TCP ClienSerer functions Path Cote i EN General Information Crossover cables can be used to directly connect owo endpoint
7. Product Suite programming sofware an Online monitoring of program Wate The Micro USB s NOT compatible with oder 2 550 View __ Productivityec Hardware User Manual nol 6 1 Chapter 6 Communications 2550 Communication Ports contd RS 232 The RS 232 portis an RJ 12 connector located on the lower This pore can be used for Modbus RTU Maser connections Modbus RTU Slave connections ASCI Incoming and Outgoing communications Custom Pronocol Incoming and Ourgeing communications Modbus RTU Master connections The RS 232 port is intended to be used for pointto point connections but iis posible connect up to 128 devices on a network fan RS 232 to RS 485 422 converter is connected to the port such as FA ISOCON This is accomplished by using the communications instructions in che ladder project MRX MWX RX WX IF 4wite RS 485 or RS 422 communications is needed using this port with an FA IOCON is the best method See Communications Connectivity section in this manual for more information Modbus RTU Slave connections The RS 232 portis intended to be used for point to point connections but it is posible for dhe RS 232 to be used on Modbus RTU network by using a RS 232 to RS 485 422 converter The is addressable in the Hardware Configuration in the Productivity Suite programming software Iis important to note that the RS
8. This is accomplished by having communications instructions for more than 16 devices in the ladder program and conerolling the enabling and disabling of the instructions so thar only 16 devices are enabled ata given ime To connect ro Modbus TCP Client bon Productivey2000 devices use the MRX Modbus Read and Modbus Write The greatest difference in the RX versus MRX is thar withthe RX the Tag Name in the CPU can be referenced directly and does not need a corresponding Modbus address The way this is accomplished is by mapping local and remote gamer together wishin the local CPU S RX instruction Once the instruction is ser up co read a remote project the Tags of Remote Project or Array Tags of Remote Project drop down lins will be accessible Map the Tag of die Remote pm projecta Tag in he Local Project o read this dara Modbus TCP Server connections The CPU can serve data back to 16 Modbus TCP Client devices concurrently 11 Modbus TCP Client devices are connected o the CPU then any new TCP connection requests will be denied until one of the existing 16 devices drops is connection Ifthe Client device connecting to the CPU is a Productiviry2000 device then a Modbus address must be assigned to the tag thar is being requested This is done in the Tag Database window TE the device connecting to the CPU is another P2000 CPU or C more panel no Modbus address is required 6 6
9. Communications Once the desired parameters have been entered the device may now be referenced in the Explicit Message Instruction lf Unconnected messaging has been selected choose the Unconnected MSG option in the Connection drop down box If Connected messaging has been selected choose the Explicit Message that was configured in the EtherNew IP Client Properties window in the Connection drop down box The rest of the setings should be matched to che specifications documented by the manufacturer An example for requesting the Identity of a device is shown below The data array configured for this function must be sufficient in size hold the returned data from the device for this object Data can also be written to the device iit supports an object for this purpose If data is being written enable the Ousput selection and specify the data array and size required by that device s objec Identity Object Gas bates of ice dep on maiba of componen eder Troubleshooting Tips 1 Use the diagnostic tags in the Hardware Configuration and Explicit Message Instruction As explained previously in the Nerwork Layer Chart section here are multiple layers maging involved with IE appears the Produevi 000 not Communicating with anothcr EtherNer P device there are diagnosi tags available ro down Ach loyer of te prota Productivity U
10. the Value specified in this feld When using wire RS 485 communications sometimes Echoes can occur since both devices the same differential signal pair to send and receive Macing asa Server on left below upon receiving a Modbus Request the CPU will wait for the time period specified in this feld before sending Response This can be with slow clients that need etr time o change from sending o receiving acting Cline on sight below after receiving a Modbus Response the CPU will wait for time period specified in this ed before sending another Request This can be 5 E sed delay request messages in order to give exta time for slow server devices c Comm Heartbeat Value This fearure allows the ladder logic in dhe CPU o know if a device has stopped communicating to he CPU If a value is placed in this Geld che CPU will a timer between cach communication packer coming into che CPU Ifa communication packer file tw be received by the CPU within the specified Time period the Sytem Bit RS 232 Heartbeat Timeout Bit RS 485 Heartbeat Timeout Bir will become true 6 56 Productivity user Ean Rev A Chapter 6 Communications Communications Error Codes Nate The only time you will see Communications Eror Codes is when the CPU is the Master of a Communications Network To simplify the process of identifying a possible Error the Productiviy2000 CPU will au
11. 16 bit Modbus rei Tag 1 Modbus address 400001 400002 Modbus reply for Tag Word Swap ON 01 03 04 56 78 00 00 With Map value to a single 16 bit Modbus register rurned ON Tag 1 Modbus address 400001 Modbus reply for Tag 01 03 02 56 78 4 Map value to consecutive 16 bit Modbus registers Allows for 32 bit data types to be mapped o two consecutive 16 bit registers This option is selected as default Allo he options in the Modbus Address tab of the Project Properties only apply the Modbus SlivelServer Functionality Similar options available forthe Modbus Master Client functions as well and are available inthe MRX and MWX Modbus instruction tumed OFF 6 28 a User Manual Ist Edition Rev A Chapter 6 Communications arr Modbus Instructions read or set data in other Modbus Slave Server devices there are two instructions available in the programming software Modbus Read and Modbus Write The Modbus Read MRX instruction is used to read data fom other Modbus devices into Tags of dhe CPU The MRX instruction can be used for Modbus TCP or Modbus RTU There are several stars bits thar can be used to determine whether the read message was successful and if it was ot the reason why Chapter 6 Communications epics Communications O O mmm Modbus Instructions cont d There isan Automatic Polling feature in the instruction to
12. 1o x XXX iere Eror in pes ove sin enor oan wr nn Sten ws pain ein xS m am sto stdin ei i 6 64 Hardware User Manual Ist Edition Rev A
13. 485 Port Settings Communications Error Codes Productivity2000 Communication Error Code P2000 EtherNet IP Error Codes Productivity HardWisrdene Mev A Chapter 6 Communications Communications Communication Ports The AutomationDirece Productivity2000 is provided with several Communications detailed description of ach of these ports are decribed in the sections below The Communication Ports are Comets Por 1 Micro SD Card The Micro SD Card slor is provided for dara logging and project amer apii For Project Transfer security die fear i disabled by del when rcg a new project Ian be enabled in che Hardware Configuration panel Once enabled project may be transfered the MicroSD CPU orto a PC Files sored onthe Micro SD card by a P2350 or rhe Producivioy Suite program are stored under a default ame o nc projec may be handled time on a Micro SD tank Existing project on the Micro SD card Vll be rererinen a prompt Data Logging The Dara Logger ol allows af periodic or event based data logging of ag and Sprem Errors to the SD eard Data Logger accessed under rhe Monitor amp Debug See Communications Connect section for more information 2 Mico USI The Micro USB 20 port uses a B connector Icis for connection to PC running
14. Scanner function to an EtherNet IP adapter device using Class 1 I O Messaging First create an EtherNet IP device in the Hardware Configuration as seen below Configure the parameters to match the settings of the Adapter device The image on right shows the setup of che Input data The size in this case is dynamic to the configuration of the device For this particular example we configured the device in a manner that allows it to publish 8 bytes of dara for Input Many devices will have a fxed configuration that should be published in the manufacturers documentation the configuration of the Data sizo is determin TT device In this configured the manner thar 6 20 Productivity save user Elian Rev A Chapter 6 Communications The Output data must also be configured data is also dynamice 777777 Sem Ee based upon the configuration In Imm our example we configured device in a manner that caused it to require 8 bytes of Output dara JE Data size is determined by he configuration of tha devia In ths cas M configured the device o VLLL require 8 bytes of output do ey ue The image on lef shows the setup for Configuration data The Configuration data for most devices is a fixed size Some devices will require that the Configuratio
15. TCP requests being accepted by the CPU To allow Reads and Weites selec Read Write Protocol This field determines whether the Portis used for Modbus RTU communications sending or receiving ASCH Stings or performing the Custom Protocol funcion 4 Baud Rane Choose Baud Rate thar your device and he CPU should cornmunicate in this feld The appropiate choice will vary rely wid device and envionment The important point it dural devices communicating on the need wo be sro the same Baud Rare The avaiable Baud Rares 1200 2400 9600 19200 3600 38400 57600 and 115200 bps 6 53 Productivity user Manuals Ean n Chapter 6 Communications Oreo RS 232 and RS 485 Port Settings cont d Node Address This is used only when the CPU is a Modbus RTU Server device This field is used ro uniquely identify the CPU on the nerwork This setting also sometimes referred ssa Station Address This feld can be ser from 1 to 247 Parc The Parity Bi is used as simple low level form of Error Detection devices on the network need to be the same Pari setting The appropriate choice will vary with devices Valid selections are None Even and Odd Dara Bits This field determines whether the communications packer uses Seven Dara Bits or Eight Data Bi Eighe Data is the only valid selection for Modbus RTU Either Seven or Eight Data Bies can be selected when using ASCII com
16. There are two 10 100Base T Ethernet on the P2 550 CPU External The bottom front port is eere to as the External Ethernet Po This can connect Modbus TCP Client devices Modbus TCP Server devices and PCs running the Produccivity2000 programming software The External Ethernet Port is configured with an IP Address Subnet Mask and Defiult Gateway allowing o funcion seamlessly on a typical LAN Local Ethernet The borom rear Ethernet is referred o as he Local Ethernet Port This porr functions as a Produciviy2000 GS Drive Client The Local Ethernet Port is configurable eee eee eter Productivitysos Chapter 6 Communications External Ethernet Port Settings ete Two CPU Remote VO networks cannot co exist on the same LAN a Port Name Allows the entry of a unique Name for the Earemal Ethemex Pore This Name is referenced in the Communications instructions MRX MWX RX WX to select the Por to send the request from b Port Security Option This Option can be as a simple Security measure o prevent Modbus TCP write request from being accepted by the CPU To allow Reads and Writes select Read Write TCHIIP Sctings The IP Serting ofthis Port may be changed in several ways Thescrings may be entered manually in the Choose CPU tool in Productivity Suite programming software This allows the user to make changes to the IP o allow
17. and GS Drive ata poll rate char wil E prevent the GS EDRVIO0 and GS Drive from detecting a loss of communication There is also a parameter P22 01 that can be monitored check the health of the serial connection between the GS EDRVIOO and the GS Drive This parameter can be monitored in the ladder code and appropriate action taken if serial communications loss is detected ma aran RE 6 50 arte User Manual Ist Edition Rev A Chapter 6 Communications Communications Port Configuration The Communications Part fr madide covey eum fu the Hardware Configuration window For amp 8 Right Click so acom the P2950 communieions fine adere the Loci Bae Group fem the Hardware Confpintion window by double fe dicking the Local Base Group or by iking the Local vote contguration does Base Group and selecting Open from the pf drp dow mesa m ween shove n Then select the 2550 double lef clicking the CPU or by ight clicking the CPU and selecting Open from the drop shor Thi vill the P2 550 configuration window seen here Although the following descriptions will focus on the P2 550 communications ports the sting also apply to any other module containing these ports P2 SCM Ethernet Configuration Ethernet Ports
18. connection by the computer running the Productivity Suite programming software Changes are sent using Multicast Messages The TCP IP Settings can be saved as part of the project This must be Enabled in the P2 550 Hardware Configuration Setngs by selecting Lie the Following tem f below IF handled his wap the Settings stored in the projec will cake effect ar Project Transfer and ar boot up only The Settings may be changed afier boot up 4 Use Current Stine When selected Project Transfer or boot up will nor make changes to the TCP IP of the CPU Use DHCP This specifies that the CPU should request its IP Settings rom a DHCP Server on the network Nale if the CPUs set to use DHCP fr i s IP Settings it cannot in al ikelhood be used as a Modbus Server E Use The loving ded the CPU wl te paid pen Proper Teo op RIP Ale Thiel speci in Faure 192 168 1 5 Suns Ma This fel he Subnet Mais uli in Four cia 252952552 The Sune Mk sed conj nion th he IP Aden ofi ag i Dae Cu This i where the Dl Ade Four Octa Ge 216811 Ti pic of thru on non peed na neq ome CPU tarot de Enc de De Gat Ades whe i mage prre Dua Quay and Response The Tine period prid d Bue Te bere de que a om e Cov Communion are MEC MV E ar ande Time zones e pene ak ng te
19. er Man tain Rev Al 6 37 Chapter 6 Communications Flin he required parameters and once configured these parameters will be used configure the Scanner side as shown in che examples below The first example shows how ro setup a Class TIO Message connection from a 3nd party EtherNev IP Scanner device an Allen Bradley RS Logio90 Conil Conpsett ogie Gene ener Dec Seu Tipe ETNERIET MODA Gee Ero obe Verde Mende dri Po es Gre p The following example shows how a Class 3 Explicit Message might be accomplished from a 3rd party device Allen Bradley PLC you can sce the Input Data must be retrieved in one connection or message and the output data in another Remember that Class 3 messaging is not as efficient in protocol messaging as Clas 1 but it does allow for granular control Nale In this example size configuration isnot shown onthe Scanner side The tag created forthe Destination must be large enough to contain the data requested shown with dashed boxes 6 38 User Manual Ist Edition Rev A Chapter 6 Communications entre oe p Chapter 6 Communications Setup Example Productivity2000 as EtherNct IP Scanner This example shows how to connect the Productvity2000
20. ete CIP layer CIP Forward Open etc The uppermost layer which contains several different types of messaging The ODVA Open DeviceNet Vendor Association specification defines many different types of messaging that reside on the layer Two types of messaging supported in the phase 1 release of the Productivity Series EtherNet IP protocol are I O Messaging and Explicit Messaging Messaging is accomplished through a Class 1 Connection and Explicit Messaging can be accomplished through a Class 3 Connection or an Unconnected Message Tag Based Messaging used for reading and writing values to Allen Bradley Control and CompaciLogix PLCs and PCCC used for reading and writing values to Allen Bradley MicroLogix and SLC PLCs are planned for subsequent phases of this protocol EtheNet IP Data When doing Messaging the data that is transported is defined as Input data and data Don t confuse this type of data with what most PLCs define as data and Output data In most PLCs Inputs are typically associated with an Input module that reads points from real word devices Outputs are typically associated with an Output module that turns off and on real word devices In Messaging Input data is data chat is sent from the target device bac to the Originator to multiple devices cha are listening multicast messages data is data that is sent from the Target device This data may or
21. is received this can be monitored in the ladder code and appropriate action canbe ake aca an pov 3 Po mE 45 ES aec Efe A e Ss n There is a Communications Heartbeat Function that can be configured for the GS Drives There are two possible communication paths that could be los P2550 wo GS EDRVI00 GS EDRV100 ro GS drive To configure che GS EDRV100 and GS Drive to detect and react to loss of communications three parameters should be configured appropriately in the drive As shown below parameter P9 03 determines what che drive will do when it detects loss of communications Parameter P9 04 enables the transmission loss detection feature Parameter P9 05 determines the amount of time the drive will wait for a transmission before assuming The GS EDRV100 reads these configured parameters and if they are configured for detecting communications loss it will also monitor for loss of communications on the Erhemer side If communications are lost on the Ethemet side the GS EDRV100 will hut down the GS Drive Productivity Ur Muna ation Rov Al 6 49 Chapter 6 Communications Configuration of GS Drive Connections contd ur el ens ve e ie very imporan to note Wu that if de communications 21 48 dem fearure enabled 10 hera GS Drive Read or SS GS Drive Wee inion EDO neede e be configured Gesn fo communicare the GS EDRVIO0
22. make it easier to read a device on a pre determined rte There is also poll offset field that can be used when simultaneous inserucions ae enabled with the Automatic Polling feature ra help stagger the How of messages being sent to the network The Modbus Wate MX instruction is similar in you and configuration to the MRX instruction I is used ro write values oa Modbus device fom the tags in dhe CPU The operates very similarly w the MRX instruction There are also many starus bis to indicate the success or reason for failure when sending a message The Automatic Polling option is also available o de MWX instruction although greater care ora mowe shouldbe taken when using this feature in his instruction This is explained in benter detail in the Menage Queue section 6 30 tiaras User Manual Ist Edition Rev A Chapter 6 Communications Network Instructions The Network Read RX and Network Write WX instructions are used to communicate to other CPU s They are very similar in operation to the MRX and instructions but they target Tag Names instead of Modbus addresses in the other CPU There is also a significant performance gain in using the RX and WX instructions when communicating to other CPU s as opposed to using the and MWX instructions The same status bits are available in the RX instruction as in the MRX instruction and operate the
23. more information RS 232 Custom Protocol In and Out 6 3 Chapter 6 Communications 2 550 Communication Ports cont d 4 5 485 The RS 485 por isa removable terminal block The RS 485 canbe for Modbus RTU Master connections Modbus RTU Slave connections ASCII Incoming and Outgoing communications Cumom Protocol Incoming and Outgoing communications Modbus RTU Master connections The RS 485 nerwork is used for multi node nerworks The CPU can connect to 128 Modbus RTU dave devices on newark This is accomplished by using the communications instructions in the ladder project MRX MWX RX WX See Communications Connectivity section for more information Hode 128 6 4 tiaras User Manual Ist Edition Rev A Chapter 6 Communications P2 550 Communication Ports cont d The Modbus RTU Slave connections The RS 485 nenwor portis used for The por is addressable in the Hardware Configuration in the Produciviy Suite programming sofware Ifthe is se xo Modbus RTU and there are communications instructions MRX MWX RX WX in the project the CPU will automatically respond to Modbus requests fom a Modbus master Ser Communications Connectivity section for more information 85 485 Modbus RTU Slave Network Topolog Mate Seo respective Manual for
24. of the application but in other cases where che CPU just wants to read changing values from other devices and the frequency of that update is not critical it would be much more efficient to skip the unnecessary code complexity of interlocking The desire to make it easier to communicate to other devices brought about the Automatic Polling feature and the Message Queue in the CPU The Automatic Polling feature allows the user to choose the rate at which messages ae sent without having to use separate timer and enabling logic The Message Queue allows the user to stage the mesages from the ladder code go out each physical communications without requiring interlocking logic 6 32 User Manual Ist Edition Rev A Chapter 6 Communications Network Instructions contd Read Request Flowchart fone Wirte Request Flowchart The implementation of how the menage queue work i slightly diferent based Whether the request is a read request write eques Write requests will ill the queue much faster chan read requests That s why itis advisable to carefully choose when doing write requests whether to use the Automatic Poll feature or to manually send write requests only when needed data to write has changed When designing a Spem is important ro know the to time takes to send a request and gera reply for ach target device The Poll time should be longer than
25. tags to look ar are the Connection Online the General Status the Extended Status and the Sanus Description the Enable tag is true and che Connection Online tag is not erue check the General Sumus value along with the Extended Scacus value s and the Satu Description If the General Status value and the Extended Status value s are of the defined errors from the ODVA specification the Status Description should also rerum a mote descriptive Suing Once these errors are known ic may be posible o very simply make the adjustment in the sertings to correct the 6 144 User Manual Elion te Chapter 6 Communications Ificis not obvious fom the description ist check the manufacturer s documentation for corrective acion in this particular scenario I the manuficrurer s documentation doesn t give corrective action check the EtherNed IP Error Code Lise in dis chapter for possible solutions Nale This may not always solve the probem as each device manufacturer may publish the error for slighty diferent reasons he Connection Online tag is tue and the dara being received is different than what is expected verify thar the correct Connection Point values and or Class Instance Amtibute values are configured There may be areas of available in thar device Verify dat the correct data aee being far both sides I the hi may make the
26. this time The longer the poll time an be within tolerance of the aplication the beer the overall network performance So for ficiency in programming and for the best possible performance for the system conservative pall rates should be used when utilizing the Automatic Poll fearure There is also a Poll offset field inthe communications instructions This helps prevent the instructions from being queued all t the same time When the project staris a master timer begins The ladder scan will ook to see if the instruction is enabled Ifi is enabled it will begin the Automatic timer at the specified offset value from the master time clock Productivas tiedn Une Minash 1x 2dien teal 6 33 Chapter 6 Communications FFF Message Queue JE the application requires more explicit orderly control of each message sent to the devices off Automatic Poll feature Using the instruction s status bits logically control each message as required All of che above explains how messages get into the queue There are several factors involved with how each queue I for each physical is emptied Serial pore queues The serial port queues empty slower than the Ethernet por queues not jus because of the hardware speed self bur because of the nature of serial communications Each request sene must wait for a response or a timeout whichever comes irst Once the teply is r
27. 232 port cannot be a Modbus RTU master and slave concurrently the port is ser to Modbus RTU and chere ate no communications instructions MWX RX WX in the project the CPU will automatically respond to Modbus request rom Modbus master Sce Communications Connectivity section for more information 6 2 User Manual Ist Edition Rev A Chapter 6 Communications P2550 Communication Ports cont d ASCII Incoming and Ourgoing communications The RS 232 can be for sending and receiving non sequenced Sting dat Thi fearure is typically used for receiving bar code rings from a scanner or sending statistical data a terminal or serial printer using the ASCI IN and ASCII OUT instructions Sce Communications Connectivity section for mote information RS 232 ASCII In Communication 232 ASCII In Communication Custom Protocol Incoming and Outgoing communications The RS 232 can be used for sending and receiving nan sequenced bye arrays to various devices This function is pial Tor communicating with devices dat dort suppor he Modbus protocol but have anotar serial communications This is accomplished by using the Custom Protocol In and Custom Protocol The RS 252 ended to be used for point to point connections bu iris posible or he RS 232 pore to De used on a uli node necwork by using a RS 232 to 85485802 convener See Communications Connectivity ctn for
28. D card nor included with proceso 2 Micro USB Port Programming with a USB 2 0 Type Micro female connector This port requires a Micro USB Type A Micro B cable sach as the USB CBLAMICBG cable The Micro USB Pore is che simplest method connecting the Productivity Suite Programming Software to the P2 550 CPU Afer the programming software has been installed connect USB A Micro cable to the CPU and select the Choose CPU option The dialog shown below will appear Highlight the CPU listed in the dialog box and click an Connect No configuration is required Note The Micro USB NOT compatible with older 1 0 1 1 fll sped _ USD devices 2 550 View 6 8 tiaras User Manual Ist Edition Rev A Chapter 6 Communications E Ce 3 RS 232 Port Serial RS 232 mulsipurpose communications port with RJ12 connect The RS 232 Port can be connected to Modbus RTU master or slave devices as well as devices thar non sequenced ASCI stings characters The manner in which thee devices are wired the CPU depends whether the device is considered to be Dats Terminal Equipment DTE or Data Communications Equipment DCE Iwo DTE devices are connected together the RX and TX signals should cross or RX of one device should go to the TX of the ther device and the TX of one device should go to the RX of the other device shown below
29. Error Codes preying W vr tat ent Thare Unsigned nteger 16 Value Explanation sgn ager 8 Valus asia Explanation x acct Ongar ta Target RPI ype as none Ds Sccepable T vao i ignored unepecties ferent RP 27 minimum aeeeptatie RPL sccopati too dou Unsigned Integer 32 Value variable Explanation om 1 oor oom Eee a a om ot UGG revisonatmaten_ message major tn minor evan ruber attract Gres org ci ne om gemme he etch ase acs v Productivityzs Hue Uer Eton 6 59 Chapter 6 Communications P2000 EtherNetAP Error Codes s som AE nee eerte eem M LE GN T peur ERU e ee rupem M 3 7 ad HE Dr TUI om Ea eaii ma iea 4 5 ET om EI X NA v SEITE ocr ooms yg 6 60 Hardware User Manual st Edition Rev A Chapter 6 Communications P2000 EtherNeUIP Error Codes ie retu
30. Eshermer devices such as a PC newark interfice card and the CPU Crossover or patch Seraighr through cables can be used directly connect endpoint Ethernet devices and the CPU The maximum distance for one cable o segment is 100 meters 328 feei If the distance required between 2 devices is greater than 100 meters add an Ethernet switch to extend the disance An Etherner switch can be added every 100 meters or lesi almost indefinitely Each Eibern switch added will incur some latency actual amount differs beween switches and manufacturers So fa very long distance is needed berween 2 Eernet devices may be conver to fiber optics The External Ethernet Port can be used a a programming Modbus TCP Client port 32 Serves a Modbus TCP Server 16 Client ot as EthesNeuIP Scanner 32 Adaptors and 4 scanners with 8 connections per device The External Ethernet Port can also be used send emails using che EMAIL instruction Creare Connection To communicate with the Productivity Suite programming software connect an Ethernet cable from the PC to the CPU External Edernet Port Once the software has been opened click on CPU and select the Choose CPU option The dialog shown below will appear 898 RUNG Chapter 6 Communications 5 External Ethernet Port contd Highlight che CPU chat you wish wo connect to and press the Connect
31. Service field make sure the Service ID Cass ID ID and Instance ID match the Adapter setings 6 Does the number of elements match the Adapter 7 Does the data ype match che Adapter Step 687 importane because the number of bytes being read from or written to the Adapter have co match the Adapter bye allocate Productivityze Chapter 6 Communications Communications GS Drives Things To Consider for the design of Remote GS Drives It is important to understand that only one Remote I O network can be on an unmanaged switch If two or more Remote networks are mixed into the same physical LAN local area network duplicate IP addressing will occur and the system will not function properly Multiple Remore networks can be used on a managed switch using the VLAN feature create virtual separation of the different networks but multicasting messages are necessary for the network to function properly Care must be taken when designing a system this way using a managed switch Even if only one Remote I O network is being used in a facility it is strongly recommended to keep it on a dedicated network physically isolated from other networks As mentioned above the Productivity2000 Remote network makes use of multi casing messages and many device will not function propery in this situation Configuration of GS Drive Connections The GS Drive configuration does not use multicasting in
32. as shown below 6 18 User Manual Ist Edition Rev A Chapter 6 Communications _ CPU Setup contd Click vo highlight she CPU connected to the Ethernet switch Select the Change CPU burton 3 The Change IP Addres CPU Name window will open as shown below Go eben an IP Address of 192 168 1 2 and Subnet Mask 255 255 0 0 for the CPU s neo IF setting and select OK The CPU is now configured with the correct IP Address for connectivity with the PC The IP Address and Subnet Mask settings will very likely differ from what will be used in the acrual application Consult the Nerwork Administrator of the facility where the CPU will be installed to get the appropriate settings for that network TCP Connection Behavior with Modbus TCP and Network Instructions When performing communications over TCP a Connection must be established before the applications can transfer data The connection is typically maintained the application decides that the connection is no longer needed and then the connection will be severed Frequent connects and disconnects are not efficient for the Client or the Server and can add unnecessary network traffic But maintaining connections needlessly is also costly ta the Client and Server in terms of processing and memory so this should also be avoided The CPU allows user control of Client connections through enabli
33. buron You may see in the CPU Connections dialog box CPU s thar ate not an the same subne a your PC but this does not mein you can connect to them To connect the CPU you muse configure ether your PC or your CPU wo bein the same subnet You can easily change the Ethernet settings of the CPU by highlighting it and selecting the Change CPU IP Name button shown below Or if you prefer PC Setup section ofthis chapter contains information on configuring the Ethernet settings of your Patch Straightthrough Cable ES Local Ethene RJ45 connector supports communication with GS EDRV100 Drive units Crossover or patch or Sight shough cables can be used to directly connect endpoint Ethernet devices and he CPU The maximum distance for one cable or segment is 100 meters 328 fee Ifthe distance required between 2 devices is greater than 100 meters add an Ethernet switch to extend the distance An Ethernet switch can be added every 100 meters or less almost indefinitely Each Ethernet switch added will incur some latency aal amount differs beeen switches and manufacture Soifa very long distance is needed between 2 Ethernet devices may be better w conver tm fiber optie system The Local Ethernet Port is used to communicate to the GS Drives with a GS EDRVIOO Ethernet module I is highly recommended thar che network arched to this port be isolated from other networks and it is impa
34. communication port cabe pinouts ASCII Incoming and Outgoing communications The RS 485 can be used for sending and tecciving non iequenced Sering data If long distances are required between the ASCII device and the CPU the RS 485 port is the better selection because of its increased distance support 1 000 meten ASCI communications are typically used for receiving bar code stings from a scanner or sending data vo a terminal or serial printer using the ASCII IN and ASCI OUT instructions See Communications Connectivity section for more information 5 232 ASCII In Communication RS 232 ASCII In Communication Productivity Uer Mana tion Rev AW 6 5 Chapter 6 Communications P2 550 Communication Ports contd 5 External Ethernet The Edhernet port is 10 100Base T Ediemet with an RJ 45 style connector Ieis used for Connection roa PC running the Productivity Suite programming sofware Modbus TCP Client connections Modbus requests sent from the CPU Modbus TCP Server connections Modbus requests received by the CPU EdeNerP Scanner 32 Adaptor BiherNelIP Adapter 4 with 8 connections per device Outgoing Email Modbus TCP Client connections The CPU can connect to 16 Modbus TCP server devices concurrently by means of communications instructions in the ladder program MWX RX WX eis posible to connect to more than 16 Modbus TCP server devices bur nor concurrently
35. ct Setup and then Hardware Configuration Select the Read Configuration button in the upper left hand corner of this dialog and che P2 550 will automatically discover all of he GS EDRVI00s connected to the switch and display all found GS Drives Productivityes Hardware User Manual La Edition 6 47 Chapter 6 Communications OS Drive Properties EER EF Ramos c c ay esate bsp Mem n Once the drives have been discovered the configuration of each drive can be read and written from the programming sofware Sena su Tar Data en Cowen ape rater fon CU opene p erste tens iere darent ave rura ome E WES ita vee allow the P2 550 to automatically write the drive parameters on each CPU project transfer and when the CPU is powered up a setting must be configured in the P2 550 project Go Tools and Options and select the Project Transfer tab Select the Transfer GS drive configuration shown above Drive parameters are ONLY transferred to the GS Drive at project transfer or at boot up of the CPU 6 48 User Manual Ist Edition Rev A Chapter 6 Communications Configuration of GS Drive Connections contd monitor the status of the connection between the P2 550 and the GS EDRV100 modules the status bis of the GS Read and GS Write instructions as shown below If a Timeout occurs or an error
36. d nteger BCD tt a Vanua nteger 32 b BCD 8027 meger 32 FIT nteger 10 SW eerta Sete Reat SWART Productivitysos Hue ar Men Eton PE Chapter 6 Communications epics Communications O Slave Server Function Code and Data Type Support The following table iss che Modbus data type the function code and che CPU source data type that is supported when the CPU is the Server or Slave on a Modbus TCP or serial connection Read Cal Status 00000 Discrete Output 00 Boolean System SOR Re Cal Statue mI Discrete Input b lean System Read Only SBR Read Holding soo meger Unsigned U8 Integer 16 b 16 nteger 16 Unsigned UTE nteger 16 be BCD B10 nteger 32 nteger 32 Be BCD 8707 meger 32 bi Float F32 nteger 16 b System SWNT Read Inout Registers Analog ipa eger Analog Input 32 be AI nteger 10 Sytem Rand Only S Wite single Cal 68696 lean C Boolean System SOR Wie single Register dopo asss nteger Unsigned UB integer 16 S16 16 bit Unsigned nteger 16 b BCD nteger 32 32 nteger 32 be BCD B32 nteger 32 Be Fist F32 nteger 16 BE Syst
37. d the Web Server for the specified time limit the connection will close Mobile Function Enables Remove Acces which allows the CPU Data Remote Monitor App to monitor the selected rags 4 Password Option Allows user to set a password for access to the Web Server Enter an account name and password of up to a combination of 16 numbers and characters ean include special characters Productivitysor Uer Manus 6 53 Chapter 6 Communications Serial Configuration sorta me m ntes mette im When the Serial Ports Tab is selected he Serial Ports settings are displayed as shown below There are rwo Serial Ports on che P2 550 CPU an RS 232 Port with an RJ 12 connector and wire RS 485 Pore with a removable three point terminal black Both Por are capable of Modbus RTU Client device that initiates communications requests and Server device that responds to communications requests communications They are also capable of ASCII outgoing strings and incoming strings RS 232 and RS 485 Port Settings Port Name Allows the entry ofa unique name for dhe RS 232 and RS 485 Parts This name referenced inside of the Communications instructions MWX RX WX and ASCII instructions AIN AOUT CPO CPI to scect th to send receive the request Pore Security This Option can be used as a simple Security measure o prevent Modbus
38. dered when designing the system IF it is imperative that no message be lost when communicating to a device each instruction should be explicitly handled one by one interlocking logie 6 31 Productivity user tse saison n Chapter 6 Communications EtherNet IP for the Producti Terminology Definitions Alot of terminology associated with EtherNev IP is not always clear Some of these terms are listed below along with their respective definitions Scanner This is the term used to describe the device thar initiates sessions The Scanner is sometimes referred as the Originator as well In more standard terms the Scanner would often be called the Client Adapter This isthe device thar responds to the EdherNevIP communications that are initiated by the Scanner The Adapter is also known as the Tages well Typically the Adapter is an Ethernet Sever Objece In an Objec isa representation of defined ser of Ethernet connections behaviors services and data atibus There are standard objects and there defined objects as well See Object Modeling example below Clas A Class isa set of Objects thar are related in some fashion Sce Object Modeling example below Instance An Instance isan actual usable manifestation of an Object See Object Modeling example below Auributes Auribus ate the specifie items within an Object Class The category of
39. e CPU via a Communication instruction such as an MRX MAX RX or WX and the Time a Response from thar device is Received IF the Response takes longer to receive or is not seceived than the specified Time period a Timeout Error will occur for he ven instruction Each instruction hara Timeour Status bir dar can be assigned toit Productivityssos er Man Al 6 55 Chapter 6 Communications epics Communications O O mmm RS 232 and RS 485 Port Settings contd m Modbus Character Timeout The Modbus Character Delay Time is specified as the Time between rwo bytes or characters within given Modbus Mese The Modbus RTU specification states that this time must be more than 1 5 Character Times real time based Baud Rase Sometimes delays occur between bytes when using radio modems media converters This seing allows some tolerance in these situations for the incoming Modbus Messages in the CPU The CPU will wait for the amount of time specified in this field before discarding the incomplete packer If the CPU does hot receive the remainder of the Message within rhe specified Time Frame it will discard the fnt portion of the Message and for a new Message a a 01030000 00 01 84 0 meo ResponselRequest Delay RS 485 Only This seating is used when che CPU isa Modbus RTU Server or Client on the RS 485 Pore The total Response Time can be up to the Toral Scan Time
40. eceived for a request or a timeout has occurred the next item in the list can be sent So the response time of the slave devices on the nerwork will largely affect the speed a wbich the queue fills and empres Ethernet queues The Erhernet queue can empty faster because when sending requests to multiple devices he CPU does not hae to wait on a response from one device before sending a request vo another device due to the inherent nature of the Ethernet hardware However sending multiple requests to the same Ethemet device does necessitate thae he CPU wats for a response from the frst request before sending another eques ro that same device Another difference in the Ethernet port queue versus the Serial port queue spawns from the TCP connection based behavior of Modbus TCP Ifa TCP connection is los to a device and there are still requests in the queue for that device those requests will be dropped from the queue There are three ways this can happen 1 Ia TCP timeout occur server device fails o respond within specified timeout value the TCP connecion is lost A Ifthe server device doses the connection then all of the requests will be dropped 3 And finally fall rungs with communications instructions to a device are disabled for five seconds the CPU will drop the TCP connection for that device in order to free up valuable resources thar could be used elsewhere in che system This is another factor thar should be consi
41. ed handshaking messages on the wire Class 3 Connection is one of the mechanisms that Explicit messaging uses Class 3 messaging uses TCP messages unlike Clas 1 Each Class 3 request has a header chat defines the ype of data requested as well as the size requested Ie allows for more in messaging but does create addtional overhead Nate Explicit messaging can be accomplished with unconnected messages as well for more infrequent requests Explicit messaging is a slower performing method of communications but it typical allows for more and contol when te situation requires i When can the P2000 CPU use Class 1 or Class 3 Connections Clas 1 and Chass 3 Connections can be accomplished withthe Produciviy2000 CPU as an a Scanner or both simultaneously How many connections can the Productvity2000 support for EcherNet Ib 4 4 BehetNec IP 4 CIP Up to 4 CIP connections allowed per EiberNet IP connection Therefore if one device can support 4 CIP connections then you can have up w a tol of 16 CIP connections wing 4 devices Setup Example Productivity2000 as EtherNet IP Adapter The Adapter setup is accomplished through the EcherNetIP Adapter setup under the Comm Adapter Config section of the Setup menu seen on right When the EtherNev IP Adapter is selected from the menu the window shown here will open I dienen der nem e eo Fe
42. er Manat Iu Editon Rox Al 6 43 Chapter 6 Communications Pe iinan OEE E EE 4 Ace TCP there isa TCP Connected field will expose the sanus of the TCP IP connection when a tag populated in this feld b There is an Adaper Name feld for a Sring tag and a Vendor ID field for an tege Both of these Beds can help to deny whee the Produciviy2000 is connected wo the correct device or not e At he CIP lyr there isa Conneerion Online field far a Boolean tag 4 There are three additional fielde to help determine why he CIP session might not be succesful General Sons for an eger ag Extended for an Integer Dara Array and Status Description for a Suring a 2 Use the TCP connected tag ir check the TCP Connected tag Ifthe connection has been enabled by tuming on the tag configured in che Enable field or triggering an Explicit Message instruction with an Unconnected MSG specified and the TCP Connected tag is not truc check the Following items Cabling Ensure thar al ofthe cables are conned and in good shape In most cases he Ethernet pore hac he cable is connected o should indicare a Link Good LED Ensure that any interim Ethernet owiehe are powered up and functioning and thar the end device ie Powered up and funcional b IP addres and correct submet Check thar the IP address entered ino he IP Address feld is she correct addres for the device that you are connecting to Also check rhat IP devices IP address and s
43. g read requests staring ar 400001 with size one and 300003 with one as shown below In the example shown above on lefi a Modbus SlavclServer device should give an exception response since there is Modbus Address af 400002 in the device This method can cause a loco inefficiencies By selecting the No exception response for non existing Modbus address eques opio the CPU wil hot give an response to the request Note thar if Modbus address 400002 by ise were requested it would give an exception response b Word swap 32 bit tags 532 AIS 32 AOS 32 F 32 FO 32 Word swap allows the ward order of 32 bit tags to be changed when sending the values across Modbus The default selection is on which reruns the data low word fist Tag 1 Integer 32 Bi 305 Tag Modbus address 400001 Productivitysor N 6 27 Chapter 6 Communications 6 Communications O O O 0111 Modbus Options contd c Map value to a single 16 bit Modbus register This option allows for compat with devices tha do not support 32 bit Modbus funcional Thi opin be selected individually for he Analog Input and Output Signed 32 data and the Internal Signed 32 data types including the array form of these data types This funcion is only useful when the value contained in a 32 bit ag doesnot exceed a signed 15 bir value 02765 Tag 1 Integer 32 80 22136 hex 0300005678 With Map value o a single
44. he Tag TET Beene arene zee eas Chapter 6 Communications a Assigning Modbus Addresses cont d When this is done two values will appear in the field The left most value isthe Modbus data type This is fixed based upon the tag data type The chart below indicates the four different Modbus datatypes in the 984 addressing scheme Address Identifier Modbus 984 Address Type omc col Rene 7 np Rend Only bi Ing Register ead Only bt word p ong iter 10 Cersa ree 25 Denon Chota es The right most value in the Mod Sta Geld is he ee address office range is from ease 1 655 You cin accept maize the value har is pre filled or toris E the value can be changed careers 3 The oftware awomaticaly wv RN ln pre fills the address offset with REH the next available address 2 6 24 User Manual Ist Edition Rev A Chapter 6 Communications Assigning Modbus Addresses cont d 2 Modbus mapping when creating Tags Modbus addresses can be assigned to Tags as they are created in the Tag Database Type in the Modbus office value when entering the Tag Name and Data Type Productivity Human ier Man te Pai 6 25 Chapter 6 Communicati
45. hecksum should be inserted what type of Checksum CRC 8 bit CRC 16 bit CRC 32 bit XOR 8 bit XOR 16 bit and XOR 32 bit which bytes of the data source should be used in the calculation of the checksum what che byte order should be of the checksum if greater than bit and how to preload the checksum calculation 1E the device requires a different Checksum calculation this can be donc outside of the instruction in other ladder cade and the resulting Tag values can be inserted where appropriate in the packet Termination characters can also be specified when needed The Custom Protocol Out instruction is for transmission only If information needs to be received from field devices the Custom Protocol In instruction will have to be used Unlike ASCII the Custom Protocol will buffer the received data When the Custom Protocol In instruction is executed it will retrieve any data held in this buffer Therefore the lost responses found with ASCII communication do not occur with Custom Protocol communication Custom Protocol In The Custom Protocol In instruction has similar formatting options to the cam jesse Custom Protocol Out instruction The Custom Protocol In instruction will calculate the Checksum of the data packer received based the criteria specified in che instruction and this will determine the stare of the status bits assigned to the instruction If the Checksum calculation passes based on the criteria specified i
46. its setup but there are some initial UDP broadcast messages that occur upon discovery when initiated from the software and at power up This should be considered if installing the GS Drive neework with other devices 6 46 tiaras User Manual Ist Edition Rev A Chapter 6 Communications e 6 Commie Configuration of GS Drive Connections contd GS Drive connections are set up in a similar manner Set a unique address 11010 for each GS EDRV100 using its DIP switches Or set the DIP switches to eer and select the address using NetEdit free download at AutomationDirect com 01 64 are valid addresses for a GS EDRVI00 in a Productivity2000 system Since the DIP switch serings can only represent 00 63 setting a GS EDRVI0O to address 64 must be done using NetEdir After the GS EDRV100 modules addresses have been set be sure to connect the serial cable that comes with the GS EDRV100 to the GS Drive serial port The GS EDRV100 will automatically configure the GS Drive serial port to the correct settings Once the GS EDRV100 is properly addressed and connected to the GS Drive connect a straight through patch Etherner cable from che Ethernet port of the GS EDRVI00 to an Ethernet switch Connect straight through cable from the P2 550 Local Ethernet Pore Remote to the same switch Open the Productivity Suite Programming software and go online with the P2 550 Sele
47. may not be connected to real word devices That is completely dependent upon the Adapter device For example When the Productvity2000 is configured as an EtherNet ID Adapter device che Input data and Ourput data is defined in internal data arrays and docs not directly tie to any Input and Output point to the real world JE icis desired to tie these array elements to real word devices that must be accomplished in code by Copy commands or other instructions Nale The Scanner originator n the P2000 wil accept messages from an Adapter target device with an established connection with Scanner The Adapter target in the P2000 wil respond back to a Scanner originator in the method Multicast or Unicast that is sent in the forward open message from the Scanner 6 36 Productivity user Ean n Chapter 6 Communications Class 1 and Class 3 Connections Whar are they and how are they best used Clas 1 Connection is the wansport mechanism tha Messaging uses to send data The basic concepe is that data is ent in one direction the Originator sends Output data in a Unicast UDP message ro the Target and the Target sends Input data in either a Unicast message back to the Originator or Multicast UDP messages to multiple devices The Input and Output data messages have no relationship each other This method works well Tor Remote UO type data and is very ficient due to lile overhead and reduc
48. munications See this eld ro match the device thar is connected to the CPU Stop Bits This feld determines whether the communications packer uses One or Two Stop Sex this Beld to match the device that is connected to the CPU RTS Mode This eld allows selection of whether or RTS is asserted during data ttanaition Used for hardware handshaking in the standard You may need to manually configure RTS Refer Jour instrument documentation to determine i specific behavior RIS Off Delay Time RS 232 Only This Time period is the amount of Time berween the end ofthe data transmission when the RTS signal is nared of The diagram below illustrates this This sewing may be needed when using media convener RS 232 to RS 422 485 converte and or radio modems A delay may be needed a the end of the data transmission for processing tme in the devices On Delay Time RS 232 Only This Time period is rhe amount of Time berween when the RTS Signal Mentem turned and the data transmission begins The diagram above illustrates chis This sening may be needed when Using media converters RS 232 to RS 485 converte and or radio modems delay may be needed after he amer on oF the RTS Signal and when the data transmission begins for processing time in the device Timeout Between Query and Response The Time period specified in dis feld is he Time beoween the queries sent fom th
49. n data Connection Point be included in the Forward Open message as shown on left even if the size is 0 Some devices will require that the Configuration data Connection Point not be in the Forward Open and the checkbox option in the image below would need to be deselected Productivity Uer Mana on Rov AW etl Chapter 6 Communications The following example shows how to connect the Productivity2000 Scanner function to an EtherNev IP adapter device using Class 3 Explicit Messaging As with IO Messaging an EsherNet IP device must be created in the Hardware Configuration as seen below eterna Phen brani n oa Explicit Messages can be performed in 2 ways Unconnected or Connected Class 3 The advantage of using Unconnected messaging is it allows more discrete control of each request The disadvantage of Unconnected messaging is that Unconnected messages have a lower priority and will take longer to get serviced on some devices Connected messages get serviced faster since there is a connection established to the device If Connected messaging is desired create an Explicit Message tab as shown in the image above If Unconnected messaging is desired do not create an Explicit Message tah Only fill out the information in the upper portion of the EtherNet IP Client Properties window 6 142 Productivity user Manuals Ean n Chapter 6
50. n the instruction che Success status bit will become true If the Checksum calculation fails che Checksum Error status bit will become true With the CPI instruction the packet termination must be specified either in terms of a termination character s ora packer length If a Checksum is expected in the reply be sure to include this in the Fixed Length value specified Productive Uer Muna ion Rov 6 15 Chapter 6 Communications Communications Ethernet TCP and UDP Port Numbers hen ting ind UDPIT communis shere it a namber Stan ne eal ie ea Se Sons apg dene fe mat Ect Bota Se ce a eed ge a a ii gee Soe Ror Wanker fn hee ss impor una as cee re neta dee Sune an Helen pen Sane ua sear singe en ig E Adapters may chose respond using anther prt ambe IP Addressing and Subnetting IP Addresses used in conjunction with the Subnet Mask and Default Gateway address are used for network routing This allows for casy and logical separation of networks Itis outside ofthe scope of this user manual to explain how IP Addresses and Subnet masks are configured for actual usage There are many books documents and toos Subnet calculators the internet chat provide this information Each facility and nerwork will incorporate their own rules and guidelines for how
51. ng and disabling the rungs containing Modbus and Network instructions The MWX RX and WX instructions have wo options for sending messages Automatic Poll and Manual Poll Automatic Poll sends out messages at a specified rate When enabled the instruction performs TCP connect with the Server device Once the connection is established the instruction messages are sent at the rate entered in the poll rare field This continues until the instruction ie disabled The TCP connection will automaticaly be severed five seconds after the instruction is disabled Manual Poll sends out a message cach time the instruction is enabled Enabling che instruction performs a TCP connect with the Server device and sends the message one time The TCP connection will auromatically be severed five seconds after receiving the reply from the Server device If the instruction gets another positive edge enable within the five seconds the message will be sent and the disconnect of the TCP connection will be delayed by an additional five seconds Productivity Uur Mana ion Rer A 6 19 Chapter 6 Communications Communications Modbus Functionality Master Client Function Code and Data Type Support The following table lists the Modbus data type the function code and the CPU source data type that is supported when the CPU is the Client or Master on a Modbus TCP or serial Modbus Client Master Support Using and MWX Instructions a esi Col stat
52. nteger 16 bt System Read Oniy SUR E Wete liis Cals 68696 C Boolean System SOR 6 22 Hardware User Manual Ist Edition Rev A Chapter 6 Communications Integer 10 Bt 516 Integer 10 QUU integer 16 bit BED 816 TT ETSI Integer 32 bit BCD BST Inge 10 bit System SWNT Imager 16 Syste Read ony SERT WiteMultifegsbes 400001 968896 Assigning Modbus Addresses to Tags B There are many different data types in the CPU Because of this the Modbus addresses need to be mapped to the various tag dara types in the CPU There two ways to map Modbus addresses to Tags in the Programming software Modbus mapping in Tag Database window Modbus mapping when creating Tags 1 Modbus mapping in Tag Database window There are only ewo data sizes in the Modbus protocol bits and words In the CPU there are multiple size types so is sometimes necessary to map multiple Modbus addresses to a single Tag entity There are also array data structures in the CPU When Modbus addresses are mapped to arrays they will be mapped as a contiguous block of addresses This is in fact the most efficient method to handle Modbus In the Tag Database window there two columns named Mod Start and Mod End To map a Modbus address to a tag in the Tag Database window simply double click in the Mod Star feld for t
53. ons m Modbus Options The Modbus protocol does not have a specific method outlined for data types outside of bits and 16 bit words Most systems now have 32 bit data types In order to transport 32 bit data types across Modbus they must be placed into two Modbus 16 bit registers Unfortunately some devices not suppor this method so sometimes incompatibilities in the order in which the 16 bit high word and low word are handled between devices persist In order to alleviate this situation chere are some options for handling this in the programming software To find the Modbus Address options go to File and click on Project Properties and then click on the Modbus Server Settings tab No exception response for non existing Modbus address requests Because the Modbus addresses can be manually assigned to tgs iis possible that gaps can occur in the Modbus address mapping For ample Tag 1 has Modbus address 400001 assigned to it and Tag 2 has Modbus address 400003 assigned to it Dire lese CE eene Deren 6 26 Productivity aea ttai ne Chapter 6 Communications Modbus Options contd Most Modbus Mastt Client devices will nempt to optimize their requests to a Modbus SlavelServer device by requesting blocks of data instead of individual registers In die case mentioned previously most Modbus masters would send one read request starting a 400001 and a sie of three instead of sendin
54. r noted wi A specified Time period a Timeout Error will for the given instruction Each instruction has a Timeout Status bit hat can be assigned toi 6 52 Productivity eta ne Chapter 6 Communications External Ethernet Port Settings cont d Modbus TCP Porc This is the listening TCP Pore Number for Modbus connections IF necessary this value can be adjusted for advanced router access In most sinatons this Port Number should be left ar 502 1 Comm Heartbeat Value This feature allows the ladder logic in the CPU to know if a device has stopped communicating o the CPU If a value is placed in this che CPU wil tr a timer between cach communication packet coming in wo the CPU communication packer fils o be received by the CPU within the specified time period the System Bit Erhemer Heartbeat Timeout Bie will become uve or Terei TT remm emm Qr L Remote Access Web Server Function Allows the ability to make a non secure weh connection to the P2 550 in order to access the USB pen drive and view readonly system tags When enabled a port number selection is required Port Default 80 Allows user to ser a number ranging from 1 65535 b Sesion Timeout Allows the user to ser a specific ime limit 1 20 mins on inactivity that will dose rhe Web Server connection If there is activiry berween the PC an
55. ritive thar it be isolated from other Remote UO networks See GS Drives topic in this manual for detail 6 12 Productivity Manual Elian ne Chapter 6 Communications lt _ ASCII and Custom Protocol Functionality Besides Modbus RTU there are two additional functions supported on the serial ports in the Productvity2000 system The funcion is the ability to send and receive text based dar with devices auch as bar code readers and serial pincers The second funcion isthe ability to communicate serially with other devices thar da nor support the Modbus protocol and lack a Productiviy2000 driver ASCII Instructions The ASCII In Out instructions the String data type to send or recieve text based data through the serial port The String data type is only intended for usc with the printable character set This can include numbers eters special character With the ASCI In instruction the CPU receive a fixed length of characters ora variable length of characters with a termination code an end of message charac The ASCII Out instruction sends text based data ou of the serial to various devices for control printing or display Productvitya 6 13 Chapter 6 Communications apes Communications O O mmm ASCII and Custom Protocol Functionality cont d While the ASCI In instruction and the ASCII Out instruction can both be used in a project the
56. rned whan the Originator Target species nthe Forward Open doe nat mc ERE a at ome Tis eer tae ty te Decree oper Pe et reg alanine oy Sena ap eee doe IEEE ust bn account for inthe Forward Open The Renter cor Mere integer 16 value of the Extended Error Code An array can be puer She cones eh aeg helena eit Peck Exntpustion The Contouren Connect si must aloe be Aopen Pain roi pen nu Forward Open This err wil be PUT Tis or maid Producing the Prosuin OJ Apo at O Fran Open espe ong tem Sean Seve ort Contig Symbol The Originator attempted to connect am omas ure at sopprid itn Dept MMPI AT S oot sem Re nein End Productivityzs Hardware User Manual I Edition Rex Alf 6 61 pra DESE x P0 x rr on oem x lt ee x v LEN Un west Service supported by the device wm oem ERR raster emeen nea e Sey E e
57. same manner The greatest difference in the RX versus the MRX is that with the RX the Tag Name in the target CPU can be referenced directly and does not need a corresponding Modbus address The way this is accomplished is by mapping local and remote tagnames together within the local CPU s RX instruction Once the instruction is set up to read a remote project the Tags of Remote Project or Array Tags of Remote Projet drop down lists will be accessible Map the Tag of the Remote project to Tag in the Local project to read thie dan Productivity Uer ion Rev Al 6 31 Chapter 6 Communications Network Instructions contd The WX instruction operates in the same manner except that the data from the Local tags will be written into the Tags of the remote project No Modbus mapping ie required 1 Ema on Ja Nale The PC programming software project for the Remote CPU must be accessible by the running the programming software for the Local project Automatic Poll versus Manual Polling and Interlocking In many cates when performing multiple communications requests to other devices the message flow must be explicitly controlled in ladder code so that a message is not sent while another one is in operation This usually requires writing interlocking code beewcen the instructions which typically involves the use of timers and shift registers ctc Sometimes this is necessary because
58. should be the same for all Instances of an Object but the actual lf might vary See Object Modeling example below Connection Point A Connection Point value is the Class Code reference for a data block This value is required for access input and data in IO Messaging It is typically defined for each input and data block by the Adapter device manufacturer 10 Messaging IO Messaging also called Implicit Messaging isa method of reading and writing blocks of dara without defining the Connection Point and size for each lock transfer The Connection Point size and transfer rate RPI are defined at the beginning and then the data blocks are mansferred ar the specified interval Explicit Messaging This method of reading or writing data requires dar each menage defines the ope of data and size of data needed for each eques ity Series Object Modeling Example Clas Definition of Automobile Artibus Make Model ere Object A Ford Mustang Instance Sally s Ford Mustang Productivitysos Chapter 6 Communications Network Layer Chart EN EE ea Poe p The diagram above illustrates che OSI seven layer model and how EtherNed IP fts into this model In general chere are three basic layers for sending and receiving data in the EtherNet IP protocol EcherNetlIP layer Register Session
59. their nerworks are to be configured 6 16 Hardware User Manual Ist Edition Rev A PC Setup For testing and verification purpose it is recommended that the PC and the CPU be on an isolated Ethernet switch Configure the PC s network interface card setting as described below 1 Starr then Run type in the Open feld and dick on OK w bring up the Connections dialog 2 Newark Connections Righe click on the Network interface shown in the Network Connections and eect Properties If there is more than one Network on the PC be sure choose she one connected o the Switch with the CPU on ie b rom the Local Area Connection Properties E window highligh he tocol TCP Ib selection and click on E Properties Productivity tees tier Maa Pain 6 17 Chapter 6 Communications PC Setup contd Internet TCP IP Properties a Inthe Properties window select Use the following IP address bo Enter an IP Address of 192 168 1 1 and Subnet Mask 255 255 255 0 and select OK Select OK again on he Local Area Connection Properties window CPU Setup Now configure the CPU s network IP setting as shown below 1 Select CPU from the Productivity Suite Software Main Menu and then select Choose CPU from the drop down menu 2 The CPU Connections window will open
60. tomatically report to specific memory location an Error Code that helps identify the ising isu The Error Codes are pore Exception Response Suing Tag specifed in The Exception Response String field is available on the following instructions GS Drives Read GS Drives Write Modbus Read Modbus Write Network Read Network Write Dataworx Request The Table shown below provides a list of Productivity2000 Communication Error Codes that may be reported by the Productivity CPU Produetivity2000 Communication Error Codes o Function Code not supported Sha cect uncon code or adden hares eu ol cane pay Check auton conned ees Modbus m atm irc cot or ates Data Value This error is typically MN a german wate Modi eae sentro pecca TTL dan rm oe NEED Productivityzo Hire ar Eton A 6 57 Chapter 6 Communications P2000 EtherNet IP Error Codes wench UI n Ex Epon 4 pem ee pum Reston step mop m mc mue meme v BENE L oo M n MEC mom ETT mese eue ele mne EISE oot pinot supara Bpan regent uere he CEU wl promi at or A 6 58 Hardware User Manual Ist Edition Rev A Chapter 6 Communications P2000 EtherNet IP
61. ubnet mask compatible with the IP addres and subnet mask of di Productivity2000 there any routers in che ensure thar a proper default gateway matches the ower I address is configured M you are unfamiliar with proper adresing and subnet configuracion consule wth the administrator for e TCP Port number The dei listening number for is 44818 Check hat the age device isening on this specifie number Ifi is nor change the vale in Pore Number ed ro he appropriate value I there are interim router devices hac are using port forwarding ensure that he router s properly configured for this setup Note Attempting do 10 Messaging across routers diferent subnets 1s unlikely to De successful 10 Messaging uses multicast messaging in many cases and the number no necessary fixed when the 10 Messaging is established the Forward Open message has the abilty to negotiate the port number used for the 0 Messages 4 Adapter Name and Vendor ID If die network contains many ErherNev IP devices and these devices may not necessarily be connected xo the roductvty2000 may be a good safeguard check the Adapter Name and Vendor ID returned and verily that these devices ae the correct devices to which it is connected 3 Use the Connection Online and Error tags Ifthe TCP Connected tag is true and the Adapter Name and Vendor look correct the next
62. us 000000 005535 000001 065538 Discrete Output 00 Boolean TIC Read Col Stas 100000 165555 100001 165535 Boolean Boolean Systm SERW ead Holding Registers 400000 405535 400001 465538 Integer 16 bi 516 Integer 16 bit Unsigned Integer 16 bit BCD BE Integer 32 532 Integer 32 bi BCD BET nteger 32 bit Pront F32 Integer 16 bit SWR Pesa Inout Ragaers 300000 205535 300001 285596 Integer 8 bit Unsigned UI Integer 16 S16 integer V6 bit Unsigned UR nteger 16 bi BCD B16 tege 32 bit 32 Integer 32 be BCD 652 teer 32 bit Float F32 Integer System SR Wwe Sole cal 000000 065555 065896 Discrete input 0 Discrete Output 00 Boolean 6 20 Hardware User Manual Ist Edition Rev A Chapter 6 Communications Imager 8 bit Unsigned UH nteger 10 b 6 eger 16 bit Unsigned UTE Wite sige ox us mese 000 400001 m nteger 22 be BCD 8027 nteger 32 F32 Integer 10 bt Syst SW nteger 6 bt Syst Rend Only SW Discrete Input Di RA Discrete Output DOT s 065635 088598 Boolean SERW Boolean Syst Read SUR Imager Unsigned U8 16 818 meger M bit Unsigne
63. y are not intended to be used in conjunction with another In other words it is not advisable to use the ASCII Our instruction send a String to a device that will respond if the response is needed and to use the ASCI In instruction to try to receive this data The ASCII instruction limitations are 1 AIN and AOUT cannot be enabled at he same time on the same serial 2 When the AOUT completes the AIN cannot be enabled the next logi scan 3 AIN docs not buffer daca received while the AIN is nor active Ifa device responds too quickly some of che response may be lost before rhe AIN instruction can start receiving data Custom Protocol Instructions The Custom Protocol is a HEX based protocol used to communicate with devices that do not have the standard Modbus RTU Protocol There are two instructions used with Custom Protocol communication Custom Protocol Our CPO Custom Protocol In CPI Custom Protocol Out The Custom Protocol Out instruction allows the user to send a byte formatted packer of dara of the CPU serial Constant values and or Tag values can be used as the source for data transmitted There are several formatting options including Byte Swap and Checksum 6 12 Productivity user Elian ne Chapter 6 Communications _ arr ASCII and Custom Protocol Functionality contd The Checksum option allows the user to select where in the packer the c
Download Pdf Manuals
Related Search
Related Contents
止水栓を閉める。 pdf Erweiterte Anweisung Sprache de Größe 1.24 MB converting AIS to mic audio jack Samsung G2719N-S Felhasználói kézikönyv exercises - Bryn Mawr Computer Science 平成20年度予算概算要求等に係る事前評価書 Philips Lighting 871150083018010 User's Manual Copyright © All rights reserved.
Failed to retrieve file