Home

Series 90 PLC Serial Communications User`s Manual, GFK

image

Contents

1. Figure 1 Series 90 70 CMM 711 6 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 44902 COMM 0 4 COPROC USt gt C US2 us 1eG o o rn RESTART 1 COMBINED SERIAL PORT PORT1 343 gt ORT2 Figure 2 Series 90 30 CMM CMM311 Except for the serial port connectors the user interfaces for the CMM311 and CMM711 are the same The Series 90 70 CMM711 has two serial port connectors The Series 90 30 CMM311 has a single serial port connector supporting two ports Each of the user interfaces are discussed below in detail LED Indicators GFK 0582C The three LED indicators as shown in the figures above are located along the top front edge of the CMM board Module OK LED The MODULE OK LED indicates the current status of the CMM board It has three states Off When the LED is off the CMM is not functioning This is the result of a hardware malfunction that is the diagnostic checks detect a failure the CMM fails or the PLC is not present Corrective action is required in order to get the CMM functioning again On When the LED is steady on the CMM is functioning properly Normally this LED should always be on indicating that the diagnostic tests wer
2. px Figure 6 Series 90 70 CMM Configurations The power supply CPU and Series 90 70 Bus Expansion Module must reside in specific slots within the rack The term Bus Expansion Module includes both Bus Transmitter Modules and Bus Receiver Modules The CPU Module must be located in slot 1 of rack 0 The Series 90 70 system usually includes a Bus Transmitter Module BTM Version A of the Bus Transmitter Module must be located to the right of all other GE Fanuc boards version B must be located in slot 2 of rack 0 If the PLC system will have more than one rack a Bus Receiver Module BRM must be located in slot 1 of each expansion rack The CMM can be placed in any slot not already allocated in any rack with the following cautions The configuration files created by the Logicmaster 90 configuration software must match the physical configuration of the modules If they do not the controller may not operate as expected Any faults will be logged in the PLC fault table Refer to GFK 0263 or GFK 0466 for more information on creating configuration files with the Logicmaster software When CMMs are in a Series 90 70 rack all the slots between the CMM and the PLC CPU must be occupied If any of these slots are empty the CMM will not be able to communicate across the backplane to the Series 90 70 PLC CPU The Series 90 30 CMM must be in the main rack baseplate with the PLC CPU
3. Station Function Inf ti Error Address Code 0582 Chapter 7 Protocol Definition CCM RTU SNP and SNP X 145 146 Station Address The station address is the address of the slave station selected for this data transfer It is one byte in length and has a value from 0 to 247 inclusive An address of 0 selects all slave stations and indicates that this is a broadcast message An address from 1 to 247 selects a slave station with that station address Function Code The function code identifies the command being issued to the station It is one byte in length and is defined for the values 0 to 255 as follows Illegal Function Read Output T ble Read Input Table Read Registers Read Analog Input Force Single Output Preset Single Register Read Exception Status Loopback Maintenance Unsupported Function Force Multiple Outputs Preset Multiple Registers Report Device Type 18 66 Unsupported Function 67 Read Scratch Pad Memory 68 127 Unsupported Function 128 255 Reserved for Exception Responses Information Field The information field contains all of the other information required to further specify or respond to a requested function Detailed specification of the contents of the informa tion field for each message type broadcast query normal response and error response and each function code is found in the section Message Descriptions
4. 137 CEM Peer State Table is bh REL RA EA i 138 CCM Master State Table 140 CCM Master Actions Aah RES 141 CCM Slave State Table 142 CCM Slave 143 Section 2 RTU Protocol uae EET ER e IRE veas 144 Introductoh nete eR E ego used a ete dor cata ee 144 Message Format sab 144 Message Types i e eR estet edades 145 Message Fields eri IE Un 145 Character Format eee RA IR RD I ATO Re RN 147 Message Termination 1 147 Timeout Usage sess LR a ne UR Rr LP 147 GFK 0582C Series 90 PLC Serial Communications User s Manual October 1996 Contents Cyclic Redundancy Check CRC 148 Calculating the CRC 16 149 Example CRC 16 Calculation 149 Calculating the Length of Frame 151 Message Descriptions 152 Communication Errors 167 Invalid Query Message 167 Serial Link Timeo t inei dee E RIED 168 Inv
5. 137 Table 40 RTU Slave Memory Types Unit Lengths and Valid Ranges 147 Table 41 Message 151 Table 42 Scratch Pad Memory Allocation 165 Table 43 SNP Timer Descriptions 174 Table 44 Modem Turnaround and Transmission Delay 176 Table 45 Series Six RS 422 Signal Cross Reference to the EIA Standard 216 Table 46 Miniconverter RS 232 Port 231 Table 47 Miniconverter 5 422 Port 231 Table 48 Miniconverter Specifications 233 Table 49 Series 90 CCM Commands 249 Table 50 Series Six CCM Commands NOT Supported by the Series 90 CCM 250 Table 51 Memory Types Supported by Series 90 251 Table 52 Series Six Memory Types NOT Supported by the Series 90 CCM 251 Table 53 Series One Memory Types vs Series 90 CCM Memory Types 252 Table 54 Series Five Memory Types vs Series 90 CCM Memory Types 252 Table 55 Function Codes Comparison 253 Table 56 ASCII Information Code Format 255 Table 57 Serial Data Format 258 Table 58 Standard RS 232 Communication Interface Signals 259 GFK 0582C
6. SERIAL PORT 2 STATUS PORT 1 RS 232 COMPATIBLE Pin 1 at bottom of connector PIN 1 Top left of connector PORT 2 RS 485 COMPATIBLE Figure 10 CPU 351 ans 352 Serial Port Items of Interest CPU 351 shown GFK 0582C 21 Hardware Features of the CPU 351 352 22 A detailed description of the hardware features of the CPU 351 and 352 can be found in Chapter 2 of GFK 0356 the Series 90 30 Programmable Controller Installation Manual This chapter only describes the serial ports on the CPU 351 and 352 The model 351 352 CPUs have the following items which are of interest for serial com munications Serial Ports Two individual ports are accessed by connectors on the front of the CPU for serial inter faces to CRTs bar code readers and other devices Port 1 the top port on the CPU 351 352 is RS 232 compatible Access to Port 1 is through a 6 pin RJ 11 connector This connector has female contacts and is similar to modular jacks commonly used for telephones and modems m Port2 the bottom port is RS 485 compatible Access to Port 2 is through a 15 pin D connector that has female contacts LED Indicators The CPU 351 and CPU322 have three LED indicators which enable you to determine the status of the serial port activity on the CPU 351 852 without having a terminal connected m SNP LED top LED is ON when the SNP port on the PLC s power supply is active data being transferred The functi
7. COMPATIBLE RS 422 SERIES 90 30 PLC lt lt SERIES 90 30 PLC lt lt SERIES 90 70 PLC coo zzo RS 422 Figure 57 Example Multidrop System Configuration In the multidrop configuration for SNP or CCM operation one CMM or host device is configured as the master and one or more CMMs are configured as slaves only master slave operation can be used A CMM configured as the master is capable of initiating communications the slave is not For the RTU operation a host device capable of emu lating RTU protocol is the master and one or more CMMs using RTU mode are slaves Idle slave devices continuously monitor the communication link to determine if the line is busy or idle In the SNP protocol when the line is idle the slaves begin looking for a break sequence After a Break is received each slave then looks for the subsequent At tach request Only the slave whose SNP ID matches the SNP ID in the request will re spond In the CCM protocol when the line is idle the slaves will begin looking for new enquiry sequences Since there is typically more than one slave device sharing the multi drop line each slave will only recognize enquiry sequences containing its own CPU ID number For the RTU protocol the slaves will look for a new request
8. GE Fanuc Automation Programmable Control Products Series 90 PLC Serial Communications User s Manual GFK0582C October 1996 GFL 002 Warnings Cautions and Notes as Used in this Publication Warning notices are used in this publication to emphasize that hazardous voltages currents temperatures or other conditions that could cause personal injury exist in this equipment or may be associated with its use Insituations where inattention could cause either personal injury or damage to equipment a Warning notice is used Caution notices are used where equipment might be damaged if care is not taken Note Notes merely call attention to information that is especially significant to understanding and operating the equipment This document is based on information available at the time of its publication While efforts have been made to be accurate the information contained herein does not purport to cover all details or variations in hardware or software nor to provide for every possible contingency in connection with installation operation or maintenance Features may be described herein which are not present in all hardware and software systems GE Fanuc Automation assumes no obligation of notice to holders of this document with respect to changes subsequently made GE Fanuc Automation makes no representation or warranty expressed implied or statutory with respect to and assumes no responsibility for the a
9. Service State Tables 137 CCM Master State Table CCM Peer State Table 138 CCM Slave State Table CCM Status Word Bi Privilege Level SNP Command 92 Change SNP ID SNP Command Clear CCM Diagnostic Status Words CCM Command Clear Diagnostic Status Words SNP Com mand COMMREQ Command Block 28 B3 COMMREQ Data Block CCM Bg COMMREQ Data Block CPU 351 COMMREQ Data Block CPU 352 COMMREQ Data Block SNP 58 COMMREO Ladder Instruction 28 31 COMMREO Status Word CCM Status Mi SNP Status Word Communication Errors RTU Communication Networks Types of Modem Transmission 65 Multidrop 264 Point to Point Communications Line Serial Index 1 Index 2 Communications Networks 263 Communications Parameters 16 cog nieetons Parameters CPU 351 25 Parameters CPU 352 25 Protocols for the CMM 2 Communications Protocols for the CPU 351 Serial Ports 23 Request 28 Compatibility CCM 249 Compatibility RTU Configuration Modes Configuring the CMM I ORack Configuration 4 Configuring the CPU 351 Serial Ports Configuring the CPU 352 Serial Ports b4 Control Information Area 105 Control Program Area 103 Converter Converters IC690ACC901 CPU 351 compatibility with existing CPUs compatibility with existing memory protect key switch RUN STOP mode select 25 CPU 351 Ser
10. In this example we are querying device number 1 address 01 We need to know the amount of data to be transmitted and this information can be found for every message type in the section Calculating the Length of Frame For this message the data length is 2 bytes Chapter 7 Protocol Definition CCM RTU SNP and SNP X 149 150 Initial XOR 1st Current hift 1 hift 2 urrent hift 3 hift 4 urrent hift 5 hift 6 urrent hift 7 hift 8 ANAKNNAKNNAKNN XOR Gen Current XOR 2nd Current hift 1 urrent hift 2 urrent hift 3 o urrent hift 4 hift 5 o urrent hift 6 hift 7 urrent hift 8 NOKNNAKNNAKNAKNAKN XOR Gen OR Gen OR Gen OR Gen OR Gen OR Gen Gen Gen OR Gen TRANSMITTER CRC 16 ALGORITHM Remainder data byte CRC Polynomial CRC Polynomial CRC Polynomial CRC Polynomial CRC data byte CRC Polynomial CRC Polynomial CRC Polynomial CRC Polynomial CRC Polynomial CRC Polynomial Transmitted CRC MS 00 00 0 0 0 00 0 0 00 0 0 0 eoo 2 1 00 1 1 1 0 01 00 0 0 00 00 0 0 00 00 0 0 00 00 00 00 ti 000 0000 000 0000 0000 0000 0000 0000 0000 0000 00
11. Raskunabletobedeleted Request only valid in stop mode CPU revision number does not match VMEbuserrorencountered Task unable to be created IDEh Size of datagram connection invalid Memory Type selector not valid in context Fh o e nvalid program cannotlogin Memory Type for this selector does not exist Unable to locate given datagram connection ID Unable to find connection address Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 s Table 17 Minor Error Codes for Major Error Code 5 Continued Error Status Service Request Error Description InvalidMemory Typeselectorin datagram Null pointer to data in Memory Typeselector Transfer type invalid for this Memory Type selector Pointlength not allowed Invalid datagramtypespecified Total datagram connectionmemory exceeded Mismatchofconfigurationchecksum Din Packet size or total program size doss notmatchinput ean Oz Fasswordsaresettoinactiveand cannotbe enabled or disabled Attempt was made to read a device but no data has been stored on it Data stored on device has been corrupted and is no longer reliable Control Program CD tasks exist but requestor not logged into main CP No task level Rack Slot configuration to read or delete Verify with FA Card or EEPROM failed C3h Textlength does not match tr
12. Data Transfer from Target to Source Read Peer To Peer Enquiry Format Master Slave Normal Sequence Data Transfer from Master to Slave Write Master Slave Normal SEQUENCE aces sme he tare ER ee d Data Transfer from Slave to Master Read Master Slave Normal SEQUENCE siis eoe hae ad eed oe Data Transfer from Slave to Master Master Slave Q Sequence Message Transfers Cyclic Redundancy Check CRC Register Message Flow Establish Communications Message Flow Request and Response Message Flow Update Real Time Datagram CMM to CMM with Handshaking RS 232 only CCM2 to CMM RS 232 CMM to OIT with Handshaking RS 232 CMM to OIT without Handshaking RS 232 CMM to Workmaster or PC AT Serial CMM to Workmaster II or 5 25 1 CMM to CMM with Flow Control None RS 422 RS 485 CMM to CMM with Flow Control Hardware RS 422 RS 485 2 5 422 5 485 CMM to OIT with Flow Control None RS 422 RS 485 CMM to Series One Series Three DCA RS 422 RS 485 CMM or Host Computer to Multiple CMMs 4 Wire Multidro
13. Last Serial Communications Line Modems 256 The Serial Communications Line is the physical medium over which messages travel The line can be a direct connection between devices or a connection through modems for long distance communications The characteristics of the communications line de pend on the requirements of the user and the electrical interface standard to which the line is constructed The word modem is an acronym for MOdulator DEModulator A modem is a device that converts data from digital to analog for transmitting and from analog to digital for receiving over telephone communications lines Some modems use other methods of transmission such as radio or microwave 844905 iip COMPUTER 4 MODEM 4 MODEM TELEPHONE LINE L poe Figure 52 Modems Used in the Communications Line Modems are generally classified as to the type of telephone line facility that can be con nected half duplex or full duplex synchronous or asynchronous modulation technique for the analog signal and the maximum data rate in bits per second Modems were orig inally designed for and most frequently used with the RS 232D interface Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Communications Modes There are three modes of communication e Simplex mode in wh
14. TD 2 EE Eu 3 RD 29 00 lt RD 3 m 2 SD 00 of lt RIS 4 4 RTS 0 0 0 cts 5 ld I C 5 ots 00 o SERIES 90 9 0 ISOLATED 0 Fg 0 0 CMM 00 n 0 REPEATER 0 00 DTR 20 o CONVERTER 90 PORT 0 lt Fg 29 BRICK 0 1082 590 QJ Ld NE MI 00 T NE 20 0 8 lt i Li T 20 9 GND 7 7 GND 0 0 0 0 00 lt 1 0 0 ee lt lt Aa 25 PIN 25 PIN 25 PIN 25 PIN FEMALE MALE MALE FEMALE Figure 43 Cable A RS 232 CMM To Converter 8344930 PIN PIN J2 SW ON J1 r CEN SD A 9 c XX 16 0 o SD 21 i 17 RD B o 0 7 00 roa 1 15 SD A 0 0 0 0 series so 0 XX 14 SD B 0 0 0 Fg Fg 0 ISOLATED o CMM oo lt TERM 12 19 A 5 00 term 24 Fg M 18 TERM 0 PORT 0 4 5 10 Fg IM 10 RTS B o AIEK 04 10R2 0 lt CTS A 11 12 CTS B o 0 0 4 22 Fg Fg 11 RTS A o UM 001 cse 1 CTS A o 0 o lt GND 7 7 GND o 05 0 sup 1 e 0 0 A V 4 2 25 PIN 25 PIN 25 PIN 25 PIN FEMALE MALE MALE FEMALE TERMINATE CONNECTION ON THE CMM INSTALL JUMPER TO CONNECT INTERNAL 120 OHM RESISTOR ON THE ISOLATED REPEATER CONVERTER INSTALL 150 OHM RESISTOR SUPPLIED Figure 44 Cable B RS 422 CMM To Converter Series 90 PLC Serial Communications User s Manual O
15. Anaddress of 0 is not allowed for the return query data request The values of the two data field bytes in the query are arbitrary The normal response is identical to the query The values of the data bytes in the response are equal to the values sent in the query DIAGNOSTIC Initiate Communication Restart Loopback Maintenance CODE 01 A loopback maintenance request query or broadcast with a diagnostic code equal to 1 is called an Initiate Communication Restart request Anaddress of 0 indicates a broadcast request slave stations process a broadcast request and no response is sent Chapter 7 Protocol Definition CCM RTU SNP and SNP X 159 160 This request disables the listen only mode enables responses to be sent when quer ies are received so that communications can be restarted The value of the first byte of the data field DATA1 must be 0 or Any other val ue will cause an error response to be sent The value of the second byte of the data field DATA2 is always equal to 0 The normal response to an Initiate Communication Restart query is identical to the query DIAGNOSTIC Force Listen Only Mode Loopback Maintenance CODE 04 A loopback maintenance request query or broadcast with a diagnostic code equal to 4 is called a Force Listen Only Mode request Anaddress of 0 indicates a broadcast request slave stations process a broadcast request
16. o RD 2 2 TD 00 0 3 RD o PC AT 00 DTR 4 8 90 CMM 20 RTS 7 5 CIS 00 00 cts 8 20 OTR 20 gt Z o jenn 5 a 7 0 9 9 25 Pin 25 Pin MALE FEMALE MALE FEMALE Figure 29 CMM to Workmaster or PC AT Serial Cable PIN PIN FN LI TD 2 3 RD RD 3 TI 2 TD WORKMASTERII gt RTS 4 5 CTS AND 5 5 Id 20 DTR IBM PS 2 DcD 8 BEP 8 DCD F7 gt DTR 20 1 SHLD gt 7 UJ 7 GND 25 Pin 25 Pin 25 Pin MALE FEMALE MALE Figure 30 CMM to Workmaster or PS 2 Serial Cable Series90 PLC Serial Communications User s Manual October 1996 244033 25 Pin FEMALE GFK 0582C Section 3 5 422 5 485 Cable Diagrams This section provides information on the RS 485 interface and on constructing RS 422 RS 485cables RS 422 RS 485 Interface and Cabling Information GFK 0582C The RS 485 Interface The Series 90 PLC family of products are compatible with EIA RS 422 or RS 485 specifica tions RS 485 drivers and receivers are utilized to accomplish communications between several system components using multiple driver receiver combinations ona single cable with four twisted pairs The total cable length cannot exceed 4000 feet A multidrop system of a driver and 8 receivers can be configured The maximum com mon mode vol
17. 98 Write Program Block Memory 07207 C27 99 PLC Short Status 07208 1 28 100 Return Control Program Name 07209 129 102 Return Controller Type and ID Information 07210 1 2 104 Return PLC Time Date 07211 1C2B 106 Return Fault Table 07212 1 2 107 Set PLC Time Date 07213 1 2 109 Toggle Force System Memory 07214 1 2 110 Establish Datagram 07215 1 2 112 Update Datagram 07216 1 30 115 Cancel Datagram 07217 C31 116 Update Real Time Datagram 07218 1 32 117 Long Attach 07300 1 84 119 Autodial Command 07400 1 8 122 Chapter 8 Protocol Definition CCM RTU SNE SNEX bo OR ne sarees Genes 125 Section 1 CCM Protocol 126 Overview of CCM Protocol 126 CCM Peer to Peer 131 CCM Master Slave Mode 133 Protocol Timing and Retry Specifications 135 CCM Protocol State Tables
18. PIN 244923 PIN Jt J2 lt TERM 24 4 m2 e SC 1 0 L5 90 RD A 13 FA 17 6 TD Ly CMM sp 8 2 13 RxD spe XX 14 9 SERIES PORT lt RrS A 10 1 alal L5 SIX 1 lt 22 Fg Fg 5 6 cts Ly come OR lt crsay 1 LK re lt crs B 23 L ov 7 1 Lot 710 ov EB SH i Set me A 4000 FEET 25 PIN 25 PIN 25 PIN 25 PIN FEMALE MALE 1200 METERS MALE FEMALE MAXIMUM TERMINATE CONNECTION ON THE CMM JUMPER INTERNAL 120 OHM RESISTOR ON THE CCM2 JUMPERS ARE INSTALLED ON THE PCB FOR TERMINATION JUMPER T2 OR T6 ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 33 CMM to CCM2 RS 422 RS 485 PIN PIN 244924 lt sa 9 22 RD A Ko 001 S 21 E m 10 RDB 00 SERIES 90 00 lt RD 13 XE XE 23 50 A 00 cum 00 RDG 25 T T sow 90 90 RISU 10 7 9 00 port 0 lt 5 22 Fg 111 15 H 00 1 M lt crsa 11 4 rts I 0 OR 0 11 a 0 2 0 lt CTS B 23 8 DCD o 00 TERM 24 pg 11 5 cts o0 L20 1 9 0 lt 0v 7 7 E 0 0 lt 1 W gt 0 25 PIN 25 PIN 25 PIN 25 PIN FEMALE MALE TERMINATE CONNECTION ON THE CMM MALE TAM JUMPER INTERNAL 120 OHM RESISTOR ON THE CMM311 ONLY PORT 2 CAN SU
19. acknowledge 15h GFK 0582C Chapter 7 Protocol Definition RTU SNP and SNP X 133 134 Datasent from sourcedevice master Data sent from targetdevice slave Datasent from sourcedevice master Data sent from targetdevice slave The first figure below shows a data transfer from the master to the slave data write The next figure shows a data transfer from the slave to the master data read Tgt E S S Lat EL E N Add N O Header T Data Q H X Block XC T Tgt E A A A N Add N C C C Q K K K Figure 17 Data Transfer from Master to Slave Write Master Slave Normal Sequence N Ful EL 5 Last EL Data TR T Data TR Block B C X Block XC Figure 18 Data Transfer from Slave to Master Read Master Slave Normal Sequence Q Sequence Protocol Flow The Q Sequence is a special master slave protocol exchange that allows the master to retrieve 4 bytes of data from a slave without issuing the 17 byte header In Q Sequence master slave communications the master ENQ sequence is 3 characters long The slave ACK response is 8 characters long The Enquiry Datatransfer format and description for the Q Sequence follows Datasent from Tgt E sourcedevice Q Add N master Q Data sent from Tgt Data Data Data Data L A targetdevice Q Add Byte Byte Byte Byte R C slave 1 2 3 A4 CK Figure 19 Data Transfer from Slave to Master Master Slave Q Sequence Series 90 PLC Serial Commun
20. 0 255 decimal 0 255 decimal Source ID 14 15 Identification number of source device Value 1 255 decimal peer peer is represented as ASCII coded hexadecimal 1 90 decimal master slave RC L 17 Longitudinal Redundancy Check This is an Exclusive Or XOR of bytes 2 through 15 ASCII Coded Hexadecimal Example Most values are expressed as ASCII coded hexadecimal Each hexadecimal digit is converted into an ASCII character For example if the target memory address is 00986 O3DAh each hexadecimal digit is converted to ASCII coded hexadecimal as shown below Byte 6 7 6 9 Target Memory Address 0 3 D A hexadecimal Target Memory Address 30 33 44 41 ASCII coded hexadecimal Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Table 33 Target Memory Types for Services Target Mem Byte 42 Byte 5 Target Memory Type Type Decimal Hex 5 Hex ASCID Rd Wr Rd Wr Rd Wr Rd Wr Absolute Memory Address Register Table Input Table 0 8 Output Table 0 8 CPU Input Override Table CPU Output Override Table 0 CPU User ele B ss os s s sw ws 9 3 eMbismesicSe E 5 s p en ES s p e s s p e E SES D 9 p voo co D 9 p 12 P miei 8 f p 19 p ao f p p aooo 9 p s p s SS m je s fe e 1 Vali
21. 224 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Simple Multidrop Configuration This configuration shows how to connect a single Isolated Repeater Converter for signal conversion or greater distance RS 232 5 422 5 422 44927 SERIES 90 PLC CABLE A CABLE B CABLE D BRICK SERIES 90 PLC HOST J2 J1 SW ON SERIES 90 PLC BRICK IS THE NICKNAME FOR THE ISOLATED REPEATER CONVERTER y Figure 41 Simple System Configuration Using the Isolated Repeater Conver ter Complex Multidrop Configuration This configuration shows how to connect multiple Isolated Repeater Converters for sig nal conversion greater distance and more drops RS 422 a44928 CABLE C SERIES 90 PLC SERIES 90 PLC HOST SERIES 90 PLC RS 422 RS 422 CABLE D x CABLE D BRICK BRICK SERIES 90 e 5 232 SW SW ON SABLEA SERIES 90 PLCI RS 422 CABLE B RS 422 RS 422 x CABLE D Fx CABLE D BRICK BRICK SERIES 90 PLCI m SW ON SW z ON SERIES 90 RS 232 p CABLE E SERIES 90 BRICK IS THE NICKNAME FOR THE BRICK 72 ISOLATED REPEATER CONVERTER a SW CTS Figure 42 Complex System Configuration Using the Isolated Repeater Conver ter
22. FUSE 1AMP C JO C CI Figure 39 Isolated Repeater Converter The user elements of the Isolated Repeater Converter are described below Two 25 pin female D type connectors Two 25 pin male D type connectors solder pot are included for user cabling 115 230Vac power connection internal 4 position terminal block Fused 1 Amp power protection Power ON green indicator LED Three position toggle switch recessed in the back of the unit is set according to System Configurations later in this section Chapter 8 Serial Cable Diagrams and Converters 221 Logic Diagram of the Isolated Repeater Conver ter The figure below provides a functional look at the unit Note the 3 position switch for controlling the J1 port transmitters This switch will be later in this section OPTICAL discussed in System Configurations 844782 RS 422 RS 232C lt 12 14 MES CTS B 4 4G RESISTORS 150 2 X 11 CTS A 4 SD 125 s y ISOLATED 9 SE POWER pate RTS B eH n noaa ISOLATION J2 J 5 gt SD RS 232C 22 Kd SD B 14 i 4 SD A gt gt RTS RS 232C 10 RTS B RTS A RD B PEK RD A K lt RD RS 232C A gt CTS B 2 lt CTS 5 232 9
23. I on the other hand an even number of bits in a character is transmitted incorrectly the parity bit will not reflect the error ASCII character A received with errors in the first two bits Parity Bit Received Data Byte odd 8 7 6 5 4 3 2 1 1 0 1 0 0 0 0 1 0 The parity bit does not reflect the error because the received character with parity shows an odd number of 1s as it is supposed to Transmission Timing Errors Timing problems between transmitter and receiver can produce other kinds of errors such as overrun framing and timeout errors Overrun Errors If timing problems between the transmitter and receiver cause charac ters to be sent faster than the receiver can handle them then this produces a situation known as overrun In this case the previous character is overwritten and an error is in dicated Framing Errors In asynchronous transmission this type of error occurs when the re ceiver mistakes a logic 0 data bit or a noise burst for a start bit The error is detected be cause the receiver knows which bit after the start bit must be a logic 1 stop bit In the case where the start bit is really a data bit and the expected stop bit is not the stop bit but a start or data bit then the framing error will be reported Timeout Errors This type of error checking is performed by the Communication Proto col Timeouts are used to ensure that timely communications exist between devices When a source device initiate
24. Serial Line Interface Describes the Serial Line Interface as implemented by the Series 90 PLCs Communication Networks Describes the types of communications net works that can be used to interconnect Series 90 PLCs iti Preface Revisions to This Manual Appropriate changes have been made to this manual GFK 0582C to add new or revised information Additionally corrections and enhancements have been made where necessary The previous Chapter 2 was deleted and a new chapter Chapter 3 was added describing two new CPUs the CPU 351 and CPU 352 which have two on board serial communications ports For a list of product standards refer to data sheet GFK 0867C or later GE Fanuc Approvals Standards General Specifications which lists all of the standards for GE Fanuc products Installation instructions in this manual are provided for installations that do not require special procedures for noisy or hazardous environments For installations that must conform to more stringent requirements such as CE Mark see GFK 1179 Installation Requirements for Conformance to Standards Related Publications GFK 0255 Series 90 Programmable Coprocessor Module and Support Software User s Manual 0487 Series 90 Programmable Coprocessor Module Reference Manual GFK 0263 Logicmaster 90 70 Programming Software User s Manual 0265 Logicmaster 90 70 Programmable Controller Reference Manual GFK 0466 Logicmaster 90 Series
25. Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Installing the CMM in the Rack To install the CMM in the rack follow these steps 1 For a Series 90 70 PLC set the CPU Run Stop switch to STOP For a Series 90 30 PLC use the Logicmaster 90 software or the Hand Held Programmer to stop the PLC This will prevent the local PLC application program if any from initiating any com mand that may affect the operation of the module Power down the Series 90 PLC system Locate the desired rack and slot Slide the CMM completely into the slot The three LEDs will be at the top of the board Press down firmly to lock the board in place but do not use excessive force Power up the PLC rack The top LED MODULE OK of the Series 90 70 CMM will flash during power up diagnostics It continues to flash while waiting for configura tion data from the CPU If no signalis received across the backplane for 30 seconds the Series 90 70 CMM will assume the CPU is not there and continue to power up without it Once the CMM is ready this LED should stop flashing and remain ON Note The top LED MODULE OK of the Series 90 30 CMM will not light if the PLC is not present or if the CMM fails its power up diagnostics Repeat this procedure for each CMM Troubleshooting After completing the above steps to install the CMM the MODULE OK BD OK LED should be on continuously If it is not the problem may be either th
26. Attach Link Idle Timeout Slaveonly Break Processing Time Masteronly Maximum Processing Time Slaveonly IThemaximu time the slave device will waitforactivityonthe maximum time the slave device will wait for activity on the serialline Itisstarted aftercompletionofanSNPresponseand cancelled when a new request is received from the master If no activity occurs within the T3 time the slave aborts the SNP communication The T3 timer default value is specified by the CMM configura tion Timeoutparameter default values range from O disabled to 10sec TheT3 timer value may be optionally negotiated be tween the master and slave devices via the SNP ParameterSe lectmessage part of the Long Attach command The master and slave devices both use the larger of the T3 values from ei ther device Each device adds the separately negotiated Modem Turn around Time value to the negotiated T3 value prior to use Do not include this value in the configured or programmed T3 value Thisis a special instance of the T3 timer used only by the slave immediatelyafter anew Attachrequest response Itallowsthe master sufficient time to negotiate new timer values by send ing an SNP Parameter Select request message to the slave de vice This special timer value is used only until the first mes sageis received after the Attach thereafter the default or nego tiated T3 value is used The T3 timer value is always equal t
27. RTS The transmitting device can signal the transmitting modem that data is Re quested To be Sent CTS The transmitting modem can signal back to the transmitting device that it is Clear To Send the data Refer to Appendix F for information on interconnecting CMMs using modems For a complete explanation of control signal usage with modems as well as the electrical and mechanical characteristics of the interface see Electrical Interface Standard EIA RS 232D and the user s manual of the modem to be used in the communications config uration 260 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 RS 449 RS 422 and RS 485 RS 449 RS 422 and RS 485 comprise a family of standards reflecting advances in inte grated circuit technology These standards permit greater distance between equipment and a higher maximum data rate RS 422 and RS 485 are standards which define electri cal interface characteristics RS 449 is a standard used in conjunction with RS 422 and RS 485 which defines the connector pin assignments cable and connector characteris tics and control signal sequences 5 422 and 5 485 are balanced or differential volt age interfaces in which the signal lines are isolated from ground One of the interface options which can be used in Series 90 serial communications is based on the RS 422 RS 485 and RS 449 standard The basic characteristics of RS 422 RS 485 RS 449
28. Rules for Using Repeater Conver ters in Complex Networks When designing a complex multidrop network including PLCs RS 422 repeater con verters bricks the following rules apply Rule 1 When using a brick as a repeater port J2 should always be directed toward the host device and Port J1 should always be directed away from the host device The switch located on the side of the brick should always be in the center position ON The only case in which Port J1 is directed toward the host is when the brick is used as a con verter RS 232 at the slave The switch is in the right position CTS Rule 2 If a Series 90 CMM slave device is located downstream of a brick set the config uration of the CMM serial port to NONE flow control with a 10 ms Modem Turnaround Delay Applies to CCM SNP and SNP X protocols only Rule 3 Do not place more than 3 bricks in a single communication path between the host and the slave devices Chapter 8 Serial Cable Diagrams and Converters 225 226 Cable Diagrams The cable diagrams below are referred to as Cables A D from the system configurations in the previous figures These diagrams show the principles for constructing your own cables and can be modified to fit your specific application 844929 PIN PIN J2 SWZON
29. The Information Field includes entries for the range of data to be accessed in the RTU Slave The table below lists these ranges for all applicable GE Fanuc PLC models Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Table 41 RTU Slave Memory Types Unit Lengths and Valid Ranges PLC Memory Type Unit Valid Range Length Registers R 0 to Maximum units 1 AnalogInputs AI 0 to Maximum units 1 Discrete Inputs 7I i 0 to Maximum units 1 0 to Maximum units 1 Discrete Outputs i 0 to Maximum units 1 0 to Maximum units 1 1 The maximum addressable ranges for each memory type depends on the model of the CPU and memory configuration Error Check Field The error check field is two bytes in length and contains a cyclic redundancy check CRC 16 code Its value is a function of the contents of the station address function code and information field The details of generating the CRC 16 code are in the sec tion Cyclic Redundancy Check CRC Note that the information field is variable in length In order to properly generate the CRC 16 code the length of frame must be de termined See section Calculating the Length of Frame to calculate the length of a frame for each of the defined function codes Character Format A message is sent as a series of characters Each byte in a message is transmitted as a character The illustration below shows the character format A character consist
30. The Series Five local and internal outputs do not exist in the Series 90 output table All outputs are equivalent and it is up to the user to determine their functionality For example an output to be used as an internal coil must not be tied to a real output The addressing scheme for the Series Five differs from that of the Series 90 when accessing I O points 4 Scratch pad definitions are not the same in the Series Five PLC and Series 90 PLC See Table 11 for the Series 90 scratch pad layout Diagnostic status words and error code definitions are different in the Series Five PLC and the Series 90 PLC See Table 12 for the Series 90 diagnostic status words and refer to Table 15 for the Series 90 error code definitions Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 D RTU Compatibility This appendix compares the function code set for the Series 90 Series Six and Series Five PLCs and the CIMPLICITY System 3000 Models I and W Table 56 RTU Function Codes Comparison Function Codes Series90 SeriesFive SeriesSix CIMPLICITY Description S EXE TX LX Diese Loa X DX X p x o pmeoseernbe o3 qox OX X p X o3 qox DX X oa ox OX X p X X X wl x x x x x x x x x x os X DX X p i eneo Lo X DX X Ls X OX X os ox OX X X e __ gt
31. 118 76h An expected Intermediate Response message was not received within the response timeout interval ABCC BlockCheck Code errorhasoccurred on an X Responsemessage 100 101 102 112 113 114 115 Table 21 Minor Error Codes for Major Error Code 13 0Dh Error Status Remote SNP Error Description Therequested service is not supported by the SNP slave 65 41h SNP slave on CMM module requires PLC CPU privilege level 2 to operate The SNP slave has rejected a request to change to a higher or lowerprivilegelevel SNP Request or Response message exceeds maximum data length of the CMM module Total data length for Mailbox and all following Buffer messages is 2048 bytes The master must use a smaller data length Use multiple requests if total data length exceeds themaximum value Improper Write Datagram message format Series 90 70 slave devices use a different format for this message than Series 90 30 or Series 90 20 slave devices The master must use the proper message format for this SNP slave device The SNP master in the CMM module sends this message as part of the Establish Datagram COMMREO command The datagram has been partially established but is not usable the data gram should be cancelled by using the Datagram ID returned by the COMMREQ Adatagramerror occurred in a Series 90 70 slave device dual port er Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Table 22 Minor Error Co
32. Header Receive Good Q ENQ 140 Wait for ACK to Header Wait for Send EOT State 1 I Send EOT State 1 I EOT State 1 I Send EOT State 1 I State 1 I EOT State 1 I EOT EOT State 1 State 1 I I Send EOT EOT State 1 State 1 I I Send Send EOT EOT State 1 State 1 I I Send Send EOT EOT State 1 State 1 Send EOT State 1 I Send EOT State 1 I Send EOT State 1 I Send EOT State 1 I Send EOT State 1 I Send EOT State 1 I I State 8 Send EOT State 1 1 Send Send EOT EOT State 1 State 1 Send Send EOT State 1 Send EOT State 1 I Send EOT State 1 ACK State 7 9 K Send Send EOT EOT State 1 State 1 I Send EOT State 1 I Send EOT State 1 I 1 10 M State 1 State 1 State 1 Series 90 PLC Serial Communications User s Manual October 1996 State 1 10 M GFK 0582C Master Actions A Zerocounters If Q seq Send Q ENQ seq Start ENQ TIMER Transition to State 10 Else Send Master ENQ Start ENQ ACK TIMER Transition to State 2 B Zero DATA_BLK_COUNT Send Data Block Start DATA_ACK_TIMER Remain in State 6 Send Header Start HEADER_ACK_TIMER Transition to State 5 D If direction is read Transition t
33. Table 47 Miniconverter RS 232 Port SD Send Data RD Receive Data GND Ground CTS Clear To Send RTS Request To Send The pinouts were chosen to allow direct connection using a straight through or 1 to 1 cable as provided with kit to the IBM PC AT Most IBM compatible computers equipped with an RS 232 port will provide a pinout compatible with the one shown above Pin Assignments RS 422 Port Table F 2 is the pinout for the Miniconverter s RS 422 serial port The direction of signal flow is also with respect to the Miniconverter Table 48 Miniconverter RS 422 Port Pin Signal Name SHLD Shield 5 VDC Power CTS A Clear To Send GND Ground RIS B Request To Send RT Receive Termination SD A Send Data SD B Send Data RD A Receive Data RD B Receive Data CTS B Clear To Send RTS A Request To Send GFK 0582C Chapter 8 Serial Cable Diagrams and Converters 231 System Configurations The Miniconverter can be used in a point to point configuration as described above or in a multidrop configuration with the host device configured as the master and one or more PLCs configured as slaves The multidrop configuration requires a straight through 1 to 1 cable from the Miniconvert er s RS 422 port to the first slave PLC s SNP port Other slaves will require a daisy chain connection between slaves A maximum of eight devices can be connected in an RS 422 multidrop configuration
34. and the Next Message Length must specify the length of the X Buffer message Valid X Buffermessage lengths are 9 1008 bytes data length plus 8 bytes Invalid Message Type field in a received X Buffer message The message type of an X Buffer message must be 54h Invalid Next Message Type field in a received X Buffer message Since an X Buffer message is never followed by another message the Next Message Typemust always be zero GFK 0582C Chapter 6 SNP Service 71 72 Note Minor Error Codes 64 115 indicate fatal errors subsequent SNP X commu nication must be initiated with an X Attach message The SNP X slave de vice is unable to return an X Response message these error codes are available only in the Diagnostic Status Words maintained for each serial port on the CMM module Table 23 Minor Error Codes for Major Error Code 15 0 Continued Error Status SNP X Slave Error Description 64 4h Serial output timeout The slave was unable to transmit an SNP Xmes output timeout The slave was unable to transmit an SNP X mes sage from the serial port May be due to missing CTS signal when the CMM module is configured to use hardware flow control 65 41h An SNP X request was aborted prior to completion due to reception of a Break 42h An X Buffer message was received containing greater than 1000 bytes of data The data is ignored 67 43h The SNP X slave did not receive a response from the Service Request Proc
35. 3 omm Th Bh 59 9m Sh 58h 59 eres 9070 Mode 788 CPU 30 AR Series 30770 Model 790CPU Series 90 70 Model 924 CPU OFh Series90 70 Model915 CPU 25 19h Series90 70 Model 925 CPU 16 10h Series9020PLCCPU 31 1Fh Series9020Model211 CPU 3 oam sesessosoMosasricrU 5 2m Zih zh Th Zh 105 L6 Return PLC Time Date 07211 1C2B Available Modes Master Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Return PLC Time Date request the slave responds with data This service provides the master with the capability to retrieve the current time and date from the slave device The Series 90 70 PLC and Series 90 30 PLC Models 331 340 341 351 and 352 support time date and day of week The Series 90 30 PLC Models 311 313 323 and Series 90 20 PLC do not support time date or day of week Unsupported re turn values are meaningless and should not be used Example Command Block Read attached slave device PLC Time Date and store in master device Register Memory Registers 201 204 Word 1 00003 0003 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07211 1C2B Command Number Word
36. 58h FFFFFFFFFFFFFFFF Broadcast SNP ID 00 X Attach request code 00h 00 00 00 00 00 00 00 Not used always 0 End of block character 17h marks the beginning of the SNP X message trailer 00 00 00 00 Not used always 0 79 Computed Block Check Code for this example Chapter 7 Protocol Definition RTU SNP and SNP X 197 X Read Command 198 The X Read Command permits the SNP X master to make a read request for a single continuous area of a single reference table in the slave PLC memory The request speci fies the segment selector offset and data length Every X Read command generates ex actly one X Request message and returns one X Response message The size of the X Response varies depending on the amount of data to be returned The maximum amount of data that can be read with the X Read command is 1000 decimal bytes If the slave detects an error when processing the X Request an X Response message is re turned with an appropriate error code Data bytes are always byte aligned Individual bit data to be read are supplied at the proper bit locations within the data bytes For example 14 occurs at the fourth bit within the data byte 0000 1000 08h The X Read command may be directed only to a particular slave device by using the spe cific slave SNP ID In Point to Point wiring only the Null SNP ID may be used in lieu of a specific SNP ID the slave device will respond to the Null SNP ID as if its ow
37. All of the devices must have a common ground If ground isola tion is required you can use the GE Fanuc Isolated Repeater Converter IC655CCM590 in place of the Miniconverter When using the Miniconverter with a modem connection it may be necessary to jumper RTS to CTS consult the user s manual for your modem Cable Diagrams Point To Point When connecting the Miniconverter to PC and compatible computers with hard ware handshaking the following cable connections should be used 44982 TXD 2 2 RXD CTS 7 7 RTS RTS 8 8 CTS GND 5 5 GND 1 DCD 6 DSR 41 DTR MINICONVERTER IBM PC AT RS 232 PORT 9 PIN 9 PIN CONNECTOR CONNECTOR Figure 49 Miniconverter to PC AT 244983 PIN PIN TXD 2 RXD RXD 3 2 CTS 7 4 RTS RTS 8 5 CTS GND 5 7 GND 8 DCD 6 DSR 20 DTR MINICONVERTER WORKMASTERII RS 232 PORT IBM PC XT PS 2 9 PIN 25 PIN CONNECTOR CONNECTOR Figure 50 Miniconverter to Workmaster Il PC XT PS 2 232 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 44984 TXD 2 3 RXD RXD 3 2 TXD CTS 7 4 RTS RTS 8 5 CTS GND 5 7 GND MINICONVERTER WORKMASTER RS 232 PORT 9 PIN 9 PIN CONNECTOR CONNECTOR Figure 51 Miniconverter to 9 Pin W
38. B SIGNAL ONLY AT END OF MULTIDROP CABLE Figure 36 CMM or Host Computer to Multiple CMMs 4 Wire Multidrop Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 45237 lt 50 9 Ne 13 RD A 50 8 21 Le T 25 RD RD 13 9 SD A SERIES 90 SERIES 90 Fg 21 CMM RD B 25 D n Fg SD B CMM PORT TERM 24 bul 24 TERM PORT 1 RTS A 10 Fg Fg 10 RTS A 1 RTS 22 Fg Fg 22 RTS B ott crs A t l 11 CTS A 2 CTS 23 ien Ri 23 CTS B ov 7 7 ov lt SHLD 1 AJ 1 SHLD 25 PIN 25PIN 5 PIN 25 PIN FEMALE MALE TERMINATE CONNECTION ON THE CMM MALE FEMALE ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 37 CMM to CMM with Flow ControlzNone 2 Wire RS 422 RS 485 JUMPER INTERNAL 120 OHM RESISTOR MAKE CONNECTIONS SHIELDED INSIDE 245238 TWISTED 5 PIN PAIRS PIN oD lt SD 9 M e 13 oa gt o 001 sw 2 11 1125 RoB 9 o RD A 13 bg bg 9 50 90 SERIES 90 ems esp ES MAST
39. Communication Control Module CCM2 CCM3 The Communications Control Module provides a serial interface between the Series Six PLC and other devices on the network which can initiate communica tions based on the CCM protocol Communication Coprocessor Module CMM The Communication Coprocessor Module provides a serial interface between the Series 90 70 or Series 90 30 and other devices on the network CMM mod ules support the CCM RTU and SNP protocols Communication Windows Communication between the ladder logic program and the local interface mod ule which takes place during the PLC scan Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 CPU Central Processing Unit The central device in a PLC that interprets user instructions makes decisions and executes the functions based on a stored program This program specifies actions to be taken to all possible inputs Data Link The equipment including interface modules and cables that allow transmission of information Diagnostic Status Words A group of 20 words which provide detailed information about the operation and configuration of the CMM module and used for monitoring and diagnosing transmission errors The status words are maintained and updated in the CMM module Different sets of Diagnostic Status Words are used for the CCM and SNP Protocols Ethernet A network technology utilizing Carrier Source Multiple Access with Co
40. Example 2 read target Series One inputs 9 through 16 into source Series 90 inputs 17 through 24 the source address is 17 the target address is 2 Series One I O addressing is byte oriented and the data length is 8 Example 3 read target Series 90 input 27 into source Series 90 input 3 you must speci fy a source address of 1 a target address of 25 and a data length of 8 Inputs 1 through 8 of the source input table will be overwritten with the values of inputs 25 through 32 of the target input table Example 4 read target Series One input 27 into source Series 90 input 3 you must specify a source address of 1 a target address of 4 and a data length of 8 Inputs 1 through 8 of the source input table will be overwritten with the values of inputs 25 through 32 of the target input table CCM Data Lengths 44 The data length refers to the length of the data transfer The units are determined by the source memory type and are listed in the following table Table 14 Unit Lengths of Series 90 CCM Memory Types Memory Type Unit Length Length Accessible 2 23 Inputs and Outputs 1 Point 1 bit Multiple s of 8 Points 6 Scratch Pad 1 Byte 8 bits Byte s 9 Diagnostic Status Words 1 Word 16 bits Word s 13 14 BitSetInput Outputs 17 18 BitClearInputs Outputs 1 Point 1 bit Point Examples Example 1 read 12 bytes of the target Series 90 scratch pad into Series 90 or Series Six registers the data
41. RS 232 Direct Connection Without Flow Control 260 Figure 54 RS 232 Modem Connection Without Flow Control 260 Figure 55 Example RS 232 Point To Point Configuration 263 Figure 56 Example RS 422 485 Point To Point Configuration 263 Figure 57 Example Multidrop System Configuration 264 Figure 58 Example Modem System Configuration 265 GFK 0582C Series 90 PLC Serial Communications User s Manual October 1996 xi Contents Table 1 CCM Communications Parameters 16 Table 2 Communications Parameters 16 Table 3 SNP Communications Parameters 16 Table 4 SNP Timer Values for Timeout Selections 19 Table 5 Port 1 RS 232 Signals 22 Table 6 Port 2 RS 485 Signals 23 Table 7 Serial Port Setup COMM REO Data 24 Table 8 Description of Communications Parameters 25 Table 9 Data Block Summary for Commands 38 Table 10 Memory Types Supported by Series 90 39 Table 11 CCM Scratch Pad Memory Allocation 40 Table 12 CCM Diagnostic Status Word Definitions 42 Table 13 Target SourceMemory Addres
42. Transition to State 3 for next cmd Cancel Response Timeouttimer Ifimproper X Responsemessage or fatal error code returned Error Abort all master processing in progress Transition to State 1 Else non fatal error X Response msg contains error code User Cmd is now complete Transition to State 3 for next cmd Build and send X Buffer message to slave Start Broadcast Delay timer Transition to State 5 Timeout Error Abortall master processing Transition to State 1 GFK 0582C SNP X Slave State Table The table below defines the actions taken by the SNP X slave in each state STATE Waitfor Break 1 Action Long Break State 2 Receive X Attach msg Receive X Requestmsg Receive X Buffer msg BufferTimeout timer expired Waitfor X Attach 2 Action State 2 Action B Statd3 1 Wait for X Request 3 Action A State 2 Action C Stat 8 4 1 Waitfor X Buffer 4 Action A State 2 Action D Stat 3 1 Action E State 1 For any invalid intersection in this table abort all slave processing and return to State 1 GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 209 SNP X Slave Actions The following action routines are used by the SNP X Slave State Table A Abortallslave processing in progress D CancelBuffer Timeouttimer Prepare to receive X Attach msg If reportable error with X Buffermessage Transition to State 2 Build and s
43. Wite CCM Scratch Pad Read DiagnosticStatus Words Read Input Table Bit Set Output Table Bit Set Input Table Bit Clear Output Table Bit Clear Chapter 5 CCM Service 39 5 6 40 The entire scratch pad is updated every time an external READ request is received by CCM Allscratch pad locations are read only The scratch pad is a byte oriented memory type Table 11 CCM Scratch Pad Memory Allocation SP Address Fildldentitie CPU Command Status Bit pattern same as SP 00 02 CPU Type 2 in hexadecimal 03 Minor in hexadecimal 04 0B CPU SNP ID 7 ASCII characters termination character 00h 0 CPU Firmware Revision No Major in BCD 0D Minor in BCD OE PCM CMMFirmware Major in BCD OF Revision No Minor in BCD 123 mo 6 7 Master Slave 90 Decimal Peer to Peer 1 254 30 33 User Program Code See Note 5 m Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Scratch Pad Memory Allocation Footnotes 1 0000 Run Enabled 0100 Halted 0001 Run Disabled 0101 Suspended 0010 Stopped 0110 Stopped IO Enabled 0011 Stopped Faulted 2 PLC CPU Major Type Codes 59070 PLC CPU 12 0Ch Series 90 70 PLC CPU S9030 PLC CPU 16 10h Series 90 30 PLC CPU b Series 90 70 Minor Types for CPU 731 31 1Fh Series 90 731 CPU CPU 732 32 20h Series 90 732 CPU CPU
44. Word before issuing the COMMREO and then check it for being non zero 2 Astatus code of 1 in the low byte indicates that the request was completed without errors Refer to the table below for a complete listing of secondary error codes for CCM 3 Display the CCM Status Word in hexadecimal format to read the two bytes of data When an error occurs the low byte will be greater than 1 The following table lists the CCM error codes that are reported as secondary error codes in the high byte of the CCM Status Word after the execution of a CCM COMM REQ These codes also appear in the low byte of CCM Diagnostic Status Word DSW 1 Chapter 5 CCM Service 45 46 Table 15 Secondary Error Codes High Byte of Status Word Low Byte of DSW Sucesfeltransfer A timeout occurred on the serial link 2 02 A COMMREO attempted to write data to a section of the CCM scratch pad that is permanently write protected by CCM A COMMREO attempted to read or write a non existentI Opoint A COMMREO attempted to access more data than is available in a particular memory type A COMMREO attempted to read or write an odd number of bytes to register memory or thediagnosticstatus words s 9 scOwMmEQatempistsdorwmoneormer emere s 9 AcOMVREQsMempidiwrpemedmemay ___ A COMMREO attempted to transfer data to or from an invalid memory type or absolute sourceaddress A COMMREO attempted to read or write one or mor
45. e 1 10 RTS A 29 CMM REPEATER L1 Li 22 RTS 0 CONVERTER Fg Fg L PORT BRICK Fg Fal LI 0 150 OHMS 1 F gt VW gt 24 TERM 2 7 GND P M M 1 SHLD i 25 PIN 25 25 MALE FEMALE x xX xX i WHEN WIRING 5 422 485 MULTIDROPCABLES REFLECTIONS THE TRANSMISSION F LINE CAN BE REDUCED BY CONFIGURING THE ee S jJ PIN J1 SwzcTS B CABLE IN A DAISY CHAIN FASHION AS e 15 RD 0 SHOWN BELOW 4 14 RD B M 16 SD A MASTER CMM SLAVE 1 l reaper Fe 0 isoLATED 4 13 A 0 REPEATER 4 12 RTS 4 CONVERTER D BRICK Em 0 E USED AS A 22 TERM D CPU BUILT IN PORT 150 OHMS 225 CONVERTER VAN 23 TERM D 7 GND 1 ZEN SEEN MALE FEMALE ALSO IT IS RECOMMENDED TO MAKE ANY X XX NECESSARY CONNECTIONS INSIDE THE 1 CABLE CONNECTOR BE MOUNTED 1 THE CMM IS NOT RECOMMENDED TO A USE TERMINAL STRIPS OTHER TYPES ud SE 35 ES EIS OF CONNECTORS ALONG THE LENGTH OF Ez Al PIN SW ON THE TRANSMISSION LINE 4 16 RD 17 RD 15 SD 47 Spi ISOLATED REPEATER 11 iT ha BIS CONVERTER BRICK is TERM USED AS A 56 GHMS REPEATER 18 TERM 7 GND 25 PIN 25 PIN MALE FEMALE TO OTHER DEVICES MAXIMUM OF 8 DEVICES ON A MULTIDROP TERMINATE THE RD B SIGNAL ONLY AT END OF MULTIDROP CABLE TERMI
46. identifies which SNP Command is to be executed and provides specific parameters for that SNP Command In describing the SNP COMMREO Data Block the following topics are discussed Structure of the SNP Data Block SNP Memory Types And Addressing Structure of the SNP Data Block There is no single format for the SNP Data Block as there is for the CCM Data Block This is because the SNP commands perform a wide variety of tasks Some commands require a single word or just a few words such as Clear Diagnostic Status Words and PLC Short Status Other commands such as Establish Datagram may require many words to supply all of the necessary command parameters Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C SNP Memory Types and Addressing GFK 0582C Table 16 Memory Types Unit Lengths and Valid Ranges PLC Memory Type Registers R AnalogInputs AI AnalogOutputs AQ Discrete Inputs 1 Discrete Outputs Discrete Temporaries T Discrete Internals 70M Discretes SA Discretes SB Discretes SC Discretes S read only Genius Global Data G There is no difference between bit and byte oriented memory types in terms of processing speed message length or message transfer time Spe Bee ie Dec 8 0 10 12 70 16 72 18 74 20 76 22 78 24 80 26 82 28 84 30 86 56 Note 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits
47. points Anaddress of zero is not allowed as this cannot be a broadcast request The function code is equal to 07 RESPONSE data field of the normal response is one byte in length and contains the states of output points one through eight The output states are packed in order of number with output point one s state in the least significant bit and output point eight s state in the most significant bit 158 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 MESSAGE 08 LOOPBACK MAINTENANCE GENERAL FORMAT Address Func Diagnostic Error Check Code 0 1 or 4 Address Func Diagnostic Error Check 08 Code 0 1 or 4 Normal Response QUERY function code is equal to 8 The diagnostic code is two bytes in length The high order byte of the diagnostic code is the first byte sent in the diagnostic code field The low order byte is the se cond byte sent The loopback maintenance command is defined only for the diag nostic code equal to 0 1 or 4 All other diagnostic codes are reserved The data field is two bytes in length The contents of the two data bytes are defined by the value of the diagnostic code RESPONSE See descriptions for individual diagnostic codes DIAGNOSTIC Return Query Data Loopback Maintenance CODE 00 Aloopback maintenancequery with a diagnostic code equal to 0 is called a return query data request
48. 0700 00000 0000 00100 0064 00000 0000 00010 000A 00000 0000 00256 0100 SNP Data Block Length NOWAITMode Status Word Memory Type Status Word Address minus 1 Register 1 Not Used NotUsed SNP Command Number Characters 1 and 2 of Slave SNP ID 5 53h 4Eh Characters 3 and 4 of Slave SNP ID P 50h I 49h Characters 5 and 6 of Slave SNP ID D 44h 1 31h Characters 7 and 8 of Slave SNP ID null null Master Memory Type to store Piggyback Status R Master Address to store Piggyback Status Register 171 1 5 msec default 5 msec T2 0 disabled 2 sec default 2 sec T3 0 disabled default 10 sec T4 100 msec default 50 msec T5 0 disabled default disabled Modem Turnaround Delay 10 msec default 0 msec TransmissionTime Delay 0 msec default 0 msec Maximum SNP Data Size 256 bytes default 1000 bytes The Slave SNP ID field specifies the SNP ID of the desired slave device The SNP ID field is 8 bytes long For a Series 90 70 PLC slave device the SNP ID can be a maximum of 7 bytes followed by a null character 0 and can include any ASCII character For a Series 90 30 or Series 90 20 PLC slave device the SNP ID is restricted to a maximum of 6 bytes followed by a null character 0 the 6 bytes must be the ASCII characters 0 through 9 inclusive and upper case A through F inclusive A null SNP ID Character 1 0 can be used to Attach to any slave SNP devi
49. 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits 1 maximumunits cial memory type restrictions apply in Datagram Point Formats Chapter 6 SNP Service s Many of the parameters of the require the specification of PLC Memory Type These parameters are used to specify the master and slave memory areas read or written The following table identifies the valid set of PLC Memory Types the access codes and unit lengths by which each type can be accessed and the valid ranges of each type The valid ranges may vary for different Series 90 PLC CPU models The maximum addressable ranges for each memory type depends on the model of CPU and memory configuration When using a byte oriented memory type the corresponding memory address off sets and number of elements are expressed in bytes not bits 59 L6 Section 2 The SNP Status Word 60 The SNP Status Word reports on the progress and results of an SNP com munications request The memory address to which the Status Word is written by the CMM is specified in Words 3 and 4 of the Command Block The contents of the SNP Sta tus Word are defined as Hex Format High Low 00 00 Minor Error Codes high byte Completion and Major Error Codes low byte
50. 13 14 17 and 18 The memory types are discussed later in this section under the heading CCM Memory Types Other CCM devices support different types ranges see Appendix D Target Memory Address Word 10 The Target Memory Address specifies the address within the CCM target device where the data transfer is to begin The address range for each Series 90 memory type and addressing examples are provided later in this sec tion under the heading CCM Memory Addressing and Data Lengths Note For both target memory type and target memory address the error check ing is done by the responding device and not by the initiating CMM Tar get memory types and target memory addresses which may be invalid for the initiating CPU may be valid for the responding CCM device Data Length Word 11 This is length of the data transfer The units are deter mined by the source memory type which is specified by the command number The unit length and accessible increment for each memory type is described with examples under the heading CCM Memory Addressing and Data Lengths later in this section Source Memory Address Word 12 The source memory address specifies the address within the Series 90 CPU where the data transfer is to begin The address range for each Series 90 memory type and addressing examples are provided later in this section under the heading CCM Memory Addressing and Data Lengths Data Block Summary for CCM Commands GFK 058
51. 236 AmericanNational Standard Code for In formationInterchange Acknowledgecontrolcharacter Block Check Code Binary Coded Decimal Bus Expansion Module BTM or BRM Bus TransmitterModule Bits Per Second Refers to protocol originally developed for the Communications Control Module for the Series Six PLC Abbreviation of the catalog number of the Communications Coprocessor Module Used to refer to the module COMmunicationREQuest Central ProcessingUnit CyclicRedundancy Check Clear to Send control signal Data Carrier Detect control signal DataCommunicationsEquipment Direct Memory Access Disk Operating System Data TerminalEquipment Data Terminal Ready control signal ElectronicsIndustriesAssociation Electronically ErasableProgrammable Read Only Memory Enquiry control character End of Transmissioncontrolcharacter Erasable Programmable Read Only Memory End of Transmission Blockcontrol character Series 90 PLC Serial Communications User s Manual October 1996 ETX FCC IEEE ISO KB LAN LED LRC MAP MB MODEM NAK PC PCM PLC PROM RAM RTU RTS RD RXD SNP SNPX SOH STX SD TXD VME End of Text control character FederalCommunicationsCommission Hexadecimal Input Output Institute of Electrical and Electronics Engi neers InternationalStandards Organization 1024 Kilobyte 1024bytes LocalAreaNetwork LightEmitting Diode LongitudinalRedundancyCheck ManufacturingAutomatio
52. 771 71 47h Series 90 771 CPU CPU 772 72 48h Series 90 772 CPU 780 80 50h Series 90 780 CPU CPU 781 81 51h Series 90 781 CPU CPU 782 82 52h Series 90 782 CPU CPU 788 88 58h Series 90 788 CPU CPU 789 89 59h Series 90 789 CPU CPU 790 90 5Ah Series 90 790 CPU 914 92 5Ch Series 90 914 CPU 915 15 0Fh Series 90 915 CPU CPU 924 24 18h Series 90 924 CPU CPU 925 25 19h Series 90 925 CPU Series 90 30 Minor Types CPU 331 35 23h Series 90 30 331 CPU CPU 340 38 26h Series 90 30 340 CPU CPU 341 36 24h Series 90 30 341 CPU CPU 351 37 25h Series 90 30 351 CPU CPU 352 3 27h Series 90 30 351 CPU 3 Located in the same position as in the Series Six scratch pad Series One Three and Five PLC users who need to determine the node type should note this location and make driver modifications where necessary 4 Scratch Pad Bytes 18h 33h Bytes Length of Memory Size Returned In 18 1B R Register Memory 1C 1F AI Analog Input Table Note Four bytes hold the hexadecimal length of each memory type with the most significant word re served for future expansion For example the 731 default register memory size of 1024 words 0400h would be returned in the following format LeastSignificant MostSignificant mim od 5 The amount of program memory occupied by the logic program Also appears on the Logicmaster 90 PLC Memory Usage screen in
53. 9 inclusive and upper case A through F inclusive A null SNP ID Character 1 0 is not permitted Note The first issued to a CMM module after PLC powerup must be delayed the CMM cannot accept COMMREQs when the PLC applica tion is started A delay of 2 seconds past first scan is recommended GFK 0582C Chapter 6 SNP Service 81 L6 Set X Status Bits Address 07003 1B5B 82 Available Modes Slave Description Local Command This command specifies the local PLC bit memory to be updated by the slave device during SNP X operation Three contiguous memory bits called the X Status Bits indicate X command activity by the slave device The X Status Bits may be examined at any time from the PLC ladder application The CMM slave X Status Bits are updated only when a valid PLC memory address has been defined via this command When an error occurs for this COMMREQ the X Status Bits address is undefined X Status Bits data will not be updated into the local PLC memory until this is successfully completed The X Status Bits used by the slave device on the CMM module are similar to the X Status Bits defined in S memory 76517 75519 for use by the slave device on the Se ries 90 20 and Series 90 30 PLC built in serial port See the Note below The X Status Bits consist of three contiguous bits The address of the lowest bit X ACTIVE is specified in the COMMREO Data Block the remaining two X Sta
54. 90 30 20 Micro Programming Software User s Manual 0467 Logicmaster 90 30 20 Micro Programmable Controller Reference Manual GFK 0402 Hand Held Programmer for Series 90 30 20 Micro programmable Controllers User s Manual GFK 0262 Series 90 70 Programmable Controller Installation Manual GFK 0356 Series 90 30 Programmable Controller Installation Manual We Welcome Your Comments and Suggestions At GE Fanuc automation we strive to produce quality technical documentation After you have used this manual please take a few moments to complete and return the Reader s Comment Card located on the next page Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C Contents Chapter 2 Introd cti n ad dna oli adds da idus 1 Quick Guide to the Manual 1 Communications Modules 2 Communications Protocols 2 Chapter 3 The CMM Description Installation Configuration 5 Overview of the 5 Section 1 Description of CMM Hardware and Operation 6 LED Indicators 25 6 vie Ee e Ree Lr e Veo rt I Leere 7 Restart ResetPushbutton 8 Serial Ports Dei e ec eb a wae tian e Rer docet lae Cea 8 Section 2 Installing and Configuring t
55. After receiving a Force Listen Only mode request the RTU device will go into the listen only mode will not perform a requested function and will not send either normal or error responses to any queries The listen only mode is disabled when the RTU device receives an Initiate Communication Restart request and when the RTU device is powered up Both bytes in the data field of a Force Listen Only Mode request are equal to 0 The RTU device never sends a response to a Force Listen Only Mode request Note Upon power up the RTU device disables the listen only mode and is en abled to continue sending responses to queries Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C MESSAGE 15 FORCE MULTIPLE OUTPUTS FORMAT Address Func Starting Number of Data Error Check 15 Point No Points Query Address Func Starting Number of Error Check 15 Point No Points Normal Response QUERY Anaddress of 0 indicates a broadcast request slave stations process a broadcast request and no response is sent The value of the function code is 15 The starting point number is two bytes in length and may be any value less than the highest output point number available in the attached Series 90 CPU The starting point number is equal to one less than the number of the first output point forced by this request The number of points value is two bytes in length The sum of the start
56. Aninvalid next message type value was detected in X Attach Response message when reestablishing an existingSNP X communicationsession Communications have notbeen established oo An invalid response code was detected X Attach Response mes sage when reestablishing an existing SNP X communicationsession Communications have not been established An expected X Attach Response message was not received within the response timeout interval when reestablishing an existing SNP X com municationsession The master has retried the X Attach message twice without receiving a response Communications have not been estab lished Chapter 6 SNP Service 67 68 Error Status Local SNP SNP X Error Description 60h A parity error has occurred on an X Responsemessage 97 A framing or overrun error has occurred on an X Responsemessage Aninvalid message type was received when an X Responsemessage wasrequired Aninvalid next message type value was detected an X Responsemes sage Aninvalid response code was detected in an X Responsemessage 66h An expected X Response message was not received within the response timeoutinterval 71h A framing or overrun error has occurred on an IntermediateResponse message Table 20 Minor Error Codes for Major Error Code 12 0 Continued sponsemessage re Aninvalid message type was received when Intermediate Response messagewas required sponsemessage message
57. Attach request to the slave The proper slave device returns an X Attach response to the master to com plete the establishment of the SNP X session An SNP X session means that the SNP X protocol is now in effect and that data transfer may take place via SNP X commands The SNP X session remains active until the next Long Break An SNP X session can be established between the master device and any individual slave Unlike SNE an SNP X session can also be established simultaneously with each and every SNP X slave device on a multidrop serial link SNP X commands are then ad dressed to the desired slave device via the slave s SNP ID 180 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Error Handling Either SNP or SNP X operation can be performed on the same wiring network as deter mined by the type of communication session SNP or SNP X Only one session SNP or SNP X can be active at any time Either type of session may be established via a Long Break and the appropriate Attach or X Attach command During an SNP X session only SNP X commands are recognized SNP commands are ignored during an SNP X session Likewise SNP X commands are ignored during an SNP session SNP X provides two types of errors hard errors and soft errors Hard errors are non recoverable These errors occur when the communication session cannot be continued Hard errors include serial transmission errors checksum framing parity or
58. Block Memory to 90 70 only Write Program Block Memory to 90 70 only PLC Short Status X Return Control ProgramName 1C29 Return Controller Type and ID 1C2A Return PLC Time Date 1C2B Return Fault Table 1C2C Set PLC Time Date 1C2D Toggle ForceSystem Memory 1C2E EstablishDatagram 1C2F UpdateDatagram CancelDatagram UpdateReal TimeDatagram Long Attach KK KK KK KK KK Special PurposeCommands Autodial 1CE8 1 This Command is valid only when communicating with a Series 90 70 slave device X SNP command examples in this section return the Status Word to Regis ter 00001 GFK 0582C Chapter 6 SNP Service 77 L6 Clear Diagnostic Status Words 07000 1B58 Available Modes Master and Slave CPU 351 and CPU 352 serial ports only support the 78 Master mode Description Local command This command clears the SNP Diagnostic Status Words maintained within the CMM module A complete set of Diagnostic Status Words is maintained for each serial port of the CMM module Example Command Block Clear the local Diagnostic Status Words in the CMM module for the serial port specified by the TASK field of the issuing Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 00001 0001 00000 0000 00008 0008 00000 0000 00000 0000 00000 0000 07000 1B58 SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1
59. CMM The actual characters are not transmitted however un til the CTS signal is returned Once the characters are transmitted the RTS signal is im mediately removed As in the case of NONE flow control nonzero Modem Turn around Delay is NOT used to control the operation of the RTS signal It is simply used to adjust the appropriate protocol timers for any delay in receiving the CTS signal once the RTS signal is asserted Data Carrier Detect DCD and Data Terminal Ready DTR These signals are used to control the reception of data from the remote device The DCD signal when received from the remote device essentially forms a request to the CMM to prepare for reception of data The CMM in turn asserts the DTR signal when it is prepared to receive the da ta In the CMM DTR is always asserted it is never turned off Timeout CCM The Timeout field displays the length of timeouts used for CCM on the target port Valid selections are LONG MEDIUM SHORT or NONE Timeout SNP The Timeout field specifies a set of values for each of the SNP timers Valid selections include LONG MEDIUM SHORT or NONE The SNP Timeout selec tions and the related timer values are specified in the following table The timers in the second half of the table are derived from earlier timer values via the specified equation Modem Turnaround Delay CCM and SNP Only The Modem Turnaround Delay field specifies the length of time required by the intervening m
60. COUNT lt 3 Increment DATA COUNT Send Data Block Start DATA TIMER Remain in State 6 Else Send Transition to State 1 Send EOT Transition to State 1 Transition to State 1 If read data Start STX TIMER Transition to State 7 Else write data Get PLC data Send Data Block Start DATA TIMER Transition to State 6 Send Data to PLC Send ACK to Data Block If last block Start EOT_TIMER Transition to State 9 Else Start STX_TIMER Transition to State 7 If HEADER COUNT lt 3 Increment HEADER_COUNT Send NAK Start SOH_TIMER Transition to State 3 Else Send EOT Transition to State 1 If DATA_BLK_COUNT lt 3 Increment DATA_BLK_COUNT Send NAK to bad block Start STX_TIMER Transition to State 7 Else Send EOT Transition to State 1 Chapter 7 Protocol Definition RTU SNP and SNP X Start T1 While T1 0 If char received 0 SEND QRSP 0 Remain in State 1 j If SEND QRSP 1 Send Response Remain in State 1 L Start HEADER TIMER Transition to State 4 M Start DATA TIMER Transition to State 8 143 Section 2 RTU Protocol 144 Introduction This section describes the Remote Terminal Unit RTU serial communications protocol When the Serial Communications Module RTU device is configured as an RTU slave it uses the protocol as explained in this
61. CTS lt l 0o ko VAC 115 gt SUPPLIES Figure 40 RS 422 Isolated Repeater RS 232 Note 25 lt SE RS 232C Converter Logic Diagram Allinputs on the unit are biased to the inactive state Inputs left uncon nected will produce a binary 1 OFF state on the corresponding output 222 Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Pin Assignments for the Isolated Repeater Converter CR E FNC RTS Request to Send RS 232 FNC CTS Clear to Send RS 232 V C C NC Ero Ero ELM Er p dee EE Optional Termination 5 Clear to Send BENE TNI 5 C C 3 C 4 C 5 C 7 EX EN E EA E uj 2 Optional Termination Optional Termination 5 7 Clear to Send 10 Clear to Send 11 RTS B Request to Send 12 CTS B Clear to Send RTS A Request to Send 13 CTS A Clear to Send BEL DA JEA DA RDG D Row 18 19 20 21 NC RD A Receive Data Optional Termination NC RD B Receive Data Optional Termination Ecce ee et RD B Receive Data 22 SD B Send Data Optional Termination 23 RD A Receive Data 23 SD A Send Data Optional Termination a 25 SD B Send Da
62. Chapter 6 SNP Service 103 L6 Return Controller Type and ID Information 07210 1C2A Available Modes Master 104 Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Return Controller Type and ID request the slave responds with data This service provides the master with the capability to retrieve the SNP ID PLC Controller Type number of control programs program name etc from the slave device PLC CPU Example Command Block Read the attached slave device Controller Type and ID information and store in master device Register Memory Registers 201 220 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 00003 0003 00000 0000 00008 0008 00000 0000 00000 0000 00000 0000 SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 Not Used Not Used 07210 1C2A SNP Command Number 00008 0008 Master Memory Type to store Control Information 00201 00C9 Master Address to store Control Information Register 201 The Master Memory Type and Address fields must be selected to allow enough room to ac comodate the 40 byte Control Information Area See Table 16 in Section 1 for valid memory types and addresses Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Control Informat
63. Error Check 01 Count Normal Response QUERY Anaddress of 0 is not allowed as this cannot be a broadcast request The function code is 01 The starting point number is two bytes in length and may be any value less than the highest output point number available in the attached Series 90 CPU The starting point number is equal to one less than the number of the first output point returned in the normal response to this request The number of points value is two bytes in length It specifies the number of output points returned in the normal response The sum of the starting point value and the number of points value must be less than or equal to the highest output point num ber available in the attached Series 90 CPU The high order byte of the starting point number and number of bytes fields is sent as the first byte The low order byte is the second byte in each of these fields RESPONSE The byte count is a binary number from 1 to 256 0 256 It is the number of bytes in the normal response following the byte count and preceding the error check The data field of the normal response is packed output status data Each byte con tains 8 output point values The least significant bit LSB of the first byte contains the value of the output point whose number is equal to the starting point number plus one The values of the output points are ordered by number starting with the LSB of the first byte of the data fie
64. ID field specifies the particular permanent datagram to retrieve This val ue was previously returned to the PLC application program upon successful completion of the Establish Datagram command The Slave SNP ID field specifies the SNP ID of the desired slave device The SNP ID field is 8 bytes long For a Series 90 70 PLC slave device the SNP ID can be a maximum of 7 bytes followed by a null character 0 and can include any ASCII character For a Series 90 30 or Series 90 20 PLC slave device the SNP ID is restricted to a maximum of 6 bytes followed by a null character 0 the 6 bytes must be the ASCII characters 0 through 9 inclusive and upper case A through F inclusive Chapter 6 SNP Service 117 118 A null SNP ID Character 1 0 can be used to select to any slave SNP device regardless of its assigned SNP ID It should be noted that a null SNP ID can only be successful in a point to point wiring configuration In a multidrop wiring configuration all SNP slave devices would respond to any Long Attach specifying a null SNP ID This procedure will produce unpredictable results and should not be attempted The Master Memory Type and Address fields must be selected to allow enough room to ac comodate the datagram area returned from the slave This area is of the size specified in the Establish Datagram command which defined the size and format of the datagram See Table 16 in Section 1 for valid memory types and addresses The Master Memo
65. Master the initiating device in a Master Slave system Slave the responding device a Master Slave system The SNP master and slave as implemented on the CMM module do not support PLC programming or configuration functions Logicmaster 90 may be connected to a CMM serial port configured as an SNP slave for data display and modification only The SNP X protocol does not support PLC programming or configuration under any circum stances After configuration the SNP and SNP X protocols are enabled on the selected port s The SNP and SNP X protocols can be enabled on none one or both serial ports of the CMM module using either the 5 232 or 5 422 5 485 electrical standard Essentially any combination of protocols ports and electrical standards area available with one ex ception The Series 90 30 CMM cannot support RS 422 RS 485 on port 1 Port selection data rate parity flow control number of stop bits timeouts and turnaround delay val ues can be configured CCM Protocol protocol is included in the EPROM software for both the Series 90 70 and Series 90 30 CMM modules The CCM protocol was originally developed for the Series Six Communications Control Module and is available on most GE Fanuc PLCs The CCM protocol allows for the following types of operation e Master the initiating device in a Master Slave system SSlave the responding device a Master Slave system Peer initiate
66. Piggyback Status area is specified the Piggyback Sta tus information is written there as each successful SNP response message is received for as long as the connection remains established See Table 16 in Section 1 for valid memory types and addresses GFK 0582C Chapter 6 SNP Service 89 Piggyback Status The table below describes the Piggyback Status information Table 27 Piggyback Status Data Piggyback Status Storage Area Description Word Location Byte Location Word 1 low byte Control ProgramNumber Word 1 high byte Current PrivilegeLevel Word 2 low byte Lastsweep time Word 2 high byte Lastsweep time Word 3 low byte Slave PLC Status Word Word 3 high byte Slave PLC Status Word Control Program Number This value represents the number of the control program task the SNP master is currently logged into The valid values in today s implementations are 1 and 0 as follows SNP master is not logged into a control program task oo SNP master is logged into control program task 0 Privilege Level Current privilege level of the SNP master device Valid values are 0 through 4 for Series 90 70 PLCs and 1 through 4 for Series 90 30 PLCs Last Sweep Time This value is equal to the time taken by the last complete sweep for the main control program task The value is in 100 microsecond increments and is measured from Start of Sweep X 1 to Start of Sweep X PLC Status Word The bits in this word are defined in the fo
67. SA transition table in bit mode SB transition table in bit mode SC transition table in bit mode 95 transition table in bit mode transition table in bit mode 1 Accessto these reference tables requires privilege level3 Since privilege level3 cannot be attained in the Series 90 CMM modules these reference tables cannot be accessed GFK 0582C Chapter 6 SNP Service 111 L6 Establish Datagram 07215 1C2F Available Modes Master 112 Description Remote command The slave device must be attached before executing this command see Attach command The master sends an Establish Datagram request with data the slave responds with a unique Datagram ID The master then sends a Write Datagram request with additional data the slave again responds This service provides the master with the capability to define a datagram an area within the slave device to be used to gather a mixed set of reference table data Once established the datagram area may be retrieved via the Datagram ID by using an Update Datagram or Update Real Time Data gram command Example Command Block Establish a permanent datagram in the attached Series 90 70 slave device Place the Data gram ID returned from the slave device into master device Register Memory Register 161 The slave device Main Program name is not required Set up the datagram for 2 point formats Point format 1 contains slave Registers 201 210 and point format 2 contains s
68. SNP X session as well as any repeated SNP X request after a session has been reestablished Number of NAKs Sent This word indicates the number of negative acknowledgements NAKs returned by this SNP device is sent when an error recoverable or fatal is detected in a received SNP message If the error is recoverable a retry is expected if the error is fatal the SNP communication is aborted Number of Break Sequences Received This word indicates the number of Break sequences received by this SNP device Used by slave devices only When a Break sequence is re ceived any existing SNP communication is aborted The Break sequence immediately preceeds each new SNP communication SNP Software Version Number This word indicates the version number of the communica tion firmware in this CMM module The version number consists of two hexadecimal numbers high byte low byte Error COMMREQ Data Block These 6 words contain the first 6 words of the Data Block from the most recent COMMREO failure Used by both master and slave devices slave devices perform local commands only This data can help to identify the COMMREO which has failed Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Change SNP ID 07002 1B5A Available Modes Slave Description Local command The slave device in the CMM module defaults to the same SNP ID as the built in slave device in the PLC C
69. Section 1 for valid memory types and addresses Note The SNP master on the CMM module and CPU 351 and CPU 352 serial ports limit this command to a total data length of 2048 bytes 1024 words Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Write System Memory 07203 1C23 Available Modes Master Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Write request with data the slave responds This service is provided to permit the access to various reference tables within the slave PLC See Table 16 for the slave memory types supported This command transfers the specified number of elements from the master reference table into the slave reference table When the memory types of the slave and master reference tables differ the slave reference table will be padded with the value 0 as necessary Example Command Block Write to the attached slave device Register Memory R Register 201 from master de vice Input Memory I Inputs 1 10 The least significant 10 bits of R201 in the slave device are filled with data from the master device the remaining bits of R201 in the slave device are set to 0 Word 1 00006 0006 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not U
70. Serial CableDiagrams Isolated Repeater Converter Miniconverter Software ModuleConfiguration Chapter 2 The CMM Description Configuration Installation andConfiguration Ladder Programming Chapter 4 Initiating Communications Chapter5 Chapter6 SNP Service ProtocolDescriptions Chapter 7 Protocol Definition RTU SNP SNP X GFK 0582C 1 Communications Modules Series 90 Communications Coprocessor Modules described in this manual are available for Series 90 70 catalog number 697 711 and Series 90 30 catalog number 697 311 PLCs Both of these modules support the SNP SNP X CCM serial communications protocols Communications Protocols for the CMM SNP and SNP X Protocols The SNP and SNP X protocols are included in the EPROM software for both the Series 90 70 and Series 90 30 CMM modules The SNP protocol is a proprietary communica tions protocol developed by GE Fanuc Automation The SNP protocol is the native com munications protocol to all models of the Series 90 PLC product line The SNP X protocol is a highly optimized addition to SNP While it offers fewer func tions than SNP SNP X is simpler to use and provides a significant performance improve ment over SNP SNP X is an extension of SNP and is available whenever SNP is config ured and operable The SNP and SNP X protocol allows for the following types of operation e
71. Source Input Table 6 words 17D6h X X X X X Read from Target to 6103 Source Output Table 6 words 17D7h Read Q Response to 6 words 6109 Source Register Table 3 used 17DDh Single Bit Write 6110 4words 17DEh Write to Targetfrom 6111 Source Register Table 6 words 17DFh Write to Targetfrom 6112 Source Input Table 6 words 17 X X X X X Write to Targetfrom 6113 Source Output Table 6words 17E1h X X X X X Internal Command no communications across the serial port TheQ Response can be set via command 6001 and the CCM slave will respond to a Sequence Enquiry received from an external device on the serial port Fora description of the Q Sequence refer to Section 3 of this chapter Data bytes 1 and 2 3b Data bytes 3 and 4 Source Register Memory address 38 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 The tables below list the memory types supported by the Series 90 The memory types for the CCM single bit set and clear are logical memory types They map to the same input and output tables as memory types 1 and 2 but are assigned unique memory type numbers because they are used to perform the bit set and bit clear special operations on the input and output tables Table 10 Memory Types Supported by Series 90 CCM CCM Memory Type CCM Target Table Register Table Read Wite Input Table Read Wite Output Table Read
72. The SNP ID field specifies the slave device s to which data will be written The null SNP ID all bytes 00h may be used only when the single session Communication Ses sion type is selected The broadcast SNP ID all bytes FFh may be used only when the multi session Communication Session type is selected The Communication Session type field specifies whether the communication session is single ses sion or multi session The master uses this value together with the SNP ID value to determine whether the proper communication session is already active or if a new session must be estab lished prior to the actual data transfer For single session operation the communication session is established with only the slave device specified by the SNP ID For multi session operation the communication session is established with all slave devices on the seriallink In either case once the proper communication session exists the master sends the data transfer command to the slave specified by the SNP ID When communicating with a single slave device single ses sion provides the fastest performance When communicating with many slave devices on a multidrop serial link multi session provides the fastest performance The Number of Master Memory Type elements to write field is specified in units consistent with the access mode of the Master Memory Type A maximum of 1000 bytes of data may be trans ferred in one X Write command use multiple commands to trans
73. There are several points to remember when interpreting the contents of the SNP Status Word 1 The CMM will never send a zero for the SNP Status Word to the PLC CPU If the user program needs to know if the command is complete it can zero the SNP Status Word before issuing the COMMREO and then check it for being non zero 2 A status code of 1 in the low byte and 0 in the high byte indicates that the request was completed without errors All other non zero values indicate errors Refer to the tables below for a complete listing of major and minor error codes for SNP 3 Display the SNP Status Word in hexadecimal form to read the two bytes of data 4 When an error occurs the low byte major error code will be greater than 1 5 Thehigh byte will contain any applicable minor error code The following tables list the SNP error codes that are reported in the SNP Status Word after the execution of an SNP COMMREQ When an error occurs these codes also ap pear in the first word of the SNP Diagnostic Status Words DSW 1 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C SNP Major Error Codes Table 17 Major Error Codes for SNP Error Status Major Error Description lOlh SuccessfulCompletion This is the expected completionvalueinthe This is the expected completion value in the Status Word InsufficientPrivilege For Series 90 70 PLC the minor error code con tains
74. Update Real Time Datagram command In response to a Break sequence all slave devices immediately abort any existing SNP communication and prepare to receive an Attach message from the master After the end of the Break sequence the master waits for the configured T4 time interval for slave preparation and then sends an Attach message The Attach message contains the SNP ID of the specific slave device with which the master desires to establish the communication session Only the specified slave device responds to the master with an Attach Response message the communication session is now established between the master and a specific slave device All other slave devices on the serial link wait for another Break sequence The SNP ID of the built in SNP slave device in each Series 90 PLC CPU is established by the Logicmaster 90 configuration For a SNP slave device on a CMM module the SNP Chapter 7 Protocol Definition CCM RTU SNP and SNP X 171 172 ID defaults to the same SNP ID as used by the PLC CPU This default value may be mo dified by the Change SNP ID command See Chapter 6 SNP Service for de tails on this command The basic SNP message flow for establishing SNP communications is shown in the figure below Master T4 delay Slave Attach Response Figure 22 Message Flow Establish Communications Once established a communication session remains active until the master transmits another Break sequence
75. Word SNP Major Error SNP Minor Error Codes Section3 SNP COMMREO ProgrammingExamples Ladder Program Example SNP Command Clear Diagnostic Status Words 07000 1B58 Read Diagnostic Status Words 07001 1 59 Change SNP ID 07002 1B5A Set X Status Bits Address 07003 1 5 X Read 07101 X Write 07102 IBBB 2454 em eed et ete oe dee ens Attach gt 07200 1 20 saath ve re RES RE EU E RES Change Privilege Level 07201 1 21 Read System Memory 07202 1622 Write System Memory 07203 1C23 Read Task Memory 07204 1 24 Write Task Memory 07205 1 25 vi Series 90 PLC Serial Communications User s Manual October 1996 45 48 48 50 50 51 51 52 53 54 55 56 57 58 58 59 60 61 62 73 73 77 78 79 81 82 84 86 88 92 94 95 96 97 GFK 0582C Contents Read Program Block Memory 07206 1 26
76. Year in BCD 108 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Set PLC Time Date 07213 1C2D Available Modes Master Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Set PLC Time Date request with data the slave responds This service provides the master with the capability to set the current system time and date clock of the slave device The master is provided several options The master may specify and set the date and or time explicitly The master may also specify that the master PLC s system date time be used to set the slave This option is useful in synchronizing the slave s date time with the master sdate time The Series 90 70 PLC and Series 90 30 PLC Models 331 340 341 351 and 352 support time date and day of week The Series 90 30 PLC Models 311 313 323 and Series 90 20 PLC do not support time date or day of week Example Command Block Set the date for the attached slave Series 90 70 PLC to Sunday January 19 1992 Word 1 00006 0006 SNP Data Block Length Word2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07213 1C2D Command Number Word 8 00003 0003 Set mode time date 1 time only 2 date only 3 synchronize 4
77. Year low byte month high byte Day of month low byte hours high byte Minutes low byte seconds high byte Day of week low byte 0 high byte Word 9 00402 0192 Word 10 00025 0019 Word 11 00000 0000 Word 12 00001 0001 Ye The Set mode field specifies what parts of the date and time are to be set in the slave de vice If time only is selected the values for date and day of week are not used If date only is selected the values for time are not used If synchronize is selected the master PLC s system time and date is used in lieu of the time and date fields in the Com mand Block The Year Month Day of month Hours Minutes Seconds and Day of week are specified packed BCD format The Hours value is entered in 24 hour format 0 23 The Day of week value specifies day of the week where Sunday 1 and Saturday 7 GFK 0582C Chapter 6 SNP Service 109 L6 Toggle Force System Memory 07214 1C2E Available Modes Master 110 Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Toggle Force System Memory request with data the slave responds This service provides the master with the capability to toggle a single status override or transition bit in the slave device to the opposite state that is from set to reset or from reset to set Example Command Block Toggle the attached slav
78. before next request broadcast X Wirite Explanation of Broadcast X Write Command 2 Bytes or Less Byte Hex Value Description Number X Write Request Message Startof message character 1Bh SNP X Command X 58h Broadcast SNP ID X Write request code 02h Segment Selector Q in bit mode Data Offset 0012h 18 zero based 019 Data Length 0001h 1 bit Data to write Max 1 word 2 bytes 16 bits End of block character 17h marks the beginning of the SNP X message trailer 00 00 00 00 Not used always 0 2D Computed Block Check Code for this example 204 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Example of Broadcast X Write Command More than 2 Bytes This example shows the message exchange of a broadcast X Write command to write more than two bytes of data This command requires a write request message and a subsequent data buffer message Note that there is neither an intermediate response nor a final response message to the broadcast request Master Slave X Write Request message 1B 58 FF FF FF FF FF FF FF FF 02 08 63 00 0A 00 00 00 17 54 1C 00 00 13 Wait Broadcast Delay time No Intermediate Response to before data buffer broadcast X Request X Write Data Buffer 1B 54 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 17 00 00 00 00 58 Wait Broadcast Delay time No X Write Response to before next request broadcas
79. below 244357 SHIELD C Rs 232 TD PORT 2 PORT 1 RS 232 TD 2 PORT 1 RS 232 RD I 5 232 RD PORT 2 PORT 1 5 232 RTS 2 Ges sens ER PORTO PORT 1 5 232 CTS 5 RS 232 DCD PORT 2 NO CONNECTION SIGNAL GROUND 7 RS 232 RTS PORT 2 2 5 9 RS 232 DTR PORT 1 PORT 1 RS 232 DCD RS 485 SD PORT 2 PORT H RS 485 RTS PORT 2 PORT 2 RS 485 RTS 9 M PORA PORT 2 RS 485 CTS 1 4 TERMINATION RD PORT 2 PORT 2 TERMINATION CTS H 2 MRNA RC PORT 2 RS 485 RD A Figure 4 Serial Port Pin Assignments for the Series 90 30 CMM The RS 485 signals for port 2 and the RS 232 signals for port 1 are assigned to the stan dard connector pins The RS 232 signals for port 2 are assigned to normally unused con nector pins A WYE cable is supplied with each Series 90 30 CMM module The purpose of the WYE cable is to separate the two ports from a single physical connector that is the cable sepa rates out the signals In addition the WYE cable makes cables used with the Series 90 70 CMM fully compatible with the Series 90 30 CMM The WYE cable is 1 foot in length and has a right angle connector on the end that con nects to the serial port on the CMM module On the other end it has dual connectors one connector is labeled PORT 1 the other connector is
80. bytes Data R1 R4 End of block character 17h marks the beginning of the SNP X message trailer Not used always 0 Computed Block Check Code for this example GFK 0582C Chapter 7 Protocol Definition RTU SNP and SNP X 199 X Write Command The X Write Command permits the SNP X master to make a write request of a single continuous area of a single reference table in the slave PLC memory The request speci fies the segment selector the offset the data length and the data If two or less bytes of data is to be written a single X Request message is transmitted up to two bytes of data may be included directly in the message If more than two bytes of data are to be writ ten an X Request message and an X Buffer message must be transmitted by the SNP X master In this case all of the data must reside in the X Buffer message the data field within the X Request message is not used Upon reception of an X Request which uses a data buffer the slave returns an Intermediate Response message to the master the mas ter then transmits the X Buffer message The maximum amount of data that can be written in the X Buffer message is 1000 decimal bytes The slave completes the com mand by returning an X Response message to the master If the slave detects an error when processing the X Request or X Buffer an X Response message is returned with an appropriate error code Data bytes are always byte aligned Individual bit data to b
81. datagrams remain established through new SNP communications Normal datagrams in a CMM711 Series 90 70 slave device or in the built in slave device in any Series 90 PLC CPU are automatically cancelled when the current SNP commu nication is ended Normal datagrams a CMM311 Series 90 30 slave device behave like permanent datagrams they are not cancelled when the current SNP communication is ended Any datagram normal or permanent may be cancelled upon request The Datagram ID is used to identify a specific datagram during a Cancel Datagram re quest The ID value 1 can be used to specify all established datagrams of the specified type normal or permanent Note Aspecial case occurs when both serial ports on the CMM311 module Se ries 90 30 are configured as SNP slave devices The ID value 1 ina Cancel Datagram request received at either slave device will cancel all established datagrams both slave devices in the same CMM There is no interaction between datagrams established on both ports of a CMM711 module Se ries 90 70 There is no interaction between datagrams established in the any CMM module and the built in CPU slave device or in different CMM modules GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 179 Section 4 SNP X Protocol This section contains a complete description of the SNP X protocol for users writing an SNP X communications driver Topics covered in this section are Ov
82. field specifies the particular datagram to cancel This value was turned to the PLC application program upon successful completion of the Establish Da tagram command The special value of 1 specifies that all datagrams of the selected da tagram type be cancelled The Datagram Type field designates a normal or permanent datagram This value must match the type specified when the datagram was established Note If the slave device is a CMM311 module Series 90 30 with both ports con figured as SNP slaves a Cancel Datagram command with the special Data gram ID of 1 will cancel all datagrams of the specified Datagram Type es tablished on both ports Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Update Real Time Datagram 07218 1 32 GFK 0582C Available Modes Master Description Remote command A permanent datagram must have been established before execut ing this command This service provides the master with the capability to Attach to the slave and retrieve a specified permanent datagram area by issuing a single command This service differs from the Update Datagram service in that communication with the slave device need not have been previously established by an Attach or Long Attach in order to perform this service Update Real Time Datagram commands may be issued as desired separate Attach commands to establish communications with the desired slave devices are not required This s
83. for peer to peer and master slave mode and protocol timing and retry specifications State tables are provided at the end of the section to clearly define what occurs throughout the pro tocol exchange for peer and master slave modes Separate tables are provided for the CCM Peer CCM Master and CCM Slave The CCM Protocol transfers data using the asynchronous serial data format For back ground information on serial data transmission and the asynchronous format refer to Appendix E The Serial Line Interface The following topics are covered in this section Overview of CCM Protocol CCM Peer to Peer Mode Description Master Slave Mode Description Protocol Timing and Retry Specifications CCM Protocol State Tables Overview of CCM Protocol The CCM Protocol is based on the ANSI Standard X3 28 implementing asynchronous character transfer using an 8 bit binary or ASCII format with optional parity bit Parity may be specified as odd or none Modes of Operation The CCM Protocol has two modes of operation Peer to Peer and Master Slave Peer to peer mode is a point to point configuration where only two devices share a single communication line Either device on the line may initiate communications The initiating device is called the source and the responding device is called the target Master slave mode is used in a multidrop configuration with one master and one or more slaves Only the master can initiate communic
84. gt gt 0004 0005 BLKMV BLKMV INT INT CONST IN1 Q R0005 CONST IN1 Q R0012 00006 00008 CONST IN2 CONST IN2 00000 00101 CONST IN3 CONST IN3 00008 00001 CONST IN4 CONST IN4 00000 00008 CONST IN5 CONST IN5 00000 00102 CONST IN6 CONST IN6 00000 00000 CONST IN7 CONST IN7 07202 00000 END OF PROGRAM LOGIC Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s SNP Command Examples The following table lists the SNP commands for the CMM module that can be initiated by a COMMREQ Most commands can be issued only to a CMM serial port configured as an SNP master device Remote commands provide communciation between a master and slave Unless otherwise indicated the master may send any remote command to any Series 90 slave device certain remote commands are valid only when communicat ing with a Series 90 70 slave device Local commands are executed without communica tion to a remote device Table 25 SNP Commands SNP Command Command Number Master Slave LocalCommands Clear Diagnostic Status Words 1B58 Read Diagnostic Status Words 1B59 Change SNP ID 1B5A Set X Status Bits Address 1B5B RemoteSNP XCommands X Read 1BBD X Write 1BBE RemoteSNPCommands Attach Change PrivilegeLevel Read System Memory Write System Memory Read Task Memory to 90 70 only Write Task Memory to 90 70 only Read Program
85. indicate the run stop dis abled state of the PLC oversweep conditions and fault presence The Slave PLC Status Word within the SNP X response is valid only during a successful response this word is zeroed in each error response Slave Memory Access Bits X Status Bits The SNP X slave device user interface defines three new contiguous status bits called X Status Bits in the slave device PLC memory These bits are updated by the SNP X slave device to provide SNP X communication information to the slave PLC The X Status Bits are defined as follows Bit n42 Bit n 1 Bit n X Write Success X Read Success The Session Active bit indicates whether an SNP X communication session is established at this slave device The X Read Success and X Write Success bits indicate that an X Read or X Write SNP X command has been successfully completed by this slave de vice The location and operation of the X Status Bits within the slave device PLC memory dif fers for the Series 90 CPU and CMM modules In a Series 90 CPU module the X Status Bits always reside at the following locations 519 518 517 X Read Success SNPX WT SNPX RD SNPXACT In a Series 90 CPU module the X Status Bits are always updated by the slave device The Session Active bit remains set whenever the SNP X session is active The X Read Success or X Write Success bit is set for exactly one sweep upon successful completion of an X Read or X Write SNP X command respecti
86. labeled PORT 2 Chapter 2 The CMM Description Installation and Configuration 9 10 44357 SHIELD C Rs 232 TD PORT 2 PORT 1 RS 232 TD H 2 S 9 Rs 232 CTS PORT 2 PORT 1 5 232 RD H 3 RS 232 RD PORT 2 PORT 1 5 232 RTS 2 7 Rs 232 DTR PORT 2 PORT 1 5 232 CTS 5 RS 232 DCD PORT 2 NO CONNECTION 5 S 5 232 RTS PORT 2 SIGNAL GROUND 7 I RS 232 DTR PORT 1 PORT 1 RS 232 DCD RS 485 SD PORT 2 PORT 2 RS 485 SD A 2 RS 485 RTS B PORT 2 PORT 2 RS 485 RTS A 0 H RS 485 CTS 2 PORT 2 RS 485 CTS 1 4 TERMINATION RD PORT 2 PORT 2 TERMINATION CTS 2 PORT 2 RS 485 RD 3s 7 RS 485 RD B PORT 2 1 2 44358 SHIELD C SHIELD AQ RS 232 TD H 2 RS 232 TD 2 9 RS 232 RD 3 RS 232 RD H 3 RS 232 RTS Q RS 232 RTS RS 232 CTS G 5 232 CTS 5 SIGNAL GROUND 7 SIGNAL GROUND 7 RS 232 DTR 5 RS 232 DTR RS 232 DCD 3 RS 232 DCD H RS 485 SD B RS 485 SD Teo I RS 485 RTS RS 485 RTS A 9 in RS 48
87. lt MASTER L Il I 24 TERM 24 PORT PORT RTS 10 Fg bg 10 10R2 RTS 22 Fg Fg 22 OR CTS A 11 11 Em lt CTS B 23 Li 1 23 0V 7 e 7 SHLD 1 Ny MJ 1 25 25 i 25 PIN FEMALE MALE N FEMALE e 13 UP TO A 25 MAXIMUM OF e 9 SERIES 90 4000 FEET 21 CMM NOTE 1200 METERS SLAVE WHEN WIRING RS 422 485 MULTIDROPCABLES 24 REFLECTIONS ON THE TRANSMISSION 10 PORT LINE CAN BE REDUCED BY CONFIGURING THE 22 CABLE IN A DAISY CHAIN FASHION AS 11 SHOWN BELOW 23 2 MASTER CMM SLAVE 1 _ _ _ 722 i 25 FEMALE eee CPU BUILT IN PORT SLAVE 2 ly PIN q q 10 RD A 11 RD B ALSO IT IS RECOMMENDED TO MAKE ANY 12 0128 SERIES 80 NECESSARY CONNECTIONS INSIDE THE 13 SD PLC s CABLE CONNECTOR TO BE MOUNTED ON A THE CMM IT IS NOT RECOMMENDED TO 9 TERM CPU USE TERMINAL STRIPS OR OTHER TYPES 6 RTS A BUILT IN OF CONNECTORS ALONG THE LENGTH OF 14 RTS B PORT THE TRANSMISSION LINE 15 CTS A 8 CTS B 7 ow APARAS BA TERMINATE CONNECTION AT FIRST AND LAST 2 1 sH DROPS FOR THE CMM INSTALL JUMPER TO CONNECT INTERNAL 120 OHMS RESISTOR 15 15 MALE FEMALE ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 TO OTHER CMM s MAXIMUM OF 8 CMM s ON A MULTIDROP TERMINATE THE RD
88. message in timely fashion If an expected Buffer message is not received within the T5 time interval after the completion of the previous mes sage the SNP communication is aborted The master must establish a new communica tion session See the SNP Timers section below for additional information on the SNP timers Even when message transmission or integrity errors do not occur the slave device may be unable to successfully complete the action requested by the master The slave device indicates a request failure by returning the appropriate major and minor error codes to the master in a response Mailbox message Retry and Error Recovery When an SNP message is received the message is examined for correctness If a trans mission or message integrity error is detected a negative acknowledgement is returned with an error code When a negative acknowledgement indicates a recoverable error the sender retries the message The SNP master permits a maximum of two retries for any message If the message is not correctly sent or received by the master after two retries the master aborts the SNP communication The master must establish a new communication ses sion When a negative acknowledgement indicates a fatal error both the master and slave immediately abort the SNP communication The master must establish a new commu nication session Fatal CMM Errors Certain local errors indicate fatal errors on the CMM module When a fatal er
89. not respond in that time ladder program execution resumes This is referred to as WAIT mode Chapter 4 Initiating Communications The 33 34 When using the Protocol it is recommended that this flag be set to NOWAIT Otherwise the time spent by the CCM Protocol could nega tively impact the CPU sweep When using the SNP Protocol this flag mustbe set to NOWAIT Any SNP COMMREO with the WAIT flag set will be immediately returned with an error Status Word Pointer Memory Type Word 3 The Status Word is written into PLC CPU memory at the location specified by Command Block Word 3 and Word 4 The format of this location includes memory type Word 3 and offset Word 4 Abbreviation Memory Type Value to Enter Discreteinput table Discrete output table Registermemory Analoginput table Analog output table Status Word Pointer Offset Word 4 This word contains the offset within the memory type selected The status word pointer offset is a zero basednumber For example if you want as the location of the Status Word you must specify a zero for the offset The offset for R100 would be 99 For information on the contents of the CCM Status Word see Chapter 5 CCM Service For information on the contents of the SNP Status Word see Chapter 6 SNP Service Idle Timeout Value Word 5 The idle timeout value is the maximum time the PLC waits for the CMM to acknowledge receipt of the request For NOWAIT
90. one coil One or more rungs form a ladder diagram Scan The technique of examining or solving all logic steps specified by the program in a sequential order from the first step to the last Serial Communication A method of data transfer within a PLC whereby the bits are handled sequen tially rather than simultaneously as in parallel transmission Series Ninety Protocol SNP SNP Protocol is the native communication used by all Series 90 PLCs SNP isa GE Fanuc proprietary master slave protocol Series Ninety Protocol Enhanced SNP X A highly optimized addition to the basic SNP protocol used exclusively for fast data transfer Appendix A Glossary of Terms 245 246 Significant Bit A bit that contributes to the precision of a number The number of significant bits is counted beginning with the bit contributing the most value referred to as the Most Significant Bit MSB and ending with the bit contributing the least value referred to as the Least Significant Bit LSB Status Word Indicates overall status of the CCM and SNP protocols and the communication network Storage Used synonymous with memory Synchronous Transmission in which data bits are transmitted at a fixed rate with the transmit ter and receiver synchronized by a clock This eliminates the need for start and stop bits Terminator A device or load connected to the output end of a transmission line to terminate or end the signals on that line User Mem
91. repeating the X Request This error applies to CMM module only ae ae Service Request Processorresponseexceeds 1000 bytes the SNP X slave de vice cannot return the data in an X Response message This errorapplies to CMM module only 16 10h Unexpected Service Request Processorerror This error applies to CMM moduleonly the unexpected SRP errorcodeis saved in the Diagnostic Sta tus Words in the CMM module Requested service is not permitted in a Broadcast request The master must direct the X Request message to a specific SNP X slave device Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Note Minor Error Codes 32 35 indicate fatal errors subsequent SNP X commu nication must be initiated with an X Attach message The SNP X slave de vice returns these error codes in an X Response message Table 23 Minor Error Codes for Major Error Code 15 0 Continued Error Status SNP X Slave Error Description 20h Invalid Message Type field in a received X Request message The Type field in a received X Request message The message type of an X Request message must be 58h X Invalid Next Message Type or Next Message Length field in a received X Request message If this request does not use a buffer 0 2 bytes of data the Next Message Type must be zero If this request will be fol lowed with a buffer message more than 2 bytes of data the Next Message Type must be 54h T
92. the User Program field GFK 0582C Chapter 5 CCM Service 41 Diagnostic Status Words 42 In addition to the CCM Status Word which is automatically transferred from the CMM to the CPU there are 20 Diagnostic Status Words which are maintained and updated within the CMM The Diagnostic Status Words are not automatically transferred to the CPU the internal COMMREO command 6003 Read Diagnostic Status Words to Source Registers is used to transfer these status words to the CPU An external device can ac cess these status words using a READ command with target memory type 9 The table below explains the purpose of each Diagnostic Status Word When two CCM ports are running concurrently each has its own copy of Diagnostic Sta tus Words Neither can report on the status of the other The Series Six Diagnostic Status Words contained data referring to both ports The Series 90 maintains two separate sets of Diagnostic Status Words as outlined in the following table The software version number remains in the same location as it was in the Series Six PLC Table 12 CCM Diagnostic Status Word Definitions Status Word Contents Bye USE Serial Port Error Code n Refer to Section 2 of this chapter for a list of the possible error codes and their definitions Internal commands will not modify this count The term conversationrefers toserial communications across the serial port 3 SameasthePCM CMM Firmware Revision Number in the
93. the wire pairs are connected correctly When using RS 422 RS 485 the twisted pairs should be matched so that both transmit signals make up one twisted pair and both receive signals make up the other twisted pair If this is ignored crosstalk resulting from the mismatching will affect the perfor mance of the communications system When routing communication cables outdoors transient suppression devices can be used to reduce the possibility of damage due to lightning or static discharge Care should be exercised to ensure that both the CMM module and the device to which it is connected are grounded to acommon point Failure to do so could result in damage to the equipment 212 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Section 2 RS 232 Cable Diagrams This section provides diagrams for the following RS 232 connections CMM to CMM e to 2 Series Six CMM to OIT PIN PIN 244918 Gy TE RD 3 1 SERIES 90 70 dg 07 SERIES 90 0 RIS 4 8 DCD 0 CMM o cts 5 11 eo DTR 0 9 CMM 0 L 0 0 DCD 8 F1 4 RTS 0 0 PORT 10R2 9 DTR 20 A I 5 CTS 00 10R2 0 GND 7 7 GND 0 o SH
94. this value is not used Any timeout value is ignored it can be zero If WAIT is selected this word speci fies the idle timeout period in 100 microsecond increments Maximum Communication Time Word 6 This word contains the maximum amount of time the program should hold the window open when the CMM is busy For NOWAIT this value is not used Any timeout value is ignored it can be zero If WAIT is selected this word specifies the maximum time in 100 microsecond increments Data Block Words 7 134 The Data Block contains information about the request in a format that depends on the communication protocol being used For Data Block information on the CCM protocol see Chapter 5 CCM Service The CCM Data Block is a maximum of 6 words long For Data Block information on the SNP protocol see Chapter 6 SNP Service The SNP Data Block length depends upon the particular SNP command Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C Chapter GFK 0582C 5 CCM Service This chapter describes the CCM serial communications service Before proceeding with this chapter it is important to be familiar with the information presented in Chapter 4 Initiating Communications The COMMREQ This chapter contains the following sections Section 1 The CCM COMMREQ Data Block Section 2 The CCM Status Word Section 3 CCM Programming Examples Comparisons among the Seri
95. 0 and store to mas ter device Register Memory Registers 201 210 Slave device Main Program name slave device Program Block name PBLOCK1 Words 12 15 contain the slave device Main Program name words 16 19 contain the slave device Program Block name Word 1 00013 0000 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word3 00008 0008 Status Word Memory Type Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07206 1C26 SNP Command Number Word 8 00001 0001 Slave Program Block Address L1 Word 9 00010 000A Number of Master Memory Type elements to read Word 10 00008 0008 Master Memory Type to store data Word 11 00201 00C9 Master Address to store data Register 201 Word 12 16717 414D Characters 1 and 2 M 4Dh A 41h Word 13 20041 4 49 Characters 3 and 4 I 49h N 4Eh Word 14 00049 0031 Characters 5 and 6 1 31h null Word 15 00000 0000 Characters 7 and 8 null null Word 16 16976 4250 Characters 1 and 2 P 50h B 42h Word 17 20300 Characters 3 and 4 L 4Ch 4Fh Word 18 19267 4B43 Characters 5 and 6 C 43h 4Bh Word 19 00049 0031 Characters 7 and 8 1 31h null The Number of Master Memory Type elements to read field is specified in units consistent with the unit length of the Master Memory Type See Table 16 in Section 1 for valid mem
96. 00 LEN 1000011 lt lt RUNG 5 STEP 0004 gt gt TOO01 0002 TMR 10 1051 CONST PV 00020 R0002 lt lt RUNG 6 STEP 0007 gt gt TO0002 70001 BLKMV BLKMV R INT INT CONST Q R0005 CONST Q R0012 00006 0000 CONST 2 CONST IN2 00000 0000 CONST IN3 CONST IN3 00008 0010 CONST 4 CONST 4 00000 0000 5 5 CONST 5 00000 00102 CONST 6 CONST 6 00000 00000 CONST CONST 06101 00000 lt lt RUNG 7 STEP 0011 gt gt T0002 T0003 MOVE COMM_ S INT REQ 0005 4 CONST IN 04 580001 0005 FT 00000 1000011 CONST SYSID 0002 CONST TASK 00000001 lt lt RUNG 8 STEP 0016 gt gt ON T0005 XE 0 qu INT R0001 I1 CONST 12 00001 END OF PROGRAM LOGIC 1 Chapter 5 CCM Service 49 Command Examples Note In each of the following examples NOWAIT modeis selected and the Sta tus Word is assigned to Register 10 00010 Set Q Response 06001 1771 50 Description Local Command The Set Q Response command is for a CMM configured in slave mode only The command is used to pass four bytes of data in Q sequence format from the PLC CPU to the CMM A remote master device will the
97. 00 0000 0000 0000 0000 1000 0000 1000 0100 0010 0000 0010 1001 0100 0000 0100 0010 0000 0010 2 LSB Flag 000 0010 000 0 0000 000 000 0000 000 000 1 RECEIVER CRC 16 ALGORITHM MSB2 Rcvr CRC after data 1110 0010 lst byte Trns CRC 0000 0000 Current CRC 1110 0010 Shift 1 0111 0001 Shift 2 0011 1000 Shift 3 0001 1100 Shift 4 0000 1110 Shitt 5 0000 0111 Shift 6 0000 0011 Shift 7 0000 0001 Shift 8 0000 0000 XOR 2nd byte trns CRC 0000 0000 Current CRC 0000 0000 Shift 1 8 yields 0000 0000 ALL ZEROES FINAL CRC 16 0100 0100 0000 0000 1000 0100 0010 0001 1000 1100 1110 1110 0000 0000 LSB2 0001 0001 0000 0000 0000 0000 0000 0000 1000 0100 0010 0010 0000 0000 Flag FOR RECEIVER NDICATES TRANSMISSION CORRECT EXAMPLE MESSAGE Refer to the example of a transmitted message shown below 1 As stated before the receiver processes incoming data through the same algorithm as the transmitter The example for the receiver starts at the point after all the data bits but not the transmitted CRC have been received correctly Therefore the receiver CRC should be equal to the transmitted CRC at this point When this occurs the output of the CRC algorithm will be zero indicating that the transmission is correct The transmitted message with CRC would then be 2 The MSB and LSB referen
98. 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status WordAddress minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07207 1C27 SNP Command Number Word 8 00001 0001 Slave Program Block Memory Address L1 Word 9 00010 000A Number of Master elements to write Word 10 00008 0008 Master Memory Type to write data from Word 11 00201 00C9 Master Address to write data from Register 201 Word 12 16717 414D Characters 1 and 2 M 4Dh A 41h Word 13 20041 4 49 Characters 3 and 4 I 49h 4Eh Word 14 00049 0031 Characters 5 and 6 1 31h null Word 15 00000 0000 Characters 7 and 8 null null Word 16 16976 4250 Characters 1 and 2 P 50h B 42h Word 17 20300 Characters 3 and 4 L 4Ch 4Fh Word 18 19267 4B43 Characters 5 and 6 C 43h 4Bh Word 19 00049 0031 Characters 7 and 8 1 31h null The Number of Master Memory Type elements to write field is specified in units consistent with the Unit Length of the Master Memory Type See Table 16 in Section 1 for valid memory types and addresses Note The SNP master on the CMM module and CPU 351 and CPU 352 serial ports limit this command to a total data length of 2048 bytes 1024 words Chapter 6 SNP Service 99 L6 PLC Short Status 07208 1C28 Available Modes Master Description Remote command The slave device must be attached before executing this c
99. 09 0009 Target Memory Type Word 10 00001 0001 Target Memory Address Word 11 00009 0009 Data Length Word 12 00936 03A8 Source Memory Address Note When using the Input and Output tables the memory address must begin on a byte boundary and the data length must be a multiple of 8 GFK 0582C Chapter 5 CCM Service 53 Read Q Response to Source Register Table 06109 1700 Description 54 Remote command This command allows the PLC programmer to read the Q Response buffer of a remote device and store the data into a specific location of the Register Table A Q Response buffer contains exactly 2 registers of data Example Read the Q Response from CCM slave device 5 into registers R00100 R00101 Word 1 00006 0006 CCM Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Word 4 00009 0009 Status Word Address minus 1 Register 10 Word 5 00000 0000 Not used in NOWAIT mode Word 6 00000 0000 Not used in NOWAIT mode Word 7 06109 17DD Command Number Word 8 00005 0005 Target CPU ID Slave ID 5 Word 9 00000 0000 Not used Word 10 00000 0000 Not used Word 11 00000 0000 Not used Word 12 00100 0064 Source Memory Address Register 100 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Single Bit Write 06110 17DE GFK 0582C Description Remote Command This command allows the user to set or clear a single
100. 1 Not Used Not Used SNP Command Number Slave Task Memory Address 1 Number of Master Memory Type elements to write Master Memory Type to write data from I Master Address to write data from Input 1 Characters 1 and 2 M A 41h Characters 3 and 4 I 49h 4Eh Characters 5 and 6 1 31h null Characters 7 and 8 null null The Number of Master Memory Type elements to write field is specified in units consistent with the unit length of the Master Memory Type See Table 16 in Section 1 for valid memory types and addresses Note The SNP master on the CMM module and CPU 351 and CPU 352 serial ports limit this command to a total data length of 2048 bytes 1024 words GFK 0582C Chapter 6 SNP Service 97 L6 Read Program Block Memory 07206 1C26 98 Available Modes Master for communication with Series 90 70 slave device only Description Remote command The slave device must be attached before executing this command see Attach command master sends a Read request the slave responds with the data This service provides the master with the capability to read the Local Subblock Data segment L reference table of a specified Program Block in the slave Only a Se ries 90 70 PLC slave device supports this service a Series 90 20 or Series 90 30 slave de vice will produce unpredictable results Example Command Block Read attached slave device Program Block Memory L Words 1 1
101. 2 Word 13 Word 14 Word 15 Word 16 Word 17 Word 18 Word 19 Word 20 Word 21 Word 22 Word 23 86 Series 90 PLC Serial Communications User s Manual October 1996 00017 0011 00000 0000 00008 0008 00000 0000 00000 0000 00000 0000 07102 1BBE 00000 0000 00000 0000 00000 0000 00000 0000 00000 0000 00008 0008 00201 00C9 00010 000A 00070 0046 00001 0001 00008 0008 00032 0020 00000 0000 00000 0000 00000 0000 00000 0000 SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 Not Used Not Used SNP X Command Number Characters 1 and 2 of Slave SNP ID Characters 3 and 4 of Slave SNP ID Characters 5 and 6 of Slave SNP ID null null Characters 7 and 8 of Slave SNP ID null null Communication Session type 0 single session 1 multi session Slave Memory Type to store data Slave Address to store data Register 201 null null null null Number of Master Memory Type elements to write Master Memory Type from which to write data l Master Address from which to write data Input 1 CRT Memory Type to store Slave PLC Status Word Master Address to store Slave PLC Status Word Register 32 Response Timeout in msec 0 use default Broadcast Delay in msec 0 use default Modem Turnaround Time in msec Transmission Delay in msec GFK 0582C 0582 s
102. 2 P 50h A 41h Password bytes 3 and 4 5 53h S 53h Password bytes 5 and 6 1 31h Password bytes 7 and 8 null null The Requested Privilege Level field is a value between 0 and 4 for Series 90 70 PLCs and between 1 and 4 for Series 90 30 or Series 90 20 PLCs In addition the privilege level can be set to a value of 1 When the value of 1 is specified the highest privilege level with the provided password is accorded the requestor The Password field specifies the password required for access to the desired privilege lev el If a password is not entered set all bytes in this field to null 0 Note The CMM module requires privilege level2 atthe PLC CPU for correct op eration To avoid incompatability with existing SNP master implementa tions an SNP slave in the CMM module will accept any privilege level and password in a Change Privilege Level request the CMM slave device will always remain at privilege level 2 92 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Table 29 Description of PLC Privilege Levels Write to all configuration or logic Configuration may only be written in STOP mode logic may be written in STOP or RUN mode Display set or delete passwards for any level The following table describes the meaning of each privilege level Writetoany configuration or logic including word for word changes the addition deletion of program logic and
103. 2C The first word of the Data Block Command Block Word 8 must be a command in the range of 6000 to 6199 decimal and is similar to the commands used by the Series Six CCM modules A subrange of 6000 to 6099 is reserved for general utility type functions that only involve local data storage on the CMM local commands and generally are used in all CCM modes master slave peer responder and peer initiator The subrange 6100 to 6199 is used for operations that require initiating communication over the serial line remote commands and are generally restricted to CCM modes of master and peer initiator Chapter 5 CCM Service 37 The following table lists the command words and the required parameters for each For more detailed information and examples of each command refer to Section 3 of this chapter Table 9 COMMREQ Data Block Summary for CCM Commands Data Block Registers X indicates Required indicates Not Used Command Target Source Description Command Memory Memory Data Memory Word Address Length Address Word 7 Word 10 Word 11 Word 12 Set Q Response 6001 Slave mode only 3 words 1771h x3a x3b Clear CCM Diagnostic 6002 Status Words 1 word 1772h Read CCM Diagnostic 6 words Status Words to 2words 6003 Source Registers unused 1773h SoftwareConfiguration 6004 See Section 3 for details 15words 1774h Read from Target to 6101 Source Register Table 6 words 17D5h X X X X X Read from Target to 6102
104. 5 CTS 4 RS 485 CTS 1 8 TERMINATION RD TERMINATION CTS 2 RS 485 RD 97 RS 485 RD 3 RS 232 44225 25 PIN FEMALE CONNECTOR PIN 1 1 FOOT 2 0 0 LABEL 3 PORT Ne PORT2 W PCM COMM CABLE 9 5 IC693CBL305B U U PINA RS 232 RS 232 RS 485 PIN 1 25 PIN MALE 25 PIN FEMALE CONNECTOR CONNECTOR Figure 5 WYE Cable Connections for the Series 90 30 CMM WYE cable routes the Port 2 RS 232 signals to the RS 232 designated pins If you do not use the WYE cable you will need to make a special cable to connect RS 232 devices to Port 2 Standard Series 90 70 CMM cables can be used for the Series 90 30 CMM when the WYE cable is used Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Section 2 Installing and Configuring the CMM This section explains how to install the CMM in the rack Series 90 70 or baseplate Se ries 90 30 and how to configure the module using Logicmaster software Topics covered are What you Will Need Installing the CMM Configuring the CMM in Logicmaster 90 Software What You Will Need Before you can begin the installation procedure you must have the following equipment and software packages A Series 90 70 or Series 90 30 Programmable Logic Controller PLC For Series 90 30 the CPU must be a model CPU331 or higher ACommunications Coprocessor Module CMM to install a
105. 6 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Establish Session To establish an SNP X communication session the master first sends a Long Break waits for the T4 time interval and sends an X Attach Request message The slave always rec ognizes a Long Break the slave resets its communication circuits and prepares to receive the expected X Attach Request message If the X Attach Request message is intended for this specific slave device the slave returns an X Attach Response to the master All other slave devices ignore the X Attach message The special Null SNP ID is always accepted by any slave device instead of its actual SNP ID The use of the Broadcast SNP ID in an X Attach message is described under Broadcast Commands below The SNP X protocol sequence for the establishment of an SNP X communication sequence is shown below Master Slave Long Break gt wait T4 time Request gt lt X Attach Response Once an SNP X session has been established SNP X commands may be used to transfer data Directed Commands When the master sends SNP X message s addressed directly to a specific SNP ID only the slave device identified by that SNP ID receives the message that slave returns re sponse message s to the master All other slave devices ignore the message The special Null SNP ID is always accepted by any slave device in lieu of its actual SNP ID Any X Read command or an X Wr
106. 8 00008 0008 Master Memory Type to store PLC Time Date R Word 9 00201 00C9 Master Address to store PLC Time Date Register 201 The Master Memory Type and Address fields must be selected to allow enough room to ac comodate the 8 bytes of data necessary to represent the PLC Time Datereturned from the slave PLC See Table 16 for valid memory types and addresses data are returned in a packed BCD format The Day of Week field indicates the day of the week where Sunday 1 and Saturday 7 The Time Date dataisreturned in the following format PLC Time Date Area Word Location Byte Location Description Word 1 low byte Year in BCD Word 1 high byte Month in BCD Word 2 low byte Day in BCD Word 2 high byte Hour in BCD Word 3 low byte Minutes in BCD Word 3 high byte Seconds BCD Word 4 low byte Day of Week Sunday 1 Saturday 7 Word 4 high byte Unused 106 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Return Fault Table 07212 1 2 Available Modes Master Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Return Fault Table request the slave responds with data This service provides the master with the capability to retrieve all or any part of the I O or PLC Fault Tables from the slave device The I O Fault Table can contain up to 32 entries the PLC Fault Table can contai
107. 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Outputs A signal typically ON or OFE originating from the PLC with user supplied pow er that controls external devices based upon commands from the CPU Parity The anticipated state either odd or even of a set of binary digits Parity Bit A bit added to a memory word to make the sum of the bits in a word always even even parity or always odd odd parity Parity Check A check that determines whether the total number of ones in a word is odd or even Parity Error A condition that occurs when a computed parity check does not agree with the parity bit Peer to Peer Communication between stations where either station can initiate requests or respond to requests Peripheral Equipment External units that can communicate with a PLC for example programmers printers etc Piggyback Status Six bytes of general PLC status information returned within each SNP response message This data may be passed to the master PLC if so requested PLC Commonly used abbreviation for Programmable Logic Controller Point to Point A serial wiring configuration which connects only two devices Program A sequence of functions entered into a Programmable Logic Controller to be executed by the processor for the purpose of controlling a machine or process Appendix A Glossary of Terms 243 244 Programmable Logic Controller or Programmabl
108. A 00 001 7 w 7 gt 9 L SHLD 1 LL Es ov gt 0 25 25 25 PIN 25 PIN FEMALE MALE TERMINATE CONNECTION ON THE CMM MALE FEMALE JUMPER INTERNAL 120 OHM RESISTOR ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 31 CMM to CMM with Flow Control None RS 422 RS 485 216 Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 a44921 oD 50 4 9 XX an 13 RD LE Go 00 lt spe 21 4 OH 25 RDG f 19 series 90 0p RD 13 50 senes oo 100 e RD B 25 a 9 Cu 00 IB 00 PORT TERM 24 7 24 TERM 0 PORT 1 0 1 00 lt 10 crsa h 20 Oe 00 c 22 XX 23 00 pm 00 e corso 10 Fr 09 lt crS B 23 l XX l 22 RTS p o 00 ov 7 7 0 0 09 smo 1 AJ o 25 25 25 25 MALE TERMINATE CONNECTION ON THE MALE FEMALE JUMPER INTERNAL 120 OHM RESISTOR ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 32 CMM to CMM with Flow Control Hardware RS 422 RS 485
109. BCC errors and protocol errors message type next message type or length When an SNP X request message cannot be received intact that is a serial transmission error has occurred the slave device does not send a response to the master The master times out waiting for the response and aborts the SNP X communication session When the SNP X request message is correctly received and the slave is able to respond the slave device returns an error code within an SNP X response message See the list of Minor Error Codes for Major Error 15 minor error codes 32 35 Both the slave and mas ter abort the SNP X communication session when a hard error is detected recovery is only possible through the establishment of a new SNP X session Soft errors are recoverable The slave device returns an SNP X response message contain ing an error code to the master The SNP X communication session remains established further SNP X commands may be issued Soft errors include improper request codes service request errors and invalid request memory types or lengths Broadcast Capability Modem Support GFK 0582C Every SNP X Attach and SNP X request message contains the SNP ID of the slave device that is to receive the message The SNP X protocol also provides a mechanism to broad cast an SNP X Attach or SNP X request to each and every slave device on a multidrop serial link To broadcast a SNP X request the special Broadcast SNP ID FFFFFFFFFFFFFFFF is s
110. Block Summary for CCM Com mands Target ID Word 8 To execute a transfer of data between CCM devices one CCM de vice must request the transfer and the other must comply with the request The device requesting or initiating the transfer is the source the device complying with but not initiating the request is the target Data can flow from source to target as well as from target to source The Target ID is the identification number of the target device for Series 90 CCM it is the CPU ID number Each CMM port can be configured with the same ora different 36 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C CPU ID number This number is assigned using the Logicmaster 90 configuration pack age Refer to Chapter 2 in this manual for more information on using the Logicmaster software to assign the CPU ID The CPU ID assigned by the automatic default configu ration provided by the Series 90 30 PLC Model 331 or higher CPU sets the CPU ID to 1 on both ports CPU ID of value 1 is also the initial Logicmaster 90 default configuration value The value of the target ID number can be from 1 to 255 in peer to peer mode or from 1 to 90 in master slave mode Target ID 015 reserved Any peer CCM device regardless of its ID will respond to target ID 255 Target Memory Type Word 9 This is the type of memory being accessed the CCM target device There are nine accessible Series 90 target memory types 1 2 3 6 9
111. C system to improve access to serial I O devices and to access PLC memory In Series 90 30 PLCs up to 9 CMMs may be installed in the main rack baseplate GFK 0582C 5 Section 1 Description of CMM Hardware and Operation This section covers the following topics for both the 711 for the Series 90 70 PLC and the CMM311 for the Series 90 30 PLC e LED Indicators Restart ResetPushbutton Serial Connectors System Operation The figures below show the layout of the CMM modules 844901 OK 2 BD PORT 1 gd Y 2 RESTART ci ANA MODEL 70 5 711 MODULE OK PORT1 2 ON OK ACTIVE BLINK COMMUNICATING PUSH TO RESTART APPLICATION PORT 1 RS 232 OR RS 422 COMPATIBLE 2 RS 232 OR RS 422 COMPATIBLE 5 MODULE FUNCTION SERIES 90 70 COMMUNICATIONS COPROCESSOR PORT 1 amp 2 RS 232 PIN SIGNAL SHIELD TD 1 2 3 RD 4 RTS 5 7 CTS GROUND 8 DCD 20 PORT 1 amp 2 RS 422 SIGNAL CTS A 12 TERM PIN 11 RD A 21 SD 22 RTS 24 TERM PIN 25 RD CONFIGURA TION DEPENDENT MODULE IC697CMM711 LABEL 44A728758 124RO1
112. COMMREO to the port that has just been configured Key Switch Functions A dual function key switch allows you to select the RUN STOP mode of operation and provides the added security of memory protection This key switch allows you to manually lock the saved version of the user program and system configuration data in flash memory The key switch has two positions for memory protection ON memory protected and OFF memory unprotected The memory protect function of the key switch is always enabled Chapter 3 CPU 351 and CPU 352 Serial Ports 25 26 The same key switch has another function it allows you to switch the PLC into STOP mode into RUN mode and to clear non fatal faults A configuration parameter must be set using the Logicmaster 90 30 configurator function to enable the key switch to also be used as a RUN STOP switch See Chapter 2 of the Series 90 30 20 Micro Programmable Controllers Reference Manual GFK 0467H for detailed operation of this feature Compatibility With Existing CPUs Programs developed on existing Series 90 30 CPUs cannot be run directly on the CPU 351 or 352 run a program developed on another model of CPU you must use Logicmaster 90 30 software to translate those programs before loading the program onto a CPU 351 or CPU 352 Programs created or translated for the CPU 351 or 352 can be translated back for execution on other CPU models Compatibility With Hand Held Programmer The user program in a
113. CPU 351 or CPU 352 cannot be viewed or edited with the Series 90 30 Hand Held Programmer IC693PRG300 The only operations supported by the CPU 351 or CPU 352 when using a Hand Held Programmer placed in the PROGRAM mode are writing to and reading from the CPU s flash memory You must use Logicmaster 90 30 programming software to edit the CPU 351 or CPU 352 user programs Additionally the Series 90 Memory Card is not supported by the CPU 351 or CPU 352 Diagnostic Error Codes Diagnostic error codes for the serial ports are generated at power up if any diagnostic test should fail Error codes will be displayed on the two serial port LEDs which will be flashing The top LED Port 1 will flash at a rate that corresponds to the first digit of the error code and the bottom LED Port 2 will flash at a rate that corresponds to the se cond digit of the error code Description of Error 0 11 Bad ProcessorFlags 0x12 Bad ProcessorRegister 0x13 0x14 BadStack Area 0x15 DMA Channel 0 not working 0x16 DMA Channel 1 not working 0 17 DMA Channel 2 not working 0x18 DMA Channel3 not working 0x19 Address Lines not working 0x21 H8 Timersnot working 0x22 Bad Interrupt Vector Table 0x23 Bad DiagnosticRAM Area 0x24 Bad H8 Cache RAM 0x25 Unexpected Interrupt 0x26 BadSystem RAM 0x27 Bad CRC Checksum 0x28 Bad Dualport RAM 0x29 Serial Port 1 Loopback failed 0x31 Watchdog TimerExpired Other Diagnostic Error Series90 PLC Serial Communications
114. D B a 15 sb 00 14 sD ISOLATED 9 19 TERM REPEATER 50 OHMS CONVERTER 5 W 18 trm B BRICK 9 0 d USED AS A 04 REPEATER 9 0 17 6 25 25 ALSO IT IS RECOMMENDED MAKE NECESSARY MALE FEMALE CONNECTIONS INSIDE THE CABLE CONNECTOR TO BE TO OTHER DEVICES MOUNTED ON THE CMM IT IS NOT RECOMMENDED TQ MAXIMUM OF 8 DEVICES ON A MULTIDROP USE TERMINAL STRIPS OR OTHER TYPES OF CONNECTORS ALONG THE LENGTH OF THE TERMINATE THE RD B SIGNAL ONLY AT END TRANSMISSION LINE OF MULTIDROP CABLE TERMINATE CONNECTION ON FIRST AND LAST DROPS ONLY ON THE CMM INSTALL JUMPER TO CONNECT INTERNAL 120 OHM RESISTOR ON THE ISOLATED REPEATER CONVERTER INSTALL 150 OHM RESISTOR SUPPLIED ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 45 Cable C RS 422 Twisted Pair GFK 0582C Chapter 8 Serial Cable Diagrams and Converters 227 SHIELDED MAKE CONNECTIONS 244932 TWISTED INSIDE D CONNECTORS SW oN PIN PAIRS i PIN p TA 7 13 RD o Lt xX Lt 125 Roe po 9 SD A 0 O XX 21 50 8 SERIES 90 ISOLATED Eil an
115. Data Wait for STX Wait for Data Wait for EOT Wait for Q RSP 10 Send ACK State 3 A 5 State 6 7 F State 1 5 I State 1 L Send EOT State 1 State 1 6 G State 1 6 J State 1 L Send EOT State 1 State 1 L Send Header State 5 E State 1 11 State 1 L Send EOT State 1 K EOT State 1 Send EOT State 1 EOT State 1 Send EOT State 1 Send EOT State 1 K Send EOT State 1 K Send EOT State 1 Send EOT State 1 K EOT State 1 K EOT State 1 K State 1 K State 1 K Series 90 PLC Serial Communications User s Manual October 1996 State 1 K GFK 0582C CCM Peer Actions A GFK 0582C Zero all counters Send ACK to ENQ Start TIMER Transition to State 3 Backoff TRUE Transition to State 11 Zero all counters Send ENQ Start ENQ TIMER Transition to State 2 Zero DATA COUNT Send Data Block Start DATA TIMER Remain in State 6 Send Header Start HEADER ACK TIMER Transition to State 5 If direction is read Transition to State 7 Else Get data from PLC memory Send data block Start DATA TIMER Transition to State 6 If last block Send EOT Transition to State 1 Else Remain in State 6 If ENQ_COUNT lt 32 Increment ENQ_ COUNT Send ENQ Start ENQ_ACK_TIM
116. Data Bits FOE keener a EE Stop Parity Start optional The table below shows examples of the binary and hexadecimal forms including parity bit of several ASCII characters The parity bit is explained in the section Parity Check ing Refer to Appendix for a complete list of the ASCII character set represented in hexadecimal and decimal Table 57 ASCII Information Code Format Binary Form of Hexadecimal Form of Parity Bit Characer 1 Character 5 Character odd 0 00000010 0000010 sl 2 STX controlcharacter character Of Text Em 00101011 1 00010101 15 NAK NENNEN NegativeAck GFK 0582C 255 Transmission Errors and Detection 256 Noise Errors Allasynchronous serial protocols use error checking and detection mechanisms to re duce the number of transmission errors and ensure reliable transfer of data The error checking methods employed by the CMM communications protocols are described be low The CMM uses four types of noise error checking Parity Checking Block Check Code checking SNP SNP X Longitudinal Redundancy Checking CCM Cyclic Redundancy Checking RTU Block Check Code checking SNP SNP X Protocols Longitudinal Redundancy Checking CCM Protocol and Cyclic Redundancy Checking RTU Protocol are performed in the Communication Protocol and are discussed in the applicable chapter Parity Checking Parity checki
117. ER 00 n n 100 00 247 24 09 ugar PoRT1 9 RTS A 10 Fg Fg 10 RTS A 90 OR o RTS 22 Fg 22 RTS B 90 2 49 CTS A 11 CTS A E 2 kk 00 CTS B 23 23 B 00 o ov 7 7 ov r 09 sup 1 w 1 so 25 25 25 25 PIN FEMALE MALE 4 MALE FEMALE A NOTE X WHEN WIRING RS 422 485 MULTIDROPCABLES Kr 5p REFLECTIONS ON THE TRANSMISSION LINE CAN BE REDUCED BY CONFIGURING TH CABLE IN A DAISY CHAIN FASHION AS e 13 gt SHOWN BELOW UP TOA 25 RD B gt MASTER CMM SLAVE 1 MAXIMUM OF 9 SD A SERIES 90 4000 FEET 21 SD B 1200 METERS SLAVE 24 TERM gt q 10 RTS A 7 22 RTS B gt oR 1 2 CPU BUILT IN PORT CMM SLAVE 2 cse 17 ov p 1 SHLD q q 25 PIN 25 PIN Y MALE FEMALE ALSO IT IS RECOMMENDED TO MAKE ANY NECESSARY CONNECTIONS INSIDE THE CABLE CONNECTOR TO BE MOUNTED ON THE CMM IS NOT RECOMMENDED USE TERMINAL STRIPS OR OTHER TYPES OF CONNECTORS ALONG THE LENGTH THE TRANSMISSION LINE TO OTHER CMM s MAXIMUM OF 8 CMM s ON A MULTIDROP TERMINATE THE RD B SIGNAL ONLY AT END OF MULTIDROP CABLE TERMINATE CONNECTION AT FIRST AND LAST DROPS FOR THE CMM INSTALL JUMPER TO CONNECT INTERNAL 120 OHMS RESIS
118. ER Transition to State 2 Else Send EOT Transition to State 1 Chapter 7 Protocol Definition RTU SNP and SNP X I If HEADER COUNT lt 3 Increment HEADER COUNT Send Header Start HEADER ACK TIMER Remain in State 5 Else Transition to State 1 J IfDATA COUNT lt 3 Increment DATA_BLK_COUNT Send data block Start DATA_ACK_TIMER Remain in State 6 Else Send EOT Transition to State 1 K Send EOT Transition to State 1 L Transition to State 1 M Send ACK If read data Start STX TIMER Transition to State 7 Else write data Get PLC Data Send Data Block Start DATA TIMER Transition to State 6 Send Data to PLC Send ACK to Data Block If last block Start EOT TIMER Transition to State 9 Else Start STX_TIMER Transition to State 7 If HEADER COUNT lt 3 Increment HEADER_COUNT Send NAK Start SOH_TIMER Transition to State 3 Else Send EOT Transition to State 1 If DATA_BLK_COUNT lt 3 Increment DATA_BLK_COUNT Send NAK to bad block Start STX_TIMER Transition to State 7 Else Send EOT Transition to State 1 Start HEADER_TIMER Transition to State 4 Start DATA_TIMER Transition to State 8 139 Master State Table Receive ACK Receive NAK Receive EOT Receive Good Header Receive STX Receive Good Data Receive Bad Data
119. Enable CCM Mode Interface Data Rate Flow Control Parity Retry Count Timeout Modem Turnaround Delay CCM CPU ID RTU Enable Interface Data Rate Flow Control Parity Station Address SNP Enable SNP Mode Interface Data Rate Flow Control Parity Stop Bits Timeout Modem Turnaround Delay Table 1 CCM Communications Parameters YES NO SLAVE MASTER PEER RS232 RS485 300 600 1200 2400 4800 9600 19200 NONE HARDWARE ODD NONE NORMAL SHORT LONG MEDIUM SHORT NONE NONE 10 ms 100 ms 500 ms 1 254 Table 2 RTU Communications Parameters YES NO RS232 RS485 300 600 1200 2400 4800 9600 19200 NONE HARDWARE ODD EVEN NONE 1 247 Table 3 SNP Communications Parameters YES NO SLAVE MASTER RS485 RS232 300 600 1200 2400 4800 9600 19200 NONE HARDWARE ODD EVEN NONE 1 2 LONG MEDIUM SHORT NONE NONE 10 ms 100 ms 500 ms 1 For the CMM311 module port 1 is RS 232 only Series 90 PLC Serial Communications User s Manual October 1996 Default YES SLAVE RS232 19200 NONE ODD NORMAL LONG NONE 1 Default Default GFK 0582C 0582 Notes on Communication Parameters Interface and SNP The Interface field specifies the type of electrical inter face used at this serial port Valid selections are 5 485 or RS 232 Note that for the CMM311 module port 1 operates as RS 232 only Flow Control
120. If broadcast X Attach Start Broadcast Delay timer Else directed X Attach Prepare to read X Attach Response Start Response Timeouttimer Transition to State 2 Cancel Response Timeouttimer Ifimproper X Attach Response message Error Abortall master processing in progress Transition to State 1 Else User Cmd is now complete Transition to State 3 for nextcmd User Cmd is now complete always successful Transition to State 3 for nextcmd If User Cmd X Write fetch data to be written Build and send X Request message to slave If broadcast X Request Start Broadcast Delay timer Else directed X Request Prepare to read Response msg Start Response Timeouttimer If X Request with Buffer Transition to State 4 Else X Request without Buffer Transition to State 5 Cancel Response Timeouttimer Ifimproper Intermediate Response msg Error Abortall master processing in progress Transition to State 1 Build and send X Buffer message to slave Prepare to read Response msg Start Response Timeouttimer Transition to State 5 Series 90 PLC Serial Communications User s Manual October 1996 F Cancel Response Timeouttimer Ifimproper X Responsemessage or fatal error code returned Error Abort all master processing in progress Transition to State 1 If non fatal error X Response msg contains error code Elsesuccessfulresponse If X Readresponse Distribute data returned from slave device User Cmd is now complete
121. LC Serial Communications User s Manual October 1996 ix Contents Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Figure 20 Figure 21 Figure 22 Figure 23 Figure 24 Figure 25 Figure 26 Figure 27 Figure 28 Figure 29 Figure 30 Figure 31 Figure 32 Figure 33 Figure 34 Figure 35 Figure 36 Figure 37 Figure 38 Figure 39 Figure 40 Figure 41 Figure 42 Figure 43 Figure 44 Figure 45 Figure 46 Figure 47 Series 90 70 711 Series 90 30 CMM CMMS311 Serial Port Pin Assignments for the Series 90 70 CMM Serial Port Pin Assignments for the Series 90 30 CMM WYE Cable Connections for the Series 90 30 CMM Series 90 70 CMM Configurations Flow Control NONE MODEM TURNAROUND DELAY 0 Flow Control NONE MODEM TURNAROUND DELAY 100 ms Flow Control CPU 351 ans 352 Serial Port Items of Interest CPU 351 shown Structure of the Operation of the Communications Request Data Block Format Data Transfer from Source to Target Write Peer Io Peer
122. LD 1 90 VJ 1 SHLD 9 25 Pin 25 Pin 25 Pin 25 Pin FEMALE MALE MALE FEMALE Figure 25 CMM to CMM with Handshaking RS 232 only PIN PIN a44919 o 3 E 2 TXD 90 PERLE 90 o 4 ats 05 a 00 5 i res es 00 05 DCD 8 DCD o re 00 AEN Mc mp a Ld A 0 PORTA 0 GND 7 7 GND 0 0 0 0 4 e e W 0 25 25 25 25 FEMALE MALE MALE FEMALE Figure 26 CCM2 to CMM RS 232 PIN PIN 244904 99 s d EIL Ta SERIES 90 0 1 1 0 Gir c Atos TD 2 r 3 RXD 9 CIS 5 4 RIS 06 00 DTR 20 E A S CTS 00 PRIMARY js 04 GND 7 7 GND 9 1 1082 0 DCD 8 20 DIR 2 o T o 25 25 25 25 MALE FEMALE MALE Figure 27 CMM to OIT with Handshaking RS 232 PIN PIN a44920 CN TN IL Elt d SEDES 9 9 ars 4 I iy ic 5 cTs ABIT oo cTs 5 H 20 oo 000 sH 20 DTR 00 PRIMARY 1 0 0 lt DTR 20 E 09 PORT 1082 o 7 7 GND 0 0 gt SHLD 1 e E AJ 0 0 25 25 25 25 MALE MALE FEMALE Figure 28 CMM to OIT without Handshaking RS 232 GFK 0582C Chapter 8 Serial Cable Diagrams and Converters 213 214 42832 ONS aa a DED 4 s 1
123. Minor in BCD CMM Firmware Revision No Major Minor 1 2 3 D E F 123 16 17 0 0 0 0 0 0 0 re Dr mes Chapter 7 Protocol Definition CCM RTU SNP and SNP X 165 166 Scratch Pad Memory Allocation Footnotes 1 0000 Run Enabled 0100 Halted 0001 Run Disabled 0101 Suspended 0010 Stopped 0110 Stopped IO Enabled 0011 Stopped Faulted a PLC CPU Major Type Codes 59070 PLC CPU 12 0Ch Series 90 70 PLC CPU 59030 PLC CPU 16 10h Series 90 30 PLC CPU b Series 90 70 Minor Types for CPU CPU 731 31 1Fh Series 90 731 CPU CPU 732 32 20h Series 90 732 CPU CPU 771 71 47h Series 90 771 CPU CPU 772 72 48h Series 90 772 CPU CPU 780 80 50h Series 90 780 CPU CPU 781 81 51h Series 90 781 CPU CPU 782 82 52h Series 90 782 CPU CPU 788 88 58h Series 90 788 CPU CPU 789 89 59h Series 90 789 CPU CPU 790 90 5Ah Series 90 790 CPU CPU 914 92 5Ch Series 90 914 CPU CPU 915 15 0Fh Series 90 915 CPU CPU 924 24 18h Series 90 924 CPU CPU 925 25 19h Series 90 925 CPU Series 90 30 Minor Types 331 35 23h Series 90 30 331 CPU CPU 340 38 26h Series 90 30 340 CPU CPU 341 36 24h Series 90 30 341 CPU 351 37 25h Series 90 30 351 CPU CPU 352 39 27h Series 90 30 352 CPU 3 Located in the same position as in the Series Six scratch pad Series One Three and Five PLC users who need to determine t
124. NATE CONNECTION ON FIRST AND LAST DROPS ONLY ON THE CMM INSTALL JUMPER TO CONNECT INTERNAL 120 OHM RESISTOR ON THE ISOLATED REPEATER CONVERTER INSTALL 150 OHM RESISTOR SUPPLIED ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 46 Cable D RS 422 Twisted Pair 228 Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C A SW CTS J2 PIN PIN 245239 tn 2 S E RD 9 ME olg RL 3 2 sp 5 0 01 lt 1 5 CTS 00 SERIES 90 o 0 001 SJ S S 5 771 lt RS 00 CMM 0 00 GND 7 Hr ren 7 GND F 00 0 CONVERTER 00 00 1 o BRICK 0 Fg EP 00 001 Fg 8 DCD 2 0 0 lt dg Lg 20 DTR 00 7 01 e Fg Fg 519 o 9 pog bog o 0 0 0 0 EXER F lo 9 0 LIS Ae 4 sup 25 PIN 25 PIN 25 PIN 25 PIN FEMALE MALE MALE FEMALE Figure 47 Cable E RS 232 Converter to CMM GFK 0582C Chapter 8 Serial Cable Diagrams and Converters 229 Section 5 5 422 to RS 232 Miniconverter This section describes how to use the RS 422 to RS 232 Miniconverter The section cov ers the following topics Description of the Miniconverter System Configurations Cable Diagrams Description of Miniconverter The Miniconverter Kit IC690ACC901 consists of an RS 422 SNP to RS 232 Minicon verte
125. NP X master must wait after sending a broadcast message before sending any other message This delay is required because the SNP X protocol requires that a slave device not respond to a broadcast request The Broadcast Delay is typically encountered after sending a broadcast X Attach request This delay applies only to the SNP X master device For the CMM module the Broadcast Delay value defaults to the configured T2 value se lected by the Timeout SNP configuration parameter default is 2 seconds This value may be modified by the SNP X master user interface The optimal Broadcast Delay val ue depends upon the PLC scan characteristics of the slowest of all attached slave PLCs that is scan rate communication window frequency and length and system load Mo dem Turnaround Time and Transmission Delay do not apply to the Broadcast Delay Response Timeout This is the maximum time interval that the SNP X master will wait for an expected mes sage from the slave device Failure to receive an expected message within this time in terval causes the master to abort the SNP X communication session the session must be re established for any further SNP X communication This timeout is used when waiting for an SNP X response or intermediate response from the slave device The Response Timeout is not used for broadcast commands This timeout applies only to the SNP X master slave device For the CMM module the Response Timeout value defaults to the c
126. Note Itis strongly recommended that byte oriented memory types be used in Point Formats instead of bit oriented memory types A Series 90 70 slave device does not permit bit oriented memory types in a datagram Point Format under any circumstances Bit oriented memory types are permitted in datagram Point Formats for a Series 90 30 slave device with the following restriction The entire bit type Point Format must fit within a single aligned byte of memory A per missible byte of bit oriented memory contains only 8 memory elements 1 to 8 9 to 16 N 8 1 to N 8 8 etc The Point Format may begin with any element but it length must not extend beyond the same memory byte as the starting element For example a Series 90 30 datagram can contain a 6 bit Point Format con taining Inputs 76133 to 76138 but not Inputs 137 to 42 The latter Point Format exceeds a single aligned memory byte 70133 to 76140 Note The length of the SNP COMMREO Data Block varies with the number of Point Formats defined in the Establish Datagram command The COMM REQ Data Block Length Word 1 of the must be equal to 3 Word 17 11 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Update Datagram 07216 1C30 Available Modes Master Description Remote command The slave device must be attached and a datagram must have been established before issuing this command see Attach and Est
127. PLC Table 51 Series Six Commands NOT Supported by the Series 90 6004 6009 Quick AccessBufferManipulations 6106 6116 6010 Set CPU Memory Write Protect 6011 Reinitialize CCM Task 6012 Set OIU Timers and Counters I OOverride TableManipulations CharacterString Manipulations unformatted ead write 6117 Write to Target from Source User Logic 6130 Set Retries 6131 Set CCM Timeouts 1 Functionality is available in a Series 90 PLC but in slightly different form See Series 90 command code 6004 Software Configuration 250 Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 The following table summarizes the memory types supported by the Series 90 Table 52 Memory Types Supported by Series 90 CCM Register Table Input Table Output Table CCM Scratch Pad DiagnosticStatus Words Input Table Output Table Input Table Output Table CCM Memory CCM Target Table Operation Type Read Wite Read Wite Read Wite Read Read Bit Set Bit Set Bit Clear Bit Clear Those Series Six memory types which are not supported are summarized in the follow ing table Table 53 Series Six Memory Types NOT Supported by the Series 90 CCM Absolute Input Override Table Output Override Table User Logic Quick Access Buffer Timers Counters Input Override Table Output Override Table Input Override Table Output Override Table Input Ove
128. PLC used the signal nomenclature as shown below The original nomenclature for this equipment has been retained in the wiring diagrams Chapter 8 Serial Cable Diagrams and Converters 215 Table 46 Series Six RS 422 Signal Cross Reference to the Standard Signal Name Name smdomni GNb During a mark condition logic 1 B will be positive with respect to A During a space condition logic 0 B will be negative with respect to A RS 422 RS 485 Cable Diagrams Diagrams for the following connections are shown in this section CMM to CMM CMM to Series Six CMM to OIT CMM to Series One Series Three DCA CMM or Host to Multiple CMMs Additionally diagrams are provided for the following special 2 wire RS 422 RS 485 con nections available with CCM protocol only CMM to CMM 2 wire CMM to Multiple CMMs 2 wire PIN PIN 244922 0 D A 9 el m us RN kG 00 sp 21 m 1 25 SERIES 90 00 lt 13 C X 01 9 SD A o SERIES 90 e Fo 25 5 I 21 sp B CMM 0 LK PORT o lt 24 Fg LI N a ut 0 PORT 1 t Id 1 0 lt RTS A 10 10 0 0 EN mI RTS A 0 OR 2 0 S RTS B 22 22 RTS B F lo 2 04 CTS A 1 11 gt o 00 Sj ors 2 2 CTS
129. PPORT RS 422 RS 485 Figure 34 CMM to OIT with Flow Control None RS 422 RS 485 Chapter 8 Serial Cable Diagrams and Converters 217 218 44925 e DA 9 3C c J2 Ro Fr s 001 lt 500 21 I ra 25 RXD 40 series 90 09 lt RDA 13 mo 5 ow 00 Rb zs I P 22 TXD 09 0 RTS 10 12 cts p e port RTS B 22 Ld 1 cTs gt a DCA oh 0 lt TERM 24 1 io RTS 2 0 lt Ln Rs 00 00 corsa A 05 23 ae o lt ov 7 7 ov 4 lt 1 9 AJ Li 25 PIN 25PIN 25 PIN 25 PIN FEMALE MALE TERMINATE CONNECTION ON THE CMM MALE FEMALE JUMPER INTERNAL 120 OHM RESISTOR ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 35 CMM to Series One Series Three DCA RS 422 RS 485 SHIELDED CONNECTIONS 244926 TWISTED INSIDE D CONNECTORS PIN PAIRS PIN spu e BE e n 13 80 21 ri 25 RD 13 9 SERIES 90 SERIES 90 ken t LXX 21 CMM Fg Fg SLAVE
130. PU This command changes the SNP ID of the CMM slave device to a specified value Different SNP IDs are required to differentiate between multiple SNP slave devices in a multi drop arrangement The SNP slave in the CMM module reverts to the default SNP ID that is the SNP ID of the PLC CPU whenever the PLC is powered up or the CMM is manually restarted Example Command Block Change the SNP ID of the SNP slave device in the CMM module to NEW ID1 Word 1 00005 0005 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07002 1B5A SNP Command Number Word 8 17742 454E Word 9 18775 4957 Word 10 12612 3144 Word 11 00000 0000 wa Characters 1 and 2 of Slave SNP ID N 4Eh E 45h Characters 3 and 4 of Slave SNP ID W 57h I 49h Characters 5 and 6 of Slave SNP ID D 44h 1 31h Characters 7 and 8 of Slave SNP ID null null was YH The Slave SNP ID field specifies the new SNP ID of this slave device The SNP ID field is 8 bytes long For the Series 90 70 PLCs the SNP ID can be a maximum of 7 bytes fol lowed by a null character 0 and can include any ASCII character For the Series 90 30 PLCs the SNP ID is restricted to a maximum of 7 bytes followed by a null character 0 the 7 bytes must be the ASCII characters 0 through
131. PU 351 352 Information Codes 255 Information codes Installing and Configuring the CMM Installing the CMM Hardware 12 Interface Standards 59 RS 232 RS 449 RS 422 RS 485 Isolated Repeater Converter Cable Diagrams 226 System Configurations K Key switch memory protect ON OFF 25 RUN STOP mode select L Ladder Program Example CCM Program Example 48 SNP Program Example LED Indicators Module OK LED P1 CPU 351 P2 CPU 351 Serial Port LEDs SNP CPU 351 Line Serial Communications 58 Long Attach SNP Command Long Break Bic Maintenance RTU message 159 Index M Master Slave Memory Addresses CCM Memory Addresses SNP Memory Addresses 59 Memory protect key switch Memory Types CCM Memory Types B9 Series Five vs Series 90 Series One vs Series 90 Series Six vs Series 90 251 SNP Memory Types Miniconverter Miniconverter kit cable diagrams 232 RS 232 port pin assignments RS 422 port pin assignments 231 RS 422 SNP to RS 232 30 specifications 233 system configurations 232 Model 351 CPU compatibility with existing CPUs 26 compatibility with existing HHP 26 memory protect key switch Port l Pin Assignments RS 232 Signals Port2 Pin Assignments RS 485 Signals RUN STOP mode select Serial Port Pin Assignments 22 Model 352 CPU compatibility with existing CPUs 26 compatibility with existing HHP 26 memory protect key
132. RTU and SNP The Flow Control field specifies the method of flow control to use at this serial port Valid selections are NONE or HARDWARE The timing diagrams below illustrate the state of the flow control lines for flow control NONE and HARDWARE The NONE selection makes use of the signals Transmit Data TD and Receive Data RD only The signal Request to Send RTS however is used as a modem keying signal The RIS signal is energized for the Modem Turnaround Delay interval and during the char acter transmission the RTS signal is then immediately de energized RTS 1 from CMM Figure 7 Flow Control NONE MODEM TURNAROUND DELAY 0 TD from CMM RTS from CMM 100 TD from CMM Figure 8 Flow Control NONE MODEM TURNAROUND DELAY 100 ms The HARDWARE selection makes use of the Transmit Data TD Receive Data RD Re quest to Send RTS Clear to Send CTS Data Carrier Detect DCD and Data Terminal Ready DTR The signals are used in the manner specified by the RS 232 and RS 422 RS 485 electrical standards these signals are described below Chapter 2 The CMM Description Installation and Configuration 17 18 RTS from CMM TD from CMM Figure 9 Flow Control HARDWARE Requestto Send RTS and Clear to Send CTS These signals are used to control the transmission of data to the remote device The RTS signal is asserted at the beginning of each transmission by the
133. Register 1 Not Used Not Used SNP Command Number Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Read Diagnostic Status Words 07001 1B59 Available Modes Master and Slave CPU 351 and CPU 352 serial ports only support the 0582 Master mode Description Local command This command returns the SNP Diagnostic Status Words maintained within the CMM module into the PLC memory area specified by the COMMREQ A complete set of Diagnostic Status Words is maintained for each serial port of the CMM module Example Command Block Read all 20 local Diagnostic Status Words from the CMM and place them into Register Memory Registers 181 200 The desired serial port is specified by the TASK field of the issuring Word 1 00005 0005 Word 2 00000 0000 Word 3 00008 0008 Word 4 00000 0000 Word 5 00000 0000 Word 6 00000 0000 Word 7 07001 1B59 Word 8 00001 0001 Word 9 00020 0014 Word 10 00008 0008 Word 11 00181 00B5 SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 Not Used Not Used SNP Command Number First Diagnostic Status Word to read DSW 1 Number of Diagnostic Status Words to read 20 DSWs Memory Type to store Diagnostic Status Words Address to store Diagnostic Status Words Register 181 The Memory Type and Address to store Diagnostic Status Words field
134. Scratch Pad Memory 6 40 Diagnostic Status Words 42 CCM Memory Addressing and Data Lengths 43 CCM Memory Addresses 43 CCM Data 44 GFK 0582C Series 90 PLC Serial Communications User s Manual October 1996 Contents Chapter 7 Section 2 The COMMREO Status Word Section 3 COMMREO Programming Examples Ladder Program Example CCM Command Examples Set Response 06001 1771 Clear CCM Diagnostic Status Words 06002 1772 Read CCM Diagnostic Status Words to Source Registers 06003 1773 Software Configuration Command 06004 1774 Read Target to Source Memory 06101 06103 17D5 17D7 Read Q Response to Source Register Table 06109 17DD Single Bit Write 06110 17 Write to Target from Source 06111 06113 17 17 1 SNP Service LAVA SEA TATUR PA Section 1 TheSNP COMMREO Data Block Structure of the SNP Data Block SNP Memory Types and Addressing Section 2 The SNP Status
135. Series 90 PLC Serial Communications User s Manual October 1996 xiii Chapter Introduction This chapter includes a quick reference to the manual and provides a brief overview of the communications protocols supported by the Series 90 Communications Coprocessor Modules Quick Guide to the Manual The purpose of this manual is to describe how to use the Communications Coprocessor Modules CMMs from both hardware and software points of view Hardware topics in clude installing the modules and constructing and installing the serial communications cables Software topics include configuring the modules using Logicmaster 90 Software and programming serial communications requests in ladder diagrams And for more experi enced users the communications protocols that reside on the CMMs are discussed in detail This manual also discusses some of the fundamentals of serial data communications in a way that relates directly to the serial communications products from GE Fanuc Automa tion North America Inc description of the Series 90 30 CPU models 351 and 352 serial ports is also included Most users will not need to study the entire manual The guide below is intended to help you get quickly to the information you need most Hardware Module Installation Chapter 2 The CMM Description Installation and Configuration Description of CPU 351 Serial Ports Chapter 3 CPU 351 and CPU 352 Serial Ports CommunicationsCables Chapter 8
136. Since there is typi cally more than one slave device sharing the multidrop line each slave will process only requests containing its own Station Address or the broadcast address which is sent to all slaves GFK 0582C Modem Transmission The word modem is an acronym for MOdulator DEModulator A modem is a device that converts data from digital to analog for transmitting and from analog to digital for re ceiving over telephone communications lines WORKMASTER II SERIES 90 70 PLC a44910 Tico nv cu zzo RS 232 l i RS 232 Figure 58 Example Modem System Configuration Some modems utilize other methods of transmission such as radio or microwave These modems are often used when the cables cannot be connected between the modems The FCC normally requires the use of single frequency transmitters with short transmit ter on times Therefore a warm up delay for the radio transmitter must be added be fore each transmission The CMM keys the radio transmitter to warm up and wait a short time before actually transmitting the data The various timeout values for the com munication protocol are increased to include the added delay When using microwave or radio transmitters the wiring depends on the particular mo dems and transmitters used Consult your local GE Fanuc Automat
137. Startof message character 1Bh 3 10 41 42 43 44 45 46 00 00 SNPID of target slave 11 00 X Attach request code 00h 12 18 00 00 00 00 00 00 00 Not used always 0 19 17 End of block character 17h marks the beginning of the SNP X message trailer 20 23 00 00 00 00 Not used always 0 24 B2 Computed Block Check Code for this example X Attach Response Message EGE 1B Start of message character 1Bh E de SNP X Command X 58h 3 10 41 42 43 44 45 46 00 00 SNP ID of target slave Ex 80 X Attach response code 80h 12 18 00 00 00 00 00 00 00 Notused always 0 17 End of block character 17h marks the beginning of the SNP X message trailer 20 23 00 00 00 00 Not used always 0 PS A2 Computed Block Check Code for this example 196 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Example of Broadcast X Attach Command This example shows the message exchange of a broadcast X Attach command Note that there is no response message to the broadcast request Master Slave Long Break gt wait T4 time X Attach Request message 1B 58 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 17 00 00 00 00 79 wait Broadcast Delay time No X Attach Response to before nextrequest broadcast X Attach Explanation of Broadcast X Attach Command Byte Hex Value Description Number X Attach Request Message Startof message character 1Bh SNP X Command X
138. TOR ON THE CMM311 ONLY PORT 2 CAN SUPPORT RS 422 RS 485 Figure 38 CMM to Multiple CMMs 2 Wire Multidrop Chapter 8 Serial Cable Diagrams and Converters 219 220 Section 4 Isolated Repeater Converter IC655CCM590 This section describes how to use the Isolated Repeater Converter The section covers the following topics Description of the Isolated Repeater Converter System Configurations Cable Diagrams purchase this unit please contact your local authorized GE Fanuc PLC distributor or GE Fanuc sales representative Note The catalog number for the Isolated Repeater Converter was previously IC630CCM390 Description of the Isolated Repeater Converter The Isolated Repeater Converter IC655CCM590 can be used for the following pur poses To provide ground isolation where a common ground cannot be established be tween components RS 422 signals for greater distance and more drops To convert signals from RS 232 to RS 422 or RS 422 to RS 232 Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C The figure below shows the appearance of the unit and the location of the user ele ments GFK 0582C TOP VIEW 242418 POWER GE Fanuc CORD ISOLATED RS232 ADAPTOR UNIT FUSE BACK VIEW
139. Time in milliseconds The illustration below shows the sequence for setting the back off time by comparing the bits of the device IDs Device 1 ID 7 Device 2 ID 3 8 ID Bits 1 8 ID Bits 1 00000111 00000011 Bits compared after 1st collison Bits compared after 2nd collison Bits compared after 3rd collison 132 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Master Slave Mode This section describes the normal protocol flow in master slave mode and a special Q se quence protocol exchange available only in master slave mode Normal Sequence Protocol Flow In Normal sequence master slave communicatons the master ENQ sequence is 3 charac ters The format and description of the characters is shown below Enquiry Data sent from Target source master to Address target slave 2 Response Data sent from target slave to source master Target Address 2 Figure 16 Enquiry Format Master Slave Normal Sequence The fields in the enquiry sequence are described below Table 36 Enquiry Description Master Slave Normal Sequence I1 Tasci coded N used to ASCII coded N used to specify Normal Sequence Normal Sequence operation Target Address ID number of target slave 20h 21h 011 Ah Example Slave ID is 37h 37h420hz57hz W ECC Lo Third character of 3 character enquiry sequence ACK NAK Response from slave indicating positive or negative 06h
140. User s Manual October 1996 GFK 0582C Chapter Initiating Communications The 4 COMMREQ This chapter describes how to initiate communications in ladder programs created with Logicmaster software The chapter is divided into 3 sections Section 1 The Communications Request Section 2 The COMMREO Ladder Instruction Section 3 Command Block Section 1 describes the structure and operation of the Communications Request Section 2 describes the format and content of the COMMREO Ladder Instruction Section 3 de scribes the format and content of the Command Block Note This chapter pertains only to the CCM SNP and SNP X Protocols which can initiate communications The RTU Protocol as implemented on the CMM is slave only and cannot initiate communications GFK 0582C 27 Section 1 The Communications Request The Communications Request is a term used to describe all the user elements required for initiating communications through the CMM and the CPU 351 and CPU 352 serial ports The Communications Request uses the parameters of the COMMREQ Ladder Instruction and an associated Command Block to define the characteristics of the request An associated Status Word reports the progress and results of each request This section describes the structure and operation of the Communications Request Structure of the Communications Request The Communications Request is made up of three main part
141. Word 2 low byte Word 2 high byte Word 3 low byte Word 3 high byte Timestampof last clear Seconds Minutes Hours Day Month Year in BCD in BCD in BCD in BCD in BCD in BCD Word 4 Word 5 Word 6 Word 7 27 Faults since last clear Faults in the table Faults in this response Faulttableentry 1 Word 322 342 Fault table entry 16 Word 658 678 Fault table entry 32 GFK 0582C Chapter 6 SNP Service 107 The format of each I O Fault Table entry is described in the following table Fault Table Area Byte 1 Byte 2 4 Byte5 Byte 6 Byte 7 Byte 8 Byte 9 10 Byte 11 Byte 12 Byte 13 Byte 14 Byte 15 Byte 16 36 Byte 37 Byte 38 Byte 39 Byte 40 Byte 41 Byte 42 The format of each PLC Fault Table entry is described in the following table Spare unused Referenceaddress Racknumber Slot number I OBusnumber Busaddress Pointaddress Faultgroup Faultaction Faultcategory Fault type Faultdescription Spare unused Timestamp Seconds in BCD Minutes in BCD Hours in BCD Day in BCD Month in BCD Year in BCD Byte 1 4 Byte 5 Byte 6 Byte 7 Byte 8 Byte 9 Byte 10 Byte 11 12 Byte 13 36 Byte 37 Byte 38 Byte 39 Byte 40 Byte 41 Byte 42 Spare unused Racknumber Slot number Unitnumber Spare unused Faultgroup Faultaction Fault error code Spare unused Timestamp Seconds in BCD Minutes in BCD Hours in BCD Day in BCD Month BCD
142. X Response Message Structure 192 X Buffer Message Structure 194 SNP X Commands ua te a eds 195 X Attach Command r roe taa ees ER ee i 195 X Read Command aes Pide 198 X Write Command 200 SNP X State Tables vele b eve d RENDER EPPUBS e Wr PE PERPE 207 SNP X Master State Table 2 207 SNP XMaster Actions 208 SNP X Slave State Table 209 SNP X Slavej Actions o eru ELE eared mb Mine 210 viii Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Contents Chapter 9 Serial Cable Diagrams and Converters 211 Section 1 Cable Assembly Specifications 212 Section 2 RS 232 Cable 213 Section 3 RS 422 RS 485 Cable Diagrams 215 RS 422 RS 485Interface and Cabling Information 215 RS 422 RS 485CableDiagrams 216 Section 4 Isolated Repeater Converter IC655CCM590 220 Description of the Isolated Repeater Converter 220 System Configurations 224 Cable Diagrams ciscus eee wi
143. a control and timing The most commonly used circuits are Table 59 Standard RS 232 Communication Interface Signals 1 ProtectiveGround PROT GND Fom DTE Fom DTE Ce Peste mom E or Data Carrier Detect or DCD TR Data TerminalReady From DTE Appendix E The Serial Line Interface 259 5 232 interface can be used for direct connections not exceeding 50 feet 15 me ters The following illustration shows the lines required for both devices to transmit and to receive 244906 Hog O gt gt COMPUTER ayn lt q SERIES 90 OR WITH SERIES 90 GND CMM WITH CMM Figure 53 RS 232 Direct Connection Without Flow Control In the above case there is no data flow control that is both devices can transmit at any time and there is no check of the communications line before transmission When modems are used without data flow control again both devices can transmit at any time and there is no check of the transmission line or that the carrier is present 44907 Hosr 22 4 TXD COMPUTER SERIES 90 OR 2 WITH SERIES90 GND TELEPHONE GND CMM WITH CMM LINE Figure 54 RS 232 Modem Connection Without Flow Control When flow control is desired the RTS and CTS control circuits can be used to permit the following
144. ablish Datagram commands The master sends an Update Datagram request the slave responds with data This ser vice provides the master with the capability to retrieve a pre defined datagram area from the slave device Once the datagram is established the datagram can be retrieved by its Datagram ID as often as necessary until the datagram is cancelled or if a normal datagram until the slave device is detached If the datagram is a permanent datagram and the slave device is detached the datagram does not have to be re established before issuing the Update Datagram command Example Command Block Update the permanent datagram with Datagram ID 1 in the attached slave device and store the returned data in master device Register Memory R beginning at Register 201 Word 1 00005 0005 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07216 1C30 SNP Command Number Word 8 00001 0001 Datagram ID Word 9 00129 0081 Datagram Type Normal 1 Permanent 81h Word 10 00008 0008 Master Memory Type to store Datagram R Word 11 00201 00C9 Master Address to store Datagram Register 201 The Datagram ID field specifies the particular datagram to retrieve This value was pre viously returned to the PLC application program upon successful completio
145. aced in the designated memory area using an appropriate programming instruction the BLOCK MOVE instruction is recommended The Command Block has the following structure Idle Timeout Value Maximum Communication Word 6 Time Data Block Words 7 up to 134 When entering information for the Command Block refer to these definitions Data Block Length Word 1 This is the length of the Data Block portion of the Command Block 1 to 128 words The Data Block portion starts at Word 7 of the Command Block The length is measured from the beginning of the Data Block at Word 7 not from the beginning of the Command Block WAIT NOWAIT Flag Word 2 This flag determines whether the Series 90 PLC will wait until the CMM or CPU 351 or CPU 352 serial ports receive the intended data before continuing Valid values are 0 NOWAIT 1 WAIT for reply The request can either send a message and wait for a reply or send a message and con tinue without waiting for a reply If the Command Block specifies that the program will not wait for a reply the Command Block contents are sent to the CMM and ladder pro gram execution resumes immediately This is referred to as NOWAIT mode If the Command Block specifies that the program will wait for a reply the Command Block contents are sent to the CMM and the CPU waits for a reply The maximum length of time the PLC will wait for the device to respond is specified in the Command Block If the device does
146. ack so that printed circuit boards can be mated to them Baud A unit of data transmission speed equal to the number of code elements per second Binary A numbering system that uses only the digits 0 and 1 This system is also called base 2 GFK 0582C Appendix AGlossary of Terms 237 238 Bit The smallest unit of memory Can be used to store only one piece of informa tion that has two states for example a One Zero On Off Good Bad Yes No Data that requires more than two states for example numerical values 000 999 will require multiple bits Break A wake up signal transmitted on the serial line which preceeds each new SNP communication session See Chapter 7 Section 3 SNP Protocol for details Brick A nickname for the GE Fanucisolated RS 232 RS 485repeater converter Broadband Network A network which can handle medium to large size applications with up to sev eral hundred stations as a typical number which might be attached Broadband technology is used in larger networking systems and requires a headend remo dulator Bus An electrical path for transmitting and receiving data Byte A group of binary digits operated on as a single unit In Series 90 PLCs a byte is made up of 8 bits Carrierband Network A network designed to handle small to medium size applications with 6 20 sta tions as a typical number of stations which might be attached Carrierband technology is often used in Local Area Networks
147. affic type The OEM key is NULL inactive Invalid blockstatetransition Table 19 Minor Error Codes for Major Error Code 10 0Ah Error Status SNP DOS Driver Error Description 110 92h NoSNP communication Either communication has been lost or a com munication session has not been established 111 91h Bad SNP communication Transmission wasaborted after maximum retries due to serial errors thatis parity overrun or framing errors Specified devicehasinsufficient memory to handle request 112 90h Bad SNP encountered Transmission wasabortedaftermaximum retries due to a bad Block Check Code 113 8Fh Out of Sequence SNP message SNP message type received was not the type expected 114 8Eh PC Serial port configured for SNP Master driver is not open no commu nication can take place Bad DOS Version Must have DOS 2 0 or later to support the SNP DOS Driver Chapter 6 SNP Service 63 64 Note Minor Error Codes 1 31 indicate non fatal errors SNP or SNP X commu nication is not terminated Table 20 Minor Error Codes for Major Error Code 12 0Ch Error Status Local SNP SNP X Error Description SNP communication is not active Must initiate a new SNP communica tion by sending an Attach or Long Attach COMMREQ invalid Status Word memory type or address fon Wasterdevicememory typeisnotyalidimiNsPLC 7 om Meserdevicememoryaddressorlenghiszeo Unable to read or write master devi
148. agram SNP Com mand 117 W WAIT mode B3 Wiring Diagrams 11 Write Program Block Memory SNP Com mand GFK 0582C 0582 rem Memory SNP Command 95 Write Task Memory SNP Command Write to Target from Source CCM Com mand WYE Cable for 311 10 Index X X Buffer Message Structure 194 X Read SNP X Commands B4 X Request Message Structure 190 X Response Message Structure 192 X Status Bits X W rite SNP X Command Bd Index 7
149. agram operation The SNP Protocol transfers data using the asynchronous data format For background information on serial data transmission and the asynchronous format refer to Appendix E The Serial Line Interface For a more detailed description of the SNP Protocol GFK 0529 SNP Communications Ref erence Manual is available from GE Fanuc GFK 0529 is for use only by licensed develop ers of SNP master or slave implementations and completely describes the format of each SNP message with examples of all service requests and responses This section covers the following topics Overview of SNP Protocol SNP Master Slave Operation SNP Timers SNP Datagrams Overview of SNP Protocol The SNP Protocol is a proprietary serial communications protocol developed by GE Fa nuc for communication between PLCs and related equipment The protocol is a set of rules that establish and maintain a communication link between SNP master and SNP slave devices SNP is a half duplex protocol that uses the RS 485 enhanced version of 5 422 and RS 232 electrical interfaces The built in SNP slave device in each Series 90 PLC CPU uses the 5 485 interface The CMM module provides both RS 485 and RS 232 inter faces See Chapter 3 for more information on the CMM electrical interface SNP de vices may be connected in a direct point to point one master and one slave or multi drop one master and multiple slaves arrangement Only one master may be on a multi
150. alid Transactions 4 169 Section 3 SNP Protocol oia RR eR Ra RE 170 Overview of SNP Protocol 33 52 22 e eet Rr EN ane BED teases 170 SNP Master Slave Operation 170 SNP Timers cete EA ex e ae edt Vest tet 173 SNP D tagrams eben e E eb be ev PERCHE Y 177 Section 4 SNP X Protocol 180 Overview of SNP X Protocol 180 SNP X Communication Session 180 Error Handling 181 Broadcast Capability 181 Modem Support s be TES ocd eee REC PEERS 181 Slave PLC Status Word 182 Slave Memory Access Bits X Status Bits 182 LLL ero LG nee YO kr Dem 183 Break Preia enero eaaet estu Eat an RR edt 184 Block Check 185 SNP X Protocol Sequence 186 Establish Session iode ete ER De BRI REM ELE RP rre 187 Directed Commands eo ia e aces tae eet 187 Broadcast Commands 188 SNP X Message Structure 2 190 X Request Message Structure 190
151. alled in and config ured for Rack 0 Slot 2 with SNP operation on Port 1 If your configuration is different than this you will need to change the COMMREO fields for Rack Slot SYSID field and or Port Number TASK field to match your configuration Ladder Program Example GFK 0582C Use the following ladder program to become familiar with programming SNP com mands and to verify that the system is connected and operating properly The ladder program example below initiates point to point SNP communication with any SNP slave device by issuing a single Attach command shortly after the ladder is started and then repeatedly issues Read System Memory commands to the connected slave device To use other commands in the example ladder simply substitute the example Command Block values provided for each command into the BLOCK MOVE instructions in Rung 6 or Rung 9 of the ladder Rung 6 prepares the initial Attach command Rung 9 prepares the repeated command that follows the initial Attach The example ladder loads up to 8 words into the COMMREO Data Block add BLOCK MOVE instructions into the ladder if the desired command requires more data Chapter 6 SNP Service 73 74 Ladder Program Example Operation The first two rungs Rung 4 and Rung 5 provide a 2 0 second delay when the ladder is started This allows more than enough time for the CMM module to initialize upon sys tem powerup When the startup delay is complete one shot 70002
152. allowed as this request cannot be a broadcast request The function code is equal to 4 The starting analog input number is two bytes in length The starting analog input number may be any value less than the highest analog input number available in the attached Series 90 CPU Itis equal to one less than the number of the first ana log input returned in the normal response to this request The number of analog inputs value is two bytes in length It must contain a value from 1 to 125 inclusive The sum of the starting analog input value and the number of analog inputs value must be less than or equal to the highest analog input num ber available in the attached Series 90 CPU The high order byte of the starting ana log input number and number of analog input fields is sent as the first byte in each of these fields The low order byte is the second byte in each of these fields RESPONSE The byte count is a binary number from 2 to 250 inclusive It is the number of bytes in the normal response following the byte count and preceeding the error check Note that the byte count is equal to two times the number of analog inputs returned in the response maximum of 250 bytes 125 analog inputs is set so that the entire response can fit into one 256 byte data block The analog inputs are returned in the data field in order of number with the lowest number analog input in the first two bytes and the highest number analog
153. and prepares to receive an Attach or X Attach message The master asserts a Long Break by holding the transmit line in a space state for at least three character times at the current baud rate If modem operation is indicated by con figuring a non zero Modem Turnaround Time the Long Break duration is 400 millisec onds to allow Long Break transmission through modems The Long Break is used iden tically by the SNP and SNP X protocols Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Block Check Code The Block Check Code BCC is the final byte of each SNP X message and is used as an integrity check of the contents of the message The BCC value is calculated over all bytes in the message except for the final BCC byte itself Upon reception of any SNP X mes sage the BCC value of the message is recalculated and compared to the BCC value with in the message The value over a message range is calculated by successively exclusive OR ing the next message byte and then rotating the cumulative BCC value left one bit this process is repeated for all bytes in the message range to be checked The BCC calculation algorithm is Initialize Temp BCC byte to zero For first to last byte in message range to be checked Exclusive OR Temp BCC byte with message byte Rotate Temp BCC byte left by 1 bit with wrap around Bump to next message byte End for Temp BCC byte now contains final BCC value A sample C
154. ansmittter 4 wire is the default operating mode Speci fying 2 wire operation disables the RS 485 receiver while the RS 485 driver is transmit ting The RS 485 receiver is re enabled once the transmitter completes and any re enable receiver delay has expired The Re enable receiver delay parameter allows the RS 485 driver to delay the re enabling of the RS 485 receivers once the transmitter completes a transmission The delay is speci fied in units of milliseconds in the range 0 65534 ms Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Read Target to Source Memory 06101 06103 1705 1707 Description Remote Command This set of commands is used to read information from the target device to one of the three source memory types listed below SourceMemory Type CommandNumber Register Table 06101 Input Table 06102 Output Table 06103 The target memory types which can be accessed are Target Memory Type Type Number Example Read from target CCM Diagnostic Status Words 1 9 to source registers RO0936 R00944 The target CPU ID is 36 Word 1 00006 0006 Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type Register Word 4 00009 0009 Status Word Address minus 1 Register 10 Word 5 00000 0000 Not used in NOWAIT Mode Word 6 00000 0000 Not used in NOWAIT Mode Word 7 06101 17D5 Command Number Word 8 00036 0024 Target CPU ID Word 9 000
155. arameter The optional Modem Turnaround Time field specifies a new Modem Turnaround Time value This is the time interval required by a connected modem to turn the link around The new val ue is specified in milliseconds and is in effect for this only If not programmed the master uses the value selected by the Modem Turnaround Delay configuration parameter The optional Transmission Delay field specifies a new Transmission Delay value This time interval accounts for unusually long time delays in transmission between the master and slave devices Such unusually long delays are typical of communications via satellite The new value is specified in milliseconds and is in effect for this COMMREO only If not pro grammed the master uses the value selected by the Timeouts configuration parameter Chapter 6 SNP Service 87 L6 Attach 88 07200 1C20 Available Modes Master Description Remote command The Attach command establishes a communication session with a slave device The Attach command can be issued at any time The master sends a Break sequence followed by an Attach request the specified slave responds with an Attach response The Break sequence is initiated to all slave devices sharing the same commu nication link The detection of the Break sequence by a slave device immediately aborts any communication session currently in process and places all slave devices into a state waiting for a valid Attach reque
156. at the LED is burned out or the board has not passed diagnostics Follow this procedure to deter mine the cause of the problem 1 Make sure that power to the rack is on the PLC is okay and that the CMM is seated properly Check the PLC fault table using the programming software If there is a bad or mis sing module fault the board may be defective otherwise contact the GE Fanuc Tech nical Support Hotline for assistance The GE Fanuc PLC Technical Support Hotline can be reached at 1 800 GE FANUC 1 800 433 2682 or International direct dial 804 978 6036 Change the CMM config to SNP RS 232 is needed and run the programming soft ware through the CMM using either the IC690CBL702 9 pin AT or IC690CBL705 25 pin PS 2 cable GFK 0582C Chapter 2 The CMM Description Installation and Configuration 13 Configuring the CMM Logicmaster 90 Software Configuring the CMM is a two part procedure e I ORackConfiguration Module Configuration Soft Switch Data Rack Configuration The Series 90 I O Rack Configuration software is used to define the type and location of all modules present in the PLC racks This is done by completing setup screens which represent the modules in a rack Specific configuration settings for individual modules can then be selected The configuration data is saved in a configuration file which is then stored to the Series 90 PLC Series 90 70 PLCs A rack in the Series 90 70 PLC can be used a
157. ations 126 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Control Characters The CCM Protocol uses special ASCII control characters for both peer to peer and mas ter slave modes The table below lists the ASCII control characters used by the CCM Protocol Table 31 Control Characters Used in CCM Protocol Enquire Acknowledge Negative Acknowledge Start of Header End of Block Start of Text End of Text End of Transmission CCM Protocol Flow This section provides an overview of the message exchange that takes place using the CCM Protocol The message flow is the same for both master slave and peer to peer mode however the characters transferred during the ENQ sequence are slightly differ ent These differences will be detailed later in this section Enquiry Sequence The enquiry sequence is a request to initiate communications and is sent from a master or peer device If the target device is not busy it sends a positive ac knowledge If itis busy it sends a negative acknowledge Header Transfer After receiving a positive acknowledge to the enquire sequence the initiating device sends a 17 character message called the header The header block speci fies direction memory type and address and length of data transfer All bytes in the header except for the CCM control characters are in ASCII coded hexadecimal format If the header is correct
158. available in the attached Series 90 CPU The high order byte of the starting byte number and number of bytes fields is sent as the first byte in each of these fields The low order byte is the second byte in each of the fields RESPONSE Series 90 PLC Serial Communications User s Manual October 1996 The byte count is a binary number from 1 to 256 0 256 It is the number of bytes in the data field of the normal response The data field contains the contents of the scratch pad memory requested by the query The scratch pad memory bytes are sent in order of address The contents of the scratch pad memory byte whose address is equal to the starting byte number is sent in the first byte of the data field The contents of the scratch pad memory byte whose address is equal to one less than the sum of the starting byte number and number of bytes values is sent in the last byte of the data field GFK 0582C 0582 RTU Scratch Pad The entire scratch pad is updated every time an external READ request is received by the CMM All scratch pad locations are read only The scratch pad is a byte oriented memory type Table 43 RTU Scratch Pad Memory Allocation SP Address Fiildentitie See Note 1 muc 7 CPU Command Status Bit pattern same as SP 00 CPU Type Major in hexadecimal Minor in hexadecimal 04 0B CPU SNP ID 7 ASCII characters termination character 00h CPU Firmware Revision No Major in BCD
159. ave previously established an SNP X session receive and process the command SNP X slave devices do not return any messages to the master in response to any broadcast message Therefore the master is unable to de tect slave errors in response to a broadcast command Since there are no responses from the slave to a broadcast command the master must wait for the Broadcast Delay time interval after sending each message to allow all slave devices to process the message Note that direct commands may be effectively used following a broadcast X Attach re quest Rapid polling of many slave devices is easily accomplished by using a broadcast X Attach to establish an SNP X session simultaneously with all slave devices on the serial link and then directing X Read or X Write commands to individual slave devices For broadcast X Attach Requests the SNP X protocol sequence is as follows Master Slave Long Break gt wait T4 time Request gt wait Broadcast Delay time no Response 188 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C For broadcast SNP X commands without a data buffer the SNP X protocol sequence is as follows Master Slave X Request gt wait Broadcast Delay time no For broadcast SNP X commands with a data buffer the SNP X protocol sequence is as follows Master Slave X Request gt wait Broadcast Delay time no Inter
160. be used if an EOT is received for any portion of the proto colexchange The table below lists the default retry values for each portion of the proto col exchange Table 40 Retry Values for CCM Protocol Retry Counter Names Description Normal Short T _ ENQ COUNT COUNT Peer to peeror master slave ENQ Retry Count to peer or master slave ENQ Retry Count QSEQ_COUNT Q Sequence Retry HEADER_COUNT Header Retry Count DATA_BLK COUNT Data Block Retry CCM Protocol State Tables The following state tables illustrate the CCM Protocol for peer master and slave devices Pseudo code describes the actions to be performed while in a particular state Separate state tables and actions are provided for peer master and slave implementations The timer and counter names used in the pseudo code match the timer and counter names listed in the Timeout and Retry Value tables presented above GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 137 Peer State Table 138 State Event Receive Receive Receive Good Header Receive STX Receive Charac ter Receive Good Data Receive Bad Data Header Receive Good Q ENQ Timeout H Idle Wait for ACK to Wait for SOH State 1 L EOT State 1 EOT State 1 K State 1 L State 4 K State 1 2 EOT State 1 K Wait for Header EOT State 1 K Wait for ACK to Header 5 Wait for ACK to
161. bit in the input or output table of another CPU The target memory types bit write functions are TargetMemory Type TypeNumber Bit Function Input Table 13 Bit Set Output Table 14 Bit Set Input Table 17 Bit Clear Output Table 18 Bit Clear Example Clear Output Q00713 in the target Series 90 PLC The target CPU ID is 25 Word 1 00004 0004 Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type Register Word 4 00009 0009 Status Word Address minus 1 Register 10 Word 5 00000 0000 Not used in NOWAIT Mode Word 6 00000 0000 Not used in NOWAIT Mode Word 7 06110 17DE Command Number Word 8 00025 0019 Target CPU ID Word 9 00018 0012 Target Memory Type Kinction Word 10 00713 02C9 Target Memory Address Chapter 5 CCM Service 55 Write to Target from Source 06111 06113 17DF 17E1 Description Remote Command This set of commands is used to write information to the target device from one of the three source memory types listed below SourceMemory Type CommandNumber Register Table 06111 Input Table 06112 Output Table 06113 The target memory types which can be written to are TargetMemory Type TypeNumber Register Table 1 Input Table 2 Output Table 3 Example Write to target registers R00200 R00249 from source registers RO0001 RO050 The target CPU ID is 10 Word 1 00006 0006 Word 2 00000 0000 Data Block Length NOWAIT Mode Status Word Memory T
162. c master 90 30 programming software configurator function You can also configure the active settings on the ports by initiating a Serial Port Setup but this will not change the configured values Both serial ports will be returned to the configured values when power is cycled to the CPU 351 or CPU 352 If poweris cycled and you have previously initiated a COMMREO to change the serial port configuration you will need to again initiate a Serial Port Setup COMMREQ Using the Serial Port Setup COMMREQ configure the CPU 351 or CPU 352 serial ports using a Serial Port Setup COMMREO the must be sent to the port that is to be configured through the ladder diagram program The SYSID of the must be 1 and the TASK ID either 19 decimal Port 1 or 20 decimal Port 2 Length of the data block is 12 words 24 bytes The format for the data block of the Serial Port Setup is shown in the following table Table 7 Serial Port Setup Data Block Start address 0 Command OFFFOh Start address 8 Bits per Character Start Address 1 Interface 1 Start Address 11 Duplex Mode 3 1 2 Start Address 7 Start Address 15 Device Identifier bytes 7 and 8 The SNP ID can also be changed by sending an SNP with the Change SNP ID command 7002 Start Address Flow Control The communication parameters for the Serial Port Setup COMMREQ are de
163. cation session is established with only the slave device specified by the SNP ID For multi session operation the communication session is established with all slave devices on the serial link In either case once the proper communication session exists the master sends the data transfer command to the slave specified by the SNP ID When communicating with a single slave device single session provides the fastest per formance When communicating with multiple slave devices on a multidrop serial link multi session provides the fastest performance The Number of Master Memory Type elements to read field is specified in units consistent with the access mode of the Master Memory Type A maximum of 1000 bytes of data may be transferred in one X Read command use multiple commands to transfer more data Note The following command parameters are optional The Data Block length Word 1 must include all parameters in use The optional Master Memory Type and Address to store Slave PLC Status Word fields specify location in the master PLC memory that is updated with the PLC Status Word from the slave device upon successful completion of this command If both fields are not programmed or are set to zero the slave PLC Status Word is not updated into master PLC memory The optional Response Timeout field specifies a new value for the Response Timeout timer This time is the maximum time that the master will wait for an X response from
164. ccuracy completeness sufficiency or usefulness of the information contained herein No warranties of merchantability or fitness for purpose shall apply Thefollowing are trademarks of GE Fanuc Automation North America Inc Alarm Master Field Control Modelmaster Series One CIMPLICITY GEnet PowerMotion SeriesSix CIMPLICITY Control Genius ProLoop Series Three CIMPLICITY PowerTRAC Genius PowerTRAC PROMACRO VuMaster CIMPLICITY 90 ADS Helpmate Series Five Workmaster CIMSTAR Logicmaster Series 90 Copyright 1996 GE Fanuc Automation North America Inc Rights Reserved Preface Content of this Manual This manual describes serial communications products for the Series 90 Programmable Logic Controller PLC Information is provided to implementa serial communications link between the Series 90 PLC a host computer peripheral device or another PLC GFK 0582C Asummary of the contents is provided here Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Appendix A Appendix B Appendix C Appendix D Appendix E Appendix E Introduction Describes the multipurpose function of this manual Describes briefly the communications products discussed in this manual The CMM Description Installation and Configuration Describes how to install and configure the Communications Coprocessor Modules CMM311 CMM711 Includes a description of the modules and how they operate
165. ccurred See Chapter 7 Protocol Definition SNP Timers for a complete description of the SNP timers GFK 0582C Chapter 2 The CMM Description Installation and Configuration 19 Chapter CPU 351 and CPU 352 Serial Ports 3 This chapter describes the serial communications ports on the Series 90 30 model 351 and 352 CPUs referred to in this manual as CPU 351 and CPU 352 Note that the only difference between the two CPUs is that the CPU 352 supports Floating Point Math func tions Introduction to the CPU 351 352 Serial Ports The Series 90 30 model 351 and 352 CPUs IC693CPU351 352 have two on board serial ports which can be configured to behave as two independent communications ports For many applications each port behaves like an independent window into the PLC for access by other devices such as industrial computers and color graphic terminals Many applications which access the Series 90 30 PLC via the built in serial port on the PLC CPU using SNP protocol can now access the Series 90 30 PLC through these serial ports The two ports support all operations that are currently supported through the SNP port located on the Series 90 30 power supply The CPU 351 and 352 serial ports are configur able using the Logicmaster 90 30 Configurator function Each port can also be config ured using a COMMREQ a47101 CPU 351 SNP W _ SNP PORT on power supply STATUS SERIAL PORT 1 STATUS
166. ce memory EE specified in Usually caused by invalid memory address for this PLC SNP message exchange may have taken place Master device memory data length exceeds maximum data size of CMM module 2048 bytes Mustuse a smaller data length Use multiple COMMREQs if total data length exceedsthis maximum value Slavedevice memory type is missing or not valid Slavedevice memory address is missing or zero 12 OCh Data Block Length is too small When expected COMM REQ length is 6 words or less an inproper length may cause other mi nor error codes 6 11 SSS Invalid Diagnostic Status Word DSW starting word or length Invalid maximum SNP message data size Must be an even value from 42 to 2048 bytes Invalid Invalid Privilege Level MustbeOthrough4or l Invalid Privilege Level MustbeOthrough4or l Must be 0 through 4 or 1 Invalid Fault Tableselector Must be 1 for I O Fault Table or 2 for PLC Fault Table Invalid Fault Table starting index Must be 1 32 for I O Fault Table or 1 16 for PLC Fault Table Invalid fault count Must be 1 32 for I O Fault Table or 1 16 for PLC Fault Table InvalidSetPLC Date Time mode Must be 1 4 InvalidSetPLCDate Time date time or day of week value Series 90 30 or Series 90 20 for permanentdatagram Missing or too many datagram point formats Must be 1 32 Invalid datagram point format data Datagram area size is too small to include data for all
167. ce regardless of its assigned SNP ID It should be noted that a null SNP ID can only be successful in a point to point wiring configuration In a multidrop wiring configuration all SNP slave devices would respond to any Long Attach specifying a null SNP ID This procedure will produce unpredictable results and should not be attempted 120 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 s The Master Memory Type and Address for Piggyback Status fields are optional If specified an area must be provided which can accomodate the 6 bytes of Piggyback Status in formation The Piggyback Status information is returned with every SNP response mes sage sent by the slave device Once the Piggyback Status area is specified the Piggyback Status information is written there as each successful SNP response message is received for as long as the connection remains established If the Piggyback Status memory type and address values are 0 that is a Piggyback area is not specified the Piggyback Status information is ignored and is not provided to the PLC ladder application program See Table 27 for a description of the Piggyback Status Data area See Table 16 in Section 1 for valid memory types and addresses The T1 T2 T3 T4 and T5 fields specify the new values of the various SNP timers SNP timer values are specified in milliseconds The T1 T2 and T3 timer values will be negotiated between the
168. ces are to the data bytes only not the CRC bytes The MSB and LSB order are the reverse of the data byte order Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Calculating the Length of Frame To generate the CRC 16 for any message the message length must be known The length for all types of messages can be determined from the table below Table 42 RTU Message Length Query or Broadcast Response Message Function Code And Name Message Length Length Less CRC Less CRC Code Code Not Defined Not Defined Read Output Table 6 3 3rd byte 1 Read Input Table 3 3rd byte 1 Read Registers 3 3rd byte Read Analog Input 3 3rd byte 1 Force Single Output 6 Preset Single Register Read Exception Status Loopback Maintenance 0 1 2 3 4 5 6 7 8 6 3 6 Not Defined Not Defined Force MultipleOutputs 7 7th byte 6 PresetMultipleRegisters 7 7th byte 6 Report Device Type 2 8 Not Defined Not Defined Read Scratch Pad 6 3 3rd byte Not Defined Not Defined Not Defined 3 1 The value of this byte is the number of bytes contained in the data being transmitted GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 151 Message Descriptions The following pages explain the format and fields for each RTU message MESSAGE 01 READ OUTPUT TABLE FORMAT Address Func Starting Number of Error Check 01 Point No Points Hi Lo Hi Lo Query Address Func Byte Data
169. ctable results Example Command Block Read attached slave device Main Control Program Task Memory Word 1 and store in master device Input Memory 1 Inputs 1 10 Slave device Main Program name MAIN1 Words 12 15 contain the Main Program name of the slave device Word 1 00009 0009 Word2 00000 0000 Word 3 00008 0008 Word 4 00000 0000 Word 5 00000 0000 Word 6 00000 0000 Word 7 07204 1C24 Word 8 00001 0001 Word9 00010 000A Word 10 00070 0046 Word 11 00001 0001 Word 12 16717 414D Word 13 20041 4 49 Word 14 00049 0031 Word 15 00000 0000 SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 Not Used Not Used SNP Command Number Slave Task Memory Address 1 Number of Master Memory Type elements to read Master Memory Type to store data I Master Address to store data Input 1 Characters 1 and 2 M 4Dh A 41h Characters 3 and 4 I 49h N 4Eh Characters 5 and 6 1 31h null Characters 7 and 8 null null The Number of Master Memory Type elements to read field is specified in units consistent with the unit length of the Master Memory Type See Table 16 in Section 1 for valid memory types and addresses Note The SNP master on the CMM module and CPU 351 and CPU 352 serial ports limit this command to a total data length of 2048 bytes 1024 words 96 Series 90 PLC Serial Communications Use
170. ctober 1996 GFK 0582C SUBSTITUTE APPROPRIATE UP STREAM DEVICE 244931 WITHIN DOTTED BOX PER SYSTEM DIAGRAMS SHIELDED MAKE CONNECTIONS r 1 TWISTEDINSIDE D CONNECTORS PIN PAIRS pii TA lt sp e MED lt 50 21 SERIES 90 r1 cl CMM cj BRA 19 SERIES lt RD B 25 r1 Trt MM 90 PORT TERM 3 N bg 10R2 TERM 125 1 Fg PORT RTS A 10 5 11 MI lt RTS B 22 P Ki OR 23 010 11 2 GND 7 sHD 4 25 25 BEN 25 PIN FEMALE MALE FEMALE 1 Jp SW ON J PIN C gi Sw crs 32 T d M 0 00 ISOLATED 00 ISOLATED REPEATER o 50 OHMS CONVERTER 23 BRICK 00 BRICK m USED AS A x 150 CONVERTER 9 0 0 L e 7 GND 25 PIN J gt 25 PIN 25 PIN FEMALE MALE FEMALE 1 1 XX WHEN WIRING RS 422 485 MULTIDROPCABLES 1 REFLECTIONS ON THE TRANSMISSION LINE e REDUCED BY CONFIGURING THE CABLE IN A DAISY PIN SW ON CHAIN FASHION AS SHOWN BELOW 16 RD m 0 MASTER CMM SLAVE 1 17 R
171. d in a program that tells the CPU where data is coming from or where to transfer the data Reference Table Any of the various PLC memory areas addressable from the ladder program or by the SNP protocol PLC memory is addressed by memory type and address Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Register Memory In the Series Six PLC dedicated CMOS RAM memory accessible by the user for data storage and manipulation Remote Terminal Unit RTU RTU protocol is a query response mode of operation used for communication between the RTU device and host computer The host computer transmits the query to the RTU slave which can only respond to the master RS 232 A standard specified by the Electronics Industries Association EIA for the me chanical and electrical characteristics of the interface for connecting Data Com munications Equipment DCE and Data Terminal Equipment DTE RS 422 A recommended standard defining electrical interface characteristics to connect Data Terminal Equipment DTE or Data Circuit Iransmitting Equipment DCE The 5 422 standard permits longer range and faster transmission rate than the RS 232D standard RS 485 Similar to RS 422 Contains additional protection for receiver circuits Also re ceivers have greater sensitivity which provides the capability for longer dis tances and more drops Rung A sequence or grouping of PLC functions that control
172. d memory types when referencing Series 90 PLCs 2 Bit functions can only be write requests GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 129 Header Example In the following example the source device ID 02 reads 10 registers beginning at Register 00986 from the target device ID 01 Target ID MSB 0011 0000 Target ID LSB 0011 0001 DataDirection Read 0011 0000 Target Memory Type Register 0011 0001 Target Memory Address MSB 0000 0000 Target Memory Address NMSB 0011 0011 Target Memory Address NMSB 0100 0100 Target Memory Address LSB 0100 0001 Complete Block Count MSB 0011 0000 Complete Block Count LSB 0011 0000 Bytes Last Block MSB 0011 0001 Bytes Last Block LSB 0011 0100 Source ID MSB 0011 0000 Source ID LSB 0011 0010 End Transfer Block 0001 0111 Block Check Character LRC 0000 0001 The LRC value is the vertical XOR Exclusive OR result of bytes 2 15 Any like num bers cancel each other to zero Data Transfer After receiving a positive acknowledge ACK to the header sequence data transfer will start Data will be written to or read from the responder depending on the data direction bit specified in the header If data byte size is less than or equal to 256 bytes data transfer will require only one data block If the data byte size is greater than 256 bytes the transfer will require multiple blocks The data block format and a description of the fi
173. des for Major Error Code 14 0Eh Error Status Autodial Error Description Ho uh Nod 050555542425 i LE The modem command string length exceeds 250 characters COMMREQ Data Block Length is too small Output command string data is missing or incomplete Serial output timeout The CMM module was unable to transmit the modem autodial output from the serial port May be due to missing CTS signal when the CMM is configured to use hardware flow control Response was not received from modem Check modem and cable Modem responded with BUSY Modem is unable to complete the requested connection The remote modem is already in use retry the connection request at a later time Modem responded with NOCARRIER Modem is unable to complete the requested connection Check the local and remote modems and the tele phone line Modem responded with NODIALTONE Modem is unable to complete the requested connection Check the modem connections and the tele phone line Modem responded with ERROR Modem is unable to complete the requested command Check the modem command string and modem Modem responded with RING indicating that the modem is being called by another modem Modem is unable to complete the requested com mand Retry the modem command at a later time Anunknown response was received from the modem Modem is unable to complete the requested command Check the modem com mand string and modem The modem
174. drop link When multiple slave devices exist on a multidrop link each slave is ad dressed by a unique SNP ID SNP Master Slave Operation SNP is a Master Slave protocol where the master device initiates all communications and the slave device responds to the master s requests SNP does not provide Peer to Peer capability Every Series 90 PLC contains a built in SNP slave device on the CPU serial port The CPU serial port is located in the CPU board for a Series 90 70 and Series 90 20 PLC and on the power supply for a Series 90 30 PLC the CPU 351 and CPU 352 also have two serial ports on the module 170 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 GE SNP DOS Driver is an SNP master device PC applications that use this driver can communicate with Series 90 PLCs over an SNP communication link Logic master 90 uses an SNP master to communicate with and to configure and program Se ries 90 PLCs Additionally SNP master devices have been implemented by many other manufacturers to communicate with Series 90 PLCs Each serial port on the CMM module within a Series 90 PLC can be configured as an SNP master or slave device in addition to the built in SNP slave on the CPU serial port The SNP devices in the CMM are used to transfer data with other SNP devices The SNP master and slave on the CMM do not support PLC programming or configuration func tions Message Format Th
175. ds with the data This service is provided to permit the access to various reference tables within the slave PLC See Table 16 for the slave memory types supported This command reads enough data from the slave reference table to fill the specified number of elements in the master reference table When the access modes of the slave and master reference tables differ the data will be transferred from the slave reference table beginning with the least significant bit Example Command Block Read attached slave device Register Memory Register 1 and place the 10 least sig nificant bits into master device Input Memory 7I Inputs 1 10 Word 1 00006 0006 Word 2 00000 0000 Word 3 00008 0008 Word 4 00000 0000 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07202 1 22 SNP Command Number SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 2 2 1 a Word 8 00008 0008 Slave Memory Type from which to read data Word 9 00001 0001 Slave Memory Address from which to read data Register 1 Word 10 00010 000A Number of Master Memory Type elements to read Word 11 00070 0046 Master Memory Type to store data I Word 12 00001 0001 Master Address to store data Input 1 The Number of Master Memory Type elements to read field is specified in units consistent with the unit length of the Master s Memory Type See Table 16 in
176. e specified by Logicmaster 90 or the Hand Held Programmer the Long Attach command must be used The Long Attach command adds some overhead to the communications process and should only be used if necessary Examples of cases which may require the Long Attach include Satellite communications Modem communications with setup times gt 500ms Communications in high noise environments Specific errordetection recovery requirements Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Example Command Block s Attach to a slave device whose SNP ID is SNP ID1 Enable Piggyback Status update on this and all following commands store the 6 bytes of Piggyback Status data into master device Register Memory R Registers 171 173 Word 1 00007 0007 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07200 1C20 SNP Command Number Word 8 20051 4 53 Characters 1 and 2 of Slave SNP ID S 53h N 4Eh Word 9 18768 4950 Characters 3 and 4 of Slave SNP ID P 50h I 49h Word 10 12612 3144 Characters 5 and 6 of Slave SNP ID D 44h 1 31h Word 11 00000 0000 Characters 7 and 8 of Slave SNP ID null null Word 12 00008 0008 Master Memory Type to store Piggyback Status Word 13 00171 00AB Master Address
177. e 15 OFh Continued 71 Table 23 Minor Error Codes for Major Error Code 15 OFh Continued 72 Table 24 Minor Error Codes for Major Error Code 19 13h 72 Table 25 SNP Commands 77 Table 26 SNP Diagnostic Status Words Definitions 79 Table 27 Piggyback Status Data 90 Table 28 Slave PLC Status Word Data 91 Table 29 Description of PLC Privilege Levels 93 Table 30 Required PLC Privilege Levels 93 Table 30 Control Characters Used in CCM Protocol 127 Table 31 Header Block Description 128 Table 32 Target Memory Types for CCM Services 129 Table 33 Data Block Description 131 Table 34 Collision Back Off Times for ACK 132 Table 35 Enquiry Description Master Slave Normal Sequence 133 Table 36 Master Enquiry Description Master Slave Q Sequence 135 Table 37 Slave Response Description Master Slave Q Sequence 135 Table 38 Timeouts for CCM 1 136 xii Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Contents Table 39 Retry Values for 1
178. e Controller A solid state industrial control device which receives inputs from user supplied control devices such as switches and sensors implements them in a precise pat tern determined by ladder diagram based programs stored in the user memory and provides outputs for control of processes or user supplied devices such as relays and motor starters Programmer A device for entry examination and alteration of the PLC s memory including logic and storage areas PROM An acronym for Programmable Read Only Memory A retentive digital device programmed at the factory and not readily alterable by the user Protocol A set of rules for exchanging messages between two communicating processes Q Sequence The Q sequence protocol format is used to poll and transfer 4 bytes of data from a slave to a master without issuing the 17 byte header Quick Access Buffer QAB The OAB is a 1024 byte buffer resident on the Series Six CCM modules used for faster data transfer than the CPU to CPU transfer RAM An acronym for Random Access Memory A solid state memory that allows in dividual bits to be stored and accessed This type of memory is volatile that is stored data is lost under no power conditions therefore a battery backup is re quired The Series 90 PLC uses a Lithium Manganese Dioxide battery or an op tional external back up battery for this purpose Read To retrieve data from a storage device Reference A number use
179. e SNP X session remains established in the slave device until either a non re coverable error occurs a Long Break is received or the device is restarted The following diagrams and tables describe the actual protocol transactions involved in establishing an SNP X communication session Both the directed and broadcast varieties of the X Attach command are described The key components of an SNP X session estab lishment are the Long Break and the X Attach command Note that the X Attach request and X Attach response messages both use the same message structure the X Request Message Structure In the X Attach response message the re sponse code is returned in the Request Code message field As with other response mes sages the X Attach response code value is the request code the X Attach request code is Oh with the high order bit set Therefore the X Attach response code is 80h GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 195 Example of Direct X Attach Command This example shows the message exchange of a direct X Attach command Master Slave Long Break gt wait T4 time X Attach Request message 1B 58 41 42 43 44 45 46 00 00 00 00 00 00 00 00 00 00 17 00 00 00 00 B2 X Attach Response message 1B 58 41 42 43 44 45 46 00 00 80 00 00 00 00 00 00 00 17 00 00 00 00 A2 Explanation of Direct X Attach Command Byte Hex Value Description Number X Attach Request Message 1 1B
180. e SNP device master or slave to abort the SNP communication The T2 timer values can be optionally negotiated between the masterand slave devices via the SNP ParameterSelectmessage part of the Long Attach command The master and slave de vices both use the larger of the T2 values from either device Each device adds the separately negotiated Modem Turn around Time and Transmission Delay values to the negotiated T2value prior to use Donotincludethesevaluesin the config ured or programmed 2 value Link Keep Alive Time The maximum time the master will wait without activity on the Master only serialline It is started upon completion of an Attach or other SNP response If the master device has sent no SNP message within the T3 time the master will send an Inquiry or Short Status message to the attached slave device to prevent a T3 timeout on the slave The T3 timer is always set to the current T3 timer value minus the time required to transfer 80 characters at the selected data rate minus any negotiated Modem Turnaround Time The value is recalculated whenever a new T3 timer value is estab lished If the T3 timer is disabled this timer is also disabled 174 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Table 44 SNP Timer Descriptions continued SNP Times JimerDype 2 2 T LinkldleTimeut Idle Timeout Slaveonly
181. e device Input Memory 1 Input 1 to the opposite state Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 00003 0003 SNP Data Block Length 00000 0000 NOWAIT Mode 00008 0008 Status Word Memory Type 00000 0000 Status Word Address minus 1 Register 1 00000 0000 Not Used 00000 0000 Not Used 07214 1 2 SNP Command Number 00070 0046 Slave Memory to toggle 1 00001 0001 Slave Address to toggle Input 1 The Slave Memory Type and Address fields specify the reference table bit in the slave device to be toggled Only bit oriented memory types are allowed See the following table for the memory types supported by this command Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s The following table lists the valid slave device Memory Types for the Toggle Force Sys tem Memory command Memory Type Description 70 46h I memory in bit mode memory in bit mode T memory in bit mode memory in bit mode SA memory in bit mode SB memory in bit mode 5 memory in bit mode 5 memory in bit mode G memory in bit mode 9 override table in bit mode override table in bit mode override table in bit mode 96M override table in bit mode G override table in bit mode 9 transition table in bit mode Q transition table in bit mode T transition table in bit mode M transition table in bit mode
182. e first figure illustrates a data transfer from the source device to the target device data write The next figure illustrates a data transfer from the target device to the source device data read E E N C C C C K K K K Figure 14 Data Transfer from Source to Target Write Peer To Peer This delay is called the back off time This back off time is based on the device s own ID Since each device has a unique device ID one side will eventually be able to transmit the character without a collision occurring Chapter 7 Protocol Definition CCM RTU SNP and SNP X 131 Data sent from sourcedevice O Z m A A C K K T Data sent from targetdevice gt X Block Figure 15 Data Transfer from Target to Source Read Peer To Peer Collision Detection and Correction In peer to peer mode a collision may occur when both devices attempt to initiate com munications at the same time This is known as an Enquiry Collision If this occurs each side delays a certain amount of time ACK TIMER to listen for from the other side before attempting to send another ENQ character A collision is assumed to occur even if an character is not received from the other device The table below shows the back off times used for collision handling Table 35 Collision Back Off Times for ENQ ACK TIMER Data Rate ID Bit 0 ID Bit 1 Time in milliseconds
183. e non existentdiagnosticstatus words 11 A attempted to transfer data beginning at an invalid scratch pad address or an input outputtableaddressnotonabyteboundary that is 1 9 17 12 0C Serial communication was aborted after a data block transfer was retried three times or a number specified by the configuration 13 Serial communication was aborted after a header transfer was retried three times or a number specified by the configuration 14 OE Serial communication was aborted after a Q Request was retried three times or a number specified by the configuration An attempt was made to set the O Response data on a device not configured as a slave 20 14 One or more of the following errorsoccurred during a data block transfer a Aninvalid STX character was received b Aninvalid ETB character was received c Aninvalid ETX character was received d Aninvalid LRC character was received e A parity framing or overrun erroroccurred Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Table 15 Secondary Error Codes High Byte of COMMREQ Status Word Low Byte of DSW Continued CCM expected to receive an EOT character from an external device and did not receive it CCM expected to receive an ACK or NAK character and did not receive either one 23 17 Communication was aborted when CCM did not receive a valid acknowledge to a master enquire sequence after 32 attempts or a number s
184. e starting register value and the number of registers value must be less than or equal to the highest register number available in the at tached Series 90 CPU The high order byte of the starting register number and number of registers fields is sent as the first byte in each of these fields The low or der byte is the second byte in each of these fields RESPONSE byte count is a binary number from 2 to 250 inclusive It is the number of bytes in the normal response following the byte count and preceding the error check Note that the byte count is equal to two times the number of registers returned in the response A maximum of 250 bytes 125 registers is set so that the entire re sponse can fit into one 256 byte data block The registers are returned in the data field in order of number with the lowest num ber register in the first two bytes and the highest number register in the last two by tes of the data field The number of the first register in the data field is equal to the starting register number plus one The high order byte is sent before the low order byte of each register 154 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C MESSAGE 04 READ ANALOG INPUTS FORMAT Address Func Starting Number of Error Check 04 Analog Input No Analog Inputs Hi Lo Hi Lo Query Address Func Byte Error Check 04 Count Hi Lo Hi Lo Normal Response QUERY Anaddress of 0 is not
185. e successfully completed and the configuration data for the module is good Flashing The LED flashes during power up diagnostics Serial Port LEDs The remaining two LED indicators PORT1 and PORT2 US1 and US2 for the Series 90 30 311 blink to indicate activity on the two serial ports PORT1 051 blinks when port 1 either sends or receives data PORT2 US2 blinks when port 2 either sends or receives data Chapter 2 The CMM Description Installation and Configuration 7 Restart Reset Pushbutton If the Restart Reset pushbutton is pressed when the MODULE OK LED is on the CMM will be re initialized from the Soft Switch Data settings If the MODULE OK LED is off hardware malfunction the Restart Reset pushbutton is inoperative power must be cycled to the entire PLC for CMM operation to resume Serial Ports The serial ports on the CMM are used to communicate with external devices The Series 90 70 CMM CMM711 has two serial ports with a connector for each port The Series 90 30 CMM CMM9311 has two serial ports but only one connector The serial ports and connectors for each PLC are discussed below Serial Ports for the CMM711 The Series 90 70 CMM has two serial ports each of which support both RS 232 and RS 485 modes The pin assignments of the serial ports are identical Note When using the RS 485 mode the CMM be connected to RS 422 de vices as well as RS 485 devices The connector pin assignments f
186. e target device Write requests 4 Atthe conclusion of every request the status of the request is reported to a particu lar memory location indicated by the Status Word Pointer in the Command Block Chapter 4 Initiating Communications The COMMREQ 29 30 Timing for Processing Communications Requests If the CMM receives Communications Requests from the PLC faster than they can be processed by the CMM the CMM may eventually log a QUEUE FULL application fault in the PLC fault table MOD Other S W error COMMREQ MB FULL START This fault can also occur if the CMM has stopped functioning The first Communications Request sent to a CMM after a power cycle or ACFAIL must be delayed until the CMM has finished power up initialization A general rule of thumb is to wait two seconds after the first scan before trying to initiate a Communications Re quest Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C Section 2 The Ladder Instruction The Communications Request begins when the COMMREO Ladder Instruction is acti vated The COMMREO Ladder Instruction has four inputs and two outputs EnableLogic Function OK logic Command Block Pointer Function Faulted logic Rack SloLocation 2222222 PortNumber 222222 Each of the inputs and outputs are discussed in detail below It is important to under stand that the Command Block Pointer input points to another locatio
187. e written must be supplied at the proper bit locations within the data bytes For example 14 occurs at the fourth bit within the data byte 0000 1000 08h The X Write command may be directed to a particular slave device or broadcast to all attached slave devices on the seriallink The X Write command is directed to a specific slave device by using the specific slave SNP ID In Point to Point wiring only the Null SNP ID may be used in lieu of a specific SNP ID the slave device will respond to the Null SNP ID as if its own SNP ID had been specified The X Write command is broadcast by using the broadcast SNP ID The slave does not return any response messages to a broadcast X Write request Therefore the master can not detect a broadcast X Write failure After sending a broadcast X Write request or its following X Buffer message the master must wait the Broadcast Delay time interval before sending the next message The following diagrams and tables describe the actual protocol transactions involved in an X Write command Both the directed and broadcast varieties of the X Write command are described The X Write command is shown both with and without the optional X Buffer message 200 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Example of Direct X Write Command 2 Bytes or Less This example shows the message exchange of a direct X Write Command without a data buffer Master Slave X Write Reques
188. eanalog input number field specifies an analog input number not available in the attached Series 90 CPU returned for function code 3 7 The diagnostic code is not equal to 0 1 or 4 returned for function code 8 8 Thestarting byte number and number of bytes fields specify a scratch pad memory address that is not available in the attached Series 90 CPU returned for function code 67 Invalid Data Value Error Response 3 An error response with a subcode of 3 is called an invalid data value error response This response is sent in the following cases The first byte of the data field is not equal to 0 or 255 FFh or the second byte of the data field is not equal to 0 for the Force Single Output Request Function Code 5 or the initi ate communication restart request function code 8 diagnostic code 1 The two bytes of the data field are not both equal to 0 for the Force Listen Only request Function Code 8 Diagnostic Code 4 This response is also sent when the data length specified by the memory address field is longer than the data received Query Processing Failure Error Response 4 An error response with a subcode of 4 is called a query processing failure response This error response is sent by a RTU device if it properly receives a query but communication between the associated Series 90 CPU and the CMM module fails Serial Link Timeout The only cause for a RTU device to timeout is if an interruption to a data stream
189. ed it is checked for successful completion of the modem command if the response is not received within this time in terval an error code is generated The Number of bytes in command string field specifies the length of the command string to send to the modem This length includes all characters including any spaces and must include the terminating ASCII carriage return character CR The modem command string can be from 1 to 250 bytes in length Examples of commonly used modem command strings issued to a Hayes compatible modem are provided below Command String Length ATDP15035559999 lt CR gt 16 10h Pulse dial the number 1 503 555 9999 ATDT15035559999 lt CR gt 16 10h Tone dial the number 1 503 555 9999 ATDT9 15035559999 CR 18 12h Tone dial using outside line with pause lt gt 5 05h Hangup the phone ATZ CR 4 04h Restore modem configuration to internally saved values GFK 0582C Chapter 6 SNP Service 123 Chapter GFK 0582C Protocol Definition CCM RTU SNP and SNP X This chapter is divided into three sections Each section describes fully the protocol as implemented on the CMM Section 1 CCM Protocol Section 2 RTU Protocol Section 3 SNP Protocol Section 4 SNP X Protocol 125 Section 1 Protocol This section contains a complete description of the protocol for users writing CCM serial communications driver Topics covered include protocol flow
190. ed to be forced to the value speci fied only at the beginning of one sweep of the Series 90 user logic Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 MESSAGE 06 PRESET SINGLE REGISTER FORMAT Address Func Register Error Check 06 Number Hi Lo Hi Lo Query Address Func Register Error Check 06 Number Hi Lo Hi Lo Normal Response QUERY Anaddress 0 indicates a broadcast request slave stations process a broadcast request and no response is sent The function code is equal to 06 The register number field is two bytes in length It may be any value less than the highest register available in the attached Series 90 CPU It is equal to one less than the number of the register to be preset The data field is two bytes in length and contains the value that the register speci fied by the register number field is to be preset to The first byte in the data field contains the high order byte of the preset value The second byte in the data field contains the low order byte RESPONSE The normal response to a preset single register query is identical to the query Chapter 7 Protocol Definition CCM RTU SNP and SNP X 157 MESSAGE 07 READ EXCEPTION STATUS FORMAT Address Func Error Check 07 Query Address Func Data Error Check 07 Normal Response QUERY This query is a short form of request for the purpose of reading the first eight output
191. elds are shown below 256 Data Full data block Bytes except last 256 or Last data block Fewer Data Bytes Figure 13 Data Block Format 130 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Table 34 Data Block Description Start of Text control character 1 256 data characters End of Block control character used if data block is not last block 17h ETX End of Text Block control character used if final data block 03h Longitudinal Redundancy Check on all data characters in block I Protocol Termination After the final data block is transfered successfully an EOT con trol character is used to terminate the connection between peer devices or between mas ter and slave In both peer to peer and master slave modes the station transmitting the final data block sends the EOT after receiving the ACK to the final data block In addition in mas ter slave mode the master always sends an EOT to terminate a transaction The EOT control character is also used to abort a connection if any portion of the CCM Protocol cannot be completed successfully CCM Peer to Peer Mode GFK 0582C Datasent from sourcedevice Data sent from targetdevice This section describes the protocol flow and enquiry collision sequence for CCM peer to peer mode Peer to Peer Protocol Flow The figures below show the general format of a successful communications exchange in peer to peer mode Th
192. elements in the master reference table When the memory types of the slave and master refer ence tables differ the data will be transferred from the slave reference table beginning with the least significant bit The X Read command may not use the broadcast SNP ID This X command requires at least 11 words in the COMMREQ Data Block From 2 to 6 additional words may be supplied containing optional parameters The following example establishes a direct single session communication session to the slave device via the null SNP ID then reads slave device Register Memory register 201 and deposits the 10 least significant bits into master device Input Memory l In puts 1 10 The PLC Status Word returned from the slave device is updated into master device Register Memory R Register 32 Word 1 00017 0011 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07101 1BBD SNP X Command Number Word 8 00000 0000 Characters 1 and 2 of Slave SNP ID null null Word 9 00000 0000 Characters 3 and 4 of Slave SNP ID null null Word 10 00000 0000 Characters 5 and 6 of Slave SNP ID null null Word 11 00000 0000 Characters 7 and 8 of Slave SNP ID null null Word 12 00000 0000 Communication Session type 0 single session 1 multi ses
193. end error X Responsemessage If fatal error B Ifimproper X Attachmessage Abort all slave processing in progress Error Transition to State 1 Transition to State 1 If X Attach for another slave device Else non fatal error No error Transition to State 1 Transition to State 3 If notbroadcast X Attach Perform requested amp Write Build and send X Attach Response message If preceeding X Request was not broadcast Prepare to receive next X Requestmsg Build and send X Responsemessage Transition to State 3 Prepare to receive next X Requestmsg Transition to State 3 C Ifreportableerror with X Requestmessage Build and send error X Responsemsg E Buffer TimeoutError Abortallslaveprocessing If fatal error Transition to State 1 Abort all slave processing in progress Transition to State 1 Else non fatal error Remain in State 3 If X Buffer message will follow If not broadcast X Request Build and send Intermediate Resp message Start Buffer Timeouttimer Transition to State 4 Perform request servic Read Write If notbroadcast X Request Build and send X Responsemessage Prepare to receive next X Requestmsg Remain in State 3 210 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Chapter GFK 0582C 8 Serial Cable Diagrams and Converters This chapter provides the information necessary for you to build serial communications cables from the CMM to another device The chapter is di
194. ently supported by the CPU 351 352 serial ports The CCM and RTU protocols will be supported in a future version of the product The SNP protocol is a proprietary communications protocol developed by GE Fanuc Automation The SNP protocol is the native communications protocol to all models of the Series 90 PLC product line The SNP X protocol is a highly optimized addition to SNP While it offers fewer func tions than SNP SNP X is simpler to use and provides a significant performance improve ment over SNP SNP X is an extension of SNP and is available whenever SNP is config ured and operable SNP and SNP X Protocols The SNP and SNP X protocol allows for the following types of operation Master the initiating device in a Master Slave system Slave the responding device a Master Slave system After configuration the SNP and SNP X protocols are enabled on the selected port s The SNP and SNP X protocols can be enabled on none one or both serial ports of the CPU 351 352 using either the RS 232 or RS 485 electrical standard as applicable Port selection data rate parity flow control number of stop bits timeouts and turnaround delay values can be configured Chapter 3 CPU 351 and CPU 352 Serial Ports 23 Configuring the CPU 351 352 Serial Ports When the CPU 351 or CPU 352 is powered up the serial ports are given a default config uration This configuration remains active until you configure the ports using the Logi
195. er model The intent is to provide a network design framework to allow equip ment from different vendors to be able to communicate Isolation A method of separating field wiring from logic level circuitry Typically accom plished through the use of optical isolation devices An abbreviation for kilo or exactly 1024 in the world of computers Usually re lated to 1024 words of memory Keep Alive Message A message generated by the SNP master or slave for the sole purpose of pre venting a timeout at the attached device that is keep the SNP communication alive Ladder Diagram A representation of control logic relay systems The user programmed logic is expressed in relay equivalent symbols LED An acronym for Light Emitting Diode which is a solid state device commonly used as a visual indicator in electronic equipment Local Area Network LAN communication network covering a limited physical space and having inter mediate data transport capability Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Logic A fixed set of responses outputs to various external conditions inputs possible situations for both synchronous and asynchronous activity must be spe cified by the user Also referred to as the program Logic Memory In the Series Six PLC dedicated CMOS RAM memory accessible by the user for storage of user ladder programs Long Attach AnSNP Attach message fol
196. ere are three types of SNP messages Attach type messages Attach Attach Response and Update Real Time Datagram which are always 24 bytes in length Mailbox mes sages which are always 40 bytes in length and Buffer messages whose length varies with the amount of data The content of each message varies with the message type and data being transferred SNP also returns a 2 byte acknowledgement after each Mailbox or Buffer message to confirm reception of the message Establishing SNP Communication SNP communication consists of two phases First the communication session must be established On the CMM this is accomplished by the Attach or Long Attach commands Then once the communication has been established data may be transferred between the master and slave On the CMM this is accomplished by the set of remote SNP com mands See Chapter 6 SNP Service for descriptions of all SNP commands available on the CMM The SNP master establishes a communication session as follows The master transmits a Break sequence to all devices on the serial link The Break sequence consists of holding the Transmit signal in the space state for greater than two character times at the selected data rate On the CMM the Break sequence is three character times and not less than 5 milliseconds if a Modem Turnaround Delay is configured the Break sequence is fixed at 400 milliseconds The CMM sends a Break sequence as part of each Attach Long At tach and
197. ervice is provided to allow for the fastest possible retriev al of data from a slave device particularly in a multi drop polling application This com mand may be used to retrieve permanent datagrams only Example Command Block Update using the Update Real Time Datagram service the permanent datagram with Datagram ID 1 in the slave device whose SNP ID is SNP ID1 Store the returned data gram data in master Register Memory R beginning at Register 201 Store the 6 bytes of Piggyback Status data in master device Register memory R Registers 171 173 Word 1 00010 000A SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07218 1C32 SNP Command Number Word 8 00001 0001 Datagram ID Word 9 20051 4 53 Characters 1 and 2 of Slave SNP ID S 53h N 4Eh Word 10 18768 4950 Characters 3 and 4 of Slave SNP ID P 50h I 49h Word 11 12612 3144 Characters 5 and 6 of Slave SNP ID D 44h 1 31h Word 12 00000 0000 Characters 7 and 8 of Slave SNP ID null null Word 13 00008 0008 Master Memory Type to store Datagram R Word 14 00201 00C9 Master Address to store Datagram Register 201 00008 0008 Master Memory to store Piggyback Status R ee i 00171 Master Address Pireba statis E The Datagram
198. erview of SNP X Protocol SNP X Protocol Sequence SNP X Message Structure e SNP X Commands SNP X Slave State Machine Overview of SNP X Protocol The SNP X Protocol is a simple protocol that provides fast data transfer between GE Fa nuc PLCs and related equipment SNP X provides significantly faster data transfer than does the SNP protocol However the SNP X protocol does not provide the extensive set of services available with SNP SNP X is a half duplex master slave protocol that uses the RS 485 and RS 232 electrical interfaces SNP X devices may be connected in a point to point one master and one slave or multidrop one master and many slaves arrangement Only one master may exist on the serial link When multiple slaves exist on the serial link each slave is ad dressed by a unique SNP ID The built in serial port in Series 90 20 and Series 90 30 PLC CPUs operate as SNP and SNP X slave devices using RS 485 only When configured for SNP operation a serial port on a Series 90 30 or Series 90 70 CMM module supports both SNP and SNP X op eration each serial port can be configured to operate as either a master or slave device utilizing either RS 485 or RS 232 SNP X Communication Session The SNP X protocol requires the establishment of a communication session called the SNP X session To establish an SNP X session the master device first transmits a Long Break After waiting the T4 time interval the master then sends an X
199. es in the normal response following the byte count and preceding the error check The data field of the normal response is packed input status data Each byte con tains 8 input point values The least significant bit LSB of the first byte contains the value of the input point whose number is equal to the starting point number plus one The values of the input points are ordered by number starting with the LSB of the first byte of the data field and ending with the most significant bit MSB of the last byte of the data field If the number of points is not a multiple of 8 then the last data byte contains zeros in one to seven of its highest order bits GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 153 MESSAGE 03 READ REGISTERS FORMAT Address Func Starting Number of Error Check 03 Register No Registers Query Address Func Byte Error Check 03 Count Hi Lo Hi Lo Normal Response QUERY Anaddress of 0 is not allowed as this request cannot be a broadcast request The function code is equal to 3 The starting register number is two bytes in length The starting register number may be any value less than the highest register number available in the attached Se ries 90 CPU It is equal to one less than the number of the first register returned in the normal response to this request The number of registers value is two bytes in length It must contain a value from 1 to 125 inclusive The sum of th
200. es 90 Series Six Series Five and Series One PLC CCM im plementations are provided in Appendix C to assist those experienced in the operation of CCM on GE Fanuc programmable controllers The CCM serial communications service is not supported in the current release of the CPU 351 and CPU 352 Support is planned for a future product release 35 Section 1 The Data Block The COMMREO Data Block is the part of the COMMREQ Command Block that iden tifies which CCM Command is to be executed and provides specific parameters for that CCM Command In describing the CCM Data Block the following topics are discussed Structure of the CCM Data Block Data Block Summary for CCM Commands CCM Memory Types Memory Addressing and Data Lengths Structure of the CCM Data Block The CCM Data Block has the following structure Command Description Block Word CCM Command Word Each of the elements of the CCM Data Block are explained below CCM Command Number Word 7 This word identifies which CCM Command is to be executed There are two categories of CCM Commands local commands and remote commands The local commands take place between the initiating CPU and its associated CMM only They are not sent over the serial line The remote commands Read Wite commands are sent over the serial line A complete list of CCM Commands is provided later in this section under the heading Data
201. esponse time is 30 seconds The modem response will be checked The modem command string data begins at Word 10 Word 1 00009 0009 Word 2 00000 0000 Word3 00008 0008 Word 4 00000 0000 Word 5 00000 0000 Word 6 00000 0000 Word 7 07400 1 8 Word 8 00030 001E Word9 00012 000C Word 10 21569 5441 Word 11 21572 5444 Word 12 13106 3332 Word 13 13620 3534 Word 14 14134 3736 Word 15 03384 0D38 122 Series 90 PLC Serial Communications User s Manual October 1996 SNP Data Block Length includes command string NOWAIT Mode Status Word Memory Type R Status Word Address minus 1 Register 1 Not Used Not Used SNP Command Number Modem Response Timeout 30 seconds Number of bytes in command string A 41h T 54h D 44h T 54h 2 32h 3 33h 4 34h 5 35h 6 36h 7 37h 8 38h lt CR gt 0Dh GFK 0582C s The Modem Response Timeout field specifies the maximum time interval that the COMM will wait for the entire response string from the modem after the modem com mand has been sent The time interval is specified in seconds If the modem response timeout value is zero modem response checking is disabled the COMMREO completes as soon as the command string is sent to the modem If the modem response timeout value is non zero modem response checking is enabled the waits for the modem response When the modem response is receiv
202. essor in the PLC CPU PLCbackplanecommunicationserror 80 50h A parity error has occurred in a received X Attach message an A framing or overrun error has occurred ina received X Attachmessage Block Check Code error has occurred a received X Attach message EE invalid Message Type was received when an X Attach message was re For an X Attach message the message type must be 58h T Aninvalid Next Message Type value was detected in a received X Attach message For an X Attach message the Next Message Length must be zero Aninvalid request code was detected in a received X Attach message A parity error has occurred in a received X Requestmessage A framing or overrun error has occurred in a received X Request message A BCC Block Check Code error has occurred in a received X Request message A parity error has occurred in a received X Buffermessage A framing or overrun error has occurred in a received X Buffermessage A BCC Block Check Code error has occurred in a received X Buffer mes sage An expected X Buffer message was not received Table 24 Minor Error Codes for Major Error Code 19 13h Error Status Port Configurer Error Description 02h UnsupportedCOMMREQ These errors are only generatedwhen These errors are only generated when there is no protocol currently being run on a port and the port receives a COMMREQ The port may be disabled or an er
203. f Local Subblk or Main Pgm name null Number of Point Formats to follow Slave Point format 1 Memory R Slave Point format 1 Address R201 Slave Point format 1 count 10 registers R201 R210 Slave Point format 2 Memory Type I in byte mode Slave Point format 2 Address byte 1 11 Slave Point format 2 count 2 bytes 16 Inputs 11 116 GFK 0582C 0582 s The Slave Device field specifies whether the slave device is in a Series 90 70 or in a Series 90 30 90 20 PLC Unpredictable operation will result if this value specifies the wrong slave device type The Datagram Type field designates the datagram to be established as either a normal or permanent datagram A normal datagram remains established in the slave PLC for the life of the communication that is until another SNP Attach or Update Real Time Data gram service is performed A permanent datagram remains established in the slave PLC for the life of the PLC that is until the datagram is cancelled power is cycled to the PLC or the datagram s control program is deleted The Size of the Datagram area field specifies in bytes the size of the datagram data area This area represents the combined sizes of all of the data areas specified by the point for mats Each point format defines data whose size depends upon the memory type and element count for that format For example a point format specifying 19 bits of the Input Table re
204. f Message Message Type Byte1 Byte2 Command Data Response PLC Status Error Status Data Length Optional Code Word Code Response Data Bytes3 Bytes 4 5 Bytes 6 7 Bytes 8 9 Bytes 10 N Trailer End of Block Next Message Next Message Not Block Check Type Length Used Code Byte 1 Byte N42 Bytes N43 N 4 Byte N 5 Byte N 6 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C The contents of the Header Command Data and Trailer for the X Response message further described below Byte1 Start of Message Startof message character Byte2 Message Type SNPX Message 58h X or 78h x Command Data Byte3 ResponseCode Response code Request Code 80h Bytes 4 5 Slave PLC Status Word PLC Status Word from slave device Bytes 8 9 Data Length Data length in bytes 0 1000 Bytes10 N Optional data Optional data 0 1000 bytes Byte N End of Block End of block character Bytes 6 7 Error Status Code Error status 00 00 success 1 Byte N 2 Next Message Type 0 Next message type always 0 Bytes N 3 4 NextMessageLength 0 Nextmessage length always 0 Byte N Unused 0 Not used always 0 5 Byte N 6 Block Check Code Calculated BCC value for this message The Message Type field is set to 58h for an X Response message or 78h for an Intermedi ate Response message The Response Code field corresponds to the Request Code of the X Request that ini
205. fer more data Note Where data types do not match zero fill will take place The remaining COMMREO parameters are optional The Data Block length Word 1 must include all parameters in use The optional Master Memory and Address to store Slave PLC Status Word fields specify a loca tion in the master PLC memory that is updated with the PLC Status Word from the slave device upon successful completion of this command If both fields are not programmed or are set to zero the slave PLC Status Word is not updated into master PLC memory The optional Response Timeout field specifies a new value for the Response Timeout timer This time is the maximum time that the master will wait for an X response from the slave The new value is specified in milliseconds and is in effect for this COMMREO only If not programmed or set to zero the master uses the T2 timer value as selected by the Timeouts configuration parameter The optional Broadcast Delay field specifies a new value for the Broadcast Delay timer This time is the interval that the master must wait for all slave devices to establish an SNP X communication session or to process a broadcast X command since the slave de vices do not return a response to any broadcast message The new value is specified in milliseconds and is in effect for this COMMREQ only If not programmed or set to zero the master uses the T2 timer value as selected by the Timeouts configuration p
206. field of the preset multiple regis ters request Note that the byte count is equal to twice the value of the number of registers The registers are returned in the data field in order of number with the lowest num ber register in the first two bytes and the highest number register in the last two by tes of the data field The number of the first register in the data field is equal to the starting register number plus one The high order byte is sent before the low order byte of each register RESPONSE 162 Series 90 PLC Serial Communications User s Manual October 1996 The description of the fields in the response are covered in the query description GFK 0582C MESSAGE 17 REPORT DEVICE TYPE FORMAT Address Func Error Check 17 Query Address Func Byte Device Slave Data Error Check 17 Count 5 Normal Response QUERY The Report Device Type query is sent by the master to a slave in order to learn what type of programmable control or other computer it is Anaddress of zero is not allowed as this cannot be a broadcast request The function code is equal to 17 RESPONSE The byte count field is one byte in length and is equal to 5 The device type field is one byte in length and is equal to 30 for the Series 90 30 PLC or 70 for the Series 90 70 PLC The slave run light field is one byte in length The slave run light byte is equal to OFFH if the Series 90 CPU is running It is equa
207. figuration to the PLC See Chapter 2 Installed the serial communications cable if you are executing a remote command See Chapter 8 for cable diagrams Written and Stored the ladder program below or a similar program Ladder Program Example Use the following ladder program to become familiar with programming CCM Com mands and to verify that your system is connected and operating properly In the CCM Command examples that follow simply substitute the values of the pro vided Command Block into the BLOCK MOVE instructions of the ladder program exam ple below Then place the PLC in RUN mode You can check the Status Word and ap propriate data tables to see if the command executed properly In the ladder program example the COMMREQ inputs are defined as follows The IN input assigns Register 0005 as the beginning of the Command Block The SYSID input indicates that the location of the associated CMM is in rack 0 slot 2 Make sure this value matches your system configuration The TASK input indicates that commands will be executed by port 1 of the CMM 48 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Ladder Program Example lt lt RUNG 4 STEP 0001 gt gt FST SCN 70001 MOVE S INT CONST 04 5 0001 000
208. fined in the following table with the default parameter shown in the right column Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Table 8 Description of Communications Parameters 0 SLAVE 1 MASTER 2 PEER SLAVE Data Rate 0 300 1 600 19200 3 2400 4 4800 Parity 1 ODD 2 EVEN ODD Flow Control HARDWARE NONE ONE 0 1 N 2 5 WARE 0 5 Turnaround Delay ONE 1 210ms 2 100ms NONE 3 00ms Timeout Bits per Character 0 bits 1 28 bits Stop Bits 0 1 stop bit 1 2 stop bits Interface 0 RS232 default for Port 1 RS232 P1 1 RS485 default for Port 2 RS485 P2 Duplex Mode 0 2 wire 1 4 wire 2 point to point 4 wire Deviceldentifier This is an identifier that distinguishes this device NULL 8 bytes in length from others on the same network for example SNP ID STAADDR Note that for devices that use an SNP ID of 1 enter 49 decimal 31 hexidecimal Note The validity of values for various parameters depends on the type of proto col configured and the availability of options supported by the firmware version of the CPU The Serial Port Setup COMMREQ can be sent any time that the system is running there by allowing you to configure a single port without interrupting the other port s current activity After sending a valid Serial Port Setup COMMREQ you should wait a mini mum of two seconds before issuing the first
209. fires to load the Attach command Rung 6 loads the Command Block with an Attach command 07200 after the startup delay This command uses a null Slave SNP ID to permit communication with any slave device Piggyback Status reporting is not enabled Rung 7 activates the COMMREO to send the SNP command to the CMM module The Command Block has been previously setup in registers R0005 and up The SNP Status Word in 0001 is cleared the SNP Status Word will be updated by the CMM when the command is complete Rung 8 monitors the SNP Status Word When the SNP Status Word is changed to 0001 denoting successful completion one shot T0004 fires to load the repeating SNP com mand Rung 9 loads the Command Block with a Read System Memory command 07202 when the previous command is complete This command reads register R101 from the slave device into register R102 in the master device In the ladder program example the COMMREO Ladder Instruction inputs are defined as follows The IN input assigns Register 00005 as the beginning of the Command Block The SYSID input indicates that the command is for CMM module in rack 0 slot 2 The TASK input indicates that the command is for port 1 on the CMM module Make sure that the SYSID and TASK values match the system configuration and that the specified CMM port is properly configured for operation as an SNP master Series 90 PLC Serial Communications U
210. gths and Valid Ranges for a listing of all memory types This table also shows the byte oriented equivalents for each bit ori ented memory type Chapter 7 Protocol Definition CCM RTU SNP and SNP X 177 178 Retrieving Datagram The slave memory areas defined by a datagram are returned to the master when the master issues an Update Datagram or Update Real Iime Datagram request The SNP master in the CMM stores the response data in the local PLC memory specified by the update command enough local PLC memory must be provided to store the entire re sponse Update Real Time Datagram The Update Datagram request a Mailbox request requires that SNP communication has been established between the master and slave devices via an Attach or Long Attach The Update Real Time Datagram request differs from the Update Datagram request in that previous communication to the desired slave device is not required Update Real Time Datagram is a special service where the master establishes a new com munication to a specified slave device indicates a previously established Datagram ID and then immediately retrieves the datagram data from the slave device Since a sepa rate Attach request is not required the Update Real Time Datagram service provides the fastest way to poll many slave devices in a multidrop arrangement The Update Real Time Datagram service retrieves only permanent datagrams from the slave device See the Datagram Lifetime sectio
211. he CMM 11 What You Will Need 11 Installing the CMM Hardware 12 Configuring the CMM in Logicmaster 90 Software 14 I ORackConfiguration 14 CMM Configuration Modes 14 Description of Communications Parameters 16 Chapter 4 CPU 351 and CPU 352 Serial 21 Introduction to the CPU 351 352 Serial Ports 21 Hardware Features of the CPU351 352 22 Chapter 5 Initiating Communications The COMMREO 27 Section 1 The Communications 28 Structure of the Communications Request 28 Operation of the Communications 29 Timing for Processing Communications Requests 30 Section 2 The COMMREO Ladder Instruction 31 Section 3 The COMMREO Command Block 33 Chapter 6 Servite vo resa vas aie atra 35 Section 1 The COMMREO Data Block 36 Structure of the CCM Data Block 36 Data Block Summary for CCM Commands 37 CCM Memory Types 39 The CCM
212. he PLC memory For an SNP slave device on a CMM module in any Series 90 PLC the slave privilege is always Level 2 and cannot be changed Level 2 permits read and write of the PLC memory If the master device requires additional privileges see the Change Privilege Level com mand for further information The Long Attach command also enables or disables Piggback Status reporting for the duration of the SNP communication When enabled Piggyback Status data is updated after each successful command Chapter 6 SNP Service 119 Example Command Block Issue a Long Attach command to a slave device whose SNP ID is SNP ID1 Store the 6 bytes of Piggyback Status data in master device Register memory Registers 171 173 Disable the T3 timer to eliminate keep alive message traffic Change the T4 tim er to 100 msec Set all other SNP timers to the default configured values Set the modem turnaround delay to 10 milliseconds for modem communication and reduce the maxi mum SNP message size to 256 bytes for communication in a noisy environment Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10 Word 11 Word 12 Word 13 Word 14 Word 15 Word 16 Word 17 Word 18 Word 19 Word 20 Word 21 00015 000F 00000 0000 00008 0008 00000 0000 00000 0000 00000 0000 07300 1C84 20051 4E53 18768 4950 12612 3144 00000 0000 00008 0008 00171 00 00005 0005 02000
213. he node type should note this location and make driver modifications where necessary Scratch Pad Bytes 18h 33h Bytes Length of Memory Size Returned In 18 1B R Register Memory 1C 1F AI Analog Input Table 20 23 Analog Output Table Note Four bytes hold the hexadecimal length of each memory type with the most significant word reserved for future expansion For example the CPU 731 default register memory size of 1024 words 0400h would be returned in the following format LeastSignificant MostSignificant eo 5 The amount of program memory occupied by the logic program Also appears on the Logicmaster 90 PLC Memory Usage screen in the User Program field Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Communication Errors Seriallink communication errors are divided into three groups Invalid Query Message Serial Link Time Outs Invalid Transaction Invalid Query Message GFK 0582C When the communications module receives a query addressed to itself but cannot pro cess the query it sends one of the following error responses Subcode Invalid Function Code 1 Invalid Address Field 2 Invalid Data Field 3 Query Processing Failure 4 The format for an error response to a query is as follows Exception Error Error Func Subcode Check The address reflects the address provided on the original request The exception func tion code is equal to
214. high order byte of the 16 bit CRC register The result is the current CRC INIT SHIFT Initialize the shift counter to 0 SHIFT Shift the current CRC register 1 bit to the right Increment shift count Is the bit shifted out to the right flag a 1 or a 0 If itis a 1 the generating polynomial with the current CRC If it is a 0 continue Is shift counter equal to 8 If NO return to SHIFT If YES increment byte count Is byte count greater than the data length If NO XOR the next 8 bit data byte with the current CRC and go to INIT SHIFT If YES add current CRC to end of data message for transmission and exit When the message is transmitted the receiver will perform the same CRC operation on all the data bits and the transmitted CRC If the information is received correctly the resulting remainder receiver CRC will be 0 Example CRC 16 Calculation GFK 0582C The RTU device transmits the rightmost byte of registers or discrete data first The first bit of the CRC 16 transmitted is the MSB Therefore in the example the MSB of the CRC polynomial is to the extreme right The X16 term is dropped because it affects only the quotient which is discarded and not the remainder the CRC characters The generat ing polynomial is therefore 1010 0000 0000 0001 The remainder is initialized to all 1s As an example we will calculate the CRC 16 for RTU message Read Exception Status 07 The message format is as follows Low y o
215. ial Ports Configuring CPU 352 compatibility with existing memory protect key switch RUN STOP mode select 25 CPU 352 Serial Ports Configuring CPU ID CCM Bd Cyclic Redundancy Check CRO 148 Calculating the CRC 6 D Data Length CCM B7 Data Length CCM Data Lengths CCM Memory Types 44 Datagrams 177 Cancel Datagram Cancelling a Datagram 179 Datagram ID 177 Datagram Lifetime Establish Datagram Establishing a Datag Normal Datagram Point Formats Retrieving a Datagram Update Datagram Update Real Time Datagram Directed SNP X Commands E Error Codes CCM Error Codes la RTU Error Responses SNP Major Error Codes 61 SNP Minor Error Codes Autodial Error Codes 69 5 SNP X Error Codes 64 Port Configurer Error Codes Remote SNP Error Codes 68 Service Request Error Codes 62 SNP DOS Driver Error Codes SNP X Slave Error Codes 70 Errors Noise Errors Transmission Timing 257 Establish Datagram SNP Command 112 Establish SNP X Session 187 Establishing a Datagram 177 Establishing SNP Communication 171 Fault Table Format pre Outputs RTU message 161 Force Single Output RTU message Framing Errors G Glossary of Terms 235 GFK 0582C 0582 Hardware Description e Hardware Features of the CPU 351 LED Indicators 22 Serial Ports Hardware Features of the C
216. iated between the master and slave devices via the SNP Parameter Select message part of the Long Attach command The master and slave devices both use the larger of the Transmission Delay values from either device 176 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C SNP Datagrams GFK 0582C The SNP Read and Write Memory requests permit the master device to directly read and write memory within the slave device memory Each read or write request is of a single memory type multiple requests are required to access different memory types SNP also provides the capability to read from several slave memory types in a single request The mixed slave memory reference is called a Datagram Datagrams provide significant ly faster retrieval of mixed memory types from a slave device than separate reads of each memory type Datagram access differs from direct memory access in that the memory references must be established before use Once the datagram has been established the defined memory data may be retrieved from the slave device by reading the datagram When datagram retrieval is no longer needed the datagram may be cancelled to free resources at the slave PLC CPU Establishing a Datagram The SNP master device establishes a datagram by specifying one or more memory areas in the slave device Each slave memory area is defined by a Point Format which specifies the slave memory type memory address and number of
217. ications User s Manual October 1996 GFK 0582C The following tables describe the individual fields the communication blocks Table 37 Master Enquiry Description Master Slave Q Sequence i wj ASCII coded Q used to specify Q Sequence operation Target Address 2 ID number of target slave 20h 2 h through 7Ah Example Slave ID is 37h 37h 20h 57h Third character of 3 character enquiry sequence Table 38 Slave Response Description Master Slave Q Sequence 0907102 ASCII coded Q used to specify Q Sequence operation Target Address 2 ID number of target slave 20h 2 h through 7Ah Example Slave ID is 37h 37h 20h 2 57h W LRC 7 Longitudinal Redundancy Check This is an Exclusive OR XOR of bytes 3 6 PACK 8 character Protocol Timing and Retry Specifications The CCM Protocol defines a set of time ranges and retry ranges for various portions of the protocol exchange Default values have been defined for the protocol Some de vices like the Series Six CCM and the Series 90 70 CMM have added capabilities to modify the default values If the default values are to be modified it is important that the values match for both the source and target devices CCM Serial Link Timeouts Timeout conditions are used for error detection and error recovery Whenever a serial link timeout occurs the side detecting the timeout will abort the communicatio
218. ications error COMMREQ timeout The did not complete within the configured time interval An SNP Request or Response was aborted prior to completion due to reception of a Break unexpected data length Usually indicates a problem with the remote Memory or Program Block MemoryRead Write are issued to a Series Response code in received SNP X response message does not match ex pected value Response code must equal the request code 80h SNP X Response message exceeds maximum data size decimal 1000 bytes Data in the Response is ignored 53 35h Invalid Piggyback Status data memory type or address Communica tions have not been established 7 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 s Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued Error Status Local SNP SNP X Error Description Decimal 40h Aparity error has occurred on an X Attach Response message when establishing a new SNP X communication session Communications have notbeen established A framing error has occurred on an X Attach Response message when establishing a new SNP Xcommunicationsession Communications have notbeen established A BCC Block Check Code error has occurred on an X Attach Response message when establishing a new SNP Xcommunication session Communications have notbeen established An invalid message ty
219. ich information can be sent over a communications line in one direction only e Half duplex mode in which information can be sent in both directions over a com munications line but only one direction at a time e Full duplex mode in which information can be sent over a communications line in both directions at the same time Interface Standards GFK 0582C An interface standard is a set of rules which define the signal characteristics cable and connection characteristics connector pin assignments and control sequences for a physi cal link between devices CMM communications are based on the interface standards explained below RS 232 This standard was developed for interconnecting Data Terminal Equipment DTE such as a printer or computer to Data Communications Equipment DCE such as a mo dem for transmission over a telephone line or network It can however be used over short distances without a modem Electrically 5 232 can be described as unbalanced or single ended voltage interface This means that all the interchange signals share a common electrical ground The basic characteristics of RS 232 are Maximum cable length 50 feet 15 meters Maximum data rate 20 Kilobits sec Logic assignments referenced to signal ground Space or logic 0 43v to 425v Mark logic 1 3 to 25v Uses 25 pin D type connector Includes 21 interchange circuits including data transmit and receive dat
220. in the system CPU 351 and CPU 352 Serial Ports Describes the serial ports on the Series 90 30 model 351 and 352 CPU modules Initiating Communications The COMMREO Explains how to initiate communications from the ladder logic The structure of the ladder instruction is described in detail CCM Service Defines the CCM service commands explains how the parameters of the service commands are included in the Data Block of the Numerous ladder programming examples are given SNP Service Defines the SNP and SNP X service commands explains how the parameters of the service commands are included in the Data Block of the COMMREQ Numerous ladder programming examples are given Protocol Definitions CCM RTU SNP SNP X Describes the RTU SNP and SNP X Protocols Serial Cable Diagrams and Converters Describes how to construct cables between the CMM and numerous other devices Discusses the Isolated Repeater Converter and the Miniconverter Glossary of Terms Contains a concise alphabetized listing of conventional communications terms and where applicable their associated acronyms ASCII Code List This appendix includes a complete ASCII Code List CCM Compatibility Provides a comparison among the Series 90 Series Six Series Five and Series One PLC CCM protocol implementations RTU Compatibility Provides a comparison among the Series 90 Series Six and Series Five PLC RTU implementations
221. ing point number and the number of points value must be less than or equal to the highest output point number available in the attached Series 90 CPU The high order byte of the starting point number and number of bytes fields is sent as the first byte in each of these fields The low order byte is the second byte in each of these fields The byte count is a binary number from 1 to 256 0 256 It is the number of bytes in the data field of the force multiple outputs request datafield is packed data containing the values that the outputs specified by the starting point number and the number of points fields are to be forced to Each byte in the data field contains the values that eight output points are to be forced to The least significant bit LSB of the first byte contains the value that the output point whose number is equal to the starting point number plus one is to be forced to The values for the output points are ordered by number starting with the LSB of the first byte of the data field and ending with the most significant bit MSB of the last byte of the data field If the number of points is not a multiple of 8 then the last data byte contains zeros in one to seven of its highest order bits RESPONSE The description of the fields in the response are covered in the query description Note The force multiple outputs request is not an output override command The outputs specified in this request are ensured t
222. input in the last two bytes of the data field The number of the first analog input in the data field is equal to the starting analog input number plus one The high order byte is sent before the low order byte of each analog input GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 155 156 MESSAGE 05 FORCE SINGLE OUTPUT FORMAT Address Func Point Data Error Check 05 Number 00H Hi Lo Hi Lo Query Address Func Point Data Error Check 05 Number 00H Hi Lo Hi Lo Normal Response QUERY Anaddress of 0 indicates a broadcast request slave stations process a broadcast request and no response is sent The function code is equal to 05 The point number field is two bytes in length It may be any value less than the highest output point number available in the attached Series 6 CPU It is equal to one less than the number of the output point to be forced on or off The first byte of the data field is equal to either 0 or 255 FFH The output point specified in the point number field is to be forced off if the first data field byte is equal to 0 It is to be forced on if the first data field byte is equal to 255 The second byte of the data field is always equal to zero RESPONSE The normal response to a force single output query is identical to the query Note The force single output request is not an output override command The output specified in this request is ensur
223. int to point configuration WORKMASTER 11 SERIES 90 70 PLC 844908 oru Ui C M M Figure 55 Example RS 232 Point To Point Configuration WORKMASTER 11 SERIES 90 70 PLC 844909 nu C M M coo Figure 56 Example RS 422 485 Point To Point Configuration GFK 0582C 263 Multidrop 264 Series 90 PLC Serial Communiocations User s Manual October 1996 The multidrop configuration is a party line structure in which several devices share the same communication line For a hardwired multidrop network all devices must use RS 422 If converters or modems are used to connect devices to the network RS 232 or RS 422 can be used It is important to note that RS 232 can be used only between two devices whenever any device is physically connected to more than one other device RS 422 must be used One device is a master and the rest are slaves only the master can initiate communication with other elements in the system The next figure illustrates the multidrop configuration WORKMASTER II SERIES 90 70 PLC a44911 av RS 232 SERIAL CABLE M M j m RS 232 RS 422 CONVERTER WORKMASTER CIMST AR OR
224. ion Area Word 1 Word 2 Word3 Word4 Word 5 Word 6 Word 7 Word8 Word9 Word 10 Word 11 Word 12 Word 13 Word 14 Word 15 Word 16 Word 17 Word 18 Word 19 Word 20 s The following table describes the format of the Control Information Area returned by the Return Controller Type and ID command Description Characters 1 and 2 of SNP ID of PLC CPU Characters 3 and 4 of SNP ID of PLC CPU Characters 5 and 6 of SNP ID of PLC CPU Characters 7 and 8 of SNP ID of PLC CPU Series90PLC Major Minor Type Highbyte Lowbyte Number of Control Programs Low byte only Characters 1 and 2 of Main Control ProgramName Characters 3 and 4 of Main Control ProgramName Characters 5 and 6 of Main Control ProgramName Characters 7 and 8 of Main Control ProgramName Number of Control ProgramBlocks Total Length of Program Blocks LSW Total Length of Program Blocks MSW Sum of Program Block AdditiveChecksums Sum of Program Block CRC Checksums LSW Sum of Program Block CRC Checksums MSW Length of Configuration Records Sum of Configuration Records AdditiveChecksums Sum of Configuration Records CRC Checksums LSW Sum of Configuration Records CRC Checksums MSW The following table indicates the Series 90 PLC Major and Minor Type codes Chapter 6 SNP Service Series 90 30 PLC CPU Description Minor Type Description Series90 70 PLC CPU 31 1mh Series90 70Mode1731CPU 90 70 4 1731 0
225. ion salesperson or Application Engineering for assistance GFK 0582C Appendix F Communication Networks 265 0582 Acronyms Appendix A Glossary of Terms B ASCII Code List C CCM Compatibility D RTU Compatibility 253 E Serial Line Interface Communications Networks 263 ASCII Code List p47 Asynchronous Transmission Attach SNP Command Autodial SNP Command 122 B Block Check Code BCC Break Sequence 171 Broadcast Delay Broadcast SNP ID 181 Broadcast SNP X Commands 188 C Cable Assembly Specifications Cable Diagrams 11 Cable Diagrams for Isolated Repeater Converter 226 Cable Diagrams for Miniconverter Cancel Datagram SNP Command Cancelling Datagram 179 Catalog numbers converters 1C690ACC901 230 CCM Command Examples Clear Diagnostic Status Words Read CCM Regters ll Words to Source Registers 51 Read to Source Register Table Read Target to Source Memory 53 Set Response Single Bit Write Software Configuration Write to Target from Source Index CCM Command Number CCM Command Summary 38 CCM COMMREQ Programming Exam ples 48 CCM Compatibility CCM Data Lengths 24 CCM Master Slave Mode CCM Memory Addresses 43 CCM Memory Types bo CCM Operation Memory Types not Sup ported CCM Peer to P eer Mode CCM Protocol CCM Protocol Timing Rety CCM Scratch Pad
226. is reserved for the CPU module the CMM can reside in any other slot There are no Bus Expansion Moduless as there are for the Series 90 70 PLCs CMM Configuration Modes The CMM configuration mode selects the communication protocol for each serial port on the module There are nine possible configuration modes for the CMM module CCM ONLY CCM protocol on both ports CCM RU protocol on port 1 RTU protocol on port 2 14 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 RTU CCM RTU protocol on port 1 protocol on port 2 RTU ONLY RTU protocol on both ports SNP ONLY SNP and SNP X protocols on both ports SNP CCM SNP and SNP X protocols on port 1 CCM protocol on port 2 CCM SNP CCM protocol on port 1 SNP and SNP X protocols on port 2 SNP RIU SNP and SNP X protocols on port 1 RTU protocol on port 2 RTU SNP RTU protocol on port 1 SNP and SNP X protocols on port 2 A different Soft Switch Data Screen is displayed for each configuration mode The factory default is CCM protocol on both ports Make sure that the proper protocol is selected If you are using SNP multidrop make sure that the proper SNP ID has been stored to the PLC CPU Chapter 2 The CMM Description Installation and Configuration 15 Description of Communications Parameters 16 The tables below describe the communications parameters available for each serial pro tocol on the CMM module CCM
227. it No response message is sent when the master sends a broadcast request The time between the end of a query and the beginning of the response to that query is called the slave turn around time The turnaround time illustrated above will vary depending on the query the activity on the other port and the activity of the PLC application program A value of 500 ms can be used as a reasonable worst case estimate Message Types The RTU protocol has four message types query normal response error response and broadcast Query The master sends a message addressed to a single slave Normal Response After the slave performs the function requested by the query it sends back a normal re sponse for that function This indicates that the request was successful Error Response The slave receives the query but for some reason it cannot perform the requested func tion The slave sends back an error response which indicates the reason the request could not be processed No error message will be sent for certain types of errors For more information see section Communication Errors Broadcast The master sends a message addressed to all of the slaves by using address 0 All slaves that receive the broadcast message perform the requested function This transaction is ended by a time out within the master Message Fields The message fields for a typical message are shown below
228. ite command containing up to two bytes of data fits within a single SNP X request The master sends an X Request message and the slave returns an X Response message to complete the command An X Buffer message is not used All response data is contained within the single X Response message The SNP X protocol sequence for an SNP X command without data buffer is shown below Master Slave X Request gt 0582 Chapter 7 Protocol Definition CCM RTU SNP SNP X 187 X Write command containing more than two bytes of data cannot fit within the single SNP X request message The master sends an X Request message and indicates that a buffer message will follow the slave returns a special response message called an Intermediate Response The master then sends the data within an X Buffer message and the slave returns the X Response message to complete the command The SNP X protocol sequence for an SNP X command with data buffer is shown below Master Slave X Request gt lt Intermediate Response gt Broadcast Commands When the master sends an SNP X message X Attach or X Request that is addressed to the special Broadcast SNP ID instead of the specific SNP ID for a particular slave device all slave devices on the serial link receive the message If the message is an X Attach message an SNP X session is established at every slave device If the message is an X Request all slave devices which h
229. l to 0 if the Series 90 CPU is not run ning data field contains three bytes Possible response for the Series 90 30 PLC 35 00 00 for CPU331 36 00 00 for CPU341 Possible responses for the Series 90 70 PLCs 31 00 00 for CPU731 82 00 00 for CPU782 32 00 00 for CPU732 88 00 00 for CPU788 71 00 00 for CPU771 89 00 00 for CPU789 72 00 00 for CPU772 92 00 00 for CPU914 80 00 00 for CPU780 94 00 00 for CPU924 81 00 00 for CPU781 Chapter 7 Protocol Definition CCM RTU SNP and SNP X 163 164 MESSAGE 67 READ SCRATCH PAD MEMORY FORMAT Address Func Starting Number of Error Check 67 Byte Number Bytes Query Address Func Byte Data Error Check 67 Count Normal Response QUERY Anaddress of 0 is not allowed as this cannot bea broadcast request The function code is equal to 67 The starting byte number is two bytes in length and may be any value less than or equal to the highest scratch pad memory address available in the attached Series 90 CPU as indicated in the table below The starting byte number is equal to the ad dress of the first scratch pad memory byte returned in the normal response to this request The number of bytes value is two bytes in length It specifies the number of scratch pad memory locations bytes returned in the normal response The sum of the starting byte number and the number of bytes values must be less than two plus the highest scratch pad memory address
230. lave I Inputs 1 16 Note that the Input memory is accessed in byte mode to overcome bit mode restrictions in Series 90 70 PLCs The total datagram data size for all point formats is thus 10 registers 20 bytes plus 16 inputs 2 bytes or 22 bytes Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10 Word 11 Word 12 Word 13 Word 14 Word 15 Word 16 Word 17 Word 18 Word 19 Word 20 Word 21 Word 22 Word 23 Series 90 PLC Serial Communications User s Manual October 1996 00017 0011 00000 0000 00008 0008 00000 0000 00000 0000 00000 0000 07215 1C2F 00000 0000 00129 0081 00022 0016 00008 0008 00161 00A1 00000 0000 00000 0000 00000 0000 00000 0000 00002 0002 00008 0008 00201 00C9 00010 000A 00016 0010 00001 0001 00002 0002 SNP Data Block Length must include all Point Formats NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 Not Used Not Used SNP Command Number Slave Device Type 90 70 0 90 30 90 20 1 Datagram Type Normal 1 Permanent 81H Size of Datagram area in bytes 22 bytes Master Memory Type for Datagram ID R Master Address for Datagram ID Register 161 Characters 1 and 2 of Local Subblk or Main Pgm name null Characters 3 and 4 of Local Subblk or Main Pgm name null Characters 5 and 6 of Local Subblk or Main Pgm name null Characters 7 and 8 o
231. ld and ending with the most significant bit MSB of the last byte of the data field If the number of points is not a multiple of 8 then the last data byte contains zeros in one to seven of its highest order bits 152 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C MESSAGE 02 READ INPUT TABLE FORMAT Address Func Starting Number of Error Check 02 Point No Points Hi Lo Hi Lo Query Address Func Byte Data Error Check 02 Count Normal Response QUERY Anaddress of 0 is not allowed as this cannot be a broadcast request The function code is 02 The starting point number is two bytes in length and may be any value less than the highest input point number available in the attached Series 90 CPU The starting point number is equal to one less than the number of the first input point returned in the normal response to this request The number of points value is two bytes in length It specifies the number of input points returned in the normal response The sum of the starting point value and the number of points value must be less than or equal to the highest input point number available in the attached Series 90 CPU The high order byte of the starting point number and number of bytes fields is sent as the first byte The low order byte is the second byte in each of these fields RESPONSE The byte count is a binary number from 1 to 256 0 256 It is the number of byt
232. length is 6 since the unit length for the source memory type reg isters is a register To read 12 diagnostic status words into the registers the data length would be 12 because both registers and diagnostic status words have equivalent unit lengths register word 2 bytes Example 2 read 8 target Series 90 inputs into Series 90 or Series Six inputs the data length is 8 points since the unit length is the same for each CCM memory types 2 and 3 inputs and outputs can only be accessed in multiples of 8 Example 3 read 8 target Series 90 registers into Series 90 or Series Six inputs the data length is 8 registers times 16 points per register 128 points Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Section 2 The CCM COMMREQ Status Word GFK 0582C Status Word reports on the progress and results of a CCM re quest The memory address to which the Status Word is written by the CMM is specified in Words 3 and 4 of the Command Block The contents of the CCM Status Word are de fined as Hex Format 00 00 see Table 15 Secondary Error Codes high byte Completion and Primary Error Codes low byte There are several points to remember when interpreting the contents of the CCM COMMREO Status Word 1 will never send a zero for the CCM Status Word to the PLC CPU If the user program needs to know if the command is complete it can zero the CCM Status
233. les are provided for SNP X master and slave devices Each state table is a matrix of the device states and the permissible input events an action routine to be performed is identified for each combination of input event and current state Following each state table pseudo code is provided for the action routines used in that state table The timer names used in the pseudo code match the SNP X timer names presented ear lier in this chapter SNP X Master State Table The table below defines the actions taken by the SNP X master in each state User Cmd Establish new SNP Xsession Receive X Attach Resp msg User Cmd X Read or X Write Receive IntermediateResp msg Receive X Responsemsg BroadcastDelay timer expired Response Timeout timer expired Master Waitfor Idle X Att Resp Action A State 2 Action B Statd3 1 Action C State 3 Action I State 1 Master Open Action D Statd 4 5 Waitfor Inter Resp Action E Stat 5 1 Action G Statd3 1 Action H State 5 Action I State 1 Wait for X Resp Action F 5 3 1 Action C State 3 Action I State 1 For any invalid intersection in this table abort all master processing and return to State 1 GFK 0582C Chapter 7 Protocol Definition RTU SNP and SNP X 207 SNP X Master Actions The following action routines are used by the SNP X Master State Table Buildand send X Attach message to slave
234. llision Detection CSMA CD often used in Local Area Networks Firmware A series of instructions contained in ROM Read Only Memory which are used for internal processing functions only These instructions are transparent to the user Hardware of the mechanical electrical and electronic devices that comprise a Program mable Logic Controller and its application s Hexadecimal A numbering system having 16 as a base represented by the digits 0 through 9 then through E Initiating Station The station from which communication originates Input A signal typically ON or OFE that provides information to the PLC Inputs are usually generated by devices such as limit switches and pushbuttons Input Module AnI O module that converts signals from user devices to logic levels used by the CPU Appendix A Glossary of Terms 239 240 Inter face To connect a Programmable Logic Controller with its application devices com munications channels and peripherals through various modules and cables Input Output That portion of the PLC to which field devices are connected Scan A method by which the CPU monitors all inputs and controls all outputs within a prescribed time ISO Standards The International Standards Organization ISO for Open System Interconnec tion OSI ISO Reference Model for Open System Interconnection An international standard for network architectures which define a seven lay
235. llowing table where bit 0 is the least significant bit and bit 15 is the most significant bit Recalling the convention of byte ordering within a word byte 5 is the least significant byte containing bits 0 through 7 and byte 6 is the most significant byte containing bits 8 through 15 as shown below Biss The PLC Status Word bit assignments are described in the following table Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Table 28 Slave PLC Status Word Data Bit 0 Oversweep flag meaningful only when constant sweep mode is active 1 Constant Sweep value exceeded 0 No oversweep condition exists Bit 1 Constant Sweep Mode 1 Constant Sweep Mode active 0 Constant Sweep Mode is not active Bit 2 PLC Fault Entry since last read 1 PLC fault table has changed since last read by this device 0 PLC fault table unchanged since last read Bit 3 I OFault Entry since last read 1 1 fault table has changed since last read by this device 0 1 fault table unchanged since last read Bit 4 PLC Fault Entry Present 1 more fault entries in PLC fault table 0 PLC fault table is empty Bit5 I OFault Entry Present 1 or more fault entries in I O fault table 0 I O fault table is empty Bit6 Programmerattachmentflag 1 Programmerattachmentfound 0 No programmer attachment found Bit 7 FrontpanelENABLE DISABLEswitchsetting 1 Outputs disabled 0 Outputs enabled Bi
236. lowed by an SNP Parameter Select message Used to establish SNP communications and to negotiate non default operating parame ters between the SNP master and a specific SNP slave device See Chapter 7 Section 3 SNP Protocol for details Manufacturing Automation Protocol MAP MAP communication protocol is specified by the Manufacturing Automation Protocol MAP specification MAP is a Connection oriented protocol that is sta tions residing on a network are able to transfer information only after establish ing a logical connection much like two people using the telephone system Master Slave Communication between stations where one station always initiates requests and the other station always responds to requests Memor y A grouping of physical circuit elements that have data entry storage and retriev al capability Microprocessor An electronic computer processor consisting of integrated circuit chips that con tain arithmetic logic register control and memory functions Microsecond or One millionth of a second 1 x 107 6 or 0 000001 second Millisecond ms or msec One thousandth of a second 1 x 10 3 or 0 001 second Mnemonic An abbreviation given to an instruction usually an acronym formed by combin ing initial letters or parts of words Appendix Glossary of Terms 241 242 Modules A replaceable electronic subassembly usually plugged in and secured in place but easily removable in case of fa
237. master and slave devices See Chapter 7 Protocol Definition Section 3 SNP Protocol for an explanation of the SNP timers and their usage In this specifying the value of 0 for any timer disables the timer When a modem is being used the T4 timer should be set to 600 msec or greater to allow the Break to be transmitted correctly The Modem Turnaround Delay field specifies the duration of time required by the modem to turn the communication link around The duration is specified in milliseconds and the default value is 0 The Transmission Delay Time field specifies a time period in seconds to account for unusually long delays in transmission between SNP devices Unusually long delays are typical of communications via satellite This value is specified in seconds and the default value is 0 The Maximum SNP Data Size field provides the ability to reduce the size of SNP data messages transmitted over the wire Communications in noisy environments may re quire a smaller message size to minimize transmission errors This value must fall in the range of 42 to 1000 bytes and be an even number of bytes The default value is 1000 Chapter 6 SNP Service 121 L6 Autodial Command 07400 1 8 Available Modes Master Description Local command This command allows a string of data to be output to aqn external tele phone modem attached to the serial port this provides the ability to autodial the at tached modem by issuing
238. mediateResponse 5 wait Broadcast Delay time no X Response GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 189 SNP X Message Structure This section describes the SNP X messages required to perform each of the SNP X com mands AnSNP X command is initiated with a single request message X Request If all com mand data cannot be transmitted within the request message the data is sent in a single data buffer message X Buffer A single response message X Response containing all response status and data concludes the SNP X command The SNP X protocol prevents a slave device from returning any response to a broadcast command Each SNP X command conforms to a general protocol format All SNP X messages con sist of the following sections e Header Command Data Trailer Command Data The contents of these sections vary depending on the message type SNP X Request Message X Request SNP X Response Message X Response or SNP X Data Buffer X Buffer X Request Message Structure 190 The SNP X Request Message X Request is sent by the master to specify the desired ser vice and parameters Up to two bytes of data can be contained within the X Request message If the command requires more than two bytes of data all data is sent in a sepa rate X Buffer message AllX Request messages are exactly 24 bytes in length and structured as shown below Header Start of Message Message Type By
239. memory elements of that memory type The SNP master in the CMM module can define up to 32 separate Point Formats when establishing a datagram When a datagram is established the slave device allocates resources in the PLC CPU to collect the various memory areas into one contiguous data area for transfer to the master device upon request If the datagram is successfully established the slave returns a Da tagram ID code to the master The Datagram ID is a single byte which must be used by the master to identify this datagram in all future requests A Point Format may use any slave memory type available with other Read commands including for Series 90 70 slave devices only Main Program Task and Program Block memory Bit oriented memory types in a Point Format are not supported by Series 90 70 slave de vices Significant restrictions exist when using bit oriented memory types in a Point For mat in Series 90 30 or Series 90 20 slave devices The slave memory defined by the Point Format must not exceed a standard byte of slave memory elements 1 to 8 9 to 16 N 8 1 to N 8 8 Since any bit oriented memory can also be refer enced as byte oriented memory it is recommended and necessary for Series 90 70 slave devices to use a byte oriented instead of bit oriented memory type in a Point Format There is no restriction on using byte oriented memory in a Point Format See Chapter 6 SNP Services Table 16 Memory Types Unit Len
240. message type of the X Buffer message the Next Message Length field is set to the length of the en tire X Buffer message header data and trailer If a data buffer message is not used these fields in the X Request trailer are set to zero GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 191 X Response Message Structure 192 The SNP X slave transmits an SNP X Response Message X Response after processing a directed X Request message to complete the X Request or to permit the master to send more data The X Response message contains a slave PLC Status Word described earli er an error status word major and minor error code bytes and up to 1000 decimal bytes of data A special X Response message called an Intermediate Response and denoted by a spe cial Message Type value is used to acknowledge the reception of an X Request message which will be followed by a data buffer message The Intermediate Response contains no data the PLC Status Word and Error Status Code fields are not meaningful The only purpose of the Intermediate Response message is to acknowledge the X Request mes sage and to permit transmission of the data buffer message When the slave device has detected an error the error is indicated by a non zero Error Status Code The PLC Status Word is set to zero and the message contains no data the Data Length is set to zero AllX Response messages are structured as shown below Header Start o
241. mmed the master uses the value selected by the Timeouts configuration parameter Chapter 6 SNP Service 85 L6 X Write 07102 1BBE Available Modes Master Description Remote command The master establishes a new SNP X communication session with the slave device if the proper session is not already active The master then sends an X Write request with data to the slave device This service is provided to permit quick write access to various reference tables within the slave PLC This command writes the specified number of elements from the master reference table into the slave reference table When the memory types of the slave and master reference tables differ the data will be padded with the value 0 as necessary In multi session operation the broadcast SNP ID may be used to write data to all slave devices on the serial link This X command requires at least 11 words in the COMMREQ Data Block From 2 to 6 additional words may be supplied containing optional parameters The following example establishes a direct single session communication session to the slave device via the null SNP ID and then writes master device Input Memory I In puts 1 10 into slave device Register Memory register 201 The PLC Status Word returned from the slave device is updated into master device Register Memory Register 32 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10 Word 11 Word 1
242. modem commands The modem command strings follow the Hayes convention Modem command strings are not part of the SNP protocol Upon issuing the Autodial command an Escape sequence is transmitted to the attached modem The Escape sequence assures that the modem is returned to the command state The Escape sequence consists of 2 seconds of silence followed by 3 plus char acters followed by another 2 seconds of silence The modem command string specified in the Autodial COMMREO will then be transmitted immediately following the Escape sequence The format of the modem command string is dependent on the attached mo dem and the desired operation Once the phone connection has been established it is the responsibility of the PLC application program to hangup the phone connection This is accomplished by reissuing the Autodial command and sending the appropriate han gup command string Each modem command string must end with the ASCII carriage return character 0Dh for proper recognition by the modem This character must be included in the command string data and length The SNP Data Block Length must include the entire modem command string The Data Block Length will vary with the size of the modem command string The Data Block Length Word 1 of the must be equal to Word 9 1 2 3 Command Block Example Dial the number 234 5678 The modem command string used is ATDT2345678 CR The maximum modem r
243. n below for a description of normal and permanent datagrams The basic SNP message flow for the Update Real Time Datagram service is shown in the figure below Request Response Master T4 delay UpdReal Optional Figure 24 Message Flow Update Real Time Datagram Note Any existing SNP communication is aborted when the master sends an Update Real Time Datagram request This request generates a Break se quence which forces all slave devices on the seriallinkto abortany existing communication and to wait for an Attach or Update Real Time Datagram request Like an Attach request the Update Real Time Datagram request specifies a particular slave device The specified slave device acknowl edges the Update Real Time Datagram request all other slave devices await the next Break sequence Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Datagram Lifetime An established datagram may be cancelled at any time via the Cancel Datagram request established datagrams are automatically cancelled when power is removed from the slave device In addition certain datagrams are automatically cancelled when the SNP communication in which they were established is terminated There are two types of datagrams Normal and Permanent The datagram type must be specified in all datagram requests The difference between the two datagram types is the lifetime of the datagram once it has been established Permanent
244. n Protocol Megabyte 1 048 576bytes Modulator Demodulator NegativeAcknowledgecontrolcharacter PersonalComputer IBM compatible ProgrammableCoprocessorModule ProgrammableLogicController Programmable Read Only Memory RandomAccess Memory Remote Terminal Unit Ready to Send control signal Receive Data Signal Series 90 Protocol Series 90 Protocol Enhanced Start of Header control character Start of Text control character Transmit Data Signal Versa Module European GFK 0582C Glossary of Terms Address A series of decimal numbers assigned to specific program memory locations and used to access those locations Analog A numerical expression of physical variables such as rotation distance or volt age to represent a quantity Application program The ladder logic program executing in a PLC or user program in computer ASCII An 8 level code 7 bits plus 1 parity bit commonly used for exchange of data which is the American Standard Code for Information Interchange Attach An SNP message which establishes communication between the SNP master and a specific SNP slave device See Chapter 7 Section 3 SNP Protocol for details Asynchronous Transmission of data in which time intervals between transmitted characters may be of unequallength Asynchronous transmission is controlled by start and stop bits at the beginning and end of each character Backplane A group of connectors physically mounted at the back of a r
245. n SNP ID had been specified The X Read command may not be broadcast since SNP X slave de vices must not respond to any broadcast command The following diagram and table describe the actual protocol transactions involved in an X Read command Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Example of Direct X Read Command This example shows the message exchange of an X Read command Master Slave X Read Request message 1B 58 41 42 43 44 45 46 00 00 01 08 00 00 04 00 00 00 17 00 00 00 00 1A X Read Response message 1B 58 81 00 00 00 00 08 00 31 32 33 34 35 36 37 38 17 00 00 00 00 B6 Explanation of Direct X Read Command Byte Hex Value Description Number X Read Request Message 1 1 Startof message character 1Bh 41 42 43 44 45 46 00 00 SNPID of target slave X Read request code 01h Segment Selector R in word mode Data Offset 0000h O zero based 1 Data Length 0004h 4 registers Not used always 0 End of block character 17h marks the beginning of the SNP X message trailer 20 23 00 00 00 00 Not used always 0 24 1A Computed Block Check Code for this example X Read Response Message 1 1B Start of message character 1Bh 3 81 X Read response code 81h 0000 PLC Status Word 00 00 for this exampleonly 00 00 08 00 31 32 33 34 35 36 37 38 17 00 00 00 00 B6 Status codes Major and Minor errors Length of data in response 8
246. n in memory where you must enter additional information about the Communications Request Enable Logic Control logic for activating the COMMREO Instruction IN The location of the Command Block It can be any valid address within a word ori ented area of memory L SYSID A hexadecimal value that gives the rack and slot location of the CMM associated with this COMMREO Instruction If the SYSID is incorrectly programmed for a rack and slot that does not contain a CMM or other intelligent module the function OK output is not activated Examples WEM 3 o For the CPU 351 and CPU 352 the SYSID is always 0001h for rack 0 slot 1 GFK 0582C Chapter 4 Initiating Communications The COMMREQ 31 32 TASK The serial port on the CMM modules and the CPU 351 and CPU 352 to be used this COMMREQ The following table lists the valid task numbers for the CMM modules Task Number 1 Port 1 Protocol 2 Port 2 Protocol The next table lists the valid task numbers for the CPU 351 and CPU 352 serial ports Task Number 19 Port 1 20 Port 2 If the task number programmed for the CMM or the CPU 351 or CPU 352 serial ports is not valid an application fault will be logged in the fault table COMMREQ BAD TASK ID This can occur if the task on the COMMREQ Instruction is misprogrammed or if the CMM has been configured without a communications protocol enabled on this serial port OK and FTOu
247. n of the Es tablish Datagram command The Datagram Type field designates a normal or permanent datagram This value must match the type specified when the datagram was established The Master Memory Type and Address fields must be selected to allow enough room to ac comodate the datagram area returned from the slave This area is of the size specified in the Establish Datagram command which defined the size and format of the datagram See Table 16 in Section 1 for valid memory types and addresses GFK 0582C Chapter 6 SNP Service 115 L6 Cancel Datagram 07217 1C31 116 Available Modes Master Description Remote command The slave device must be attached and a datagram established be fore executing this command see Attach and Establish Datagram commands This ser vice provides the master with the capability to cancel a previously established normal or permanent datagram in the slave device Example Command Block Cancel the permanent datagram with Datagram ID 1 in the attached slave device Word 1 00003 0003 Word 2 00000 0000 Word 3 00008 0008 Word 4 00000 0000 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07217 1631 SNP Command Number SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 2 12 1 1 Word 8 00001 0001 Datagram ID Word 9 00129 0081 Datagram Normal 1 Permanent 81h The Datagram ID
248. n poll this slave CMM with a Read Q Sequence command not available on the CMM to obtain the data The Q Se quence operation avoids the 17 byte header included in Read Write commands Inthis command Words 8 and 9 of the Command Block have a special purpose Word 8 Data bytes 1 and 2 of Q Response Word9 Data bytes 3 and 4 of Q Response Data byte format High Byte Low Byte Word 8 Data Byte 2 Data Byte 1 Word 9 Data Byte 4 Date Byte 3 Example Set response with the numbers 1 2 3 4 Word 1 00003 0003 Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type Register Word 4 00009 0009 Status Word Address minus 1 Register 10 Word 5 00000 0000 Not used in NOWAIT Mode Word 6 00000 0000 Not used in NOWAIT Mode Word 7 06001 1771 Command Number Word 8 00513 0201 Data Bytes 1 and 2 Word 9 01027 0403 Data Bytes 3 and 4 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Clear Diagnostic Status Words 06002 1772 Description Local Command This command requires only the command number Word 7 Example Clear CCM Diagnostic Status Words Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 00001 0001 00000 0000 00008 0008 00009 0009 00000 0000 00000 0000 06002 1772 Data Block Length NOW AIT Mode Status Word Memory Type Register Status Word Address minus 1 Register 10 Not
249. n up to 16 entries For detailed information on the fault tables refer to the applicable Programmable Controller Reference Manual GFK 0265 for Series 90 70 or GFK 0467 for Series 90 30 Example Command Block Read the attached slave device I O Fault Table Entry 1 only and store in master device Register Memory R Registers 201 227 Word 1 00006 0006 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07212 1C2C Command Number Word 8 00001 0001 Selected Fault Table I O 1 PLC 2 Word 9 00001 0001 Beginning Fault Table Entry I O 1 32 PLC 1 16 Word 10 00001 0001 Number of faults entries requested I O 1 32 PLC 1 16 Word 11 00008 0008 Master Memory Type to store Fault Table R Word 12 00201 0001 Master Address to store Fault Table Register 201 The Master Memory Type and Address fields must be selected to allow enough room to ac comodate the 12 bytes of data necessary to represent the table header plus 42 bytes for each fault requested from the slave PLC This size requirement applies to both I O and PLC Fault Table retrieval See Table 16 in Section 1 for valid memory types and address es The Fault Table area is returned in the following format Fault Table Area Word 1 low byte Word 1 high byte
250. nd test 1 697 711 for a Series 90 70 CMM IC693CMM311 for a Series 90 30 CMM If this application uses CCM protocol with standard default settings for a Series 90 30 CMM CMM 311 no other equipment is required For other applications you will also need the following A computer with a hard disk ALogicmaster 90 system including software hardware and appropriate cables Refer to either the Logicmaster 90 70 Programming Software User s Manual GFK 0263 or to the Logicmaster 90 Series 90 30 20 Micro Programming Software User s Manual GFK 0466 for more information GFK 0582C Chapter 2 The CMM Description Installation and Configuration 11 Installing the CMM Hardware 12 The first step in the installation procedure is to physically install the CMM hardware and verify that it is working properly Overview In a single rack system the CMM resides in the same rack as the CPU In a Series 90 70 multiple rack system the CMM can reside in either the CPU rack or in an expansion rack The Series 90 30 CMM must reside in the same rack as the CPU The following illustration shows one possible system configuration for installing a Series 90 70 CMM in a local or expansion rack LOCAL RACK CONFIGURATION 244915 PICC S P M UM CPU RACK EXPANSION RACK P C B S P T S R M P U M P MM
251. ned in the Control Program Area The Number of Control Program Names field specifies the number of slave Control Program names to be returned in the Control Program Area The size of the Control Program area in words depends upon the number of Control Program names requested and is calculated as 4 Word 10 1 Response data always starts with the first Control Pro gram name defined at the slave device See Table 16 in Section 1 for valid memory types and addresses 102 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 s The following table describes the format of the Control Program Area returned by the Return Control Program command Control Program Area Number of Control Programs Characters 1 and 2 of Control Program Name 1 Characters 3 and 4 of Control Program Name 1 Characters 5 and 6 of Control Program Name 1 Characters 7 and 8 of Control Program Name 1 Character 1 and 2 of Control Program Name 8 Character and 4 of Control Program Name 8 Character 5 and 6 of Control Program Name 8 Character 7 and 8 of Control Program Name 8 The Number of Control Programs field indicates how many control programs have been defined at the slave device The Control Program Name fields contain the ASCII name of the control program s If more control program names were requested than have been defined the unused con trol program name fields contain the ASCII null string all bytes 0
252. ng can be generally specified as even odd or none The parity bit derived by the sender and monitored by the receiver is dependent on the number of 1s occur ring in the binary character If parity is defined as odd the total number of 1s in the binary character in addition to the parity bit must be odd If the parity is even the total number of 1s in the character including the parity bit must be even If the parity is none no parity checking is performed In the example shown below the ASCII coded amp contains two 1s therefore the parity bit must be 1 for odd parity The parity bit would be 0 in the case parity were defined as even In the case of no parity the parity bit is not transmitted For CCM protocol the optional parity bit may be odd or none for the SNP SNP X and RTU protocols the par ity may be odd even or none If parity checking is employed and one of the bits is transmitted incorrectly the parity bit will reflect the error ASCII character A received correctly Parity Bit Received Data Byte odd 8 7 6 5 4 3 2 1 1 0 1 0 0 0 0 0 1 ASCII character A received with error in the first bit Parity Bit Received Data Byte odd 8 7 6 5 4 3 2 1 1 0 1 0 0 0 0 0 0 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C The receiver monitors the parity bit and detects the error in transmission because the received character with parity has an even number of 1s instead of an odd number
253. ns and send an EOT to the other device The timeouts defined for the CCM Protocol are listed in the table below If a turn around delay is used it is added to the CCM timeout for that portion of the protocol ex change Each communications driver must adhere to the timeouts defined below GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 135 Table 39 Timeouts for Protocol ENQ ACK TIMER Wait on ACK NAK to master ENQ 0 Wait on ACK NAK to 1st peer ENQ 0 50 400 800 Wait on ACK NAK to retransmitted peer ENQ 300 0 300 440 300 440 300 440 600 0 140 220 140 220 140 220 1200 0 80 120 80 120 80 120 19200 0 80 120 80 120 80 120 Wait on ACK to Header Wait on STX Wait for CTS signal The following table defines 4 character times for each data rate selection Data Rate 4 Character Times 147 milliseconds 74 milliseconds 37 milliseconds 19 milliseconds 10 milliseconds 5 milliseconds 3 milliseconds 1 Value depends upon backoff algorithm detection of bit in CPU ID for example at 19200 bps a 0 bit waits 80 milliseconds a 1 bit waits 120 milliseconds 136 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Retries The Protocol provides a retry mechanism for different parts of the protocol ex change This mechanism allows one side to retransmit ENQ sequences headers or data blocks if they were previously NAKed The retry mechanism may not
254. ns are those where a single Isolated Repeater Converter is used Complex multidrop configurations contain one more multidrop sections where an Isolated Repeater Converter is included as one of the drops In both simple and complex multidrop config urations the transmitters directed downstream from the master can be on at all times There will be no contention for the communication line because only one device the master transmits downstream In simple multidrop configurations there will be no contention when transmitting upstream as long as devices tri state their drivers when idle and turn them on only when they have something to transmit This is the case for the Series 90 70 and Series 90 30 CMMs In complex multidrop configurations however special steps must be taken to switch the upstream transmitters of the Isolated Repeater Converter Switching Upstream Transmitters For the RS 422 drivers to be active at the J2 port of the Isolated Repeater Converter the RTS input at J1 must be true The state of the RS 422 drivers at the J1 port depends on the position of the switch on the unit When the switch is in the center position the J1 transmitters will always be turned on When the switch is in the CTS position toward the power cable then either the RS 232 or RS 422 CTS signal must be true to turn on the J1 drivers Note Note the position of the switch on the Isolated Repeater Converter in the system configurations below
255. nse to Source Register Table Bal Read Registers RTU message Read Scratch Pad Memory RTU Mes sage ii ystem Memory SNP Command 94 Read Target to Source Memory CCM Command Read Task Memory SNP Command pd Repeater Convertey Report Device Type RTU Message 163 Response Timeout Restart ResetPushbutton Retries CCM 137 Retries SNP 173 Retrieving a Datagram 178 Return Control Program Name SNP Command Return Controller Type ID SNP Com mand Return Fault Table SNP Command od PLC Time Date SNP Command 106 5 252 59 RS 232 Cable Diagrams RS 422 RS 485 Cable Diagrams GFK 0582C 0582 5 449 RS 422 and RS 485 RS 485 2 W ire Operation RS 232 CPU 351 Port 1 22 RS 485 CPU 351 Port 2 7 RTS CTSTiming RTU Character Format RTU Communication Errors 167 RTU Compatibility RTU Message Descriptions Force Multiple Output Force Single Output Loopback Maintenance Preset Multiple Registers 16 Preset Single Register Read Analog Inputs 155 Read Exception Status Read Input Table Read Output Table Read Registers Read Scratch Pad Memory 164 Report Device Type RTU Message Fields 145 Error Check Field 147 Function Code Information Field Station Address RTU Message Format RTU Message Length 151 RTU Message Termination 147 RTU 1 es Das Broadcast Error Response Normal Resp
256. o State 7 Else write Get data from PLC memory Send data block Start DATA TIMER Transition to State 6 E If last block Send EOT Transition to State 1 Else Remain in State 6 If ENQ COUNT lt 32 Increment ENQ_COUNT Send Master ENQ Start ENQ_ACK_TIMER Remain in State 2 Else Send EOT Transition to State 1 GFK 0582C If HEADER COUNT lt 3 Increment HEADER COUNT Send Header Start HEADER TIMER Remain in State 5 Else Send Transition to State 1 If DATA_BLK_COUNT lt 3 Increment DATA_BLK_COUNT Send data block Start DATA_ACK_TIMER Remain in State 6 Else Send EOT Transition to State 1 Send EOT Transition to State 1 Transition to State 1 Send Data to PLC Send ACK to Data Block If last_block Start EOT_TIMER Transition to State 9 Else Start STX_TIMER Transition to State 7 Chapter 7 Protocol Definition RTU SNP and SNP X L IfDATA BLK COUNT lt 3 Increment DATA COUNT Send NAK to bad block Start STX TIMER Transition to State 7 Else Send EOT Transition to State 1 M If QSEQ COUNT 3 Increment QGEQ COUNT Send Q ENQ seq Start ENQ TIMER Remain in State 10 j Else Transition to State 1 Start DATA_TIMER Transition to State 8 141 Slave State Table State Idle i Wait for Wait i i Wait for Event Heade
257. o be forced to the values specified only at the beginning of one sweep of the Series 90 user logic GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 161 MESSAGE 16 PRESET MULTIPLE REGISTERS FORMAT Address Func Starting Number of Data Error Check 16 Register No Registers Query Address Func Starting Number of Error Check 16 Register No Registers Normal Response QUERY Anaddress of 0 indicates a broadcast request slave stations process a broadcast request and no response is sent The value of the function code is 16 The starting register number is two bytes length The starting register number may be any value less than the highest register number available in the attached Se ries 90 CPU It is equal to one less than the number of the first register preset by this request The number of registers value is two bytes in length It must contain a value from 1 to 125 inclusive The sum of the starting register number and the number of regis ters value must be less than or equal to the highest register number available in the attached Series 90 CPU The high order byte of the starting register number and number of registers fields is sent as the first byte in each of these fields The low or der byte is the second byte in each of these fields The byte count field is one byte in length It is a binary number from 2 to 250 inclu sive Itis equal to the number of bytes in the data
258. o the default T3 value plusa fixed worst case Transmission Delay value of 65 sec If the T3 timer is disabled this timer value is also disabled This is the minimum time delay the master must wait after completion of the Break sequence before it sends an Attach or Update Real Time Datagram message This time interval al lows the slave device to activate its receiver circuits and pre pare to accept incoming messages Used by the master device only This timer is used during the Attach Long Attach and Update Real Time Datagram commands The T4 timer defaults to50 milliseconds forallCMMconfigura tion Timeout parameter selections The T4 timer value may be optionally specified by the Long Attach command The maximum time that the slave device will delay while pre paring a response message It is started when the final request acknowledgementis sent to the master If the response mes sage is not ready to send within the T5 time the slave sends a keep alive message to the master to prevent a T5 timeout at the master The T5 timer usually keeps track of the time that the SNP slave waits for the Service Request Processor The 5 timer default value is specified by the CMM configura tion Timeoutparameter default values range from 0 disabled to5sec The T5 value used by the master device may be modi fied by the Long Attach command The T5 timer value is not negotiated between the master and slave devices the slave de vicealway
259. o times The NAKed message may be retransmitted a maximum of twotimes 42 2Ah Anunknown message was received when an acknowledge ACK or NAK wasrequired Sequence Error An unexpected SNP message type was received A received SNP message contains bad next message length value 45 2Dh Acknowledge timeout Anacknowledge ACK or NAK was not received within the configured T2 time interval A slave device may generate this error if the master device has aborted after maximum sponse NAKs and does not NAK the next response retry Response timeout The SNP Master did not receive an SNP Response message within the configured T5 time interval Buffer message timeout An expected Text Buffer or Connection Data message was not received within the configured T5 time interval Serial output timeout The CMM module was unable to transmit a Break an SNP message or SNP acknowledge ACK or NAK from the serial port May be due to missing CTS signal when the CMM moduleis configured to use hardware flow control SNP slave did not receive a response from the ServiceRequest Processor in the PLC CPU Invalid SNP Slave SNP ID Must be a 0 7 ASCII characters plus aterminating null character 00h The Null SNP ID eight bytes of 00h may be used to specify any single slave device TheSNP master has received an response message containing an SNP slave device May occur when Series 90 70 commands Task 90 30 slave device re PLCbackplane commun
260. odems to turn the link around In the case that NONE flow control is selected the Modem Turnaround Delay also speci fies the length of time that the Request to Send RIS signal is asserted before any char acters are transmitted Valid selections are NONE 10 ms 100 ms or 500 ms Note Timeout values used by Logicmaster 90 software and the Series 90 70 and 90 30 CPUs are also listed for comparison Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Table 4 SNP Timer Values for Timeout Selections s ms 5ms T2 2 sec 2 sec T3 Disabled 10 sec T4 50 ms 50 ms 5 Disabled Disabled Transmission Delay 0 sec 0 sec COMMREQ timeout 30 sec 30 sec T3 80 character times T3 65 seconds T5 80 character times T5 Transmission Delay twice next message transmission time l The Transmission Delay specifies the length of time required for the data to transfer from the initiating device to the responding device This duration is also referred to as the wire time Examples where this value may be changed to a non zero value include instances where satellite links are used to transfer data The Timeout specifies the maximum length of time that a can remain in process If the COMMREQ command cannot be completed before this time interval the processing is terminated an error code is returned in the COMMREQ Status Word indicating that a COMMREQ timeout has o
261. of 3 character times occurs while a message is being received If this occurs the message is considered to have terminated and no response will be sent to the master There are certain timing considerations due to the characteristics of the slave that should be taken into account by the master After sending a query message the master should wait approximately 500 milliseconds before assuming that the slave did not respond to its request 168 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Invalid Transactions GFK 0582C If an error occurs during transmission that does not fall into the category of an invalid query message or a serial link time out it is known as an invalid transaction Types of errors causing an invalid transaction include Bad CRC The data length specified by the memory address field is longer than the data re ceived Framing or overrun errors Parity errors If an error in this category occurs when a message is received by the CMM module the RTU slave does not return an error message The RTU slave treats the incoming message as though it was not intended for it Chapter 7 Protocol Definition CCM RTU SNP and SNP X 169 Section 3 SNP Protocol This section contains a simplified description of the SNP Protocol for users of the SNP master and slave implementations on the CMM module Topics covered include pro tocol flow master slave operation protocol timing and dat
262. ol uses the polynomial X16 X15 X2 1 which in binary is 1 1000 0000 0000 0101 The CRC this polynomial generates is known as CRC 16 The discussion above can be implemented in hardware or software One hardware im plementation involves constructing a multi section shift register based on the generating polynomial 840473 x x15 x16 CRC REGISTER gt 415 14 CE UE EXCLUSIVE OR DATA INPUT Figure 21 Cyclic Redundancy Check CRC Register 148 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C To generate the CRC the message data bits are fed to the shift register one at a time The CRC register contains a preset value As each data bit is presented to the shift regis ter the bits are shifted to the right The LSB is XORed with the data bit and the result is XORed with the old contents of bit 1 the result placed in bit 0 XORed with the old con tents of bit 14 and the result placed in bit 13 and finally it is shifted into bit 15 This process is repeated until all data bits in a message have been processed Software imple mentation of the CRC 16 is explained in the next section Calculating the CRC 16 The pseudo code for calculation of the CRC 16 is given below Preset byte count for data to be sent Initialize the 16 bit remainder CRC register to all ones XOR the first 8 bit data byte with the
263. ommand see Attach command The master sends a PLC Short Status request the slave responds with data This service provides the master with the capability to read the status of the slave PLC Example Command Block Read the attached slave device short status and store in master device Register Memory Register 201 Word 1 00003 0003 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07208 1C28 SNP Command Number Word 8 00008 0008 Master Memory to store Status R Word 9 00201 00C9 Master Address to store Status Register 201 The Master Memory Type and Address fields must be selected to allow enough room to ac comodate the 12 bytes of short status information returned from the slave PLC The fol lowing table describes most of the PLC Short Status information The short status in formation includes the 6 bytes of Piggyback Status information carried on each response from the slave device See Table 16 in Section 1 for valid memory types and addresses See Table 28 for a detailed description of the Slave PLC Status Word 100 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C The table below includes information the PLC Short Status Status Storage Area Description Word Location Byte Loca
264. ommands are addressed to the special broadcast address and are ac cepted by all SNP X slave devices on a multidrop serial link A broadcasted SNP X com mand contains a single request message and may optionally contain one additional data buffer message To avoid confusion at the master the slave never sends a response to broadcasted command Only some SNP X commands can be broadcasted Since a broadcasted command prohibits a response an SNP X command to read data is not vi able Both the master and slave examine each received message for errors Serial transmission errors parityframing overrun Block Check Code are fatal since the message was not received intact no response can be generated Protocol violations message type error next message info error are also fatal but an error response message can be returned The SNP X session is terminated at once by a fatal error Service request errors invalid request code parameters or data are non fatal an error response is returned and the SNP X session remains active If the slave device detects an error and is able to return a response that is the message from the master was correctly received regardless of content the slave returns an error code within the X Response message If a reportable error is detected during an X Request message which uses a data buffer an X Response message containing the er ror code is returned in lieu of the normal Intermediate Response message 18
265. on of the Port 1 P1 and Port 2 P2 LED indicators middle and bottom LEDs respectively indicate transmit and receive activity on serial ports 1 and 2 respectively The P1 LED middle LED will be ON when data is being transferred through Port 1 the RS 232 port m The P2 LED bottom LED will be ON when data is being transferred through Port 2 the RS 485 port Pin Assignments for CPU 351 352 Serial Ports The following two tables describe the pin assignments for each of the serial ports on the CPU 351 and CPU 352 Table 5 Port 1 RS 232 Signals Pin Signal Number Name Description Gear To Send 6 12 05 RequesttoSend Pin 1 is at the bottom of the connector as viewed from the front of the module Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Table 6 Port 2 RS 485 Signals Pin Signal Number Name Description 3 Nc Necometo 5 Nc NeCometin 34 NC NeCometin 5 EC RTS B ifferential Request To Send CTS A Differential Clear To Send Pin I is at the top left of the connector as viewed from the front of the module Note that Pin 5 provides Isolated 5 VDC power 100 mA maximum for powering external options 7 ee al D Communications Protocols for the CPU 351 352 Serial Ports The SNP and SNP X protocols are the only protocols curr
266. onfigured T2 value selected by the Timeout SNP configuration parameter default is 2 seconds This value may be modified by the SNP X master user interface The optimal Response Time out value depends upon the characteristics of the slave PLC scan that is scan rate commu nication window frequency and length system load and the need to detect and correct communication failures The time required to transmit the largest possible SNP X response message 1015 bytes at the configured data rate is internally added to the Response Timeout value Any non zero Modem Turnaround Time and Transmission Delay values are also internally added to the Response Timeout value Chapter 7 Protocol Definition CCM RTU SNP and SNP X 183 Long Break 184 Buffer Timeout This is the maximum time interval that the SNP X slave will wait for an expected SNP X buffer message from the remote master Failure to receive a buffer message within this time interval causes the slave to abort the SNP X communication session the session must be re established for any further SNP X communication This timeout is used whenever a buffer message is expected during both directed and broadcast requests The Buffer Timeout is not configured or specified by the user interface this time interval is internally calculated as 10 seconds plus the time required to transmit the largest pos sible SNP X buffer message 1008 bytes at the configured data rate This timeout applies only
267. onse Query RTU Protocol RTU Scratch Pad RTU Timeout Usage RUN STOPkey switch S Scratch Pad 44 Scratch Pad RTU Serial Cable Diagrams Index Serial Communications Line Serial Line Interface Serial Port Pin Assignments CPU 351 CPU 352 Serial Ports 8 Session SNP Communication Session SNP X Communication Session Session Type SNP X Set PLC Time Date SNP Command 109 Set Q Response CCM Command 50 Set X Status Bits Address SNP X Com mand Short Status 100 Single Bit Write CCM Command Single Slave Session B7 Mic NM Access Bits X Status Bits 182 Slave PLC Status Word SNP X 85 B SNP and SNP X Protocols 3 SNP Command Examples Attach Autodial Command Cancel Datagram Change Privilege Level p2 Change SNP ID B1 Clear Diagnostic Status Words 79 Establish Datagram Long Attach PLC Short Status 100 Read Diagnostic Status words po Read Program Block Memory Read System Memor Read Task Memory Return Control Program Name Return Controller Type and ID Informa tion 104 Return Fault Table Return PLC Time Date 106 Set PLC Time Date 109 Set X Status Bits Address B2 Toggle Force System Memory Update Datagram Index 5 Index 6 Index Write Program Block i Write System Memor 99 Write Task Memory X Read 84 X W rite B6 SNP Command Summary 77 SNP Programming Exam ples 73 Maste
268. or both ports of the Series 90 70 CMM are shown below 242734 SHIELD 2 RESERVED 9 1 RESERVED 9 RESERVED RS 232 RTS 2 RS 232 CTS B RESERVED NO CONNECTION 6 I RESERVED SIGNAL GROUND TO I RS 232 RS 232 DCD Ly RS 485 SD B G2 1 RS 485 RTS B RS 485 RTS A 00 Gy nsa CS RS 485 CTS A D TERMINATION RD TERMINATION CTS 2 RS 485 RD B RS 485 RD A 3 Figure 3 Serial Port Pin Assignments for the Series 90 70 CMM Note In the figure above SD Send Data and RD Receive Data are the same TXD and RXD used in the Series PLC A and B are the same as and A and denote inputs and A and B denote outputs To termi nate the RS 485 CTS input signal jumper pins 11 and 12 to terminate the RD input signal jumper pins 24 and 25 8 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 Serial Ports for the CMM311 The Series 90 30 CMM has a single serial connector which supports two ports Port 1 applications must use the RS 232 interface Port 2 applications can select either the RS 232 or RS 485 interface NOTE When using the RS 485 mode the CMM be connected to RS 422 de vices as well as RS 485 devices The connector pin assignments for the Series 90 30 CMM are shown
269. or that parameter should remain in effect The initial parameter settings are configured with Logicmaster 90 Example Change the turnaround delay to 1000ms and the retry count to 16 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10 Word 11 Word 12 Word 13 Word 14 Word 15 Word 16 Word 17 Word 18 Word 19 Word 20 Word 21 00015 000F 00000 0000 00008 0008 00009 0009 00000 0000 00000 0000 06004 1774 01000 03 8 65535 FFFF 65535 FFFF 65535 FFFF 65535 FFFF 65535 FFFF 65535 FFFF 65535 FFFF 65535 FFFF 00016 0010 65535 FFFF 65535 FFFF 65535 FFFF 65535 FFFF 7 CCM Data Block Length NOWAIT Mode Status Word Memory R Status Word Address minus 1 Register 10 Not used Not used Command Number Turnaround Delay 0 65534ms ENQ_ACK_TIMER 0 65534ms SOH_TIMER 0 65534ms HEADER_TIMER 0 65534ms HEADER_ACK_TIMER 0 65534ms STX_TIMER 0 65534ms DATA_TIMER 0 65534ms DATA_ACK_TIMER 0 65534ms EOT_TIMER 0 65534ms COUNT 0 50 HEADER_COUNT 0 50 DATA_BLK COUNT 0 50 RS 485 operating mode 2 4 or FFFF Re enable RS 485 receiver delay 0 65534 ms See Chapter 7 Protocol for a description of the use and value of each CCM timer and counter The RS 485 operating mode parameter allows the RS 485 driver to be configured to oper ate either as a 2 wire or 4 wire tr
270. or until a timeout or other fatal error occurs in either the master or slave device Request and Response Once communication has been established between the master and the slave devices the master can send a request to the slave The slave then sends a response to the mas ter A request or response consists of a Mailbox message optionally followed by one or more Buffer messages Both the master and slave perform error checking on all received messages and return an acknowledgement to the sender of the message The basic SNP message flow for SNP requests and responses is shown in the figure be low Request Response Optional Optional Figure 23 Message Flow Request and Response Every SNP message must be acknowledged Once a message has been sent if an ac knowledgement is not received within the T2 time interval the SNP communication is aborted The master must establish a new communication session Every SNP request must receive a response After the master has completed a request all request messages have been sent and acknowledged if the first message of the re sponse is not received within the T5 time interval the SNP communication is aborted The master must establish a new communication session Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C SNP Timers GFK 0582C When a request or response contains one or more Buffer messages the next Buffer mes sage must follow the previous
271. orkmaster or PC XT Computer Additional Adapter Required Table 49 Miniconverter Specifications Mechanical RS 422 RS 232 Electrical and General Voltage Supply Typical Current Operating Temperature Baud Rate Conformance Ground Isolation 15 pin D shell male for direct mounting to Series 90 serial port 9 pin D shell male for connection to RS 232 serial port of a Workmaster II computer or Personal Computer 5 VDC supplied by PLC power supply Version IC690ACC901A 150 mA Version B IC690ACC901B 100 mA 0 to 70 C 82 to 158 F 38 4K Baud maximum EIA 422 Balanced Line or ELA 423 Unbalanced Line Not provided GFK 0582C Chapter 8 Serial Cable Diagrams and Converters 233 Appendix Glossary of Terms GFK 0582C A In the Series 90 PLCs serial communications a number of special terms are used Also many of these terms are referenced by acronyms For example a Programmable Logic Controller PLC computer or other device that connects to a network is called by the general name station This appendix contains a concise alphabetized listing of conventional communications terms and where applicable their associated acronyms Most of these terms but not necessarily all are used in this manual 235 Commonly used Acronyms and Abbreviations ASCII ACK BCC BCD BEM BTM BPS CCM CMM COMREQ CPU CRC CTS DCD DCE DMA DOS DTE DTR EIA EEPROM ENQ EOT EPROM ETB
272. ory Term commonly used when referring to the memory circuits within the PLC used for storage of user ladder programs Volatile Memory A memory that will lose the information stored in it if power is removed from the memory circuit devices Word A measurement of memory length usually 16 bits long for the Series 90 PLC Write To transfer record or copy data from one storage device to another Wye Cable A cable supplied with each Series 90 30 CMM module which separates serial ports 1 and 2 from the combined serial port on the CMM module Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Appendix ASCII Code List b Thia appendix provides a table of the standard ASCII American Standard Code for In formation Interchange characters 48 30 91 5B ex 00 0 gt 2 1 4 5 Be oD lt gt Z A B C D E F G H I J K L M N Q R S T U V W X Y Z GFK 0582C 247 Appendix Compatibility C This section compares the Series 90 CCM implementation with the CCM implementa tion of the Series Six Series One and Series Five PLCs The following table lists the CCM Commands supported by the Series 90 PLC Table 50 Series 90 CCM Commands GFK 0582 249 The following table summarizes those Series Six commands not supported by the Series 90
273. ory types and addresses Note The SNP master on the CMM module and CPU 351 and CPU 352 serial ports limit this command to a total data length of 2048 bytes 1024 words Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Write Program Block Memory 07207 1 27 0582 Available Modes Master for communication with Series 90 70 slave device only Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Write request with data the slave responds This service provides the master with the capability to write the Local Subblock Data segment L reference table of a specified Program Block in the slave When the memory type of the master reference table does not specify word access the slave data will be padded with the value 0 as necessary Only a Series 90 70 PLC slave device sup ports this service a Series 90 20 or Series 90 30 slave device will produce unpredictable results Example Command Block Write to the attached slave device Program Block Memory L Words 1 10 from mas ter device Register Memory Registers 201 210 Slave device Main Program name slave device Program Block name PBLOCK1 Words 12 15 contain the slave device Main Program name words 16 19 contain the slave device Program Block name Word 1 00013 000D SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3
274. p CMM to CMM with Flow Control None 2 WireRS 422 5 485 CMM to Multiple CMMs 2 Wire The Isolated Repeater Converter RS 422 Isolated Repeater RS 232 Converter Logic Diagram Simple System Configuration Using the Isolated Repeater Converter Complex System Configuration Using the Isolated Repeater COonyerter s eis te Se be esate iere s ne Cable A RS 232 CMM To Converter Cable RS 422 CMM To Converter Cable RS 422 Twisted Pair Cable D RS 422 Twisted Pair Cable E RS 232 Converter to CMM x Series 90 PLC Serial Communications User s Manual October 1996 29 130 131 132 133 134 134 134 144 148 172 172 178 213 213 213 213 214 214 216 217 217 217 218 218 219 219 221 222 225 225 226 226 227 228 229 GFK 0582C Contents Figure 48 Series 90 SNP to RS 232 Miniconverter 230 Figure 49 Miniconverter to 232 Figure 50 Miniconverter to Workmaster 5 2 232 Figure 51 Miniconverter to 9 Pin Workmaster or PC XT Computer Additional Adapter Required 233 Figure 52 Modems Used in the Communications Line 258 Figure 53
275. pe was received when X Attach Response was required when establishing a new SNP X communication session Com munications have not been established Aninvalid next message type value was detected in X Attach Re sponse message when establishing a new SNP X communicationses sion Communications have notbeen established Aninvalid response code was detected in an X AttachResponsemessage whenestablishing a new SNP X communication session Communica tions have not been established Anexpected X Attach Response message was not received within the re sponsetimeoutinterval when establishing a new SNP Xcommunication session The master has retried the X Attach message twice without re ceivinga response Communications have not been established Aparity errorhasoccurred on an X AttachResponse message when rees tablishingan existingSNP X communication session Communications havenot been established A framing or overrun error has occurred on an X Attach Response message when reestablishing an existing SNP X communication ses sion Communications have not been established ABCC Block Check Code error has occurred on an X Attach Response messagewhen reestablishing an existing SNP Xcommunicationsession Communications have not been established An invalid message type was received when an X Attach Response was required when reestablishing an existing SNP Xcommunication session Communications have not been established
276. pecified by the configuration 24 18 Communication was aborted after a peer enquire was NAKed 32 times by the external de vice ora number specified by the configuration 25 19 Communication was aborted when CCM did not receive a valid response to a peer enquire after 32 attempts or a number specified by the configuration 26 1A Atimeoutoccurred during an attempt to transmit on a port due to CTS being in an inactive state too long Anerroroccurred when data was being transferred between CCM and the Series 90 CPU AwmwliCOMMREQdamblokienghwasspedied os 4 TwcOMMREQismwadonapeerpot o 5 5 ___ The COMMREO data block values are out of range GFK 0582C Chapter 5 CCM Service 47 Section 3 CCM COMMREQ Programming Examples This section provides an explanation and example of each CCM Command Each exam ple includes values for the Command Block A ladder program example is also pres ented here for your convenience Before attempting to execute the CCM Command examples make sure you have first done the following Installed the CMM in the desired rack see Chapter 2 and connected a cable be tween the Logicmaster 90 or Hand Held Programmer and the PLC Performed Rack Configuration and selected the desired communications parameters for the CMM See Chapter 2 Verified that configuration is valid Stored the con
277. pecified in the request message Requests which are broadcast never invoke a response For this reason only an X Attach or X Write request are mean ingful in the broadcast context A broadcast X Attach request establishes an SNP X session with each and every SNP X slave on a multidrop seriallink Subsequent SNP X requests may then be addressed as desired A broadcast X Write request sends the same data to all SNP X slave devices that have established an SNP X session AllSeries 90 SNP X devices allow the RTS serial port signal to be used as a modem ing signal The RTS signal is always asserted for the Modem Turnaround Time interval prior to each data transmission and is removed after the transmission is complete If the Modem Turnaround Time value is non zero the RTS signal will precede the outgoing data Serial ports on the CMM modules may be configured for either hardware flow control full RIS CTS operation or no flow control CTS is ignored Series 90 CPU slave devices do not support hardware flow control the CTS signal is always ignored Chapter 7 Protocol Definition CCM RTU SNP and SNP X 181 Slave PLC Status Word Each successful SNP X response contains a word which indicates the latest PLC Status Word from the slave device This word conforms exactly to the PLC Status Word con tained within the Series 90 PLC Piggyback Status data See the Slave PLC Status Word Data table Among other things this word contains bits that
278. ponse x 78h 3 82 X Write response code 82h 10 17 End of block character 17h marks the beginning of the SNP X message trailer 11 14 00 00 00 00 Notused always 0 15 03 Computed Block Check Code for this example X Write Data Buffer Message 1 1B Start of message character 1Bh 20 bytes of data to write R100 R109 41 42 43 44 45 46 47 48 49 50 23 17 End of block character 17h marks the beginning of the SNP X messagetrailer 24 27 00 00 00 00 Notused always 0 28 58 Computed Block Check Code for this example X Write Response Message 1 1B Start of message character 1Bh 58 SNP X Intermediate Response X 58h 3 82 X Write response code 82h 4 5 PLC Status Word 00 00 for this exampleonly 6 7 Status codes Major and Minor errors Data Length always 0 8 9 10 17 End of block character 17h marks the beginning of the SNP X message trailer 11 14 00 00 00 00 Not used always 0 15 07 Computed Block Check Code for this example GFK 0582C Chapter 7 Protocol Definition RTU SNP and SNP X 203 Example of Broadcast X Write Command for 2 Bytes or Less This example shows the message exchange of a broadcast X Write command without a data buffer Note that there is no response message to the broadcast request Master Slave X Write Request message 1B 58 FF FF FF FF FF FF FF FF 02 48 12 00 01 00 04 00 17 00 00 00 00 2D Wait Broadcast Delay time No X Write Response to
279. procedure to calculate a BCC byte over a message range is provided below byte procedure calc bcc msg len byte msg Pointer to start of SNP X message int len Number of bytes to compute BCC over int i int bec Temp BCC byte longer than byte to handle wrap around during rotate 1 0 bcc 0 while i lt len the Temp BCC byte with message byte bcc bec msg i Rotate Temp BCC byte left by 1 bit bcc bcc lt lt 1 Wrap MSB into LSB for rotate bcc bec bec gt gt 8 amp 0x01 Increment i for next msg byte i Return the computed BCC byte return byte bcc GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 185 SNP X Protocol Sequence This section describes the sequence of messages used by the SNP X Protocol to establish an SNP X communication session and to transfer data All message exchanges consist of a request and a response the master device sends requests and the slave device returns a response SNP X commands may be directed or broadcasted Directed SNP X commands are ad dressed to a specific slave device and are accepted only by that device Directed com mands contain both a request and a response A directed SNP X command contains single request message and may optionally contain one additional data buffer message The response always contains a single response message Broadcasted SNP X c
280. qox DX x eee rr EO pesesesosesiene X x x x X X X X X X X X X X X m a p x gt lt x gt lt I EE Series 90 is Read Analog Inputs Series Five and Series Six are Read Registers CIMPLICITY is Read Input Registers 253 Appendix Serial Line Interface E The Serial Line Interface encodes decodes messages according to a particular informa tion code and performs parity checking of each character received over the serial line The drivers for the transmission line are also part of the Serial Line Interface This appendix covers the following topics Information Codes Transmission Errors and Detection Asynchronous Transmission Serial Communications Line Information Codes Aninformation code is a standard by which numbers letters symbols and control char acters are presented for serial transmission In the CCM protocol characters in headers as well as control characters are encoded Other characters such as those occurring in data are uncoded binary data There are a number of different coding schemes used today but the most common and the type used in CMM communications is the Ameri can Standard Code for Information Interchange or ASCII code As shown in the illustration below the CMM uses an 8 bit character code plus an option al parity bit to transfer serial data
281. quest the slave returns an Intermediate Response message and waits for the X Buffer message Upon receiving the X Buffer message the SNP X slave processes the write to the PLC reference table The SNP X slave returns an appropriate X Response message to con clude the command Master Slave X Write Request message 1B 58 00 00 00 00 00 00 00 00 02 08 63 00 0A 00 00 00 17 54 1C 00 00 13 Intermediate Response 1B 78 82 00 00 00 00 00 00 17 00 00 00 00 03 X Write Data Buffer 1B 54 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 17 00 00 00 00 58 X Write Response 1B 58 82 00 00 00 00 00 00 17 00 00 00 00 07 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Explanation of Direct X Write Command More than 2 Bytes Byte Hex Value Description Number X Write Request Message Startof message character 1Bh SNP X Command X 58h SNPID of target slave X Write request code 02h Segment Selector R in word mode Data Offset 0063h 99 zero based R100 Data Length 000Ah 10 words Notused always 0 19 End of block character 17h marks the beginning of the SNP X message trailer 20 Next message type Buffer T 54h 21 22 Next message length in bytes 001Ch 28 23 Not used always 0 24 Computed Block Check Code for this example Intermediate Response Message 1 1B Start of message character 1Bh 78 SNP X Intermediate Res
282. quires 3 bytes to represent it Two registers require 4 bytes The Master Memory Type and Address for Datagram ID fields specify the location in the mas ter PLC memory where this COMMREQ returns the 1 byte Datagram ID The Datagram ID is obtained from the slave device when the datagram is successfully established The Datagram ID must be used by the master to identify this datagram in all subsequent commands See Table 16 in Section 1 for valid memory types and addresses If the datagram is designed to access Local Subblock Memory L or Main Program Memory in a Series 90 70 slave device the Local Subblk or Main name field must contain the Main Program name for P or Local Subblock name for L as an ASCII string Otherwise this field is set to null 0 Each datagram consists of one or more Point Formats A Point Format defines a memory range within the slave device The Number of Point Formats field contains the number of Point Formats being defined Each Point Format consists of 3 words the memory type the memory address and the count of memory elements to be read See Table 16 and the Notes below for memory types and address The memory element count may range from 1 to 256 only Examples of Point Formats are shown above in Words 18 20 and in Words 21 23 3 word Point Format is required for each Point Format counted in Word 17 A maximum of 32 point formats is allowed in a datagram Chapter 6 SNP Service 113 114
283. r a 6 foot 2 meter serial extension cable and a 9 pin to 25 pin Converter Plug as sembly The 15 pin SNP port connector on the Miniconverter plugs directly into the serial port connector on the Series 90 30 power supply Series 90 70 CPU or Series 90 20 CPU The 9 pin RS 232 port connector on the Miniconverter connects to an RS 232 com patible device a44985 RS 422 RS 232 PORT PORT Figure 48 Series 90 SNP to RS 232 Miniconverter When used with an or compatible computer one end of the extension cable plugs into the Miniconverter s 9 pin serial port connector the other end plugs into the 9 pin serial port of the computer The Converter plug supplied with kit is required to convert the 9 pin serial port connector on the Miniconverter to the 25 pin serial port con nector on the GE Fanuc Workmaster computer or an IBM PC XT or PS 2 Personal Computer The GE Fanuc Workmaster computer requires an additional adapter not supplied with kit please contact your local GE Fanuc PLC distributor for use with the Miniconverter 230 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Pin Assignments RS 232 Port The pinout of the Miniconverter is shown in the following two tables The first table shows the pinout for the RS 232 port The direction of signal flow is with respect to the Miniconverter
284. r Slave Operation 170 NP Message Format 171 Protocol 170 NP Request Response 172 NP Retry and Recovery NP 7 Status Word leo Timers 173 e via Long Attach 119 119 1 174 Update Real Time Datagram 99 2 VU VU NHN NH SNP X Commands 195 X A ttach Command 19 X Read Command 198 X W rite Command 200 SNP X Protocol 180 SNP X Protocol Sequence 186 SNP X State Tables 207 SNP X Master State Table SNP X Slave State Table SNP X COMMREQ Programming Exam ples 77 Set X Status Bits Address B2 X Read 84 X W rite B6 Software Configuration CCM Com mand 52 Source Memory Address CCM B7 Standards Interface State Tables 137 Status Word CCM Status Mes ee SNP Status Word 60 Synchronize PLC Time Date 109 T Target ID CCM B8 Target Memory Address Target Memory Type CCM B7 Timeout Errors 57 Timeouts 1 Timeouts ia Timers SNP X Broadcast 5j Buffer Timeout 184 Response Timeout Timers SNP Default SNP Timer Values SNP Timers 173 Toggle Force Memory Types Toggle Force System Memory SNP Com mand 10 Transmission Delay di d Errors and Detection 55 256 Transmission Timing Errors Transmission AsynchronousD57 U Update Datagram SNP Command 115 Update Real Time Datagram 178 Update Real Time Dat
285. r for Data ACK to Header Receive Send ENQ EOT State 1 Receive PLC Data Receive ACK EOT State 1 State 1 E E Receive Send NAK EOT EOT State 1 State 1 E F D Receive State 1 State 1 State 1 EOT F F Receive State 4 SOH EOT State 1 State 1 L E E Receive Send ACK Good State 6 7 Header Receive Send Send State 8 Send STX EOT EOT EOT State 1 State 1 State 1 E E M E Receive Send Send Send Send Char EOT EOT EOT EOT actr State 1 State 1 State 1 State 1 E E E E Receive Send Good ACK Data State 7 9 H Receive Send Send Send Send Bad EOT EOT EOT EOT Data State 1 State 1 State 1 State 1 Header E E E E Receive Good Send Send EOT Send Send Send Send EOT State 1 EOT EOT EOT EOT State 1 State 1 State 1 State 1 State 1 E E E E 142 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C CCM Slave Actions G Send ACK SEND QRSP 1 A DO ACK 1 GFK 0582C Start DELAY TIMER While DELAY TIMER Of If char received DELAY ACK TIMER 0 DO ACK 0 Remain in State 1 If DO_ACK 1 Send 3 char ACK to ENQ Start SOH_TIMER Transition to State 3 Zero DATA_BLK_COUNT Send Data Block Start DATA_ACK_TIMER Remain in State 6 If last block Send EOT Transition to State 1 Else wait for PLC data Remain in State 6 If DATA BLK
286. r occurs Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 s The X READ and X WRITE bits indicate that a remote X request has been successfully completed by this slave device The appropriate bit is set after completion of each suc cessful remote read or write X request The PLC application ladder must detect the X READ and X WRITE bits in every sweep Upon detection each bit must be immedi ately cleared in order to correctly detect the next remote X request completion Note The X Status Bits operate slightly differently for slave devices on CMM modules the CPU 351 and CPU 352serial ports and on the PLC CPU built inserial port For the PLC CPU the X Status Bits are located at predefined memory locations and are always updated after SNP X slave operation TheX READ and X WRITE bits remain set for exactly one sweep and may not be cleared by the PLC ladder application Chapter 6 SNP Service 83 L6 X Read 07101 1BBD Available Modes Master Description Remote command The master establishes a new SNP X communication session with the slave device if the proper session is not already active The master then sends an X Read request to the slave device the slave responds with data This service is provided to per mit quick read access to various reference tables within the slave PLC This command reads enough data from the slave reference table to fill the specified number of
287. r s Manual October 1996 GFK 0582C Write Task Memory 07205 1C25 s Available Modes Master for communication with Series 90 70 slave device only Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Write request with data the slave responds This service provides the master with the capability to write the Main Data segment reference table of the slave s main control program task When the memory type of the master reference table does not specify word access the slave data will be padded with the value 0 as necessary Only a Series 90 70 PLC slave device supports this service a Series 90 20 or Series 90 30 slave device will produce unpredictable results Example Command Block Write to the attached slave device Main Control Program Task Memory P Word 1 from master device Input Memory I Inputs 1 10 Slave device Main Program name MAINI Words 12 15 contain the Main Program name of the slave device Word 1 00009 0009 Word 2 00000 0000 Word 3 00008 0008 Word 4 00000 0000 Word 5 00000 0000 Word 6 00000 0000 Word 7 07205 1C25 Word 8 00001 0001 Word9 00010 000A Word 10 00070 0046 Word 11 00001 0001 Word 12 16717 414D Word 13 20041 4 49 Word 14 00049 0031 Word 15 00000 0000 SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register
288. red as shown below Header Start of Message Message Type Command Data Optional Data Bytes3 N Trailer End of Block Next Message Next Message Not Block Check Type Length Used Code Byte 1 Byte N42 Bytes N43 N 4 Byte N 5 Byte N 6 The contents of the Header Command Data and Trailer for the X Buffer message are further described below Header Byte1 Start of Message 1Bh Startof message character Byte2 Message Type 54h SNP X Message 54h T Command Data Bytes3 N Optional data Optional data 1 1000 bytes Trailer End of block character Bye 2 __Next Message Type 9 Nextmessagetype always0 Bytes 3 4 NextMessageLength 0 Next message length always 0 Bye NS Unused always0 Byte N 6 BlockCheckCode Calculated BCC for this message The size of the Optional data field depends upon the amount of data in the message The size of the entire X Buffer message was specified by the Next Message Length field in the preceding X Request message 194 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C SNP X Commands This section describes the SNP X protocol message exchange for each SNP X command Both directed and broadcast commands are described Examples with actual values are provided for each SNP X command X Attach Command Before any data can be transferred between SNP X devices an SNP X communication session must be es
289. referenced as RS 485 in this manual are Maximum cable length 4000 feet 1200 meters Maximum data rate 1 Megabits second at 4000 feet and 10 Megabits second at 40 feet 12 meters Logic assignments differential inputs not referenced to ground Space or logic0 Circuit is 200 mv to 6 v with respect to circuit B Mark or logic1 Circuit A is 200 mv to 6 v with respect to circuit B 25 pin D type connector 30 interchange circuits For a complete explanation of the electrical and mechanical characteristics of these inter faces see Standards RS 449 RS 422 and RS 485 Appendix E The Serial Line Interface 261 Appendix Communication Networks term network system configuration refers to the way in which computers termi nals and communication equipment are interconnected With Series 90 PLCs the fol lowing data communications system configurations are possible Point to Point Peer to Peer or Master Slave Multidrop Single Master Multiple Slaves Modem Transmission Point To Point Point to Point connection is the simplest type of system configuration when using this method only two devices are connected to the same communication line Either 5 232 or 5 422 can be used They can be connected in peer to peer mode where both devices can initiate communications or in master slave mode where only the master can initiate communications The following figures illustrate the po
290. response is expected to be either CONNECT or OK GFK 0582C Chapter 6 SNP Service 69 Note Minor Error Codes 1 21 indicate non fatal errors the SNP X communica tion session is not terminated Table 23 Minor Error Codes for Major Error Code 15 0 Error Status SNP X Slave Error Description 1 The service request code an X Request messageisunsupported or service request code in an X Request message is unsupported or invalid at this time This error may occur if an SNP Xcommunication session has not been successfully established at the slave device 2 02h Insufficient privilege level in the slave PLC CPU for the requested SNP X service Password protectionat PLC CPU maybe preventing the requested service Invalidslave memory type in X Requestmessage a CE Invalidslavememory address or range in X Requestmessage Invalid data length in X Request message Data length must be non zero and may not exceed decimal 1000 bytes X Buffer data length does not match the service request in X Requestmes sage The X Buffermessagelengthis obtained from the NextMessageLength field in the X Request message the length of the data within the buffer mes sageis always the message length minus 8 bytes 7 07h Queue Full indication from Service Request Processor in slave PLC CPU Theslaveis temporarily unable to complete the service request the master should try again later It is recommended that the master wait at least 10 msec before
291. rol and parity values can be configured Modbus is a trademark of Gould Inc GFK 0582C Chapter 1 Introduction 3 Chapter The CMM Description 2 Installation and Configuration This chapter describes the Communications Coprocessor modules CMM311 CMM711 and explains how to install and configure the modules Also included is a discussion of the system operation of the modules in the Series 90 PLC The chapter is divided into two sections Section 1 Description of CMM Hardware and Operation Section 2 Installing and Configuring the CMM Overview of the CMM The Communications Coprocessor Module CMM 15 high performance microcomput er designed to perform communications functions in a Series 90 PLC system The CMM is closely coupled to the Series 90 PLC and may be configured to behave as two independent communications ports For many applications each port behaves like an independent window into the PLC for access by other devices such as industrial computers and color graphic terminals Many applications which accessed the Series Six PLC user reference tables using CCM or RTU protocols can now support the Series 90 PLC with little or no change Many applications which access the Series 90 PLC via the built in serial port on the PLC CPU using SNP protocol can now access the PLC via the CMM module Each CMM occupies a single slot in a Series 90 PLC rack Up to 63 CMMs may be installed in a single Series 90 70 PL
292. ror code See table of Minor Error Codes below SNP X slave error An erroroccurred within the SNPX task in the re mote slave device The minor error code contains the specific error code See the table of Minor Error Codes below Portconfigurator error Problem with sending mail to the slave Service Request task Series 90 70 PLC CPUs only Problem with getting mail from the slave Service Request task Series 90 70 PLC CPUs only Slave SNP task timed out before receiving an SRP response Series 90 70 PLC CPUs only Slave SNP task could not find the requested datagram connection Series 90 70 PLC CPUs only Slave SNP task encountered an error in trying to write the datagram Series 90 70 PLC CPUs only Slave SNP task encountered an error in trying to update the datagram Series 90 70 PLC CPUs only 0582 Chapter 6 SNP Service 61 L6 62 SNP Minor Error Codes The meaning of each Minor Error Code depends upon the Major Error Code for which it is defined Consult the appropriate Minor Error Code table for the indicated Major Error Code Table 18 Minor Error Codes for Major Error Code 5 Error Status Service Request Error Description Ei ER Cannotreplacel Omodule Eo Rskaddressoutoframge o ES Invalidpassword O Programmerisalready attached Could notreturn block sizes EB
293. ror has oc cured in processing a new configuration E c 0h Invalid COMMREO status word location E Invalid COMMREQ data Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Section 3 SNP COMMREQ Programming Examples This section provides an explanation and example of each SNP command Each example includes values for the Command Block A ladder program example is also presented here for convenience Before attempting to execute the SNP command examples make sure that the following steps have been performed CMM module has been installed in the desired PLC rack see Chapter 2 The rack configuration has been performed and the desired communications param eters have been selected for the CMM module using the Logicmaster 90 configura tion software or the Hand Held Programmer see Chapter 2 The rack configuration has been verified and is valid The rack configuration has been stored into the PLC see Chapter 2 If using Logic master 90 the configuration in the PLC has been verified equal to the Logicmaster 90 configuration The serial communications cable has been installed between the master and slave devices for operation of any remote commands See Chapter 8 for cable diagrams The ladder application program below or a similar program has been written and stored into the PLC Note In the examples below the CMM module has been inst
294. ror occurs the CMM aborts its end of the SNP communication A new communication session must be established Fatal local errors are indicated by Major Error Code 12 0Ch and Minor Error Codes 32 20h and higher See Chapter 6 SNP Service for a listing and descrip tion of all SNP major and minor error codes A number of timers are defined to support the SNP Protocol Adjustable timers are provided because different SNP devices can coexist on a given SNP serial link each with its potentially different processor and different processing ca pability The SNP Protocol provides several timers whose values may be adjusted by the user to allow the serial communication link to run as efficiently as possible for a given situation The default value for each SNP timer is selected by the CMM configuration Timeout pa rameter Each of the four Timeout selections establishes a set of values for all SNP timers The default SNP timer values for each configuration selection are listed in Table 4 SNP Timer Values for Timeout Selections Non default SNP timer values must be provided Chapter 7 Protocol Definition CCM RTU SNP and SNP X 173 by the Long Attach SNP command Long Attach command issues an SNP Parame ter Select message to negotiate new timer values between the master and slave devices SNP timers revert to the configured default values when a new Attach request is sent Attach command Non default SNP timer values must be re e
295. rride Table Output Override Table Appendix C CCM Compatibility Bit Set Bit Set Bit Clear Bit Clear Bit Toggle Bit Toggle 251 252 The next two tables compare the Series One and Series Five memory types with those supported by the Series 90 CCM Table 54 Series One Memory Types vs Series 90 CCM Memory Types Series One CCM Series 90 CCM Memory Type Target Table Memory Type Target Table 1 CO e s eMsmehmd ____ O o 3 DignosieStsusWords 1 The addressing scheme for the Series One differs from that of the Series 90 when accessing I O points 2 Scratch pad definitions are not the same in the Series One PLC and the Series 90 PLC See Table 11 for the Series 90 scratch pad layout 3 Diagnostic status words and error code definitions are different in the Series One PLC and the Series 90 PLC See Table 12 for the Series 90 diagnostic status words and refer to Table 15 for the Series 90 error code definitions Table 55 Series Five Memory Types vs Series 90 CCM Memory Types Series Five CCM Series 90 CCM Memory Type Target Table Memory Type Target Table 1 Registers Register Table Dus 31 7 Scratch EE CCM Scratch Pad v9 i DiagnosticStatus Words rz DiagnosticStatus Words The Series Five local and special inputs do not exist in the Series 90 input table Allinputs are equivalent and it is up to the user to determine their functionality
296. ry Type and Address for Piggyback Status fields are optional If specified an area must be provided which can accomodate the 6 bytes of Piggyback Status in formation The Piggyback Status information is returned with every SNP response mes sage sent by the slave device Once the Piggyback Status area is specified the Piggyback Status information is written there as each successful SNP response message is received for as long as the connection remains established If the Piggyback Status memory type and address values are 0 that is a Piggyback area is not specified the Piggyback Status information is ignored and is not provided to the PLC ladder application program See Table 27 for a description of the Piggyback Status Data area See Table 16 in Section 1 for valid memory types and addresses Note The Update Real Time Datagram command may be sent to any slave de vice as specified by the slave SNP ID This command issues a Break se quence which will cancel any previous Attach or Long Attach command and abort any existing SNP communication A new Attach or Long Attach command must be issued to re establish normal SNP communication after all Update Real Time Datagram commands have been completed Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C s Long Attach 07300 1 84 GFK 0582C Available Modes Master Description Remote command The Long Attach command provides the capability to specify a hos
297. s The CRC consists of 2 check characters generated at the transmitter and added at the end of the transmitted data characters Using the same method the receiver gener ates its own CRC for the incoming data and compares it to the CRC sent by the transmit ter to ensure proper transmission A complete mathematic derivation for the CRC will not be given in this section This information can be found in a number of texts on data communications The essential steps which should be understood in calculating the CRC are as follows The data bits which make up the message are multiplied by the number of bits in the CRC The resulting product is then divided by the generating polynomial using modulo 2 with no carries The CRC is the remainder of this division Disregard the quotient and add the remainder CRC to the data bits and transmit the message with CRC The receiver then divides the message plus by the generating polynomial and if the remainder is 0 the transmission was transmitted without error A generating polynomial is expressed algebraically as a string of terms in powers of X such as X X X or 1 which can in turn be expressed as the binary number 1101 A generating polynomial could be any length and contain any pattern of 1s and 0s as long as both the transmitter and receiver use the same value For optimum error detection however certain standard generating polynomials have been developed RTU protoc
298. s Word refer to Chapter 6 SNP Service Operation of the Communications Request GFK 0582C The figure and text below describe generally what happens when a Communications Request is initiated PLC CPU CMM 44917 BACKPLANE SERIAL LADDER T COMMUNICATIONS PROGRAM co CCM OR SNP LINE MMAND BLOCK PROTOCOL e COMMREQ SOFTWARE TO TARGET DEVICE CPU MEMORY DATA STATUS WORD STATUS WORD i Figure 12 Operation of the Communications Request 1 ACommunications Request is initiated when a COMMREO ladder instruction is activated At this time details of the Communications Request are sent from the PLC CPU to the CMM in a Command Block The Command Block is transferred through the backplane if the CMM is in a local rack and through the Bus Expansion Modules and backplane if the CMM is in an expansion rack 2 Some requests are referred to as local requests These requests are between the PLC CPU and the CMM specified by the COMMREO instruction only All communica tion takes place over the backplane or Bus Expansion Moduless and backplane No data is sent over the serial line 3 Forremote requests such as Read or Write requests the CMM interprets the in formation in the Command Block and forwards the request over the serial line to the target device another CMM or a host for processing The data is then transferred from the target device to the initiating device Read requests or from the initiating device to th
299. s a communication the target must respond within a cer tain amount of time or a timeout will occur causing the communication to be aborted During a CMM communication there are a number of instances in which a timeout can occur For a detailed explanation of these instances refer to Chapter 7 Protocol Defini tions AsynchronousTransmission GFK 0582C Asynchronous serial transmission is used in CMM communications Although there is no synchronizing clock used the transmitting and receiving equipment must be operat ing at the same bit rate or errors mentioned in the previous section will occur The general format for asynchronous communications includes a start bit eight data bits an optional parity bit and a stop bit Appendix E The Serial Line Interface 257 Table 58 Serial Data Format Serial Data Format Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8 Bit 9 Bit 10 optional ACTIVE DATA BITS When the receiver detects the leading edge of the start bit which is always logic 0 a tim er is triggered to allow sampling to occur in the middle of each bit After the last data bit or the parity bit has been received the logic state of the line must be a 1 for at least one bit time before receiving the next character If no more characters are to be sent the line will be maintained in the 1 state logic1 Parity Stop Bit Bit optional logicO First Order of transmission
300. s a main CPU rack or as an expansion rack Racks are available that have either 5 or 9 slots for modules plus provision for a power supply or power supply connection in the leftmost slot The rack shown in the previous illustration has 9 slots for modules The rack in which the CPU resides requires a power supply in slot PS and a CPU mod ule in slot 1 Slot 1 in the CPU rack is reserved for the CPU module in an expansion rack slot 1 is reserved for the Bus Receiver Module BRM A Bus Transmitter Module must be installed in slot 2 of rack 0 if it is a version B module version A of the BTM must be located to the right of all other GE Fanuc boards The BTM is required for parallel communications with the programmer or if multiple racks are to be in a system The remaining slots can contain combinations of I O or intelligent modules to suit the application program The CMM can be installed in any slot except for slot 1 in any rack in the system There can be no empty slots to the left of option modules or I O modules using interrupts unless a Blank Slot Interrupt Jumper is installed in the empty slot in a Series 90 70 PLC system If more I O is required in the system than can be contained in a single rack additional racks can be added to the system up to a maximum of eight racks including the CPU rack Series 90 30 PLCs For Series 90 30 PLCs the CMM must reside in the CPU rack baseplate There is a slot for the power supply and slot 1
301. s and responds to another Peer device Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C After configuration the protocol is enabled on the selected port s The pro tocol can be enabled on none one or both of the serial ports of the CMM module using either the RS 232 or RS 422 5 485 electrical standard Essentially any combination of protocols ports and electrical standards are available with one exception The Series 90 30 CMM cannot support 5 422 5 485 on port 1 Port selection data rate parity flow control timeouts turnaround delay and retry values can be configured RTU Protocol RTU protocol is included in the EPROM software for both the Series 90 70 and Series 90 30 CMM modules RTU protocol as implemented on the CMM is a subset of the Modbus Remote Terminal Unit serial communications protocol The RTU protocol as implemented on the CMM provides for Slave operation only Slave theresponding device in a Master Slave system After configuration the RTU protocol is enabled on the selected port s The RTU proto col can be enabled on none one or both of the serial ports of the CMM module using either the RS 232 or RS 422 RS 485 electrical standard Essentially any combination of protocols ports and electrical standards are available with one exception The Series 90 30 CMM cannot support 5 422 5 485 on port 1 Port selection station address data rates flow cont
302. s must be selected to accomodate the requested number of Diagnostic Status Words See Table 16 in Section 1 SNP Diagnostic Status Words The following table specifies the contents of the SNP Diagnostic Status Words Table 26 SNP Diagnostic Status Words Definitions Word Number 1 2 3 Word 4 Word 5 Word 6 Word 7 Words 8 13 Word 14 Words 15 20 Chapter 6 SNP Service Error SNP Status Word NumberofSuccessfulRequests Responses Number of Error Requests Numberof Aborts Number of Retries sent Number of NAKs sent Number of BreakSequences Received Reserved 00h SNP Software VersionNumber First 6 words of error COMMREO Data Block 79 80 Error SNP Status Word This word indicates the major and minor error code values of the most recent COMMREO error or internal SNP error This word follows the format and contents of the SNP Status Word See Section 2 SNP Status Word for complete details Number of Successful Requests Responses This word indicates the number of successful completions or SNP responses For a master device this value indicates the number of successful COMMREO completions this value also includes any additional messages exchanged to keep the SNP communications alive For a slave device this val ue indicates the number of SNP responses successfully sent to the remote master this value also includes any messages sent to keep the SNP communication ali
303. s of a start bit 0 eight data bits an optional parity bit and one stop bit 1 Between charac ters the line is held in the 1 state MSB Data Bits LSB Parity E My o Message Termination Each station monitors the time between characters When a period of three character times elapses without the reception of a character the end of a message is assumed The reception of the next character is assumed to be the beginning of a new message The end of a frame occurs when the first of the following two events occurs The number of characters received for the frame is equal to the calculated length of the frame A length of 3 character times elapses without the reception of a character Timeout Usage Timeouts are used on the serial link for error detection error recovery and to prevent the missing of the end of messages and message sequences Note that although the GFK 0582C Chapter 7 Protocol Definition RTU SNP and SNP X 147 module allows up to three character transmission times between each character in a message that it receives there is no more than half a character time between each char acter in a message that the module transmits After sending a query message the master should wait approximately 500 milliseconds before assuming that the slave did not respond to its request Cyclic Redundancy Check CRC The Cyclic Redundancy Check CRC is one of the most effective systems for checking error
304. s uses its configured T5 timer value The T5 timer is also disabled whenever the T2 timer Acknowledgement Timeout is disabled Chapter 7 Protocol Definition CCM RTU SNP and SNP X 175 Table 44 SNP Timer Descriptions continued SNP Timer _ _ 22 2 Processing Timeout Irh msdaumitimethafthemdster devicevallwaitfardhesiave maximum time that the master device will wait for theslave Masteronly device to return an expected response message It is started when the final request acknowledgementis received from the slave It is restarted when a keep alive message is received from the slave If the response is not received within the T5 time the SNP communication is aborted The T5 timer is always set to the current T5 timer value plus the time required to transfer 80 characters at the selected data rate plus any negotiated Modem Turnaround Time The T5 value is recalculated whenever a new T5 timer value is estab lished If the 2 or T5timeris disabled the T5 timerisalso dis abled Buffer Message Timeout The maximum time a station will wait for the other station to Master and Slave send an expected Buffer message as part of an SNP request or response It is started after acknowledgement has been sent and another Buffer message is expected If the Buffer message isnot received within the T5 time the SNP communicationis aborted The T5 timer is always set to the current T5 timer value pl
305. s which are important to the user These parts are The COMMREO Ladder Instruction The Command Block The Status Word The figure below illustrates the relationship of these parts 44916 INSTRUCTION INPUTS COMMAND AND BLOCK OUTPUTS FOR COMMREQ INSTRUCTION COMMAND DETAILS BLOCK OF THE POINTER REQUEST STATUS WORD STATUS WORD POINTER Figure 11 Structure of the COMMREQ The COMMREQ Ladder Instruction The COMMREO Ladder Instruction is the main structure used to enter specific information about a communications request This information in cludes the rack and slot location of the CMM associated with the request and the port on which to execute the request In addition there is an entry in the COMMREO Ladder Instruction which points to another location in memory which is the Command Block 28 Series90 PLC Serial Communications User s Manual October 1996 GFK 0582C Command Block Command Block is a structure that contains additional informa tion about the communications request This information includes timing parameters a pointer to the Status Word and a Data Block The Data Block describes the direction of the data transfer and location and type of data being transferred The Status Word The Status Word reports on the results of the communications request For more information on the CCM Status Word refer to Chapter 5 CCM Service For more information on the SNP Statu
306. s within the configured T3 time interval A Parity error has occurred on an Attach Attach Response or Update Realtime Datagram message Communications have not been estab lished A BCC Block Check Code error has occurred on an Attach Attach Response or Update Realtime Datagram message Communications have notbeen established A Framing or Overrun serial error has occurred on an Attach Attach Response or Update Realtime Datagram message Communications have notbeen established An invalid SNP message type was received when an Attach Attach Response orUpdateRealtimeDatagrammessagewasrequired Commu nicationshave not been established Aninvalid next message length value was specified in an Attach Attach Response or Update Realtime Datagram message Communications have not been established An unexpected SNP message type was received when an Attach Attach Response or Update Realtime Datagram was required Communications have not been established Another Break was received while SNP slave was waiting for an Attach or Update Realtime Datagram message AnSNP message has been sent and retried the maximum number of times A maximum of two retries are permitted A retry is caused by a NAK from from the remote SNP device 65 66 Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued Error Status Local SNP SNP X Error Description 41 29h Areceived SNP message has been NAKed the maximum number of tw
307. scratch pad OE OF This value will always remain in word 12 of the diagnostic status words even when the diagnostic status words are cleared by issuing internal command 6002 or by an external devicerequest Refer to Section 2 of this chapter for a description of the returned Status Word fora CCM Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Memory Addressing and Data Lengths In order to carry out a data transfer the CCM protocol must be given the address at which the transfer is to begin and the length of the data to be transferred The starting address plus the length must not exceed the end of a table boundary The requirements for specification of the starting address and data length are explained in this section followed by general guidelines for replacing a Series One Three Five or Six PLC with a Series 90 PLC in an application using CCM protocol CCM Memory Addresses The memory addresses in the following table are target addresses when the responding device is a Series 90 PLC These addresses are source addresses when the initiating de vice is a Series 90 PLC Table 13 Target Source Memory Addresses Ranges 1 Specified register with which the data the register with which the data 1 MaximumUnits Maximum Units transfer is to begin Input Table Specifies the input or output point with which the 1 Maximum Units Output Table data transfer is
308. se sree ele enda be E beside 226 Section 5 RS 422 to RS 232 Miniconverter 230 Appendix A Glossary of 235 Commonly used Acronyms and Abbreviations 236 Glossary of ER PARERE 237 AppendixB ASCII Code List 247 AppendixC CCMCompatibility 249 AppendixD 55 gt 5 5 55 5 9 seen ee sane 253 AppendixE Serial Line Interface 255 Information Codes rensei ad ete e ens PLI eaa un GM eS Ree 255 Transmission Errors and Detection 256 Noise BtrOfs i e s Apu E dae haath boy ae er e TOR ees 256 Transmission Timing Errors 257 Asynchronous Transmission 257 Serial Communications 258 iter ene Cete et posite oiu aisle a aud date onl E eee 258 Interface Standards sos e ER ER meus 259 AppendixF CommunicationNetworks 263 PointzTo Point i iis cesser vet ee hee ER RA Riad dew AC ee V does 263 Mu ltidrop cce HIE eek oe Ye erbe due d 264 Modem Transmission 265 GFK 0582C Series 90 P
309. section RTU protocol is a query response protocol used for communication between the device and a host computer which is capable of communicating using RTU protocol The host computer is the master device and it transmits a query to a RTU slave which re sponds to the master The RTU device as an RTU slave cannot query it can only re spond to the master The RTU data transferred consists of 8 bit binary characters with an optional parity bit No control characters are added to the data block however an error check Cyclic Re dundancy Check included as the final field of each query and response to ensure accu rate transmission of data Message Format The general formats for RTU message transfers are shown below Slave Turn around Time Master Query Message Slave Query Transaction Master Broadcast Message Slave No Response Broadcast Transaction Figure 20 RTU Message Transfers Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C A distinction is made between two communicating devices The device which initiates data transfer is called the master and the other device is called the slave The Serial Communications Module CMM can only be a RTU slave The master device begins a data transfer by sending a query or broadcast request message slave completes that data transfer by sending a response message if the mas ter sent a query message addressed to
310. sed Word 6 00000 0000 Not Used Word 7 07203 1C23 SNP Command Number Word 8 00008 0008 Slave Memory Type to store data R Word 9 00201 00C9 Slave Address to store data Register 201 Word 10 00010 000A Number of Master Memory Type elements to write Word 11 00070 0046 Master Memory Type from which to write data I Word 12 00001 0001 Master Address from which to write data Input 1 The Number of Master Memory Type elements to write field is specified in units consistent with the unit length of the Master Memory Type See Table 16 in Section 1 for valid memory types and addresses Note The SNP master on the CMM module and CPU 351 and CPU 352 serial ports limit this command to a total data length of 2048 bytes 1024 words Note When master and slave memory types do not match zero fill will take place GFK 0582C Chapter 6 SNP Service 95 40 Read Task Memory 07204 1C24 Available Modes Master for communication with Series 90 70 slave device only Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Read request the slave responds with the data This service provides the master with the capability to read the Main Data seg ment reference table of the slave s main control program task Only a Series 90 70 PLC slave device supports this service a Series 90 20 or Series 90 30 slave device will produce unpredi
311. ser s Manual October 1996 GFK 0582C 0582 Ladder Program Example lt lt RUNG 4 STEP 0001 gt gt continued on next page Chapter 6 SNP Service FST SCN T0001 MOVE 5 INT CONST IN 04 0001 00000 LEN 1000011 lt lt RUNG 5 STEP 0004 gt gt 870001 T0002 TMR 0 105 CONST PV 00020 R0002 lt lt RUNG 6 STEP 0007 gt gt TO002 70001 BLKMV BLKMV R INT INT CONST IN1 Q R0005 CONST Q R0012 00007 00000 CONST 2 CONST 2 00000 00000 CONST CONST IN3 00008 00000 CONST IN4 CONST IN4 00000 00000 CONST 5 CONST 5 00000 00000 CONST 6 CONST 6 00000 00000 CONST CONST 07200 00000 lt lt RUNG 7 STEP 0011 gt gt T0002 T0003 4 MOVE_ COMM_ S INT REQ 70005 CONST IN Q RO001 R0005 IN FT 00000 1000011 CONST SYSID 0002 CONST TASK 00000001 75 76 lt lt RUNG 8 STEP 0016 gt gt ALW ON T0004 EQ 5 INT ROOO01 11 0 CONST 12 00001 lt lt RUNG STEP 0019
312. ses 43 Table 14 Unit Lengths of Series 90 CCM Memory Types 44 Table 15 CCM Secondary Error Codes High Byte of COMMREO Status Word Low Byte of DOW cette Erbe br NINE es 46 Table 15 CCM Secondary Error Codes High Byte of COMMREO Status Word Low Byte of DSW Continued 47 Table 16 Memory Types Unit Lengths and Valid Ranges 59 Table 17 Major Error Codes for SNP 61 Table 18 Minor Error Codes for Major Error 5 62 Table 17 Minor Error Codes for Major Error Code 5 Continued 63 Table 19 Minor Error Codes for Major Error Code 10 OAh 63 Table 20 Minor Error Codes for Major Error Code 12 OCh 64 Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued 65 Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued 65 Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued 66 Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued 67 Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued 68 Table 21 Minor Error Codes for Major Error Code 13 ODh 68 Table 22 Minor Error Codes for Major Error Code 14 0 69 Table 23 Minor Error Codes for Major Error Code 15 0 70 Table 23 Minor Error Codes for Major Error Cod
313. sion Word 13 00008 0008 Slave Memory Type from which to read data R Word 14 00201 00C9 Slave Address from which to read data Register 201 Word 15 00010 000A Number of Master Memory Type elements to read Word 16 00070 0046 Master Memory Type to store data l Word 17 00001 0001 Master Address to store data Input 1 Word 18 00008 0008 Oa Memory Type to store Slave PLC Status Word Word 19 00032 0020 Master Address to store Slave PLC Status Word Register 32 Word 20 00000 0000 Response Timeout in msec 0 use default Word 21 00000 0000 Broadcast Delay in msec 0 use default Word 22 00000 0000 Modem Turnaround Time in msec Word 23 00000 0000 Transmission Delay in msec 84 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 s The SNP ID field specifies the slave device from which data will be retrieved The null SNP ID all bytes 00h may be used only when the single session Communication Session type is selected The broadcast SNP ID all bytes FFh may not be used by this command The Communication Session type field specifies whether the communication session is single session or multi session The master uses this value together with the SNP ID value to determine whether the proper communication session is already active or if a new session must be established prior to the actual data transfer For single session op eration the communi
314. specified point formats Invalid number of Control Program Names Must be 1 8 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C 0582 s Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued Error Status 1Ch 1Dh Fh Local SNP SNP X Error Description SNP X Request exceeds maximum data size 1000 bytes Must use a smaller data length Use multiple COMMREQs if necessary InvalidSNP X communication session type Must be 0 for a single slave device or 1 for multiple slave devices Illegaldestination SNP ID specified for SNP X slave Must be 0 7 ASCII characters plus a terminating null character 00h The Null SNP ID eightbytes of 00h may be used to specify any single evice The Broadcast SNP ID eight bytes of FFh may be used tospecify all slave devices on the seriallink Destination SNP ID does not match SNP X session type The Broadcast SNP ID is not permitted single slave SNP X session The Null SNP ID is not permitted ina multiple slave SNP X session Note Minor Error Codes 32 118 indicate fatal errors subsequent communica tion must be initiated with an Attach or Long Attach COMMREQ or any remote SNP X Table 20 Minor Error Codes for Major Error Code 12 0Ch Continued Error Status i Chapter 6 SNP Service Local SNP SNP X Error Description Inactivitytimeout T3 The SNP slave has not received any new SNP message
315. st The master device waits the length of the T4 timer before sending the Attach request to the slave devices Only the slave device with the matching SNP ID responds with an Attach response The non matching slaves return to a state waiting for a Break sequence The master upon receiving a valid Attach re sponse completes the with a successful status No response or an invalid response completes the COMMREO with an error status Having negotiated a successful Attach to a slave PLC the master device is accorded the default privilege level at the slave device For the built in CPU port in a Series 90 70 PLC the default slave privilege level is Level 0 Level 0 prevents any read or write of the PLC memory For the built in CPU port in a Series 90 30 or Series 90 20 PLC the default slave privilege level is Level 1 Level 1 permits read but not write of the PLC memory For an SNP slave device on a CMM module in any Series 90 PLC the slave privilege is always Level 2 and cannot be changed Level 2 permits read and write of the PLC memory If the master device requires additional privileges see the Change Privilege Level com mand for further information The Attach command also enables or disables Piggyback Status reporting for the dura tion of the SNP communication When enabled Piggyback Status data is updated after each successful command If a particular installation requires configuration parameter values different from thos
316. stablished after each new Attach request Previously established SNP timer values are not changed by the Update Real Time Datagram request Each of the SNP timers is described below Note that Modem Turnaround Delay and Transmission Time are rot included in the SNP timer values unless specifically stated Modem Turnaround Delay and Transmission Delay are described following the timers Table 44 SNP Timer Descriptions SNP Timer Bmerbpe Description n Tt Minimum Minimum Turn Around Time Time ITheminimum timeintervalwhichthisdevicerequiresbetween minimum time interval whichthis devicerequires between Master and Slave areception and the nexttransmission Itallows the half duplex serial line to switch direction It is usually used as the time delay after receiving amessage until sending its acknowledge ment or after an acknowledgement until sending the next message It must elapse before sending a message oracknowl edgement The T1 timer defaults to5 milliseconds for all CMM configura tion Timeout parameter selections T1 timer values are always exchanged between the master and slave devices in the Attach request and response messages each device operates with the T1 value obtained from the other device Acknowledgement Timeout The maximum time allowed for reception of an acknowledge Master and Slave ment after sending a message Failure to receive an acknowl edgement within the T2 time causes th
317. switch Por L Pin Assignments RS 232 Signals 2 Assignments 5 485 Signals 23 RUN STOP mode select Serial Port Pin Assignments Modem Command via SNP Autodial 122 Modem Communications Modes 59 Modem Transmission 265 Modem Turnaround Delay Modems Modes Communications 59 Multi Slave Session Multidrop D64 Index 3 Index 4 Index N bii id Checking Parity Checking 256 Noise Errors p5d NOWAIT mode B3 O Overrun Errors 257 Overview of the CMM f P Parity Checking Peer to P eer Piggyback Status 89 90 d PLC Status Wor PLCMajor MinorType Codes PLC Short Status SNP Command PLC Status Word P1 Point Format Memory Type Restrictions 114 Point To Point Pe uie Registers RTU message 162 Preset Single Register RTU message 157 Privilege Levels in PLC Programming Examples CCM Program AE SNP Program Example Protocol Definition RTU Protocol 144 SNP Protocol SNP X Protocol Protocol Definition CCM SNP SNP 125 Q Q Sequence Quer y Response Quick Guide to the Manual i R Read Analog Inputs RTU message 159 Read CCM Diagnostic Status Words to B Registers CCM Command 51 Read Diagnostic Status Words SNP Com mand 79 i c Status RTU message 158 Read Input Table RTU message 153 Read Output Table RTU message Read Program Block Memory SNP Com mand Read Q Respo
318. t of additional parameters to fine tune the communications between the master and the slave device The Long Attach command can be issued at any time When issued a Break sequence is initiated to all slave devices The detection of the Break sequence by a slave device immediately aborts any communication session currently in process and places the slave device into a state waiting for a valid Attach request The master waits the length of the T4 timer before sending the Attach request to the slave devices The master then waits for the Attach response Only the slave device with the matching SNP ID responds The other slaves return to a state waiting for a Break sequence In addition to the exchange of the Attach request response an exchange of an SNP Pa rameter Select request response also occurs The SNP Parameter Select request is issued by the master SNP device to negotiate the T2 and T3 timer values the Modem Turn around Delay the Transmission Time Delay and the Maximum SNP Data Size with the slave SNP device Having negotiated a successful Long Attach to a slave PLC the master device is accorded the default privilege level at the slave device For the built in CPU port in a Series 90 70 PLC the default slave privilege level is Level 0 Level 0 prevents any read or write of the PLC memory For the built in CPU port in a Series 90 30 or Series 90 20 PLC the default slave privilege level is Level 1 Level 1 permits read but not write of t
319. t 8 FrontpanelRUN STOPswitchsetting BEEN D RN Bit9 OEM protected bit 1 OEM protection in effect 0 No OEM protection Bits12 15 PLC State 0 RunI Oenabled 1 RunI Odisabled 2 Stop I O disabled 3 CPU stop faulted 4 CPU halted 5 CPU suspended 6 Stop I O enabled GFK 0582C Chapter 6 SNP Service 91 L6 Change Privilege Level 07201 1C21 Available Modes Master Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Change Privilege Level request the slave re sponds This service provides the master with the capability of changing its access privi lege level at the slave PLC if the proper password is provided This command is only necessary if the master is not accorded sufficient privileges as a result of the Attach com mand Example Command Block Request privilege level change at attached slave device to level 2 The Slave device pass word is PASS Word 1 00006 0006 Word 2 00000 0000 Word 3 00008 0008 Word 4 00000 0000 Word 5 00000 0000 Word 6 00000 0000 Word 7 07201 1C21 Word 8 00002 0002 9 16720 4150 Word 10 21331 5353 Word 11 00049 0031 Word 12 00000 0000 SNP Data Block Length NOWAIT Mode Status Word Memory Type Status Word Address minus 1 Register 1 Not Used Not Used SNP Command Number Requested Privilege Level Password bytes 1 and
320. t X Buffer GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 205 Explanation of Broadcast X Write Command More Than 2 Bytes Byte Hex Value Description Number X Write Request Message 1 1B Startof message character 1Bh FFFFFFFFFFFFFFFF BroadcastSNPID 02 X Write request code 02h 08 Segment Selector R in word mode Data Offset 0063h 99 zero based R100 Data Length 000Ah 10 words Notused always 0 17 End of block character 17h marks the beginning of the SNP X message trailer 54 Next message type Buffer T 54h 21 22 Next message length in bytes 001Ch 28 00 Not used always 0 13 Computed Block Check Code for this example vm Data Buffer Message Start of message character 1Bh EE EN SNP X Command 54h 42 43 44 45 46 47 48 49 50 End of block character 17h marks the beginning of the SNP X messagetrailer 24 27 B 00 00 00 Not used always 0 Computed Block Check Code for this example 206 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C SNP X State Tables This section presents generic state tables for the protocol processing of SNP X master and slave devices These state tables are provided as an aid to those developing their own SNP X master or slave implementations The state tables illustrate the SNP X proto col processing only they are not sufficient to implement complete SNP X devices Separate state tab
321. t message 1B 58 00 00 00 00 00 00 00 00 02 48 12 00 01 00 04 00 17 00 00 00 00 2D X Write Respone message 1B 58 82 00 00 00 00 00 00 17 00 00 00 00 07 Explanation of Direct X Write Command 2 Bytes or Less Byte Hex Value Description Number X Write Request Message 1 1B Startof message character 1Bh 00 00 00 00 00 00 00 00 SNPID of target slave X Write request code 02h Segment Selector Q in bit mode Data Offset 0012h 18 zero based Q19 Data Length 0001h 1 bit Data to write Max 1 word 2 bytes 16 bits End of block character 17h marks the beginning of the SNP X message trailer 23 00 00 00 00 Not used always 0 2D Computed Block Check Code for this example Xie EE Message Start of message character 1Bh X Write response code 82h PLC Status Word 00 00 for this exampleonly Status codes Major and Minor errors Data Length always 0 End of block character 17h marks the beginning of the SNP X messagetrailer 00 00 00 00 Notused always 0 07 Computed Block Check Code for this example GFK 0582C Chapter 7 Protocol Definition CCM RTU SNP and SNP X 201 202 Example of Direct X Write Command More Than 2 Bytes This example shows the message exchange of a direct X Write command to write more than two bytes of data The X Request requires a subsequent transmission of an X Buffer message by the SNP X master After the slave receives the initial X Re
322. ta 25 SE Enable RS 232C NotUsed NCzNo Connection SD Send Data and RD Receive Data are the same as TXD and RXD used in the Series Six PLC 2 2 1 10 11 12 13 14 15 16 17 18 19 20 2 and are the same as and A and B denote outputs and A and denote in puts Chapter 8 Serial Cable Diagrams and Converters 223 The signal ground connections 7 on each connector must be made between the Isolated Repeater Converter and the PLC forJ1 and the Iso lated Repeater Converter and the host computer for J2 Pin 7 of the J1 port is connected to the metal shell of the J1 connector Pin 7 of the J2 port is connected to the metal shell of the J2 connector These two signal ground connections are isolated from each other and are isolated from the power system ground green wire on the terminal block To main tain proper isolation these signal grounds cannot be tied together System Configurations The figures below show various ways you can connect the Isolated Repeater Converter to convert signals expand the number of drops and obtain greater distance Any sys tem configuration can be reduced to a minimum number of cables each covering a part of the overall system configuration The example system configurations below refer to these cables as Cables A D shown in Cable Diagrams later in this section Downstream and Upstream Contention In this section simple multidrop configura tio
323. tablished by the master with the slave The master device sends a Long Break waits the T4 time interval and transmits an X Attach request to establish an SNP X session with the slave device The X Attach command may be directed to a particular slave device or broadcast to all slave devices on the serial link The X Attach is directed to a particular slave device by specifying the SNP ID of that device In Point to Point wiring only the Null SNP ID may be specified in lieu of the actual SNP ID of the slave device the slave device will respond as if its own SNP ID had been specified When directed to a specific SNP X slave a properly encoded X Attach request invokes an X Attach response an SNP X communication session is now established with the SNP X slave The X Attach response does not contain an error code in all error cases an X Attach response is not returned An X Attach is broadcast to all slave devices by specifying the broadcast SNP ID The slave does not return any response to a broadcast X Attach request Therefore master cannot detect a broadcast X Attach failure After sending a broadcast X Attach request the master must wait the Broadcast Delay time interval before sending the next X Re quest An SNP X communication session is now assumed to be active Once the SNP X communication session has been established the slave device is able to accept SNP X commands Any number or combination of SNP X commands can be per formed Th
324. tage between each additional drop is the RS 485 standard of 12 Volts to 7 Volts The driver output must be capable of 1 5 V minimum into 60 ohms The driver output impedance must be at least 120 K ohms in the high impedance state The receiver input resistance is 12K ohms or greater Receiver sensitivity is 200 millivolts Care must be taken that common mode voltage specifications are met Common mode conditions that exceed those specified will result in er rors in transmission and or damage to Series 90 PLC components Constructing RS 422 RS 485 Cables When connecting the CMM to a non Series 90 device using the RS 422 RS 485 standard the non Series 90 device s line receiver must contain fail safe capability This means that in an idle open or shorted line condition the output of the line receiver chip must as sume the marking state When using RS 422 RS 485 the twisted pairs should both be matched so that both trans mit signals make up one twisted pair and both receive signals make up the other twisted pair The CMM is supplied with a 120 Ohm terminating resistor in each RS 422 receiver cir cuit If the module is at either end of an RS 422 multidrop or point to point link pin 25 the RD B signal must be connected directly to pin 24 the internal 120 ohm terminat ing resistor If the module is an intermediate drop in the multidrop link this connection should not be made Some older equipment such as the Series Six
325. tatus Word bits 8 15 GFK 0582C Chapter 6 SNP Service 101 L6 Return Control Program Name 07209 1029 Available Modes Master Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Return Control Program Name request the slave responds with data This service provides the master with the capability of retriev ing the number of control program tasks and the name of each task from the slave de vice Currently only a single control program is supported by all Series 90 PLCs In fu ture releases however up to 8 control programs may be supported in the Series 90 70 PLC Example Command Block Read the first Control Program name from the attached slave device and store in master Register Memory Registers 201 205 Word 1 00004 0004 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07209 1C29 SNP Command Number Word 8 00008 0008 Master Memory Type to store Control Program data R Word 9 00201 00 9 Master Address to store Control Program data Register 201 Word 10 00001 0001 Number of Control Program Names to retrieve 1 8 The Master Memory Type and Address fields must be selected to allow enough room to ac comodate the data retur
326. te1 Byte2 Command Data SNP ID Request Code Command Specific Data Bytes3 10 Byte 11 Bytes 12 18 Trailer End of Block Next Message Next Message Not Block Check Type Length Used Code Byte 19 Byte 20 Bytes 21 22 Byte 23 Byte 24 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C The contents of the Header Command Data and Trailer for the X Request message further described below Byte1 Start of Message Startof message character Byte2 Message Type 58h SNP X Message 58h X Command Data Bytes3 10 SNPID _ SNP ID of desired SNP X slave Byte 11 RequestCode _ Desired service request code Bytes12 18 CommandSpecific Depends uponcommand Data Byte EndofBlock Bye20 NexMesaegelype Nextmessagetype orSR T Bytes21 22 Next Message Length Nextmessage length in bytes Byte23 Unused o Norsed Calculated BCC value for this message The SNP ID field contains the SNP ID of the slave device to which this message is sent This field may also contain the special Null SNP ID all 8 bytes 00h or the special Broad cast SNP ID all 8 bytes FFh Byte 24 Block Check Code The Request Code and Command Specific Data fields vary with each SNP X command The trailer portion of the X Request message indicates whether a data buffer message will be used If a data buffer is used the Next Message Type field is set to 54h the
327. the slave The new value is specified in milliseconds and is in effect for this COMMREO only If not programmed or set to zero the master uses the T2 timer value as selected by the Timeouts configuration parameter The optional Broadcast Delay field specifies a new value for the Broadcast Delay timer This time is the interval that the master must wait for all slave devices to establish an SNP X communication session or to process a broadcast X command since the slave de vices do not return a response to any broadcast message The new value is specified in milliseconds and is in effect for this only If not programmed or set to zero the master uses the T2 timer value as selected by the Timeouts configuration parameter The optional Modem Turnaround Time field specifies a new Modem Turnaround Time val ue This is the time interval required by a connected modem to turn the link around The new value is specified in milliseconds and is in effect for this COMMREO only If not programmed the master uses the value selected by the Modem Turnaround Delay configuration parameter The optional Transmission Delay field specifies a new Transmission Delay value This time interval accounts for unusually long time delays in transmission between the master and slave devices Such unusually long delays are typical of communications via satellite The new value is specified in milliseconds and is in effect for this COMMREO only If not pro gra
328. the privilege level required for the servicerequest 4 04h ProtocolSequence Error The CPU has received a message that is out of order 5 05h Service Request Error The minor error code contains the specific error code See table of Minor Error Codes below 06h IllegalMailbox Type Servicerequestmailbox type is either undefined or unexpected 7 07h The PLC CPU sService Request Queue is full The master should retry later Itis recommended that the master wait a minimum of 10 msec before sending another servicerequest SNP DOS Driver Error The minor error code contains the specific error code See table of Minor Error Codes below IllegalService Request The requested service is either not defined or not supported This value is returned in lieu of the actual 01h value passed in the SNP error message to avoid confusion with the normal successful COMMREQcompletion LocaBNP SNP X Error An erroroccurred within the SNP task in the CMM module in this PLC This error may occur in either an SNP master or an SNP slave The minor error code contains the specific error code See table of Minor Error Codes below Remote SNP Error An erroroccurred within the SNP slave task in the CMM module in the remote PLC The minor error code contains the specificerror code See table of Minor Error Codes below AutodialError An erroroccurred while attempting to send a command string to an attached external modem The minor error code contains the specific er
329. the sum of the function code of the query plus 128 The error sub code is equal to 1 2 3 or 4 The value of the subcode indicates the reason the query could not be processed Invalid Function Code Error Response 1 An error response with a subcode of 1 is called an invalid function code error response This response is sent by a slave if it receives a query whose function code is not equal to 1through 8 15 16 17 or 67 Invalid Address Error Response 2 An error response with a subcode of 2 is called an invalid address error response This error response is sent in the following cases 1 Thestarting point number and number of points fields specify output points or in put points that are not available in the attached Series 90 CPU returned for function codes 1 2 15 2 Thestarting register number and number of registers fields specify registers that are not available in the attached Series 90 CPU returned for function codes 4 16 3 The starting analog input number and analog input number fields specify analog inputs that are not available in the attached Series 90 CPU returned for function code 3 4 The point number field specifies an output point not available in the attached Series 90 CPU returned for function code 5 Chapter 7 Protocol Definition CCM RTU SNP and SNP X 167 5 Theregister number field specifies a register not available in the attached Series 90 CPU returned for function code 6 6 Th
330. the target station will respond with a positive acknowledge ACK If the header is incorrect the target will respond with a negative acknowledge NAK The header format and descriptions of the fields within the header are shown below Data No of Flow Dir Bytesin Data Last Mem Blocks Block 4 10 11 12 13 Chapter 7 Protocol Definition CCM RTU SNP and SNP X 127 128 Table 32 Header Block Description Sia of Header contol character Target ID 2 Identification number of the target device Valueis represented as ASCII coded hexadeci mal In peer to peer mode a value of FFh 255 decimal is recognized accepted by any device 3 Data Flow Direction 5 Bytes 4 and 5 supply target memory type Byte 4 also specifies data direction read or write Valueis represented as ASCII coded hexadeci mal Target Memory Type Target Memory Ad This field specifies the starting address for the dress data transfer Value is represented as ASCII coded hexadecimal Complete Data Block The number of complete 256 byte data Count blocks tobe transferred Valueis represented as ASCII coded hexadecimal Last Block Byte Count 12 13 The number of bytes less than 256 bytes in the final or only data block Value is repre sented as ASCII coded hexadecimal 1 255 decimal peer peer 1 90 decimal master slave Will vary depending on target de vice See Table 33 Will vary depending on target de vice See Table 13
331. theoverriding Level3 discreteI Write to any data memory except overridingdiscretel O The PLC can be started or stopped PLC and I O fault tables can be cleared Level1 Read any data memory Write to memory is prohibited The PLC cannot be started or stopped Level0 Series 90 70 PLC only Read and Write of PLC system memory is prohibited Table 30 Required PLC Privilege Levels Service Request Change PrivilegeLevel ReadSystem Memory Read Task Memory Read Program Block Memory Write System Memory Write Task Memory Write Program Block Memory Toggle Force System Memory Return Fault Table Return Control ProgramName Return Controller Type and ID Return PLC Time Date PLC Short Status Set PLC Time Date EstablishDatagram UpdateDatagram CancelDatagram UpdateReal TimeDatagram Chapter 6 SNP Service Minimum Privilege Level Series 90 30 or Series 90 20 PLC Series 90 70 PLC The following table indicates the minimum privilege level required at the slave device to perform each request from the SNP master 1 1 n a n a 2 n a n a RFPNORPRFORNNNNR FB 1 For Series 90 30 PLCs with Release 1 x CPU firmware privilege level3 is required 93 L6 Read System Memory 07202 1C22 94 Available Modes Master Description Remote command The slave device must be attached before executing this command see Attach command The master sends a Read request the slave respon
332. tiated this command The response code value is set to the request code value with the high order bit always set For a successful X Response message the Slave PLC Status Word field contains the PLC Status Word from the slave device For an error X Response this field is set to zero For information on the contents of the Slave PLC Status Word refer to Table 28 in Chapter 6 The Error Status Code field consists of two bytes The first byte byte 6 contains the Ma jor Error code 00 indicates successful completion the second byte byte 7 contains the Minor Error code The meaning of the Minor Error code depends upon the Major Error code value The Data Length field is always present this field contains the number of data bytes which immediately follow in the message This field is set to zero when the message contains no data The Optional data field may not be present The size of this field is indicated by the Data Length field If the Data Length field is zero the Optional data field is not present GFK 0582C Chapter 7 Protocol Definition RTU SNP and SNP X 193 X Buffer Message Structure SNP X Data Buffer Message X Buffer is sent by the master to carry additional data for the command specified in the preceding X Request message The X Buffer message is sent only after an Intermediate Response message is received from the slave X Buffer messages may contain from 1 to 1000 decimal bytes of data and are structu
333. tion Word1 lowbyte Number of Control Programs 0 No program tasks currently defined 1 One program task defined for the PLC CPU highbyte ProgrammerFlags Set of boolean flags indicating which control pro gram tasks have programmers currently attached tothem Each bit postion corresponds to a control program task 0 no programmer attached 1 programmer attached where bit 0 corresponds to control program 0 Since at most one control pro gramiscurrently allowed this byte is either zero or one Word2 lowbyte Login Types high byte 2 bit codes indicating the type of login associated with each control program The 2 bit field begin ning at bit 0 corresponds to control program 0 Since there can be at most one control program in the current implementation only bit 0 and bit 1 havemeaning The codesbelow are for Series 90 70 PLCs Only 03h Parallel Work Station Interface WSI attached 02h Serial device attached at PLC CPU 01h Non dedicated programmer attached 00h No programmer attached low byte Auxiliary Status Only the highest bit is defined and only for the Series90 70 Bit 7 indicates Programmerwindowstatus 0 Programmerwindowclosed 1 Programmer window open high byte Not used 00h low byte Control ProgramNumber high byte Current PrivilegeLevel low byte Last sweep time in 0 1 msec units high byte Last sweep time in 0 1 msec units low byte PLC Status Word bits 0 7 high byte PLC S
334. to begin Source memory address must be on a byte boundary that is 1 9 17 2 6 CCM Scratch Pad Specifies the scratch pad byte with which the data 0 255 Memory transfer is to begin CCMDiagnostic Specifies the diagnostic status word with which the Status Words data transfer is to begin Bit Set Input Specifies the input or output point to be set 1 MaximumUnits Bit Set Output 17 Bit Clear Input Specifies the input or output point to be cleared 1 Maximum Units 18 Bit Clear Output The maximum addressable ranges for each memory type depends on the model of CPU and memoryconfiguration For I O references the Series 90 and Series Six CCM implementations use point oriented addressing rather than the byte oriented addressing of the Series One Three and Five PLCs The starting address is interpreted by the Series 90 PLC as the bit number at which the transfer is to begin Series 90 source memory addresses must be on a byte boundary See the examples that follow Software packages which use the byte oriented addressing method to interface with a Series One Three or Five PLC may need to be modified for the Series 90 PLC Scratch pad and diagnostic status words are resident in PCM CMM memory GFK 0582C Chapter 5 CCM Service 43 Example 1 read target Series 90 inputs 9 through 16 into source Series 90 inputs 17 through 24 the source address is 17 the target address is 9 and the data length is 8
335. to store Piggyback Status Register 171 The Slave SNP ID field specifies the SNP ID of the desired slave device The SNP ID field is 8 bytes long For Series 90 70 PLCs the SNP ID can be a maximum of 7 bytes followed by a null character 0 and can include any ASCII character For Series 90 30 PLCs the SNP ID is restricted to a maximum of 6 bytes followed by a null character 0 the 6 bytes must be the ASCII characters 0 through 9 inclusive and upper case A through F in clusive A null SNP ID Character 1 0 be used to Attach to any slave SNP device regardless of its assigned SNP ID It should be noted that a null SNP ID can only be successful in a point to point wiring configuration In a multidrop wiring configuration all SNP slave devices would respond to any Attach specifying a null SNP ID This procedure will pro duce unpredictable results and should not be attempted The Master Memory Type and Address for Piggyback Status fields are optional If the Piggy back Status memory type and address values are 0 that is a Piggyback area is not speci fied the Piggyback Status information is ignored and is not provided to the PLC ladder application program If a Piggyback Status location is specified an area must be pro vided which can accomodate the 6 bytes of Piggyback Status information described be low The Piggyback Status information is returned with every SNP response message sent by the slave device Once the
336. to the SNP X master device The Modem Turnaround Time and Transmission Delay values used only by the SNP X master device to add to the Response Timeout and Broadcast Delay values are de scribed below Modem Turnaround Time This is the time interval required by intervening modems to turn the serial link around This time defaults to the configured value for Series 90 CMM or CPU modules For CMM modules this value is specified by the TurnA Delay SNP configuration parameter For an SNP X master device in the CMM module the configured value may be modified by the SNP X master user interface The Modem Turnaround Time value is also used to specify the time that the RIS signalis activated prior to data transmission This provides a keying signal for use with modems and is used by all SNP X master and slave devices Transmission Delay This is the time required for the data to transfer from the initiating device to the receiv ing device This time is usually referred to as wire time This time reflects unusual de lays in the data transmission path as when satellite links are used to transfer data For the CMM module this time defaults to zero For a master device this default value may be modified by the SNP X master user interface The SNP X master sends a Long Break to signal all slave devices on the serial link to pre pare to establish a new communication session Each and every slave device aborts any active communication session
337. tputs The function s OK and FT outputs can provide power flow to option al logic which can verify successful completion of the Communications Request The OK and FT outputs can have these states ENable OK output FT output no active active yes notactive no execution Power Flow The COMMREQ Instruction always passes power flow to the OK output in NOWAIT mode In WAIT mode the function passes power flow to the OK output un less the timeout period is exceeded or if a 0 timeout period has been specified Then the OK output is set to false and the FT output is set to true WAIT NOWAIT modes are discussed in detail in Section 3 The COMMREQ Command Block The FT output can also be set true and OK set to false if The specified target address is not present The specified task is not valid for the device Data length is 0 If there are errors in the portion of the Command Block used specifically by the CMM these errors are reflected in the value returned in the status location not in the FT output Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Section 3 The COMMREQ Command Block GFK 0582C The Command Block contains the details of a Communications Request The address of the Command Block is specified by the IN input of the COMMREO Ladder Instruction This address be in word oriented area of memory L R AI or AQ The Command Block structure can be pl
338. tus Bits are always located at the two next higher memory locations The X Status Bits may be defined only in the 1 Q T or bit oriented Memory Types The following example defines the X Status Bits in Discrete Internal Memory 76M bit mode bits 101 103 Word 1 00003 0003 SNP Data Block Length Word 2 00000 0000 NOWAIT Mode Word 3 00008 0008 Status Word Memory Type R Word 4 00000 0000 Status Word Address minus 1 Register 1 Word 5 00000 0000 Not Used Word 6 00000 0000 Not Used Word 7 07003 1 5 SNP X Command Number Word 8 00076 004C Slave Memory of X Status Bits 70M bit mode Word 9 00101 0065 Slave Address of X Status bits 70M101 The Slave Memory Type and Address of X Status Bits fields must be selected to allow enough room for the three X Status Bits Only the 1 Q or T bit oriented memory types are permitted see the Memory Type table Table 16 If the X Status Bits location is not specified both the memory type and address values are 0 the X Status Bits in formation is not written to the PLC The layout of the X Status Bits is specified below bit n 2 bit n 1 bit n The ACTIVE bit indicates that an SNP X communication session is active this slave device is able to receive data transmission X requests while this bit is set This bit is set when a new SNP X communication session is established this bit is cleared whenever a Break is received or a fatal erro
339. ult or system redesign In the Series 90 PLC a combination of a printed circuit board and its associated faceplate which when combined form a complete assembly Multidrop A serial wiring configuration which connects more than two devices all devices on this multidrop must be uniquely addressable Nanosecond ns or nsec One billionth of a second 1 x 10 or 0 000000001 second Noise Undesirable electrical disturbances to normal signals generally of high frequen content Non Volatile Memory A memory capable of retaining its stored information under no power condi tions power removed or turned off OFF Line Equipment or devices that are not connected to a communications line For ex ample the Workmaster computer when off line operates independent of the Series 90 CPU ON Line Descriptive of equipment or devices that are connected to the communications line Optical Isolation Use of a solid state device to isolate the user input and output devices from in ternalcircuitry of an I O module and the CPU Output Information transferred from the CPU through a module for level conversion for controlling an external device or process Output Devices Physical devices such as motor starters solenoids etc that receive data from the Programmable Logic Controller Output module AnI O module that converts logic levels within the CPU to a usable output sig nal for controlling a machine or process Series
340. us the TransmissionDelay value plus twice the time required to transfer the next Buffer message at the selected data rate The T5 value is recalculated whenever a Buffer message is ex pected If the T2 or T5 timer is disabled the T5 timer is also disabled The Modem Turnaround Delay and Transmission Delay which are added to certain SNP timers are described in the following table Table 45 Modem Turnaround and Transmission Delay Modem Turnaround Delay The length of time required by intervening modems to turn the link Master and Slave around The Modem Turnaround Delay default value is specified by the CMM configuration TurnA Delay parameter default values range from 0 None to 500 milliseconds The Modem Turnaround Delay value may be optionally negotiated between the master and slave devices via the SNP Parameter Select message part of the Long Attach command The master and slave devices both use the larger of the Modem Turnaround Delay values from either device TransmissionDelay The length of time required for the data to transfer from the Master and Slave initiating device to the receiving device This time is also referred to as the wire time This time reflects unusual delays in the data transmission path as when satellite links are used to transferdata The Transmission Delay defaults to 0 milliseconds for all CMM configura tion Timeout parameter selections The Transmission Delay value may be optionally negot
341. used in NOWAIT Mode Not used in NOWAIT Mode Command Number Read CCM Diagnostic Status Words to Source Registers 06003 1773 GFK 0582C Description Local Command There are 20 consecutively numbered CCM Diagnostic Status Words which can be read by the PLC CPU A transfer of all or part of the Diagnostic Status Words can be made to the CPU as long as they are in a consecutive block Example Read the first five Diagnostic Status Words to source registers R00050 RO00054 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10 Word 11 Word 12 00006 0006 00000 0000 00008 0008 00009 0009 00000 0000 00000 0000 06003 1773 00000 0000 00000 0000 00001 0001 00005 0005 00050 0032 Chapter 5 CCM Service Data Block Length NOWAIT Mode Status Word Memory Type Register Status Word Address minus 1 Register 10 Not used in NOWAIT Mode Not used in NOWAIT Mode Command Number Not used Not used Target Memory Address Data Length words Source Register 51 Software Configuration Command 06004 1774 52 Description Local command This command allows the PLC Ladder application program to reconfi gure a CCM port with specific settings for timers and retry counters This command when issued will override the configuration specified by Logicmaster 90 Specifying the value 65535 FFFFh for any parameter will indicate that the current setting f
342. ve as well as successful local completions Number of Error Requests This word indicates the number of COMMREQs that have failed at this SNP device This value counts non fatal errors only the SNP communica tion is maintained For an SNP slave device this value also counts error responses re turned to the master Number of Aborts This word indicates the number of fatal errors at this SNP device the SNP communication is terminated An abort may occur at either a master or slave de vice After an abort the master device must establish new SNP communications Aborts may be caused by failure to receive an expected message or acknowledgement certain protocol errors failure to read or write to the serial port or a communication fail ure to the local PLC Inactivity timeouts which do terminate SNP communication are not counted as aborts an inactivity timeout occurs at the slave device when the slave receives no further messages from the master Number of Retries Sent This word indicates the number of message retries performed by this SNP device A master or slave device retries a message when the acknowledgement to that message indicates a recoverable transmission error A maximum of two retries are permitted to any SNP message if the message is still not correctly acknowledged a fatal error occurs and the SNP communication is aborted For SNP X operation this word indicates the number of X Attach retries to establish the
343. vely In a Series 90 CMM module the X Status Bits reside at a user defined location in a bit oriented reference table in local PLC memory A separate set of X Status Bits must be defined for each CMM serial port configured as an SNP X slave device The X Status Bits are available only after the location has been specified via the Set X Status Bits Address 07003 The Session Active bit is always maintained by the slave device and must not be reset by the ladder application The X Read Success and X Write Success bits are only set by the slave device the ladder application must examine and then reset these bits every ladder logic scan in order to properly detect the next X Status Bits in dication 182 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Timers GFK 0582C The SNP X protocol uses the following timers Note that the T4 timer is used exactly as in the SNP protocol 4 This is the time interval that the SNP or SNP X master device must wait after sending a Long Break before sending an Attach or X Attach message This allows the slave device to setup the serial port and prepare to receive an attach message This timer is used only by the master device The usual value of this timer is 50 milliseconds If modem opera tion is indicated by configuring a non zero Modem Turnaround Time the T4 timer val ue is 600 milliseconds Broadcast Delay This is the minimum time interval that the S
344. vided into 4 sections Section 1 Cable Assembly Specifications Section 2 RS 232 Cables Section 3 RS 422 Cables Section 4 RS 422 Isolated Repeater Converter IC655CCM590 Section 5 RS 422 to RS 232 Miniconverter kit IC690ACC901 211 Section 1 Cable Assembly Specifications The cable assembly presents one of the most common causes of communication failure For best performance construct the cable assemblies according to the recommended connector parts and specifications e Cable connector to CMM ports 1 or 2 Male D Subminiature Type Cannon DB25P solder pot with DB110963 3 Hood or equivalent standard RS 232 connector Connectors for ports 1 and 2 are located on the Series 90 70 CMM board Both ports are brought out a single connector on the Series 90 30 CMM board A WYE cable is provided with each Series 90 30 CMM board Length maximum 50 feet 15 meters for RS 232 50 feet 15 meters for RS 422 RS 485 without isolation at the remote end 4000 feet 1200 meters for 5 422 5 485 with isolation at the remote end e Overall shield 24AWG minimum Connector to external device specified by external device manufacturer The following cables provide acceptable operation at data rates up to 19 2K BPS and dis tances up to 4000 feet for RS 422 RS 485 NEC 222P1SLCBT At shorter distances under 50 feet 15 meters almost any twisted pair or shielded twisted pair cable will work as long as
345. ype Register Word 5 00000 0000 Word 6 00000 0000 Word 7 06111 17DF 0006 0000 Word 3 00008 0008 Word 4 00009 0009 0000 0000 Word 8 00010 000A Word 9 00001 0001 Word 10 00200 00C8 Word 11 00050 0032 Word 12 00001 0001 Status Word Address minus 1 Register 10 Not used in NOWAIT Mode Not used in NOWAIT Mode Command Number Target CPU ID Target Memory Target Memory Address Data Length Source Memory Address Note When using the Input and Output tables the memory address must begin on a byte boundary and the data length must be a multiple of 8 56 Series 90 PLC Serial Communications User s Manual October 1996 GFK 0582C Chapter GFK 0582C SNP Service This chapter describes the SNP serial communications service Before proceeding with this chapter it is important to be familiar with the information presented in Chapter 4 Initiating Communications The COMMREQ This chapter contains the following sections Section 1 The SNP Data Block Section 2 The SNP Status Word Section 3 SNP Programming Examples The SNP serial communications service is supported by the CPU 351 beginning with re lease 6 50 and by the CPU 352 beginning with release 7 0 57 400 58 Section 1 SNP Data Block The SNP Data Block is the part of the COMMREO Command Block that

Download Pdf Manuals

image

Related Search

Related Contents

Philips AJ1000  Cisco Systems 15454M6DC Computer Accessories User Manual  Dossier de presse - SDE Lyon 2015  Modelo 2160Descargar Pdf  Infineon 80C517/80C537 User's Manual  Niles Audio TM-XM Satellite Radio User Manual  EMC Compliance Test Report  TECHNICAL MANUAL - Exhibitor Online Services  Modelo 275HVD - Chauvin Arnoux Group  

Copyright © All rights reserved.
Failed to retrieve file