Home
Allen Bradley
Contents
1. RS 244 C or Asynchronous port connecter Cable RS 422 A of 1770 KF2 compatible module port RS 232 C connector of computer a Connection Diagram 133008 Chapter 3 installing the 1770 KF2 3 13 Figure 3 66 Wiring Diagram for RS 232 C Asynchronous x port connector FIS 232 C of 1770 KF2 module BS 232 C compatible port connector of computer Chassis ground Signal ground mai AXD TxO B i 20 4 l ra MMA AW 7 25 pin female connector Cabie not exceeding 50 Ft i 3 2 20 a IL TD ll QTR Ee A a Se 3 SZ i i DCD DSR b Wiring Diagram of fiS 232 C Pid L VAAD Figure 3 66 Wiring Diagram for RS 422 A Asynchronous port connector S 422 A of 1770 KF2 compatible port module connector of RAS 426 A computer Cable not exceeding 4000 ft RDB Note The connector and the pin outs for the RS 422 A compatible computer port will depend on the computer manufacturer s standard assign ment Other pins may have to be jumipered on the computer connector to ensure proper Operation N 25 pin female connector c wiring diagram for RS 422 A ahs bc at Chapter 3 tnstatling the 1770 KF2 Connection to a Modem Ta connect the module to a modem you can construct your own cable according to the wiring diagram in figure 3 7 This cable plugs into the COMPUTER ASYNCHRONOUS co
2. TOTAL ENGINEERING SERVICES TEAM INC TEST Inc A Weatherford Enterra Company SCADAWARE i ALLEN BRADLEY PLC PROTOCOL INTERFACE Document 1250 02 Revised April 1996 This document is C Copyright 1994 by Total Engineering Services Team Incorporated TEST Ine New Orleans La USA All Rights Reserved Contact Arthur Zatarain PE via www artzat com For information on this document eee ee CONTENTS INTRODUCTION 0 0005 pa wati safe b Suttle G 1 PLC 5 HARDWARE INTERFACE karat JEN dud 2 FULL vs HALF DUPLEX e a EN weaned ees ir Binet A ja MAP SETUP FILE KEYWORDS it fk ola eae MSG Text message Medan ES ieg oD JA IE 3 TAG Table Reference ID 0 ee 3 ERROR Specify BCC or CRC Error Checking L LL 3 ACK Control Message Acknowledgements 2 00 0 eee 3 DUPLEX Specify Full or Half Duplex Protocol L 0000 3 STATION Specify Station ID 2 ees 3 UNITT MaltisPEC Emulattoti 2620 eek ea oe ane teh OS RY Oe ets 4 ID Set PLC Address Sire disor ka ue Baie es pei Pe BO ser as Sa Sh 4 SELE Select Logical TSP RTU Sasa adapun ee 4 FILE Define a PLC Map File soina ohte ee ee 4 MAP STATEMENT Define map between TSP and PLC data 2 5 MAP STATEMENT OPTIONS is o ak Gees je Sal age E 5 SAMPLE PLC MAP SETUP FILE Ait cath E hee Paice oe SETTING UP A PLC PROTOCOL TASK 8 MAP SELECT XK alae ol trai ii EA B oP A a INA a SEE A 8 MAP LOAD xx AB ifile
3. INTERFACE The TEST SCADA software uses a standard RS 232 port for communication This port can be connected to an Allen Bradley PLC 5 in one of the following three ways 1 A 1784 CP10 or 1784 CP11 interconnect cable can be used for a direct connection to Channel Q on a PLC 5 This provides communication to a single PLC on a peer to peer basis Each command received by the PLC through channel O is processed without regard for the Destination ID included in the command The Source ID included in each command is actually used to specily a file number in the PLC s memory for which the command applies 4 A 1770 KE2 module can be used to connect to Channel TA on a PLC 5 and communicate over the Data Highway Network When using this module the Source ID included in the command is replaced with the address of the 1770 KF2 module before being sent to the intended PLC Since the Source ID is actually used to specify a file number in a PLCs memory only a single file can be aecessed for each PLC connected to the 1770 KF2 module This file is called a Compatibility File and tts number is the same as the address of the KF2 madule The bit modify and move instructions BTD MOV and MVM can be used in a PLC s ladder logic to transfer bits to or from the compatibility file to other areas of a PLC s memory 3 A 1785 KE module can be used to connect to Channel TA on a PLC 5 and communicate over the Data Highway Network This module contains a dip switch which
4. PORT connector ot RS 232 C cornpatible PORT 1785 KE module connect fe t 1770 CG Cable 16 5 ft onnector of computer SHLD SHLD GND GND TXO RAD AXD TXD DSR OTR DCD DCD DTA DSR GND GND RTS ATS CTS CTS 15 pin Male 25 pin Male Connector Connector 19239 This type of connection includes the DTR signal to allow each end to detect the loss of the other end s ability to communicate If your computer does not provide the DTR signal Jumper pins 6 and 8 at the module tu pin 11 4 6 Chapter 4 Connecting Your RS 232 C Davice to the 1785 KE Connection to Another Communication Module You can connect the 1785 KE to another Data Highway interface module with a longline cable This cable can be up to 7 000 feet long Hawever remember that the cable lengih can limit the communication rate refer to the section earlier in this chapter entitled Electrical Characteristics of Lhe RS 232 C Port Fer information on how to construct a longline cable for connection to a o 1771 KG module refer to figure 4 3 9 1773 KA or 1775 KA module refer to figure 4 4 To construct the cable use a male connector at each end Use Belden 8723 or equivalent cable available from Allen Bradley under cat no 1778 CR Connect the cable shield at one end only Chapter 4 Connecting Your RS 232 C Device to the 1785 KE Figure 4 3 Connection to a 1771 KG Module RS 232 C PORT connector of 1785 KE module 15 pin M
5. The last parameter on the line is optional and is used to specify the name of the map file to be processed If no file name is specified the default file name RTU_AB is assumed H a file name is specified but does not contain an extension the defauit file extension AB is assumed lf an attempt is made to process a MAP LOAD command using an index number fer which a map has already been defined the command will be ignored and the current data map for the specified index number will remain unchanged MAP LOAD 1 AB TEST process map file TEST AB to define map 1 MAP DUMP filename This command is used to list the configuration of a data map ta a file This command can be processed by any RTU type task but two conditions must be met prior to processing the command if itis to be successful First the task processing the command must have a valid map selected Second the currently selected map must be defined from a prior MAP LOAD command The last parameter on the line is optional and is used to specify the name of the file to contain the listing of the map contiguration If no file name is specified the default file name AB MAP is assumed If a file name is specified but does not contain an extension the default file extension MAP is assumed MAP DUMP dump currently selected data map to file AB MAP MAP SCAN stn dst file start count This command is used ta request data from a remote unit using the A B protocol This command can be proc
6. be processed by any task although norma practice is to have it processed by Task O during system startup The format of the file is very similar to other TSP test files The keyword is the first word on the line and some abbreviations are allowed A semicolon can be used as a comment character allowing for comments anywhere in the text fite MSG Text message Text messages can be sent to the system console during map file processing with the MSG statement All text after the MSG keyword is echoed to the system consola TAG Table Reference ID Set the tag name for the data map being defined By default the tag names for each data map are MAP1 MAP2 MAP3 and so on These tag names can be used by any RTU type task to select a data map by tag name rather than by index number Tag PLCI Tag for this table is PLC1 ERROR Specifv BCC or CRC Error Checking Specify the type of error checking that will be used to check the accuracy of each message packet transmission The twa types of error checking available are the biock check character BCC and the 16 bit cyclic redundancy check CRC 16 The keywords BCC and CRC are used to specify the type of error checking to use The default is BCC Error CRC Specify CRC error checking ACK Control Message Acknowledgements Specify ON OFF or AUTO to control message acknowledgements to a PLC Specifying ON will cause an ACK to be sent to a PLC after each message is successfully received Specif
7. by any KTU type task However the defaust protocol for all RTU type tasks is the TSP protocol In order for a task to access a data map and use the Data Highway protocol the MAP SELECT command must be used This command is usually processed from within the STARTx RTU file which automatically gets processed when the task is started Once a valid data map is selected for an RTU type task the protocol for that task is determined by the type of map selected For more details refer to the MAP SELECT command in the section called MAP COMMAND MAP COMMAND IN TSP LANGUAGE This command is used to load a map file select a particular data map for a task send data to and receive data from another unit using the A B protocol and list the contiguration of a data map to a file The MAP corurand can he processed only by RTU type tasks The format of this command is the word MAP followed by a keyword and some additional parameters The available keywords and an explanation of each are given below MAP SELECT xx Up to 10 data mapping schemes can be defined on a TEST SCADA system at ane time However each task can have access to only one data map at a time This command is used to select a particular data map for an RTU type task A data map can be selected by index number or tag name SCABAWARE Allen Bradley PLC Protocol April 1996 Total Engineering Services Team TEST Page Valid index numbers range from 1 ta 10 and the default tag name of
8. each map is the keyword TAG followed by the index number This tag name can be changed from within the map file during a map load By default the current data map index for each task is O This means that there is no default data mapping scheme for any task and the default protocol for all RTU type tasks is the TSP protocol Once a valid data map is selected for an RTU type task the protocol for that task is determined by the type of map selected Modbus or A R protocol The command MAP SELECT 0 can be used by an RTU type task to disassociate itself with any data map This will cause the protocol used by that task to be returned to the TSP protocol If a third parameter is not specified in the command a message will be sent to the task processing the command ta show the current map index for that task MAP SELECT 1 select data map 1 for current task MAP LOAD xx AB filename This command is used to process a map file which defines a data map In this command a valid index number in the range 1 10 must be specified in place of the xx shown above Specifying a map tag name instead of an index number will not work for this command Because the data map to be defined is specified in this command by an index number the task processing the command does not have to select this map or any data map prior to processing this command Following the map index number is the keyword AB which specifies that an Allen Bradley map is being defined
9. is determined by the type of file specified in the command if the specified file is either an Output or Input tile an Unprotected Bit Write command is generated Otherwise an Unprotected Write command is generated Full Duplex Mode MAP DATA 41 write 8 elements starting at location O to file 1 of PLC 4 MAP DATA 2 7 08 63 write 3 elements starting at location 6 to file 7 of PLC 2 Half Duplex Made MAP DATA 4108 write 8 elements starting at location O to file 1 of PLC 4 Station 4 MAP DATA 2763 write 3 elements starting at location 6 to file 7 of PLC 2 Station 2 MAP DATA 5 2763 write 3 elements starting at location 6 to file 7 of PLC 2 Station B SAMPLE TSP DOWNLOAD FILE Assume that there are 2 Allen Bradley PLC data maps defined The first data map MAP1 is used to communicate directly with 3 PLC slaves The addesses of these PLCs will be 1 2 and 3 for gimplisity The second data map MAP2 is used to communicate with 2 additional PLCs that are connected ta a 1770 KF2 module The addresses of these PLCs will be 4 and 5 and the address of the 4770 KF2 modbule will be 10 Both data maps use the half duplex protocol Although all b PLCs could have been defined in a single data map they are setup in 2 data maps for illustrative purposes SCABAWARE Allen Bradley PLC Protocol April 1996 Toral Engineering Services Team TEST Page 10 Now assume that task 1 will be used as the A B PLC task and the fife LINK 1T RTU will be us
10. 232 G commpatible PORT 1785 KE module connector of modem SHLD SHLD GND CNO TXD TXO RXD AXD RTS RTS CTs crs DSR DSR pen a co DTA DTR GND GND 15 pin Male 25 pin Male Connector Connector ISEM
11. C Output file O postion 2 would contain a 1 otherwise a Q An update from a TEST SCADA unit to a PLC can occur in 1 of 2 ways First a request can be sent to a TEST unit acting as a slave The TEST unit would interpret the request build up a response in the PLC format and send back the response Second the TEST SCADA unit can act as a master and simply build up a PLC command and send it out Now let us consider what happens when data is transferred in the opposite direction fram a PLC to a TEST SCADA unit When data is transferred in this direction only the PLC locations that are mapped to TEST SCADA channel VALUES will have an effect on the TEST SCADA unit For example again consider the following 3 map setup lines where file O is a PLC Output file MAP 0 0 01 Value MAP O 1 O1 New MAP 6 2 OT Value New Now consider the state of the TEST SCADA unit after an update from these 3 PLC focations If the value of PLC Output file position O is 1 Output channel 1 1 would contain a 1 otherwise a The update from PLC Output file O position 1 would have no effect on the TEST SCADA unit because the mapping does not cantain a channel value The update fram PLC Output file O position 2 would have the same effect as the update from PLC Output File O position O This is because the NEW parameter would be ignored and tha VALUE parameter would work the same as it did fot position Q There is one last point worth mentioning about the mapping of PLC
12. NG UP A PLC PROTOCOL TASK Setting up a task to use the Allen Bradley PLC protocol involves a simple 3 step process These stops are 1 Define the task 2 Load the map file 3 Select the data map STEP 1 Any RTU type task except task O can be used to communicate using the A B PLC protocol A single line in the main configuration DAT file is ali that is needed to define an RTU type task Examples of such lines are TASK RTU Com TASK RTU AB PLC The keyword TASK indicates a new task definition and the keyword RTU indicates the type of task The third item on the line can be up to 16 characters long and is simply the task name STEP 2 In order for the TEST SCADA system to interface with an A B PLC a file musi be processed which maps TEST SCADA data types inte A B PLC data types The details of what is contained in the map file are described elsewhere in this document For now we assurne that the map file has already been created and that it is correct The MAP LOAD command must be used to process the map file and setup the mapping scheme This command can be processed by any RTU type task including task O Normally this command is processed by task O during program startup This can be either in the STARTO RTU file or a subroutine called from this fila Again the details of the MAP LOAD command can be found elsewhere in this document in a section called MAP COMMAND STEP 3 Once a mapping scheme has been loaded it is accessible
13. Output and Input files Since these locations contain either a O or a 1 they are easily mapped with the Status Input and Output channels af a TEST SCADA system However PLC Output and Input files can also be mapped to any transferring data for digital type channels When going from a TEST SCADA unit to a PLC the PLC location will be set to 1 when the value of the corresponding channel is not equal to Q otherwise ft will be set to 0 When going from a PLC to a TEST SCADA unit a channel value will be set to 1 when the PLC location contains a 1 otherwise it will be set to 0 For PLC Integer files each location contains a 16 bit integer value What each 16 bit value represents depends on the man setup for each location The available keywords for specifying what data will be mapped into each PLC Input file location are listed below VALUE integer representation of channel s current value Hi hi alarm setpoint LO lo alarm setpoint DB deadband value If no keyword is specified the keyword VALUE is assumed If more than one keyword is specified only the first one will have affect Consider the foliowing MAP setup lines where file 7 is a PLC Integer file MAP 70 V1 lt map integer value of V1 with file 7 position O MAP 7 1 VIH lt map integer format of hi setpoint with pos 4 MAP 7 2 VT LO lt map integer format of lo setpoint position 2 MAP 7 3 Al DB lt map integer format deadband with position 3 For PLC Floating Point files each
14. ale Connector Figure 4 4 User supplied Cable Belden 8723 7000 ft max cat no 1778 CR Connect the shield atone end only Belden 8723 7000 ft max NS erfa supplied male connectors Connection to a 1773 KA or 1775 KA Module RS 232 C PORT connector of 1785 KE module 15 pin Male Connector NS User supplied male connectors User supplied Cable Belden 8723 7060 ft max cat no 1778 CR Connect the shield at one end only User supplied Cable Beiden 8723 7000 ft max N Connector User supplied Cable 4 7 RS 232 C PORT connector of 1771 KG module 15 pin Male 15235 RS 232 C PORT connector of 1773 KA or 1775 KA module 25 pin Male Connector 15236 ET 4a Chapter 4 Connecting Your R 232 C Device to the 1785 KE Connection to a Modem To connect the module ta a madem you can use the modem interface cable cat no 1770 CP This cable plugs into the RS 232 C PORT connector on the module and the RS 232 C compatible connector on the modem Connect the cable shield at one end only The 1770 CP cable is 16 5 feet long If you need a longer cable or a male female adapter cable you can construct your own according to the wiring diagram in Figure 4 5 Be sure that the cable length does nat exceed the RS 232 C limit of 50 feet Figure 4 5 Wiring Diagram AS 232 C PORT Connector ta a Modem RS 232 C PORT connector of RS
15. annel or a channel range Hf a single channel is given it is directly mapped with the specified PLC file and position lf a channel range is specified the first channel in the range is mapped to the specified PLC file and position Cansecutive channels in the channel range are mapped to consecutive positions iri the same PLC file For example consider the following lines which could be used to map TSP Output channels 1 5 with PLC Output file O positions 0 4 In this example each line maps a single TSP Output channel MAP 0 0 O1 Map PLC file 0 position 0 with TSP channel 02 HAP Q 1 02 Map PLC file 0 position 1 with TSP channel 02 MAP 0 2 03 MAP 0 3 04 MAP 0 4 05 By using a channel range the same 5 TSP Output channels could be mapped to the same 5 Output file positions in 4 single command as shown below MAP 0 0 01 05 map chans 01 05 with file 0 positions 0 4 The remaining parameters of a map specification are strictly optional These parameters are keywords which specify exactly what data pertaining to the TSP channels will be mapped to the PLC files MAP STATEMENT OPTIONS For PLC Output and input files each file location contains ether a O ora i Therefore each location can be mapped with the value of a digital TSP channel Status Input or Output or the status of a channel condition such as the existence of a particular alarm condition The available keywords for specifying which channel data will be mapped into each PLC Output a
16. can te set far either LOCAL or REMOTE mode When in Local mode the 1785 KE module functions just like the 1770 KF2 module mentioned above However when in Remote mode the 1785 KE module will not raplace the Source ID with its own address before sending the command to the intended PLC it will simply pass along whatever Source ID is included in the command just as if a 1784 interconnect cable were being used FULL vs HALF DUPLEX Full duplex is used for point to paint links where two devices communicate on a pear to peer basis This involves simultanecus two way communications and both stations on the link can initiate communications whenever they wish Full Duplex can also be used to communicate te a number af remote stations on the Data Highway using point to point links Half duplex is used for multidrop networks where there is one master station and one or more slave stations All stations are tied together on a commen link and thus everybody hears everything transmitted on the link Since there is potential for two station s transmissions to collide if they both try fo transmit at once only the master can initiate a message aby time it wishes The slaves can only cammunicate when polled by the master For communications between a number of stations either Full duplex ar Half duplex could be used Using Full duplex will provide the best performance However it is more expensive since communications to the remotes are via dedicated point to p
17. dress Whenever data is requested from PLC 4 or PLC 5 it is read from the PLC s compatibility file The compatibility file of each PLC is file number 10 which matches the address of the 1770 KF2 module Similarly whenever data is sent to PLC 4 or PLC 5 it is written ta the same compatibility file To better understand how to exchange data between a PLC using a compatibility fila and a TEST SCADA system let s take a closer look at the two MAP SCAN commands shown above for PLC 5 These commands are map scan 10 5 798 scan 8 elements starting at 0 from file 10 of PIC 5 map scan 1d 5 888 scan 8 elements starting at 8 from file 10 of PLC 5 Assume that file 7 is defined as an Integer file and file 8 is defined as a Floating Point file within PLC 5 Also assume that the data contained in files 7 and 8 is to De mapped with TSP channels as shown below PLE 5 TSP Channel File 7 Element 0 Vi Element 1 v2 Element 2 v3 Element 3 VA Element 4 v5 Element 5 V6 Element 6 V7 Element 7 v8 File 8 Element Q Al Element 1 A2 Element 2 A3 Element 3 A4 Element 4 A5 Element 5 AG Element 6 A7 Element 7 A8 Now assume that compatibility file 10 is defined as an Integer file within PLC 5 and the PLC is SEADAWARE Allen Bradley PLC Protocol April 1996 Total Engineering Services Team TEST Page if programmed to continuously copy the first 8 elements of files 7 and 8 into this file The mapped data contained in file 10 might then look l
18. ed to get a continuous update from all 5 PLCs Polling can automatically begin whenever task 1 is started by including the line READ LINKI in the START1 RTU file Following is an example of what this LINKI RTU file would look like Allen Bradley PLC Constant Poll File map sel mapl sele first data map map scan 1 0 0 16 scan 16 elements starting at 0 from file 0 of PLC i map scan 2 0 0 16 scan 16 elements starting at 0 from file 0 of PLC 2 map scan 2 1 0 16 scan 16 elements starting at 0 from file 1 of PLC 2 map scan 2 1 15 16 scan 16 elements starting at 15 from file 1 of PLC 2 map scan 3 7 0 8 Scan 8 elements starting at from file 7 of PLC 3 map scan 3 888 scan 8 elements starting at 8 from file 8 of PLC 3 map sel na 277 hts second data map map scan 10 4 0 0 16 scan 16 elements starting at_0 from file 10 of PLC 4 map scan 10 4 L 16 scan elements starting at 16 from file 10 of PLC 4 map scan 10 5 7 0 R scan 8 elements starting at 0 from file 10 of PLC 5 map scan 10 5 888 scan 8 elements starting at 8 from file 10 of PIC 5 if ack 0 lt gt 0 if last scan command was unsuccessful return quit processing tile and constant poll endi map data 10 5 9 24 8 send B elements starting at 24 to file 10 of PLC 5 force 1 read Tinkl queue up msg to continue constant poli Natice that the MAP SCAN and MAP DATA commands for MAP2 use the STN DST notation where STN represents the 1770 KF2 address and DST represents the PLC ad
19. essed by any RTU type task except task O Before processing this command the task should have a valid A B data map selected which bas been defined using the MAP LOAD command The first parameter on the line following the SCAN keyword specifies a Destination ID and possibly a Station ID The Destination ID represents the address of the PLC that is tte ultimate destination of the message This ID must be defined for the currently selected data map at the time this SCADAWARE Allen Bradley PLC Protocol April 1996 Total Engineering Services Team TEST Page 9 message is processed For all full duplex and most half duplex applications the Destination ID is all that needs to be provided by this parameter However when using half duplex protocol this parameter can also include a Station ID which is designated using a colon and the format STN DST H the STN is not specified the Station ID included in the outgoing message will be the same as the Destination ID Following the PLC ID is the file number for which data will be read from the PLC This file number must be detined for the specified PLC ID The last two parameters that must be specified in the SCAN command are the starting location and number of locations within the map for which data is requested All mapping starts at location O For example if a file af 200 elements is defined the actual locations that exist are O 199 If the start location specified is not within the val
20. file Available fila numbers range from 0 ta the maximum number of files specified in the ID statement minus one There are only 4 PLC data types supported at this time and the available keywords ara OUTPUT digital off or on INPOT digital off or on INTEGER 16 bit integer FLOAT 32 bit floating point If more than ane file definition exists for the same file number under the same map ID only the first definition line for that file will be accepted FILE O OUTPUT 256 define file O as type Output with 256 elements FILE 1 INPUT 256 define file 1 as type Input with 256 elements FILE 7 INTEGER 128 define file 7 as type Integer with 128 elements FILE 8 FLOAT 64 define file 8 as type Float with 64 elements SCABAWARE Allen Bradley PLC Protocol April 1996 Page 4 MAP STATEMENT Define map between TSP and PLC data Specify a link between TSP channel data and PLC file data Parameters include a PLC file number a number representing the position within that file a TSP channel or channel range and optional data type specificanan The specified PLC file number must be defined using the FILE statement before it can be mapped Fallawing the PLC file number is a number which represents the position within that tila where the TSP channel mapping will begin Remember data within a PLC file starts at position O and extends up lo the maximum number of elements in the file minus 1 The next parameter can be either a single TSP ch
21. g Point file in the TEST system Notice that the elements in file 8 of the TEST system start at position 8 rather than 0 The reason for this should be clear after examining the two MAP SCAN commands in more detail First af all let s fook at the command SCADAWARE Allen Bradley PLC Protocol April 1908 Total Engineering Services Team TEST Page 12 map scan 10 5 7 9 8 scan 8 elements starting at 0 from file 10 of PLC 5 When the TEST SCADA system processes this command it first looks at the specified number of clements ard the type of data contained in the specified file Together this information wilt determine how many bytas the TEST system will attempt to read from the PLC In this command the specified file is 7 which is defined as an Integer file Since there are 2 bytes per element and the number of elements specified is 8 the TEST system will send out a command requesting 16 bytes from the PLC The data will be read from the compatibility file file 10 starting with element O as specified in the command The returned data will be written to file 7 in the TEST data map again starting with element O as specified in the command Now let s look at the second MAP SCAN command map scan 10 5 8 8 8 scan 8 elements starting at 8 from file 10 of PLC 5 The specified file in this command is file 8 which is defined as a Floating Point file Since there are 4 bytes per element and the command requests 8 elements from the PLC the TEST
22. id range an error will result If the number of locations specified extends beyond the upper limit the count will automatically be reduced to eliminate the overrun When a TSP MAP SCAN command is processed an A B Unprotected Read command is generated This command can generally be executed by any PLC node and is used to read wards of data from any area of the PLC data table memory The number of words to read is automatically calculated based on the type of data contained in the specified file the starting location in the file and the number of locations to read Full Duplex Mode MAP SCAN 4 1 l read 8 elements starting at location O from file 1 of PLC 4 MAP SCAN 2 7 read 3 elements starting at location 6 from file 7 of PLC 2 no we Half Duplex Made MAP SCAN 4108 read 8 elements starting at location O from file 4 af PLC 4 Station 4 MAP SCAN 2763 read 3 elements starting at location 6 from file 7 of PLC 2 Station 2 MAP SCAN 5 2763 read 3 elements starting at location 6 from file 7 of PLC 2 Station MAP DATA stn dst file start count This command is used to send data to a remote unit using the A B protocol The parameters required by this command are the same as those required by the MAP SCAN cemmand with tha exception that data will be written to the specified file rather than read When a TSP MAP DATA command is processed either an A B Unprotected Bit Write or an Unprotected Write command is generated The resulting command
23. ike this PLE S TSP Channel File 10 Element 0 Vi Element 1 V2 Element 2 v3 Element 3 V4 Element 4 V6 Element 5 V6 Element 6 y7 Elernent 7 VB Element 8 upper 2 bytes of Al Element 9 lower 2 bytes of At Element 10 upper 2 bytes of A2 Element 71 lower 2 bytes of A2 Element 12 upper 2 bvtes of A3 Element 13 lower 2 bytes of A3 Element 14 upper 2 bytes of A4 Element 16 lawer 2 bytes of A4 Element 16 upper 2 bytes of A5 Element 17 Jower 2 bytes of A5 Element 18 upper 2 bytes of AG Element 19 lower 2 bytes of AG Element 20 upper 2 bytes of A7 Element 21 lower 2 bytes of A7 Element 22 upper 2 bytes of AB Element 23 lower 2 bytes of AS Fite 7 and file 10 are both Integer files and each element takes up 2 bytes in either file File 8 is a Moating Point file which requires 4 bytes per element Therefore each element in file 8 takes up the equivalent of 2 elements in file 10 In order to properly read all data mapped with TSP channels V1 V8 and A1 A8 from the compatibility file using the two MAP SCAN commands shown above the TEST system data map for PLC ID 5 must be defined as shown below for files 7 and 8 PLCS TSP Channel File 7 Elemen 0 VI Element 1 V2 Element 2 V3 Element 3 V4 Element 4 V5 Element 5 V6 Element 6 v7 Efement 7 VB File 8 Element 8 Al Element 9 A2 Elament 10 A3 Element 11 Ad Elament 12 AS Elament 13 AG Element 14 A7 Element 15 AB Again as with PLC 5 define file 7 as an Integer file and file 8 as a Floatin
24. location contains a 32 bit floating point number The data that can be mapped te these locations and the keywords used to setup the map are the same as that for Integer files Now consider the following MAP setup lines where file 8 is a PLC Flaating Point file MAP 80 V1 lt map float value of V1 with file 8 position Q MAP 8 1 V1 HI lt map float format of hi setpoint with pos 1 MAP 8 2 V1 LO lt map float format of lo setpoint position 2 MAP 8 3 A1 DB lt map float format deadband with position 3 Again if no keyword is specified the keyword VALUE is assumed dley PLC Protocol Apri 1996 Total Engineering Services Team TEST Page 6 SAMPLE PLC MAP SETUP FILE Allen Mona PLC Test File msg Allen Bradley PLC Map File Start error CRE ack OFF duplex FULL units 3 msg Starting Unit 1 ID 1710 sele 5180 g Defining PLC Files ce it a nteger 20 Fils float 16 msg Mapping Qutput File 0 wap 0 ma a ol NEW map 0 2 a ALARN map 0 30 map 0 4 0 map map map ol 1 RESE oJ ABRORMAL ot NEW ALARM ot NEW RESET map map map map map la map RUST map 0 VI V5 msg Happing In Input File 1 ma S16 map ka i 2o ol 016 channels 01 0 2 o2 NEW a2 ALARM Bes loleoooos Bac 9 l 2 13 02 ABNORMAL 4 si s16 0 As ka msg Mapping Integer File 7 map 7 peine iy AL AL0 msg Mapping E Floating Point File 8 map map 8 8 al 8 msg Starting Unit 2 Ih 6 3 sele 55222
25. namel oe Terr Enos ee eee g MAP DUMP filename ee 9 MAP SCAN stridat file start count LL ee 9 MAP DATA sinidst file start count 2 0 ee EEEE TE 10 SAMPLE TSP DOWNLOAD FILE LL 10 INTRODUCTION Allen Bradley PLCs can receive command messages and reply to them via Data Highway Data Highway Plus DH 485 or RS 232 network By using the appropriate interface module a TEST SCADA system can access the network and communicate with any PLC using the Allen Bradley protocol This document provides detailed information on TEST s implementation of the Allen Bradley communications protocol Although the user is not expected to be an expert some familiarity with Allen Bradley PLCs and TEST SCADA systems is assumed This document is not a tutorial for Allen Bradley PLCs For additional information about A B PLCs and interface modules refer to the following A B publications Publication 1770 6 8 16 Data Highway Data Highway Plus DH 485 Communication Proteco and Command Set Reference Manual Publication ICCG 11 6 Allen Bradtey Communication Division SCADA Applications Guide Publication 1770 6 5 13 Data Highway or Data Highway Plus Asynchronous RS 232 C or RG 422 A Interface Module Cat No 1770 KF2 User s Manual Publication 1785 6 5 2 Allen Bradley 1785 KE Data Highway Plus Communications Interface Module User s Manual SCADAWARE Allen Bradley PLC Protocol April 7896 Total Engineering Services Team Page I PLC 5 HARDWARE
26. nd Input file location are listed below Following each keyword is the condition for which the corresponding PLC locations will contain a 1 when the data is transferred fram TSP VALUE if current value of channel lt gt O NEW if in alarm but not yet acknowledged ALARM if acknowledged but stiff in alarm state DB if cleared but still within deadband RES if no longer in alarm and waiting for reset ABNORMAL if alarm conditions NEW ALARM or RESET exist If no keyword is specified the keyword VALUE is assumed For PLC Outputs and Inputs multiple keywords can be specified on a single line In such a case the associated PLC file location would contain a 1 if any of the conditions are met at the time of the transfer from TSP to the PLC Far example consider the following 3 map setup fines where file O 1s a PLC Output file MAP 00 01 Value MAP O 1 O71 New MAP G 2 O1 Valus New Now consider the value of PLC Output locations 0 1 and 2 after an update of these 3 locations from a TEST SCADA unit If the value of Qutput channel 1 is 1 PLC Output file O position O would contain a 1 otherwise a O if Output channel 1 is in alarm but has not yet been acknowledged PLC SEADAWARE Allen Bradley PLC Protocal April F996 Total Engineering Services Team TEST Page Output file O postion 1 would contain a 1 otherwise a O H either the value of TSP Output channel is 1 or Output channel 1 is in alarm but has not yet been acknowledged PL
27. nd itself STATION 8 specify STN address of this map UNITS Multi PLC Emulation Within each data map up to 16 PLC IDs can be defined each with its own map setup The UNITS command defines how many logical Allen Bradley PLCs will be emulated by the data map being defined If this cammand is omitted a value of O is assumed Units B allow 5 different PLC addresses to be emulated ID Set PLC Address Specify the PLC ID number to be used for subsequent dala maps as well as the maximum number of files that can be mapped for that PLC No table sizes or data maps can be defined until an ID has been specified Valid HDs range fram O to 254 and each ID command will begin the next map setup Data can be mapped for any PLC file starting with O and ranging up to the maximum number of tiles specified minus one 1049 start defining PLC address 4 with a maximum of 9 files 0 8 SELE Select Logical TSP RTU Select a logical TSP RTU which is used in subsequent TSP data table references This is a convenience so that subsequent map lines do not have to explicitly name a particular RTU on each fine The RTU named in the SELECT line will be the default RTU Sela WD34A map following chans for West Delta 34 A RTU FILE Define a PLC Map File Define a PLC file which is used to map specific PLC data types with TSP data types Parameters include a file number a keyword specifying the type of file and a number specifying the number of elements in the
28. nnecter on the module and the RS 232 C compatible connector on the modem figure 3 7 Connect the cable shield at one end only Be sure that the cable length does not exceed the RS 232 C limit of 50 feet Figure 3 7 Connection to a Modem 25 pin fernale 25 pin male connector connector Asynchronous DRI part connector RS oa of 1770 KF2 compatible part module cannector of RS 232 C modem Asynchronous fa Connection diagram port connector RS 232 C ot 1770 KF2 compatible port module connector of RS 232 C modem i Cable not exceeding 50 ft Chassis ground l Signal ground TXD ap me o 4 zz 25 pin female 25 pin male connector cennector ib Wiring diagram 14831 BLUS HOSE 1770 KF2 to PLC 5 U 1770 KF2 PLC 5 Chapter 4 Connecting Your RS 232 C 4 5 Device lo the 1785 KE Direct Connection to a Computer To connect the module directly to a computer you can use a data terminal interface cable cat no 1770 CG This cable plugs into the RS 232 C PORT connector on the module and the RS 232 C compatible connector on the computer Connect the cable shield at one end only The 1770 CG cable is 16 5 feet long If you need a longer cable or a male female adapter cable you can construct your own according to the wiring diagram in Figure 4 2 Make sure that the cable length does nat exceed 50 feet Figure 4 2 Wiring Diagram RS 232 C PORT Connector to Computer RS 232 C
29. oint links Half duplex is based on full duplex protocol but also includes a Station ID at the beginning of each master message When the TEST SCADA software is acting as a master using half duplex protocol the Station ID included in each outgoing message is provided by the MAP SCAN or MAP DATA command The station ID reprosents the address of a slave on a multidrop link This should not be confused with the Destination ID which is the final destination of the message In most situations a PLC is actually a slave on the multidrop tink and the final destination of a message Therefore the SRC and DST are the same However when multiple PLCs are tied into a network interface module the interface module acts as a slave on the multidrop link and the PLCs are the ultimate destinations of the messages In this situation the MAP SCAN and MAP DATA commands should specify the Station ID to be the address of the interface module and the Destination ID to be the address of the intended PLC Refer ta the MAP SCAN command far more information on how to specify a Station ID S ABAWARE Allen Bradley PLC Protocol April 1996 Total Engineering Services Team TEST Page 2 MAP SETUP FILE KEYWORDS The map file contains plain text statements on lines which begin with Map File keywords Each line performs a specific function to build and define the tables which form the data map between TEST SCADA data types and Allen Bradley PLC data types The map file can
30. or Male sl DSR 8 DCO 20 DIR 19871 B 17 3 12 Chapter 3 installing the 1770 KF2 If you are connecting a 1770 KF2 module to an RS 232 C compatible device e g modem or computer then vou must mount the module within 50 cable feet of that device For such applications the module s GND must be connected Lo the GND of the modem or computer This type of connection does not provide electrical isolation between Lhe module and the connected device If a connection is made between the 1770 KF2 and an RS 422 A compatible device you can mount the device and the module up to 4000 cable feet apart Direct Connection to a Computer To connect the module directly to a computer you can construck your own cable according to the wiring diagram in figure 3 6a This cable ptags inte the COMPUTER ASYNCHRONOUS connector on the module and the RS 232 C or RS 422 A compatible connector on the computer figure 3 8a Connect the cable shield at not one end only Be sure that the cable length do exceed the RS 232 C limit of 50 feet er the RS 4 limit of 4000 feet This type of connection includes the DTR signal to allow each end to detect the loss of the other end s Ti ability to communicate H your computer does not provide the DTR signal jump pins 6 and 8 at the 1770 KF2 module ta pin 20 Figure 3 6a Connection lo a Computer 25 pin female 26 pin male connector connector
31. peg De Defining i Files e l input 1 msg Mapping ma Input File 1 map 1 msg Starting Unit 3 ID 9 sele hil7d msg Defining PLC Files file 0 output file l input 20 use Full du lex use 16 A CRE error checking do not send any Acks protocol tota PLCs to be simulated first unit is PLC ID 17 with maximum 10 files TSP channel mapping will be for 55180 RTU H output bit file Input bit file eger fije l Hoa ing point file gt PLC Output file 0 bit 0 is value of FSP 01 PLC Output file 0 bit 1 is new alarm status of PLC Output file 0 bit 2 is in alarm status of TSP 01 PLE Output file 0 bit 3 is deadband status of TSP 01 Bee Output file 0 bit 4 is reset status of TSP Oi PLC Output file 0 bit 5 is abnormal status of TSP 01 PLC output file 0 bit 6 is New or In alarm status of TSP O01 PLC Output file 0 bit 7 is new or reset status oF TSP PLC Output file 0 bit 8 is value of TSP 02 PLC Output file 0 bits 14 29 are TSP channels PLC Qutput file 0 bits 30 34 are TSP channels 7 PLC input file 1 bits o 15 are TSP channels PLC Input file l bits 20 35 are TSP PLC Integer file 7 integers 0 9 are TSP channels TSP channel mapping will be for 55222 RTU TSP channel mapping wil be for HI170 RTU April 1996 Page 7 Total Engineering Services Team TEST msg Mapping Output File 0 map 0 koiett msg Mapping Input File L map 1 b 917516 msg AtTen Bradlev PLC Map File Done SETTI
32. system will send out a command requesting 32 bytes from the PLC Again the data will be read from compatibility file 10 However instead of starting with element 0 data will be read starting with element 8 as specified in the command The returned 32 bytes will be written to file 8 in the TEST data map starting with positon 8 TOTAL ENGINEERING SERVICES TEAM INC TEST INC TEST INC OFFICE New Orleans LA Latayette LA Houston TX Ventura CA Anchorage AK Singapere Bahrain MAIN NUMBER FAX NUMBER 504 371 3000 318 269 0911 713 467 3113 805 658 0403 807 276 5660 65 533 4108 65 534 2403 973 690 575 973 697 010 504 371 3001 318 269 0910 713 467 8113 809 658 9975 907 276 6361 File RI BOWP AMZ Printed April 3 1996 SCADAWARE Allen Bradley PLC Protocol April 1996 Page 13 Appendix B Cabie Connections Figure B 9 Interconnect Cable 1784 CP10 PLC 5 11 5 20 5 30 5 40 5 40L 5 60 5 60L 5 80 Processor to Terminal using serial port te eee Na See OM 10 11 9 SKT IBM AT Computer Female 25 pin PLC Processor RxD 2 Male GND 5 XD 3 DSR 8 DCD 20 DR 19870 e B 16 Appendix B Cable Connections Figure B 10 interconnect Cable 1784 CP11 PLC 5 11 8 20 5 90 5 40 5 40L 5 60 5 B0L 5 80 Processor to Terminal using a serial port _ 8am 25 SKT IBM XF Computer Female PLC Process
33. ying AUTO will cause an ACK to be sent to a PLC before each message is sent and after aach message is successfully received The default setting is OFF which prohibits any ACKs from being sent and can significantly reduce the number of necessary transmissions ACK ON send ACK after each message is successfully received ACK AUTO send ACK before sending msg and after receiving msg DUPLEX Specify Full or Half Duplex Protocol Specify whether FULL or HALF duplex protocol will be used The default setting is Full Duplex For more information refer to section Full vs Half Duplex DUPLEX HALF use Half duplex protocol STATION Specify Station ID Specify the Station ID for the current map table This ID is only necessary when using half duplex protocol In half duplex the beginning of each message sent by a master contains a Station ID When this unit is acting as a slave and a message is received a check is done to see that the Station SCADAWARE Allen Bradley PLC Protocol Aprit 1996 Total Engineering Services Team TES Page 3 ID included in the message matches the Station ID of this unit Hait dees not match the message is ignored NOTE This Station ID is only used to check incoming messages it is not included in any response to incoming messages or in outgoing messages initiated by this unit acting as a master When acting as a master the Station ID included in any outgoing message is provided by the MAP SCAN or MAP DATA comma
Download Pdf Manuals
Related Search
Related Contents
取扱説明書(PDF) User Manual Manuale - Hanna Instruments Ingressi aria igroregolabili HQ EL-WDB201 door bell LIVA - 25 - SERCATE SLU , productos quimicos y deterjentes de Appel à candidature 1 Maroc (410) Programme UNITWIN/Chaires UNESCO Rapport d Copyright © All rights reserved.
Failed to retrieve file