Home

6001-6.5.5, Allen-Bradley Standard Driver Software, User Manual

image

Contents

1. CMD STS TNS FNC 06 07 Reply Format CMD STS TNS 46 You can use this command to check the integrity of the transmissions over the communication link The command message transmits up to 243 bytes of data to a node interface module The receiving module should reply to this command by transmitting the same data back to the originating node Command Format CMD STS TNS FNC DATA 06 00 243 bytes max Reply Format CMD STS TNS DATA 46 243 bytes max B 7 Appendix B Specifying Message Packet Commands with Send_StdDrv Diagnostic Read Diagnostic Status B 8 This command reads up to 244 bytes of data from the PROM or RAM of the node interface module You can use it to read the module s diagnostic timers and counters When communicating to an SLC 500 set ADDR to 0 and SIZE to 10 decimal See appendix C for diagnostic read replies for DH 485 devices Command Format CMD STS TNS FNC ADDR SIZE 06 01 Reply Format CMD STS TNS DATA 46 244 bytes max Your computer uses this command to read a block of status information from a DH 485 device The reply contains the information in its DATA field The status information varies with the type of device See appendix C for diagnostic status replies for DH 485 devices Command Format CMD STS TNS FNC 06 03 Reply Format CMD STS
2. B 10 Appendix B Specifying Message Packet Commands with Send_StdDrv Reply Format CMD STS TNS EXT STS DATA 4F only if error 244 bytes max The following are possible STS and EXT STS responses Table B E Possible Responses for Typed Logical Read with Three Address Fields This Response Means STS 00 SUCCESS 10 command format incorrect 50 address problem F0 extended STS EXT STS 1A file already open Appendix B Specifying Message Packet Commands with Send StdDrv Protected Typed Logical Write Command Format with Three Address fields File Element Sub element CMD STS TNS FNC BYTE FILE FILE ELEMENT SUB ELMT DATA OF AA SIZE NUMBER TYPE NUMBER NUMBER 244 bytes max Table B F Protected Typed Logical Write with Three Address Fields Byte Description CMD OF STS Indicates the status of a message transmission TNS A unique 16 bit transaction number Use it to match a reply message to its corresponding command which contains the same number FNC AA BYTE SIZE the size of data to be written in bytes notincluding the address fields or other overhead bytes FILE NUMBER or Byte 7 addresses files 0 254 only For higher addresses byte bytes 7a 7c 7a FF expands FILE NUMBER to three bytes total Bytes 7b and 7c are used for expanded file address low address byte first FILE TYPE 80 81 R
3. see 4 4 Using Close StdDrv 24e ethe eh Miao tg Bee Rates 4 7 Compiling Linking and Configuring Your Application Program 5 1 Chapter Objectives iu secet eget tne eec tr eee gal YU dece n Compiling and Linking Your Application Program 0000 51 Configuring Your Application Program 0 cee eee ee eee 5 3 Application Program Examples 00 cee eee eee ee eee ee A Sample Prograf sorser tenini iiia E ata deine eur eu dessins A PLC 2 Unprotected Read osci oro terere et yr eder e ek een A 4 PLC 2 Unprotected Write ao ke ecied rers i ere EU RU aser eter E aS Diagnostic Loop Back serrie inerea rr het mee e eger rns A 4 Diagnostic Counter Read ou auis nee dae eer Oe gebat he aoc nq epa uoa qs A 1q Diagnostic Status 0 cece eee ee eee nnn e eee E E 4 13 Diagnostic Counter Reset 0 ec nh A 14 Specifying Message Packet Commands with Send StdDrv B Chapter ObjectiyeS sesto ker bea ER OEC KO E ROI I e Fa a Ra o dc d Formatting the Message Packet Message Packet Fields i e EEeRreR ORPHEO REPE SERRA REESE Supported Command Set rn ERU ERI Uer S DERE d REN RR RACE SOR B 4 Diagnostic Counters Reset R 9 0 RR a 0 RR cece RRR eens B 7 Diagnostic Loop erii dices rr RR dee ins CERE Y RE ERO EU E ODE mE eie Diagnostic Read soo bp vuitton cec pases Miei obs a EL osa y run rin RTT rL Unprotected Read 55 cos Hep eS Ep ERO ACA Ret eC dC S E
4. The timeout variable is the number of seconds that you want to wait for a reply Important If you are communicating to an SLC 500 using the unprotected read or unprotected write commands create Data File 9 in the SLC 500 The SLC 500 uses this file for DH 485 communication The data table address defined as dt addr in the Appl StdDrv function will 4 3 Chapter 4 Writing Your Own Application Program Using Send_StdDrv 4 4 be interpretted by the SLC 500 as a logical offset in words into Data File 9 See the SLC 500 Advanced Programming Software Manual chapter A3 for more information on the SLC 500 memory organization If you do not wish to use the commands supported by the Application Library use the Send_StdDrv function to send user formatted messages The Send_StdDrv function call transmits data over the DH 485 network to a DH 485 station Depending on your application you can use the Send StdDrv function call two ways You can communicate with token passing DH 485 devices such as the SLC 500 communicate with slave only DH 485 devices See appendix B for more information on message packet formats for the Send StdDrv function call Any transmission that does not complete normally is aborted by a timeout or local error code indicating the problem See appendix D for a list of error codes Use the following format and parameters Format for Send StdDrv The Send StdDrv function call is
5. amp io stat 0 I O status XT DHP_MSG L_R 0 DHP_MSG dst amp DST DH 485 address x DHP_MSG dta amp dt_addr DT address KY DHP MSG len size Size in bytes DHP MSG buf amp d buff 0 Write buffer DHP MSG TO timeout Reply timeout in sec XJ PLC FCT PLC2 UWR Initialize a PLC function x Write 2 integer values to a SLC 500 file at remote station DST x fct stat Appl StdDrv PLC FCT amp DHP MSG x Appendix A Application Program Examples Fct stat returns 1 if F2E snet the command successfully if fct stat NORMAL Get ErrMsg fct stat err msg 9 printf s n err msg fct stat close StdaDrv device exit 1 When a reply has been received or a timeout io_stat 0 will be set while io_stat 0 printf status reply received n If io stat 0 does not 1 then an error occurred if io stat 0 NORMAL Get ErrMsg io stat 0 err msg printf s n err msg fct stat Close StdDrv device exit 1 Appendix A Application Program Examples PLC 2 Unprotected Read DH DH Application Library c 1989 APPLICATION SYMBOL PLC2 URD Include files Linkable Driver krdefs h stddrv h include include Application Variables int size PLC FCT GEE b e unsigned int status io stat 2 dt addr 0110 timeout char device K
6. 1 Type sTARTA485 followed by the communication option settings For example type START485 a0 m31 cM b9600 where This Variable Is a the DH 485 address of the 1784 KR valid addresses are 0 31 m the maximum node address on the Dh 485 link valid addresses are 0 31 c the category of operation this is always m b the DH 485 baud rate valid entries are 300 1200 2400 4800 9600 or 19 200 baud only Important SLC 500 processors operate at 9600 or 19 200 baud only 2 Press ENTER This operation initializes the 1784 KR Now that the 1784 KR board and driver are installed and configured you can run your application program Appendix Application Program Examples Sample Program The following program is an application that shows how to write information to Data File 9 of an SLC 500 processor using the Application Library and the PLC 2 Unprotected Write function symbol If you are communicating to an SLC 500 using the unprotected read or unprotected write commands you must first create Data File 9 in the SLC 500 The SLC 500 uses this file for DH 485 communication The data table address defined as dt addr in the Appl StdDrv function will be interpretted by the SLC 500 as a logical offset in words into Data File 9 See the SLC 500 Advanced Programming Software Manual chapter A3 for more information on the SLC 500 memory organization x A typical 6001 F2E Application Calling the Applicati
7. function 4 5 Chapter 4 Writing Your Own Application Program Preventing Reply Messages from Being Lost To prevent reply messages from being lost we provide a Get_tns function Use the following format x Get tns The Get_tns function returns an unsigned integer value Place this value in the two byte TNS field of your DH 485 message prior to calling the Send StdDrv function See page B 5 for more information on Get tns Using Get ErrMsg The Get ErrMsg function call supplies a message string for errors in data transmission If an error occurs call Get ErrMsg with the error code to get a message indicating the problem Use the following format and parameters Format for Get ErrMsg The Get ErrMsg function call is shown below Get ErrMsg err ret msg Parameters for Get ErrMsg Table 4 E explains the parameters Table 4 E Get ErrMsg Parameters Parameter Description err unsigned int is a copy of the error value returned in io stat 0 ret msg char is a pointer to a character buffer at least 80 characters long It contains the error message string that corresponds to the code in the err parameter The error message is returned in this buffer Table 4 F explains how to read io stat 0 to get the STS and EXT STS bytes 4 6 Chapter 4 Writing Your Own Application Program Table 4 F Reading io stat 0 If the STS and EXT STS bytes of io stat 0 look like this Itis a
8. Message Packet Formats for the Basic Command Set Diagnostic Read Reply Diagnostic Counters C 4 The table below contains diagnostic read reply values for s SLC 500 s APS COMI 1784 KR Interface Module Table C D Diagnostic Read Reply Values for SLC 500 APS and 1784 KR This Byte Means 0 Total packets received low byte 1 Total packets received high byte 2 Total messagaes sent low byte 3 Total messages sent high byte T qeds 7 7 5 Reylmtexeeed WKmmemyst 7 NAK no memory received 8 Baimesagereeved Error Codes Appendix Error Codes This appendix contains local and remote error codes Table D A Local Error Codes Error Codes in Hex Message 1 Successful transmission 18 LLC Interface not initialized SSAP already used or invalid SSAP 19 LLC Interface not initialized KTLLC driver not installed 1A Unsuccessful send request SSAP not active or illegal 1B Unsuccessful send request Invalid packet size 1C Unsuccessful send request Host cannot access dual port 1D Reply timeout No reply data received 1E Unsuccessful send request Buffer not available 1F DH 485 Interface not initialized 23 Bad function parameter 25 Invalid Channel 21 KR transmit timeout 28 Fatal solicited buffer memory allocation 29 Fatal timer buffer memory allocation 2A Fatal timer buffer memory corrupted 2B KR channel already open D 1 Appendix D Error Codes D 2
9. STS EXT STS l Command message No error The values in the EXT STS byte can be any values STS EXT STS F0 Reply message with extended status information Match the code in the low byte EXT STS to the code for the appropriate command in appendix D STS EXT STS Reply message X status field of the DH 485 e field contains remote errors returned y devices on the DH 485 network See appendix D for a list of error codes Y lt user interface local error codes listed in appendix D S S Using Close_StdDrv The CloseStdDrv function call releases all resources and services and must be called before the application terminates Use the following format and parameters Format for Closing Communication The Close StdDrv function call is shown below status Close StdDrv device Parameters for Closing Communication Assign the parameters in Table 4 G Table 4 G Assigning Parameters to Close Communication Parameter Description device KR 0 The device parameter should coincide with the device used in the Open StdDrv function When the Close function is called a status value is returned indicating whether the operation was successful or unsuccessful Normal completion is 1 A value other than 1 indicates that an error occurred See appendix D for a list of error codes 4 Chapter Objectives Compiling and Linking Your Application Program Compiling Linking and Configuring Your Application
10. 0 4 7 Get ErrMsg using 4 6 Open StdDrv using Overview 1 2 Send StdDrv preventing reply messages from being lost 4 6 specifying message packet commands B 1 Send StdDrw using G Get tns Function 4 6 Include F iles Medis E M Message Packet Fields 8 4 Message Packets Fomating 6 1 communicating with slave only devices communicating with Token passing devices P Programming Considerations 3 2 S Standard Driver Library Files 2 2 Standard Driver Software Considerations Contents of 2 1 application librar files 2 2 example es 23 ing fa driver ibrary files 2 2 Product Overview Why you use it 1 1 ALLEN BRADLEY NIU A ROCKWELL INTERNATIONAL COMPANY With offices in major cities world Wi dhes WORLD EUROPE INDIA ASIA PACIFIC CANADA LATIN AMERICA HEADQUARTERS MIDDLE EAST AFRICA HEADQUARTERS HEADQUARTERS HEADQUARTERS 1201 South Second Street HEADQUARTERS Allen Bradley Hong Kong Allen Bradley Canada Limited 1201 South Second Street Milwaukee WI 53204 USA Allen Bradley Europa B V Limited 135 Dundas Street Milwaukee WI 53204 USA Tel 414 382 2000 Amsterdamseweg 15 2901 Great Eagle Center Cambridge Ontario NIR 5X1 Tel 414 382 2000 Telex 43 11 016 1422 AC Uithoorn 23 Harbour Road Canada Telex 43 11 016 FAX 414 382 4444 The Netherlands G P O Box 9797 Tel 519 623 1810 FAX 414 382 2400 Tel 31 2975 60611 Wanchai Hong Kong Telex 069 59317 Telex 844 18
11. Description Status Reply 19 Processor Mode Status C ontrol Word Bit 0 4 mode 0 Download 1 Program 2 Reserved 3 Idle due to SUS instruction 4 Reserved 5 Reserved 6 Run 7 Test Continuous Scan 8 Test Single Scan 9 31 Reserved Forces Active Forces Installed Communication Active 20 Processor Mode Status Control Word High Byte BIL Protection Power Loss Bit2 Load Memory Module on Mem Error Bit5 Major Error Process halted 21 Program ID low byte 22 Program ID high byte 23 Processor RAM size in Kbytes 24 Directory File Corrupted 00 1F Program Owner Node Address 3F No Program Owner C 2 Appendix C Message Packet Formats for the Basic Command Set Table C B Diagnostic Status Reply for APS Software with COM1 Port DH 485 connection Byte Description Status Reply Hex 1 00 no modes 5 Series Revision Bits 0 4 0 Release 1 1 Release 2 etc Bits 5 7 0 Series A 1 Series B etc 6 16 Bulletin Number Name APS ASCII 17 24 Product Specific Information 00 Table C C Diagnostic Status Reply for 1784 KR Byte Description Status Reply Hex 1 Mode Status Byte 00 no modes 2 Type Extender FE 3 Extended Interface type 24 5 Series Revision Bits 0 4 0 Release 1 1 Release 2 etc Bits 5 7 0 Series A 1 Series B etc 6 16 Bulletin Number Name ASCII 1784 KR 17 24 Product Specific Information 00 C 3 Appendix C
12. Function Call Lets You Open StdDrv initialize the 6001 F2E Standard Driver Use this function call in every program you write Appl StdDrv use predefined support routines Application Library in applications that use the basic command set See page 4 2 for a list of these commands Send StaDrv format commands not provided in the Application Library It lets you format message packets when communicating with token passing or slave only devices Get ErrMsg retrieve an ASCII string that describes a network message error Close StdDrv end communication Use this function call in every program you write Important When you write your program you must always start with Open StdDrv and end with Close StdDrv The middle of your program will consist of Appl StdDrv or Send StdDrv or a combination of both Use the Send StdDrv function call to format commands not supported by the Application Library routines See table 4 B on page 4 2 for a list of these commands Your disk contains example programs F2EDIAG C and F2ESLC C you can use to test communication on the DH 485 network See appendix A for additional program examples The next chapter for the format and parameters for each function call Programming Considerations Keep the following considerations in mind when you write your application program Use Borland Turbo C v2 01 or later or Microsoft C v5 0 or later Whether you use only Appl StdDrv routines
13. Program This chapter tells you what you need to do before your application program can communicate with other devices on the network First you compile and link the software then configure it See the instructions below To compile and link the linkable driver application software do the following 1 Create your application program and include the KRDEFS H and STDDRV H files 2 Compile your application program with the large memory model option 3 Link your driver with an appropriate standard driver and application library module Important In addition to including header files in your application you need to link with an appropriate Standard Driver and Application Library file whether you are using the Application Library or not 4 Copy your application EXE and START485 EXE programs to the directory you wish to use 5 If the 1784 KR card switch settings are configured for other than default settings enter an environment string See the PC DH 485 Interface Module Installation Data publication 1784 2 23 for more information 5 1 Chapter 5 Compiling Linking and Configuring Your Application Program Configuring Your Application Program 5 2 The following are compile line examples of Microsoft C and Borland Turbo C s Microsoft C C gt CL AL Gs PROGRAM C L MSAPP LIB L MSKT LIB Borland Turbo C C gt TCC ml PROGRAM L TCAPP LIB L TCKT LIB To configure your application program
14. RR RC RUE Rcg Unprotected Write a aE AR RTE een canaries egere edlen OON oS eh dece aia s Protected Typed Logical Read with Three Address Fields File Element Sub element sss se a a 00 R 0 R RRR R RRR RR ne Protected Typed Logical Write with Three Address fields File Element Sub element 0 ccc eee eens Diasnostic Replies ore eerte Ree deleto a inpr ble E bie oe Diagnostic Status Reply E 0 rE TEE ec oa a Diagnostic Read Reply Diagnostic Counters e 0c eee eee Error Codes 2o eec ae RU ERRRCRRMeDENRUPEA D Er Ra DUE ee inr v dtd STE PEIPER les Um EEREE This Manual s Purpose Audience Related Publications Preface Preface This manual shows you how to s Install the 6001 F2E Standard Driver software Communicate with DH 485 stations via the 6001 F2E Standard Driver software Use this manual and the 6001 F2E Standard Driver software if any of your application programs require information from devices such as the SLC 500 programmable controller We assume you are familiar with the DOS operating system and C programming language See the following publications for information about communicating on the DH 485 network For installing the 1784 KR module Refer to this manual PC DH 485 Interface Module Installation Data publication 1784 2 23 Data Highway Data Highway Plus Protocol and Command Set User s Manual publication 1770 6 5 16 SLC 500 Advanced Programming Soft
15. TNS DATA 46 244 bytes max Unprotected Read Unprotected Write Appendix B Specifying Message Packet Commands with Send_StdDrv This command reads words of data from any area of PLC data table memory Use the SIZE field to specify the number of bytes to be read To specify a number of PLC words SIZE should be an even value because PLC words are two bytes long Data bytes are transferred low byte first The address of a word should be even Command Format CMD STS TNS ADDR SIZE 01 Reply Format CMD STS TNS Dala 41 244 bytes max This command writes words of data into any area of PLC data table memory Command Format CMD STS TNS ADDR DATA 08 244 bytes max Reply Format CMD STS TNS 48 Important If you are communicating to an SLC 500 using the unprotected read or unprotected write commands create a Data File 9 in the SLC 500 The SLC 500 uses this file for DH 485 communication The data table address defined as dt_addr in the Appl_StdDrv function will be defined as a logical offset in words into Data File 9 See the SLC 500 Advanced Programming Software Manual chapter A3 for more information on the SLC 500 memory organization B 9 Appendix B Specifying Message Packet Commands with Send StdDrv Protected Typed Logical Read with Three Address Fields File Element Sub element C
16. codes 4 1 Chapter 4 Writing Your Own Application Program Communicating on DH 485 with the 6001 F2E Standard Driver Using Appl StdDrv 4 2 After you have initialized the Standard Driver with the Open StdDrv function call you are ready to communicate You can use the Appl StdDrv function call Application Library or the Send StdDrv function call or a combination of both Use the SendStdDrv function call to format commands not supported by the Application Library See table 4 B for a list of commands supported by the Application Library The Appl StdDrv function formats DH 485 messages for the basic command set and transmits them over the DH 485 network Use the Appl StdDrv with the selected PLC application symbol and Appl StdDrv message block data structure The application symbols and the message block data structure are defined in the STDDRV H header files Use the following format and parameters Format for Appl StdDrv The Appl StdDrv function call is shown below status Appl StdDrv SYMBOL SD FB Parameter Description SYMBOL identifies the support routine symbol see table 4 B SD FB struct initializes the DH function block see table 4 C See appendix D for return status values for the Appl StdDrv function Parameters for Appl StdDrv Table 4 B below shows the available functions in the Application Library you can use with Appl StdDrv Table 4 C shows the Appl StdDrv
17. message block data structure Table 4 B 6001 F2E Support Routines To do this Specify this Diagnostic loop back testing PLC DLB Read diagnostic counters PLC DCR Read diagnostic status PLC DS Reset diagnostic counters PLC RC Basic command setunprotected read PLC UPR Basic command set unprotected write PLC UWR Chapter 4 Writing Your Own Application Program Refer to Appendix B for each of the available Application Library routines Table 4 C Appl StdDrv Message Block Data Structure Variable DHP MSG LONNNMM 3E WINMERNNCEEEEK device DHP MSG stat Gio stati DHP_MSG L_R Loc Rem DHP_MSG dst amp destination DHP_MSG dta amp dt addr DHP_MSG len size DHP_MSG buf Kd bump DHP_MSG TO timeout Variable fiye Descripfion 000000000000 Description char The device variable indicates to the Standard Driver the communication interface and its channel Setthis variable to KR 0 The io stat variable serves two purposes When Application Library routines are called they return status before any type of reply is received from the remote device When the Appl StdDrv successfully initiates a request to send a message status 1 io stat 0 is reset to 0 When a reply message is received or a reply timeout occurs that matches the original request io stat 0 is set to a value greater than 0 Normal completion is 1 Ifio stat 0 is normal io stat 1 will contain the length of the reply da
18. or Send StdDrv routines you must always link the following If you are using this Link these files Borland Turbo C v2 01 L TCKR LIB L TCAPP LIB Microsoft C v5 0 L MSKR LIB L MSAPP LIB 32 Chapter Objectives Using Open_StdDrv Parameter device KR 0 unsol msg NULL 0 Using the Function Calls This chapter shows you how to use each of the function calls It includes the format and parameters for each function call The Open StdDrv function call initializes the 6001 F2E Standard Driver To open the Standard Driver use the following format and parameters Format for Open StdDrv The Open function call is shown below status Open StdDrv device 0 0 0 unsol msg NULL 0 0 0 Parameters for Open StdDrv Assign the parameters in Table 4 A Table 4 A Assigning Parameters to Open Communication Type Description char Assigns a driver type KR and communication channel 0 The 6001 F2E Standard Driver supports one 1784 KR communication channel struct This is a null pointer for this release N A These parameters are ignored but you still need to include them in the function call Type in a zero for each ignored parameter When the Open StdDrv function is called a status value is returned indicating whether the operation was successful or unsuccessful Normal completion is 1 A value other than 1 indicates that an error occurred See Appendix D for a list of error
19. status io stat 2 timeout char device KR 0 unsigned char destination unsigned char d buff struct SD FB DHP MSG EY Initialize the DH 485 function block DHP_MSG dev device DHP_MSG stat amp io_stat 0 a DHP_MSG L_R 0 DHP_MSG dst amp destination fe DHP_MSG dta unsigned char NULL DHP_MSG len size E DHP MSG buf amp d buff 0 s DHP MSG TO timeout i PLC_FCT PLCx_DLB T XT Communication device I O status DH 485 address Size in bytes max 243 Loop back buffer Reply timeout in sec Initialize a PLC function x Ey T hy af Appendix A Application Program Examples Call the Standard Driver Appl function status Appl StdDrv PLC FCT amp DHP MSO status See 6001 F2l LH User s manual appendix D io stat 0 Local amp remote I O status Hi byte DH 485 status Lo byte Local amp extended DH 485 status io stat 1 Reply length in bytes if applicable AU App endix A Application Program Examples Diagnostic Counter Read A 10 M DH DH Application Library c APPLICATION SYMBOL Diagnostic Counter Read PLCx DCR Include files Linkable Driver krdefs h stddrv h include include Application Variables size PLC FCT status io stat 2 ctr addr int unsigned int timeout device KR 0 unsigned char
20. use the TNS value to associate the reply message with its corresponding command Ifthe TNS value of a reply message matches the TNS value of a command message then that reply is the appropriate one for that command Note thatthe low byte least significant bits of your TNS value will be transmitted across the link before the high byte most significant bits At any instant the combination of SRC CMD and TNS are sufficient to uniquely identify every message packet in transit Atleast one of these fields in the current message must be different than the corresponding field in the last message received by a command executor If none of these fields is different the message is ignored The process is called duplicate message detection ADDR The ADDR address field 2 bytes contains the address of a memory location in the command executor where the command is to begin executing For example if the command is to read data from the command executor ADDR specifies the address of the first byte of data to be read The first byte of the ADDR field contains the low least significant byte of the address and the second byte contains the high byte of the address The ADDR field specifies a byte address not a word address as in SLC programming SIZE The SIZE byte specifies the number of data bytes to be transferred by a message This field appears in read commands where it specifies the number of data bytes that the responding node must
21. 042 Tel 852 5 739391 FAX 519 623 8930 FAX 31 2975 60222 Telex 780 64347 FAX 852 5 834 5162 Publication 6001 6 5 5 May 1990 PRINTED IN USA Supercedes publication 6001 6 5 4 December 1989 PN 404631101
22. Allen Bradley Standard Driver Software Cat No 6001 F2E B User s Manual aT This Manual s Purpose 0 ccc cece nn PUGH ONCE cues eoru neca ahora E clays femur Rm Um bara eevee waders ss Related Publications N a e R dre KE 0 cee cece eee eens Product Overview 10 9 0 EEE 56 REHAL ERE EC RLERIF E RE ERU Why Use the Standard Driver Software 0006s Compatible Hardware and Software 0 0 cece eee LIS Overview of the Function Calls ss sss s s e s e ce cece ees 1 2 Software Considerations 0 cc ccc eee e Installing the Standard Driver Software e 0 cece cee eee eee Guru Sun MR What the Package Includes oc cece What s on the Diskette 0 0 cece cece IH 2 3 Installing the Standard Driver Hardware and Software ES Planning Your Application Program 0 eee eee eee Chapter Objectives 0 0 9 vaca ous vertes Rhe R e tere se et dd eae ag Include Files Rr Re t eR Rh ees ren Overview of the Function Calls 0 0 eee cece ee Programming Considerations e ee 3 3 Using the Function Calls 4 Chapter Objectives ia usse e arira R sap Maree te eb e Geena E tek 4 Using Open SDI aE Haa a R R Mice oe Ea Cao dard Banyo ibo Communicating on DH 485 with the 6001 F2E Standard Driver Using Appl SOULTR TA R NTR RR R RAR NR E Using Send StdDrv saga RRR RR R RRR AER NTR e Using Get ErrMsg
23. HP MSG Initialize the DH 485 function block DHP MSG dev device DHP MSG stat amp io stat 0 DHE MSG L R 0 DHP MSG dst amp destination DHP MSG dta unsigned char NULL DHP MSG len 0 DHP MSG buf unsigned char NULL DHP MSG TO timeout M Communication device I O status DH 485 address Size not applicable Reply timeout in sec E X Au XL Appendix A Application Program Examples PLC_FCT PLCx_RC Initialize a PLC function y Call the Standard Driver Appl function status Appl StdDrv PLC FCT amp DHP_MSG status See 6001 F21 Li User s manual appendix D io stat 0 Local amp remote I O status Hi byte DH 485 status Lo byte Local amp extended DH 485 status io stat 1 Reply length in bytes if applicable SI A 15 Chapter Objectives Formatting the Message Packet Appendix Specifying Message Packet Commands with Send_StdDrv Use the information in this appendix to format the Send_StdDrv function call Your message packet format depends on whether you are sending data to token passing devices such as the SLC 500 s slave only DH 485 devices This appendix contains the message packet format you need and an explanation of the fields each packet contains supported commands for the Send function call The figures on the following pages show all possible field
24. R 0 unsigned char destination struct SD FB DHP_MSG Mu Initialize the DH 485 function DHP MSG dev device DHP MSG stat amp io stat 0 DHP MSG LR 0 DHP MSG dst amp destination DHP MSG dta amp dt addr DHP MSG len size DHP MSG buf amp d buff 0 DHP MSG TO timeout PLC FCT PLC2 URD x PLC 2 Unprotected Read Allen Bradley block Communication device I O status DH 485 address DT address byte location Size in bytes max 244 Read buffer Reply timeout in sec Initialize a PLC function AU Su Au XI Bur Bef af Appendix A Application Program Examples Call the Standard Driver Appl function status Appl StdDrv PLC FCT amp DHP_MSG status See 6001 F2E User s Manual appendix D io stat 0 Local amp remote I O status Hi byte DH 485 status Lo byte Local amp extended DH 485 status io stat 1 Reply length in bytes if applicable Binary address format dt addr 0 lo byte dt addr 1 hi byte K Appendix A Application Program Examples PLC 2 Unprotected Write DH DH Application Library APPLICATION SYMBOL PLC2 UWR Include files include include Linkable Driver krdefs h stddrv h Application Variables int size PLC FCT S cip E kes unsigned int char status io stat 2 dt addr 0110 timeou
25. S bytes in io stat 0 cmd bum unsigned char The cmd buff parameter is the buffer containing your message to be sent to the remote station Use the following format LEN TYP DST SRC CMD STS TNS TNS DATA The LEN field contains the entire packet length including LEN The TYP field is the message type Setthis value to 0 or 5 depending on the message type The DST field is the DH 485 destination where your message is sent The SRC field is the local 1784 KR DH 485 address This field can be setto 0 See appendix B for definitions of each field pass thru 1 The pass thru parameter is a reply option for the Standard Driver When pass thru is setto pass thru 0 1 the entire reply message the header and the data you requested is placed in your buffer When the pass thru parameter is setto 0 only the data you requested not the header is placed in your buffer The length is returned in io stati reply buff unsigned char The reply buff parameter tells the driver where to put a reply message to your application The reply message is copied into your buffer using the following format LEN TYP DST SRC CMD STS TNS TNS DATA timeout 5 unsigned int The timeout parameter is the number of seconds your application waits for a reply message 0 0 N A Parameters 7 and 8 are not used but you still need to include them in the function call Type in a zero for both parameters See Appendix D for return status values for the Send_StdDrv
26. SIZE byte that specifies the number of data bytes to be transferred by a message DATA data sent as part of themessage command B 2 Appendix B Specifying Message Packet Commands with Send_StdDrv Communicating with a Slave only Device Figure B 2 shows the message packet format you use to communicate with a slave only DH 485 device Important Shaded blocks indicate packet fields that may or may not be included in your message packet depending on the command Figure B 2 Message Packet Format for Communicating with a Slave only Device Table B B shows the message packet fields in Figure B 2 Table B B Communicating with a Slave only Device This Packet Field Is the LEN length of the message packet including LEN TYP type code identifying this format this is always a 5 IMMEDIATE BLOCK immediate block in the destination device 1 local link message this is always a 1 DST DH 485 destination address for this packet SRC DH 485 address of the device sending the packet CMD command byte STS message packet status TNS transaction number 2 bytes FNC byte used with CMD If used it defines the specific function under the command type ADDR two byte field that contains the address of a memory location in the command executor where the command is to begin executing SIZE byte that specifies the number of data bytes to be transferred by a message DATA data sent as part of a message command The next section des
27. Table D B Remote Error Codes Error Codes in Hex Message STS 00 Success 10 Command format incorrect 50 Address problem 60 Disallowed due to command protection F0 Extended status EXT STS 0B Access denied Improper privilege 1A File already open 1B Procesor in edit mode Not accessible A Application Library Files 2 2 Application Program Compiling Linking and Configuring 5 1 Examples A 1 diagnostic counter read A 10 diagnostic counter reset A 14 diagnostic loop back A 8 diagnostic status plc 2 unprotected write sample program A 1 Planning 3 1 C Command Set Supported B 6 Diagnostic Counters TE Diagnostic Loop B 7 Diagnostic Read B 8 Diagnostic Status B 8 protected typed logical with three address fields B 10 protected typed logical write with three address fields B 12 Unprotected Read B 9 Unprotected Write B 9 Compatibility Hardware and Software 1 1 D DH 485 Network Communicating with the 6001 F 2E on the 4 2 Diagnostic Replies Diagnosstic Status Reply C 1 Diagnostic Status Repl for APS software C 3 for the SLC 5 01 C 1 Diagnostic Reply Diagnostic Read Reply Diagnostic ELEZ 3 Diagnostic Status Reply for the 1784 KR C 3 E Error Codes Local D 1 Remote D 2 Example Files 2 3 F Appl StdDrv using Close StdDrv using Function GO Appl StdDrv message block data structure Get ErrMsg reading io stat
28. cribes the packet fields for both applications B 3 Appendix B Specifying Message Packet Commands with Send StdDrv Message Packet Fields The message packet fields for the previous applications are described in more detail in the table below Table B C Message Packet Field Description Field Description LEN This field identifies the length of the message packet including LEN The allowed range is 0 255 TYP This is the code that identifies the type of communication Use 0 to communicate to an SLC 500 processor and 5 to communicate to a Slave only device IMMEDIATE BLOCK The allowed range is 0 and 128 255 depending on the device DST and SRC The DST destination byte contains the DH 485 node number of the node that is the ultimate destination of the message The SRC source byte contains the DH 485 node number of the node that originated the message The application layer supplies the DST value the data link layer supplies the SRC value Allowed values for these bytes are 0 to 31 decimal CMD and FNC The CMD command and FNC functions bytes 1 byte each together define the activity to be performed by the command message at the destination node Command defines the command type and FNC if used defines the specific function under that command type STS and EXT STS The STS status and EXT STS extended status bytes indicate the status of the message transmission In command messages the application program sho
29. destination char unsigned char d buff struct SD FB DHP MSG xy Initialize the DH 485 function DHP_MSG dev device DHP_MSG stat amp io stat 0 DHP_MSG L_R 0 DHP_MSG dst amp destination DHP MSG dta amp ctr addr DHP MSG len size DHP MSG buf amp d buff 0 DHP MSG TO timeout 1989 Allen Bradley block Communication device I O status DH 485 address Counter address ret d from DS cmd Size in bytes max 243 Counter buffer Reply timeout in sec Au 5 t k Appendix A Application Program Examples PLC_FCT PLCx_DCR Initialize a PLC function Call the Standard Driver Appl function status Appl_StdDrv PLC FCT amp DHP_MSG status See 6001 F21 Li User s manual appendix D io stat 0 Local amp remote I O status Hi byte DH 485 status Lo byte Local amp extended DH 485 status io stat 1 Reply length in bytes if applicable SI A 1l App endix A Application Program Examples Diagnostic Status DH DH Application Library c 1989 Allen Bradley APPLICATION Diagnostic Status SYMBOL PLCx DCR Include files Linkable Driver include krdefs h include stddrv h Application Variables int size PLC FCT unsigned int status io stat 2 timeout char device KR 0 unsigned char destination unsigned cha
30. e process of planning an application program It contains the following include files you need to put in your program function calls programming considerations The include files contain declarations for the driver type you are using Define them at the top of your application program The 6001 F2E Standard Driver uses the following include files KRDEFS H STDDRV H Important In addition to including header files in your application you need to link with an appropriate Standard Driver and Application Library file whether you are using the Application Library or not If you use multiple files place KRDEFS H and STDDRV H in the main file Only one source per executable can reference each include file If additional source files within an executable reference the Standard Driver software you must do the following s duplicate KRDEFS H and STDDRV H under different names delete the following lines from the duplicate KRDEFS H int max umsg Max Umsg int max smsg 16 delete from the duplicate STDDRV H all lines beginning from the first occurance of under the Prototype heading to the end of the file Use these edited versions in all remaining source files that reference the 6001 F2E Standard Driver software 3 1 Chapter 3 Planning an Application P rogram Overview of the Function Calls Function calls let your application program communicate with devices on the DH 485 network This
31. eserved 82 Output 83 Input 84 Status 85 Bit 86 Timer 87 Counter 88 Control 89 Integer ELEMENT NUMBER Byte 9 addresses elements 0 254 only For higher addresses or bytes 9a 9c byte 9a lt FF expands ELEMENT NUMBER to three bytes total Bytes 9b and 9c are used for expanded element address low address byte first SUB ELEMENT Byte 10 addresses sub elements 0 254 only For higher NUMBER or bytes addresses byte 10a 2 FF expands SUB ELEMENT NUMBER 10a 10c to three bytes total Bytes 10b and 10c are used for expanded Sub element address low address byte first DATA Low byte first Reply Format CMD STS TNS EXT STS 4F only if error Diagnostic Status Reply Appendix Diagnostic Replies The tables below show diagnostic status replies for the following SLC 5 01 Table C A APS Software Table C B 784 KR Interface Module Table C C Table C A Diagnostic Status Replies for the SLC 5 01 Extended Processor Type for rack type 1747 L51 for 20 40 I O Series R evision Bits 0 4 Release 1 Release 2 etc Bits 5 7 Series A Series B etc Bulletin Number Name in ASCII 1747 LP 11 amp LP 14 5 01 1747 L20 500 20 1747 L30 500 30 1747 L40 500 40 Product Specific Information 17 Major Error Code Word low byte 18 Major Error Code Word high byte C 1 Appendix C Message Packet Formats for the Basic Command Set Byte
32. ion 2 11 or earlier you need to purchase the current version of Allen Bradley DOS 11 Chapter 1 Product Overview Overview of the Function Calls 1 2 The 6001 F2E Standard Driver Software consists of a library of C programming language function calls that let your computer communicate with nodes on the DH 485 network Table 1 A lists these commands Table 1 A 6001 F2E Standard Driver Software Commands If you want to Use this function call perform initialization functions required Open StdDrv before any communication can take place transmit data over the DH 485 network Send StdDrv to a DH 485 station release all resources and services Close StdDrv before the application program terminates See chapter 4 for more information on the function calls Software Considerations Chapter 1 Product Overview Important information about the 6001 F2E Standard Driver software for the 1784 KR Interface Module is listed below the 6001 F2E driver does not support unsolicited messages the 6001 F2E does not support multiple outstanding commands you must receive the reply from your command before sending another command the 6001 F2E supports the large memory model version of Microsoft C and Borland Turbo C only the 6001 F2E driver does not respond to a diagnostic status command sent to itself but responds to diagnostic status commands sent from another computer the 6001 F2E driver does not retur
33. ms listed above 2 1 Chapter 2 Installing the Standard Driver Software What s on the Diskette 2 2 The Standard Driver diskette contains the following types of files linkable large memory model standard driver library files s application library files example application files Standard Driver Library Files Use the following files to build a linkable large memory model application using the Standard Driver This file Contains L MSKR LIB a large memory model Microsoft v5 1 compatible 6001 F2E Standard Driver library module L TCKR LIB a large memory model Borland v2 01 compatible 6001 F2E Standard Driver library module STDDRV H definitions and declarations required to compile a 6001 F2E Standard Driver application KRDEFS H START485 EXE the 6001 F2E Standard Driver start up and initialization program Run the START485 EXE to initialize the 1784 KR before you run your application Application Library Files The following files contain application functions libraries that let you use pre defined support routines Application Libraries Use these in applications using the basic command set in table 4 B on page 4 2 This file Contains L MSAPP LIB a large memory model Microsoft v5 1 compatible application library module L TCAPP LIB a large memory model Borland v2 0 compatible application library module Installing the Standard Driver Hardware and Software Chapter 2 Installing the Standard Drive
34. n a local error code if the KR detects a node address on the network the same as its own The station that had the address first stays on line the other station goes off line so check for duplicate addresses in this situation if you incorrectly format messages to be sent by the Standard Driver software a timeout condition occurs in the application Since there is no error code indicating an incorrect message format check the message format first when the application software times out with a timeout error code the 6001 F2E does not support off link messages messages sent across a bridge to another network the 6001 F2E supports applications that communicate with a single 1784 KR only 13 Chapter Objectives What the Package Includes Installing the Standard Driver Software In this chapter you learn about what the Standard Driver package includes the contents of the Standard Driver diskette how to install the Standard Driver Software You have one of these two packages Cat No Product Description 6001 F2E Stand alone Standard Driver software for the 1784 KR Standard Driver software bundled with the 1784 KR hardware 1747 F 2E Each package contains one User s Manual publication 6001 6 5 5 one 5 1 4 diskette and one 3 1 2 diskette use the appropriate diskette for your system software license If you ordered the 1747 F2E you received a 1784 KR board in addition to the ite
35. ommand Format CMD STS TNS FNC BYTE FILE FILE ELEMENT SUB ELMT OF A2 SIZE NUMBER TYPE NUMBER NUMBER Table C A gives a description of each field Table B D Protected Typed Logical Read with Three Address Fields Byte Description CMD OF STS Indicates the status of a message transmission TNS A unique 16 bit transaction number Use it to match a reply message to its corresponding command which contains the Same number FNC BYTE SIZE the size of data to be read in bytes not including the address fields or other overhead bytes Byte 7 addresses files 0 254 only For higher addresses byte 7a FF expands FILE NUMBER to three bytes total Use bytes 7b and 7c for expanded file address low address byte first 80H 81H Reserved 82H Output 83H Input 84H Reserved 85H Bit 86H Timer 87H Counter 88H Control 89H Integer Byte 9 addresses elements 0 254 For higher addresses byte 9A FF expands ELEMENT NUMBER to three bytes total Bytes 9b and 9c are used for expanded element address low address byte first Byte 10 only addresses sub elements 0 254 For higher addresses byte 10a FF expands SUB ELEMENT NUMBER to three bytes total Bytes 10b and 10c are used for expanded sub element address low byte first FILE NUMBER or bytes 7a 7c FILE TYPE ELEMENT NUMBER or bytes 9a 9c SUB ELEMENT NUMBER or bytes 10a 10c
36. on Library via the APPL function dispatcher XI Write 2 integers to a remote SLC 500 include lt stdio h gt 6001 F2E linkable driver include files include krdefs h include stddrv h Define the communication device char device KR 0 main defin NORMAL 1 Normal F2E status int i size Data qty in bytes d_buff 4 Integer data buffer PEC TECI char err_msg 80 unsigned char DST 2 Byte wide destination unsigned int io_stat 2 Status variables fct_stat dat_addr 2 0 0 timeout 5 5 second timeout 47 ard s dA XI pE XI S A A 1 Appendix A Application Program Examples DH 485 function block description found in STDDRV H 5 struct SD FB DHP_MSG DH 485 function block Start the 6001 F2E software fct stat Open StaDrv device 0 0 0 struct unsol msg NULL 0 0 0 If the open was unsuccessful display the error and exit if fct stat NORMAL Get ErrMsg fct stat err msg printf n sWMn err msg exit 1 Initialize the data to be sent to the SLC 500 X d buff 0 1 Integer value 1 d buff 1 2 Integer value 2 size 4 This example uses 2 byte integers so size is 2 times the number of integers sent Initialize the DH 485 function block XL DHP_MSG dev device Communication device DHP MSG stat
37. r Software Example Files The following files contain working 6001 F2E Standard Driver application examples This file Contains F2EDIAG C diagnostic routines F2ESLC C unprotected read and unprotected write routines SCREEN H definitions and declarations required to compile F2EDIAG C or F2ESLC C This section tells you how to install the Standard Driver hardware and software Installing the Hardware To install the Standard Driver hardware 1 Set the 1784 KR memory address switches and jumper settings that are compatible with your computer system See the 1784 KR Installation Data publication 1784 2 23 for instructions on setting these switches 2 Record these addresses on a piece of paper You will need them when you configure the software 2 3 Chapter 2 Installing the Standard Driver Software Installing the Software To install the Standard Driver software 1 Create a working directory in your computer s hard disk C F2E for example Use this directory to build your application program s 2 Put the disk containing the Standard Driver files in disk drive A gt We use drive A gt as a default 3 Copy all the files from the disk to that directory Copy A C F2E This completes the installation procedure The next chapter helps you plan your application program 24 Chapter Objectives Include Files Planning Your Application Program This section guides you through th
38. r d buff struct SD FB DHE MSG Ky Initialize the DH 485 function block DHP MSG dev device DHP MSG stat amp io stat 0 DHP MSG L R 0 DHP MSG dst amp destination DHP MSG dta unsigned char NULL DHP MSG len 0 DHP MSG buf amp d buff 0 DHP MSG TO timeout AU M Communication device I O status DH 485 address Size not applicable Status buffer Reply timeout in sec amp I aay Af XI Appendix A Application Program Examples PLC_FCT PLCx_DS Initialize a PLC function y Call the Standard Driver Appl function status Appl StdDrv PLC FCT amp DHP_MSG status See 6001 F21 Li User s manual appendix D io stat 0 Local amp remote I O status Hi byte DH 485 status Lo byte Local amp extended DH 485 status io stat 1 Reply length in bytes if applicable SI A 13 App endix A Application Program Examples Diagnostic Counter Reset A 14 DH DH Application Library c 1989 Allen Bradley APPLICATION Diagnostic Counter Reset SYMBOL PLCx RC Include files Linkable Driver include krdefs h include stddrv h Application Variables int size PLC FCT unsigned int status io stat 2 timeout char device KR 0 unsigned char destination unsigned char d buff struct SD FB D
39. return in its reply message The allowed value for SIZE varies with the type of command DATA The DATA field contains binary data from the application program The number of data bytes in a message depends on the command or function being executed B 5 Appendix B Specifying Message Packet Commands with Send StdDrv Supported Command Set The supported command set includes commands that can generally be executed by any SLC processor Use these commands with the Send StdDrv function call Command CMD Hex FNC Hex SLC 500 Protected Typed Logical Read with 3 address OF A2 fields Protected Typed Logical Write with 3 address fields Basie Diagnostic Counters reset LEN 07 Diagnostic Read Unprotected Read Unprotected Write Diagnostic Status Important In the example formats that follow CMD and FNC values are expressed in hexadecimal notation all other values are in decimal form The message packet fields for each of the commands are described in more detail in the following pages See page B 2 for more information on formatting message packets B 6 Diagnostic Counters Reset Diagnostic Loop Appendix B Specifying Message Packet Commands with Send_StdDrv This command resets to zero all the diagnostic timers and counters in the node interface module The diagnostic status command gives the starting address for this block of counters and timers Command Format
40. s in the Send function call message packet The unshaded blocks indicate fields that are always included in your message packet The shaded blocks indicate fields that may be included in your message packet depending on the command Use the appropriate message packet format for your particular application B 1 Appendix B Specifying Message Packet Commands with Send_StdDrv Communicating with a Token passing Device SLC 500 Processor Figure B 1 shows the message packet format you use to communicate with token passing devices such as an SLC 500 processor Important Shaded blocks indicate packet fields that may or may not be included in your message packet depending on the command Figure B 1 Message Packet Format for Communicating with an SLC 500 Processor Table B A explains the message packet fields in Figure B 1 Table B A Communicating with an SLC 500 Processor This Packet Field Is the LEN length of the message packet including LEN TYP type code identifying this message packet format this is always a 0 DST DH 485 destination address for this packet SRC DH 485 address of the device sending the packet CMD command byte STS message packet status TNS transaction number 2 bytes FNC byte used with CMD If used it defines the specific function under the command type ADDR two byte field that contains the address of a memory location in the command executor where the command is to begin executing
41. shown below status Send StdDrv device amp io stat 0 amp cmd buff 0 pass thru amp reply buff 0 timeout 0 0 Use the Send StdDrv function call to send user formatted messages Chapter 4 Writing Your Own Application Program Parameters for Send_StdDrv Assign the parameters in Table 4 D Table 4 D Assigning Parameters to Send Data Parameter Description device KR 0 The device parameter should coincide with the same device used in the Open_StdDrv function Set this value to KR 0 io stat 2T unsigned int The io stat variable serves two purposes When standard driver routines are called they return status before any type of reply is received from the remote device When the Standard Driver successfully initiates a requestto send a message status 1 io stat 0 is reset to 0 When a reply message is received or a reply timeout occurs that matches the original request io stat 0 is set to a value greater than 0 Normal completion is 1 Ifio stat does not equal 1 an error occurred The formatis as follows The low byte EXT STS of io stat 0 contains local errors such as timeout The high byte STS of io stat 0 contains DH 485 errors If the high byte of io stat 0 equals FO Hex indicating the extended DH 485 status the low byte if io stat 0 will contain the extended DH 485 status value See appendix D for more information on error messages See table 4 F for examples of STS and EXT ST
42. t device KR 0 unsigned char destination struct SD FB pd H I I I iue O 0 0 0 d 0 vg d O UU M UU OU E a I I PLC_FCT DHP_MSG c 1989 Allen Bradley PLC 2 Unprotected Write nitialize the DH 485 function block SG SG SG SG SG SG SG SG dev device Communication device stat amp io stat 0 I O status LR 0 dst amp destination DH 485 address dta amp dt_addr DT address byte location len size Size in bytes max 242 buf amp d buff 0 Write buffer TO timeout Reply timeout in sec PLC2 UWR Initialize a PLC function X XE S 57 Appendix A Application Program Examples Call the Standard Driver Appl function status Appl StdDrv PLC FCT amp DHP MSO status See 6001 F2E User s manual appendix D io stat 0 Local amp remote I O status Hi byte DH 485 status Lo byte Local amp extended DH 485 status io stat 1 Reply length in bytes if applicable Binary address format dt addr 0 lo byte dt addr 1 hi byte Appendix A Application Program Examples Diagnostic Loop Back DH DH Application Library c 1989 Allen Bradley APPLICATION Diagnostic Loop Back SYMBOL PLCx DLB Include files Linkable Driver include krdefs h include stddrv h Application Variables int size PLC FCT unsigned int
43. ta buffer Ifio stat does not equal 1 an error occurred The format is as follows The low byte EXT STS of io stat 0 contains local errors such as timeout The High byte STS of io stat 0 contains DH 485 errors If the high byte of io stat 0 equals FO Hex indicating the extended DH 485 status the low byte ifio stat 0 will contain the extended DH 485 status value See appendix D for more information on error messages See table 4 F for examples of STS and EXT STS bytes in io_stat 0 Set this variable to 0 unsigned char The DH 485 destination address The destination variable is the DH 485 address where you want your message to be sent on the DH 485 network unsigned int The data table address Depending on the routine the dt_addr variable is a two byte value or string describing the data table address where data is to be read from or written to When reading data the size variable indicates how many data bytes are to be read When writing data the size variable indicates how many bytes should be copied from the data buffer and written to the remote station unsigned char The application data buffer The application data may take on several or formats If you are using byte values d_buff may be defined as a char array int the size variable is defined as a one to one relationship If you are using Signed integers data is automatically stored in byte swapped format the size value is defined as a two to one relationship
44. uld always set the STS value to 0 In reply messages the STS byte may contain one of the status codes listed in appendix D If the high byte 2 F0 Hex there is extended status information in the EXT STS byte Otherwise there is no EXT STS byte An STS value of 0 in a reply message means the command has been executed with no error In a reply message the STS byte is divided between application layer and link layer The link layer uses bits 0 through 3 ofthe STS byte to report local errors those errors that occur when the link layer attempts to transmit a message across the link The application layer uses bits 4 through 7 ofthe STS byte and in some cases the EXT STS byte to report remote errors those errors that occur when the command executor at the destination node tries to execute the command message Refer to appendix D for more information B 4 Appendix B Specifying Message Packet Commands with Send_StdDrv Field Description TNS The TNS transaction bytes 2 bytes contain a unique 16 bit transaction identifier For each command message transmitted by your computer node your application level software must assign a unique 16 bit transaction number A simple way to generate this number is to use the Get tns function and store the value in the two TNS bytes of the new message See page 4 6 for more information on Get tns When the command initiator receives a reply to one of its command messages it can
45. ware User s Manual publication 1747 801 information on PLC commands and protocol information on the SLC 500 Why Use the Standard Driver Software Compatible Hardware and Software Product Overview The Standard Driver Software cat no 6001 F2E for the 1784 KR Interface Module lets you communicate directly to SLC 500 programmable controllers and other devices on the DH 485 network You use a standard set of function calls to communicate with DH 485 stations These function calls let you define your own message packets or request pre defined message packets included in the software See page 4 2 for more information about the message packets You can use the following hardware devices with the 6001 F2E Standard Driver software 1784 T35 Plant Floor Terminal 1784 T50 Industrial Terminal 6120 6121 and 6122 Industrial Support Computers s BM PC XT and PC AT Compaq Deskpro 286 Compaq Portable II and III If your computer is not listed above consult your local Allen Bradley sales office for compatibility information You can use the following with the 6001 F2E Standard Driver software If you use this programming device Use this operating system 1784 150 programming terminal Allen Bradley DOS version 3 21 IBM PC XT PC AT or IBM compatible DOS version 3 0 or later Use the DOS version programming terminal included with the programming terminal lf you are using a 1784 150 that has DOS vers

Download Pdf Manuals

image

Related Search

Related Contents

Manual de instrucciones Distribuidor de vídeo 1292 00  EF2400iS EF2000iS EF1600iS EF16HiS  フジグラス粒剤 25  IMC Toys 650152  Parkside XQ600 User's Manual  Communication Manual MH__MCH metasys N2 guide  Kensington Pro Fit® Mid-Size Wireless Mouse - Graphite Grey  

Copyright © All rights reserved.
Failed to retrieve file