Home

1771-6.5.13, ASCII I/O Moulde User Manual

image

Contents

1. 1771 CB oS i r Interconnect Cable 1771 AL Local B Adapter Module Module Group 1 1771 CK CJ Slot 1 Power Cable am I m Ne T 1771 DA ASCII 1770 CB IT DH Module Adapter Cable 1771 M 2 4 EN 1 0 Chassis 1777 CP Termination Plug 11818 4 PLC 2 20 2 30 only Connect the I O interconnect cable between the PC processor and the I O adapter module If the IT DH adapter cable is too short or not available make your own It should not exceed 50 feet Figure 1 4 Using Channels A and B You may or may not be able to connect cables to channels A and B at the same time depending on the revision of your industrial terminal 2 5 Chapter 2 Getting Started with Your ASCII Module 2 6 Industrial terminals manufactured before May 1982 allow cross talk between channels and B As a result data table values could be altered Therefore you should alternate cables between channels for the tutorials of this manual when using these terminals When using a series A industrial terminal you must alternate cables Your industrial terminal has a date code stamped in white on the upper right corner
2. 0005 0000 T T0001 n Energize timer on power up TON TE 01 TIMER ON T0001 17 1 0 SECOND 0001 0 TD i RUNG NUMBER RM14 15 hs De energize timer after transferring initialization words it 15 RUNG NUMBER RM15 01 ne Command word 1 initialization bit Module expects 1 00 up to 4 initialization words 17 WO0005 0000 01 RUNG NUMBER RM16 10001 Load initialization words with MVE 0004 A 00 selector switch or at power up FILESFROMATOR 12 WO0005 0000 A 0007 0002 0004 R 0002 0002 DN 01 COUNTER C0004 15 POS LEN 0 4 C0004 MODE ALL SCAN ER 13 RUNG NUMBER RM17 WBo04 0000 WO005 0000 WO005 0000 A gt B do E 0003 0001 15 02 05 0000000000000000 B WO001 0000 0000000000000000 W0005 0000 RUNG NUMBER RM18 50001 ND MVF EN 05 FILES FROMA TO R 12 0003 0002 0001 R 0006 0002 DN Moves new data from BTR file to storage file when nes COUNTER C0001 15 is sent to PC POS LEN 0 62 C0001 ER MODE ALL SCAN gt i RUNG NUMBER RM19 Appendix ASCII Module For PLC 3 Proessor Example Application Read Write This program allows you to display two messages files on demand Program NO TAG One message file contains a message variable timer accumulated value When you enter the word GO from the keyboard of the peripheral device your program starts a five second write block transfer
3. 6 1 Chapter 6 1 Command Words sete 6 1 Initialization Words 6 3 Status 6 13 Table of Contents Troubleshooting Chapter Recognizing Initialization 5 How You Interpret Status Indicators How You Interpret Codes in Status Word Testing the ASCII Module and Cables PLC 2 Family Processors Complete Getting Started Program PLC 2 Family Block Transfer Programming Block Transfer Timing 00 0 cece eee eee nee Example Read Only Program Example Write Only Program Example Read Write Program Example Application Write Program For PLC 3 Family Processor Complete Getting Started Program PLC 3 Block Transfer Programming Example Read Only Program Example Write Only Program Example Read Write Program Example Application Read Write Program For
4. See WARNING section titled How 1771 P1 Mini PLC 2 15 SIT Power Supply Processor 5 Your Equipment Using Channels Module Group 1 Slot a wu 7 a Channel A a 1771 DA ASCII 1770 13 EE I O Module Industrial Terminal B x rear view _ m o2 Q B o IST 0 1771 41 A2 4 me d 6 Chassis EIE 1772 6 8 Processor Interface Cable N 76 1771 CL d Channel B Power Cable 1770 CB IT DH Adapter Cable 11817 24 1 Connect the power cable between the power supply and the I O chassis The cable connects to the backplane of the I O chassis behind the processor adapter slot 2 Connect the processor interface cable between the PC processor and channel A on the industrial terminal 3 Connect the IT DH adapter cable between the ASCII module and channel B on the industrial terminal Chapter 2 Getting Started with Your ASCII Module Figure 1 2 Connections for PLC 2 20 or PLC 2 30 Controller 2 See WARNING in section titled How to Connect Your Equipment Using Channels A amp B 1772 Processor Interface Cable Channel A 1770 73 Industrial Terminal O rear view Sad C gho E pe E o E e H
5. below Mode Transmission Choosing Single or Multiple Choose single transfer when you want the module to send a single string Transfers IW2 17 to the processor in each block transfer or when the string is long enough to require more than one block transfer Choose multiple transfers when your ASCII device transmits short strings 31 characters per string or less at a high rate of transmission Then the module will include more than one string in each block transfer The highest number of strings that you can transfer in one block transfer is the number of complete strings that the module can load into 62 or fewer block transfer words 3 25 Chapter 3 Choosing Module Features Selecting Delay for Carriage Return IW3 06 07 Setting Remaining Bits in IW1 10 17 3 26 Record your choice by writing a 0 single transfer or 1 multiple transfer in IW2 17 Use the form found at the end of this chapter or the boxes below Single or Multiple Transfers When using an unbuffered data terminal select time for the ASCII module to delay outputting data while the mechanical carriage return is operating Your selections are Delay Time ms 0 00 50 01 100 10 200 11 Record your selection by writing the code IW3 07 06 using the form found at the end of this chapter or the boxes below Delay for Carriage Return Set the remaining bits in initialization word one according to
6. c gt gt CONTROL 2 CONTROL SHIFT ESCAPE CONTROL SHIFT L CONTROL SHIFT M CONTROL SHIFT N CONTROL SHIFT O SPACE C 2 Appendix ASCII Conversion Tables ASCII CHARACTER OR CONTROL lt gt A B C D E F G H J K M N 0 Q R 5 0 V W X Y 2 C 3 Appendix ASCII Conversion Tables f g h k m n 0 p q r 5 t u V w x y 2 C4 Appendix ASCII Conversion Tables Table C C ASCII Control Codes Control Code 1 Display 2 CTRLO CTRLA CTRLB CTRLC CTRL D CTRLE CTRL F CTRLG CTRLH CTRLJ CTRL K CTRLL CTRLM CTRLN CTRLO CTRLP CTRL Q CTRLR CTRLS CTRLT CTRLU CTRLV CTRLW CTRL X CTRLY CTRLZ ESCAPE CTRL CTRL D CTRL CTRL DELETE OR RUBOUT 2 NULL START OF HEADER START OF TEXT END OF TEXT END OF TRANSMISSION ENQUIRE ACKNOWLEDGE BELL BACKSPACE HORIZONTAL TAB LINE FEED VERTICAL TAB FORM FEED CARRIAGE RETURN SHIFT OUT SHIFT IN DATA LINK ESCAPE DEVICE CONTROL 1 DEVICE CONTROL 2 DEVICE CONTROL 3 DEVICE CONTROL 4 NEGATIVE ACKNOWLEDGE SYNCHRONOUS IDLE END OF TRANSMISSION BLOCK CANCEL END OF MEDIUM SUBSTITUTE ESCAPE FILE SEPARATOR GROUP SEPARATOR RECORD SEPARATOR UNIT SEPARATOR DELETE UJ 2 ITI rm rm Co Co RAO AK KT FQ omm lt AWK A POM H
7. 68ms x 3 4 1 x 9ms 204ms 3x9ms 231ms Not a block transfer channel 68ms x 1 2 1 x 9ms 68ms 9ms 77ms Not an active channel append B A CII Module For PLC 3 Processor 4 Compute the approximate read or write block transfer time for channel 1 and channel 3 Figure A 15 Figure B 6 Computing Block Transfer for Each Channel Step4 Compute the read or write block transfer time Example values have been added Program Scan Time program 2 5ms K words x 20K words 2 5ms x 20 50ms Scanner Scan Time read or write 231ms for channel 1 and 77ms for channel 3 from step 3 Block Transfer Timer per Channel Channel 1 Program Scan 2 Scanner Scan 50ms 2 231ms 50ms 462ms 512ms Channel 3 Program Scan 2 Scanner Scan 50ms 2 7ms 50ms 154ms 204ms Reducing Scan Time Due to the asychronous scan relationship between program and scanner and the serial operation of each channel in the scanner we suggest that you optimize the overall scan time Although recommendations are application dependent we make the following recommendations as general guidelines Whenever possible control the manner in which block transfer instructions are enabled For example if only a few block transfer modules require frequent transfer of data program them to run continually Inhibit block transfer instructions of those modules that require less frequent transfer until enabled by a timer
8. 0003 0000 RUNG NUMBER RM1 0002 0000 J E 07 07 RUNG NUMBER RM2 WO003 0000 W0002 0000 w0005 0000 1 E L 1 L L 7 15 15 02 WO003 0000 0002 0000 1 1 L 1 L 15 15 WO005 0000 0003 0000 RUNG NUMBER 0002 0000 1 4 Li L 73 02 15 15 WO005 0000 0003 0000 RUNG NUMBER RM4 0002 0000 t 1 1 9 02 15 15 10001 RUNG NUMBER 5 WO005 0000 L U L 02 03 10001 WO005 0000 RUNG NUMBER RM6 0005 0000 TE 1 1 p 02 03 04 0005 0000 RUNG NUMBER RM7 0005 0000 lr 19 1 L 7 04 03 4 07 Chapter 4 ASCII I O Module Tutorial 4 28 WO005 0000 WO003 0000 RUNG NUMBER RM8 0602 00 1 t L 1 L 1 L 04 16 16 WO005 0000 0003 0000 RUNG NUMBER RM9 0002 0000 J f 1E U 1 L 1 L 04 16 16 RUNG NUMBER RM10 WB004 0000 BTR CNTL 1 BLOCK XFER READ EN 15 RACK 001 12 004 0000 GROUP 1 CNTL 3 E MODULE 1 HiH DN 05 DATA FQ003 0000 15 LENGTH 0 CNTL CNTL 004 0000 _ EN 13 004 0000 BTW CNTL E BLOCK XFER WRITE 17 RACK 001 02 GROUP 1 CNTL MODULE 1 HIGH H DNj DATA 0002 0000 05 LENGTH 0 CNTL CNTL 004 0000 Eg 03 RUNG NUMBER 11 0005 0000 00 0003 0000 RUNG NUMBER RM12 0005 0000 dg Lb 07 01 S0003 L 1 L 01 RUNG NUMBER RM13 0005 0000 0001 1 it TON TE 1 E TIMER
9. 2 2 4 4 9 4 0 15 40 4 19 6 0 6 64 2ms This is the worst case time between two consecutive read block transfers in the 4 chassis local configuration described in example problem 2 enabled ASCII module in each chassis Mini PLC 2 15 Controller The program scan and I O scan are consecutive and are considered as a single processor scan The Mini PLC 2 15 scan time varies typically from 18 to 24ms for a 1K program and one I O chassis Each block transfer module will be updated during a program scan The procedure for calculating the worst case time between transfers can be done in two steps The facts of the problem are Processor Scan time PS 24ms Number of Words Transferred W 64 read or 2 write A 13 append A A CII Module PLC 2 Family Processors 14 1 Calculate the block transfer time T for the read and write operation T 2 0 1ms 6 16ms word x number of words transferred The same equation is used for either read or write transfer times 2 Calculate the worst case system time ST between two read block transfers ST PS T read PS T write Example Problem 3 A Mini PLC 2 15 programmable controller is communicating with one ASCII module in its I O chassis The ladder diagram program contains 2K words Otherwise this example problem is identical to example problem 1 Solution The facts of the problem are Program length 2K words Processor Scan Time PS 24ms 1K words
10. Allen Bradley ASCII I O Module User Cat No 1771 DA M anua Table of Contents To Our Customers 1 1 Overview of This Manual 1 1 Intended Audience 1 1 Notational Conventions 1 1 Some Tips on Using This Manual 1 2 Typical Applications 1 3 Getting Started With Your ASCII Module 2 1 PLC 2 Family Processors 2 2 What You Need to Get Started 2 2 Reading Data from Your ASCII Device 2 10 Writing Data to Your ASCII Device 2 14 PLG 3 PROCGSSONS esee rre EE 2 18 What You Need To Get Started 2 18 Reading Data from Your ASCII Device 2 28 Writing Data to Your ASCII Device 2 32 Choosing Module Features 3 1 Chapter 3 1 Choosing the Mode of Communication 3 1 Choosing the Mode of Module Operation IW1 02 04 3 13 Using BCD Delimiters Report Generation Mode Only 4 10 1 3 14 Justifying Margins 3 03 3 15 Using the End of String Delimiter 3 10 16 317 Setting String Len
11. Function of Control Status Bits Select full duplex when your ASCII device is set for full duplex or when your ASCII device transmits and receives data simultaneously You can also select full duplex when your ASCII device only transmits or only receives data Select half duplex when your ASCII device is set for half duplex or when your ASCII device transmits or receives data one way at a time Select simplex read when your ASCII device only transmits data You should set the ASCII module s I O buffer to 100 input in IW3 00 02 Select simplex write when your ASCII device only receives data You should set the ASCII module s I O buffer to 100 output in IW3 00 02 Select echo when you want your ASCII data terminal to display the characters it sends to the module Do not select echo when your ASCII device cannot display the characters it sends to the module Bits IW1 10 12 Function Communication Rate Description The communication rates that the module can handle are listed below Select the rate that you chose for your ASCII device Communication Rate 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud 110 baud 110 baud 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 Bit IW1 13 Function Number of Data Bits Description Reset it to zero default when your ASCII device generates 8 data bits per character Set it when your ASCII device generates 7 data bits per character Note that the module treats
12. RUNG NUMBER RM4 WO0005 0000 0003 0000 1 a Status word 1 Command word 1 i P read handshake 15 10001 RUNG NUMBER RM5 WO0005 0000 LAL U 02 03 RUNG NUMBER RM6 a ee One shot to enable write block pis ds 02 i a transfer of new data of module 04 0005 0000 RUNG NUMBER RM7 0005 0000 19 LE 04 03 WO005 0000 WO003 0000 RUNG NUMBER RM8 WO002 0000 J 1 F L t 1 E 04 16 Command word 1 Status word 1 16 write handshake RUNG NUMBER 9 W0002 0000 af FE aL ue UJ 04 16 16 RUNG NUMBER RM10 Read status word 1 amp 2 BTR CNTL Vt and data BLOCKXFERREAD EN 15 RACK 001 12 WB004 0000 GROUP 1 CNTL t MODULE DN 05 DATA FQ003 0000 15 LENGTH 0 CNTL 004 0000 ER Write command words 1 amp 2 B H initialization data and message data Ee BTW CNTL NR BLOCK XFER WRITE EN 17 RACK 001 02 GROUP 1 CNTL MODULE 1 HIGH DN DATA FQ002 0000 05 LENGTH 0 CNTL CNTL 004 0000 ER RUNG NUMBER RM11 03 Initialization Turns off rung 1 except for Nd 1st scan at power up i WO003 0000 RUNG NUMBER 12 0005 0000 lt Energize at power up to load initialization words Also energized on L 07 on 1st scan after processor selection of run monitor mode 01 50003 01 23 pendix B Cll Module For PLC 3 Processor 24 RUNG NUMBER RM13
13. Read and write error bits illuminate at the same time when the error source is the module address entry or the file length entry in the instruction block You have a communication problem You did not correctly connect the twinaxial cable to the scanner You did not connect a terminator resistor to each end of the twinaxial cable B 14 Appendix ASCII Module For PLC 3 Proessor When the scanner encounters a communication fault it tries twice to complete the transfer It sets the error bit after the second unsuccessful try When the scanner encounters a communication fault it tries twice to complete the transfer It sets the error bit after the second unsuccessful try When the scanner and or processor detects a block transfer error the transfer is halted Transfers from the module are prevented until Your program clears the instruction s control word clears the error Figure A 17 You locate and correct the error Figure B 8 Resetting the Control Word after a Block Transfer Error CTRL WORD MOV E MOV FROMA TO R 03 A STORAGE WORD 0000000000000000 13 R CTRLWORD 0000000000000000 Detecting Faults Block transfer error detection and resulting processor shutdown are safety features of Allen Bradley programmable controllers We recommend that you adapt such safety features to your application However you may want your program to reset block transfer instructions whenever an error
14. data table file 06 0 Results Two transfers took place Figure 3 7 The first transfer occurred when the string length exceeded the set string length when you entered the second 5 If you could have looked into the file it would have appeared in ASCII or in hex respectively as follows Figure 3 7 Division of Data Between Two Transfers 012 3 45 67 8 9 012 3 4 5 6 7 8 9 lt 1st transfer gt 2nd transfer gt 15 characters terminated by ENTER 11836 4 39 Chapter 4 ASCII I O Module Tutorial RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 00 00 00 00 01 23 45 67 89 0 1 00010 23 4 QOHOOH 00H00H 00 00 RADIX H START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 3031 3233 3435 3637 3839 3031 00010 3233 3420 0000 0000 0000 0000 0000 0000 The second transfer occurred when you pressed ENTER and transferred the balance of data from the module s input buffer The balance of data is displayed in ASCII or hex respectively as follows RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 00HO0H 00 00 56 7 8 9 00010 QOHOOH 00H00H 00 00 RADIX H START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 3536 3738 3920 2020 2020 2020 00010 2020 2020 0000 0000 0000 0000 0000 0000 Your program must include instructions for processing new data read
15. 07 07 RUNG NUMBER RM2 0003 0000 1r Energize at power up to load initialization words Also energized on WOQUS 07 on 1st scan after processor selection of run monitor mode 01 50003 01 RUNG NUMBER RM3 0005 0000 Energize timer on power up T0001 TON 01 0001 17 1 0 SECOND P 2 0001 0 TD 15 RUNG NUMBER RM4 De energize timer after transferring initialization words j t 15 01 RUNG NUMBER RM5 10001 Command word 1 initialization bit Module expects 0002 0000 Der CETT 00 up to 4 initialization words 17 0005 0000 01 45 ns pendix A Cll Module PLC 2 Family Processors RUNG NUMBER RM6 10 d Load initialization words with MVF 0004 dut FILES FROMA ey 00 selector switch or at power up 007 0002 12 WO005 0000 R F0002 0002 0004 COUNTER C0004 2 01 5 POS LEN 4 05 0 0004 MODE ALL SCAN 13 10001 RUNG NUMBER RM7 WO005 0000 1 02 03 RUNG NUMBER RM8 m 2 One shot to enable write block PM a E ae AG 02 03 transfer of new data of module 04 WO005 0000 RUNG NUMBER RM9 WO005 0000 lE 1 amc 7 04 03 WO005 0000 WO003 0000 RUNG NUMBER RM10 WO002 0000 J H is L UNE PAS ML 7 04 16 Command word 1 Status word 1 16 write handshake WO005 0000 WO003 0000 RUNG NUMBER RM11 0002 0000 1r 1r 9 a LE J 04
16. 1 HIGH H DN DATA FQ001 0004 05 LENGTH 0 CNTL CNTL 001 0000 ER 03 B 13 append B A CII Module For PLC 3 Processor Special Considerations When using 1775 S4A I O scanner with thumbwheel switch set to 1 only part of its data handling capacity is available for handling block transfers This scanner can store and transfer a maximum of 72 words at any one time from up to four block transfer modules across any of the active channels If a block transfer read instruction is enabled but the scanner s buffer cannot accept the instruction s block length the scanner is processing other blocks of data the block transfer instruction must wait for a subsequent scan when the scanner s buffer can accept all the words that the module has to transfer The same applies for a write block transfer instruction We suggest that you add an additional scanner if necessary Block Transfer Errors Once enabled a block transfer instruction in a PLC 3 ladder program will set either a done bit or an error bit The instruction indicates an error when it illuminates the ER symbol Typical block transfer errors occur when You do not correctly enter the instruction The rack group and module numbers do not match the location of the installed module You entered a file length greater than 64 You did not create the data file or the address that you entered does not match the file you created
17. CW1 16 and new data Detects that CW1 16 has been toggled Moves data to output buffer where it is sent to the ASCII device Toggles SW1 16 and returns new status to acknowledge receipt lt SW1 16 Repeats the cycle when it detects a change in W1 16 and when you enable the one shot NOTE The processor can write data to the module but the module will not process the data to its output buffer inhibits data to the ASCII device until the module detects that your program has toggled SW1 16 Table 5 B Logic Conditions for a Write If Then SW1 16 CW1 16 at Module has acknowledged processing the processor previous block of data Program sets CW1 16 SW1 16 when you enable the one shot to write new data CW1 16 SW1 16 at Module moves new data to output buffer to module ASCII device Module sets SW1 16 CW 16 to acknowledge that it processed the data 5 5 Chapter 5 Handshaking 5 6 A write only program requires only write handshaking A read write program requires read and write handshaking The module can handle handshaking and data simultaneously For example read block transfers could contain new data and acknowledgment of the previous write block transfer Refer to Complete Getting Started Program Appendix A for PLC 2 family and for PLC 3 controllers Handshaking bits in the ASCII module s command and status words used in these programs are defined
18. Chapter 6 Function of Control Status Bits 6 2 Description Set this bit to reset the following status bits in status word one Bit 07 Power up initialization Bit 15 Read data available Bit 16 Write data acknowledge Bit CW1 10 11 Function Reserved for Future Enhancements Description Reset it to zero Bit CW1 12 Function Self Diagnostics Description Set this bit to enable the module s self diagnostic routine which tests the module s firmware memory and timers During the self diagnostic test the module discontinues communication After completion the module re initializes itself to power up default mode You must then re initialize the module if you want it to operate in any mode other than default Bit CW1 13 Function Port Disable Description Set this bit to disable I O communication thru the interface port on the ASCII module Otherwise reset this bit to zero Bit CW1 14 Function Incomplete String Description Set this bit to tell the module to transfer an incomplete string in the next bock transfer It allows you to examine the contents of the input buffer This command is intended for troubleshooting purposes Avoid using it during normal operation Reset this bit to zero Bit CW1 15 Function Read Data Acknowledge Description After the processor receives and processes new status and or data the program toggles this bit The toggled status CW 15 SW 15 is returned to the module
19. Conversion A BCD delimiter is a character that you place before and after BCD values It tells the ASCII module to interpret the values as BCD not as ASCII for conversion In report generation mode when using BCD values with ASCII data characters you must separate BCD values by means of a delimiter For example if you want to use the BCD value of 297 in a message and you have selected the asterisk 0101010 in binary or 2A in hex as the BCD delimiter you would place the asterisk before and after the BCD value 297 Otherwise the 7 bit ASCII equivalent of BCD 297 would be transferred as unwanted characters Justifying Margins IW3 03 Chapter 3 Choosing Module Features Select the BCD delimiter from the following hex characters 0 1A 1F 2 2 3A 3F 4A 4F 5A 5F 6A 6F or 7A 7F Do not use Any character that otherwise would appear in the message The end of string delimiter that you will select later ASCII characters and their codes are listed in tables in appendix C Record your selection by writing either the 7 bit binary code or the 2 digit hex code for BCD delimiter in IW4 10 16 using the form found at the end of this chapter or the boxes below BCD Delimiter IWA 14 10 0 NOTE The module defaults to the colon as the BCD delimiter if you do not use initialization word four IW4 However if you use IW4 you must enter a BCD delimiter Margin justification refers to the m
20. Figure 1 4 Then try again starting at Procedure P1 Figure 1 4 Minimum Connections in the 1770 CB Cable Protective Ground Connectors 1 1 25 pin D Shell m Male Connector 2 Transmitted Data Cable Kit 1770 3 Received Data 3 end 7 Ground 7 Cable Belden 8723 or equivalent 18 18 5 In cable but not 25 25 required for ASCII L module ASCII Module Industrial Terminal Interface Port Channel B 11819 Writing Data to Your ASCII In this demonstration you will load data characters into the write block Device transfer file and observe how they are displayed You will use the industrial terminal in PLC 2 mode to load data Then you will change the industrial terminal to alphanumeric mode and observe the transferred data Chapter 2 Getting Started with Your ASCII Module You will use the following procedures where Procedures and P3 are repeated from the section titled Reading Data from Your ASCII Device In Procedure You Will Set your industrial terminal to PLC 2 mode Load data into the write block transfer file Set your industrial terminal to alphanumeric mode and observe the transferred data Procedure P3 Set Your Industrial Terminal to PLC 2 Mode NOTE Skip this procedure if your processor is already in PLC 2 mode 1 Press MODE SELECT 2 Check that the PLC 2 family keytop overlay is in place 3 Select PLC 2 mode
21. Press 11 on the keyboard The beginning of your ladder diagram program will be displayed Procedure P5 Load Data into an Instruction File 1 Check that the processor mode select switch is in the PROG position 2 Move the cursor to the instruction whose file you want to load BLOCK XFER WRITE 3 Display the file in hex Press DISPLAY 1 4 Load new data starting in position 003 for a write block transfer instruction position 001 for other file instructions Positions 001 and 002 are reserved for command words in a write block transfer instruction Chapter 2 Getting Started with Your ASCII Module 2 16 For example load the following hex codes that are equivalent to BRADLEY 12345 as follows Note the space between BRADLEY and 12345 POSITION FILE DATA ASCII Equivalent 003 4252 BR 004 4144 AD 005 4C45 LE 006 5920 Y 007 3132 12 008 3334 3 4 009 3500 5 Check your display of FILE DATA to be sure that you entered all data exactly as shown Don t forget to press INSERT V after entering data in each position Use the shift key to enter the hex character C Procedure P1 Set Your Industrial Terminal to Alphanumeric Mode 1 Insert the alphanumeric keytop overlay 2 Select alphanumeric mode Press MODE SELECT 12 3 Setthe communication rate to 300 baud Press 13 RETURN The module s CHANNEL ACTIVE LED turns on 4 Change the processor mode select switch to the RUN PROG position
22. SW2 which accompanies the transfer Bit SW1 16 Function Write Data Acknowledge Description The module acknowledges receipt of a valid write block transfer by copying the status of CW1 16 into this bit which is returned to the processor in the next read block transfer Bit SW1 17 Function Channel Active Description The module sets this bit to tell the processor that the ASCII device is enabled It is reset when the ASCII device is turned off or disconnected Status Word Two SW2 Bit SW2 00 07 Function Number of Words Per String Read Only Description This 2 digit BCD number shows the number of words used by the module to transfer the data string that you selected IW2 00 13 The number of words will be approximately equal to the number of characters per string divided by the type of data conversion such as 2 ASCII characters or 3 BCD characters per word When a data string requires more words than the maximum for a read block transfer these digits display the maximum number of data words 62 in the read block A data string could require several read block transfers Bit SW2 10 17 Function Number of Strings Per Block Transfer Read Only Description This 2 digit BCD number shows the number of data strings that are transferred to the PC processor in each read block transfer when you select the transfer of multiple data strings IW2 17 1 Chapter 6 Function of Control Status Bits When t
23. di De energize after time out u 45 Initialization words sent OFF 10 252 200 035 V er d 2 15 15 Status word one SW1 Command Word one CW1 00 252 200 read data available E 15 15 035 252 200 L ON 15 00 io SW1 CW1 Read Handshake 035 252 200 00 15 ON 15 037 Read SW1 SW2 and data bar codes BLOCK XFER READ EN DATA ADDR 050 17 MODULE ADDR 371 BLOCK LENGTH 14 DN FILE 252 267 17 BLOCK XFER WRITE T Write CW1 CW2 and initialization words DATA ADDR 051 16 MODULE ADDR 371 i53 BLOCK LENGTH 14 FILE 200 215 16 A 16 327 endix A ASCII Module PLC 2 Family Processors 253 137 035 Test for new valid data END 035 lamm m f EE 000 17 00 01 i E Moves new valid data from FILE TO FILE MOVE 063 2 BTR file to storage file COUNTER ADDR 063 EN POSITION 001 17 FILE LENGTH 012 FILEA 254 267 069 FILER 600 613 RATE PER SCAN 012 15 15 Load initialization words FILE TO FILE MOVE 061 via switch or power up COUNTER ADDR 061 EN POSITION 001 17 020 FILE LENGTH 004 1 Lr ES FILEA 570 573 06 10 FILER 202 205 DN RATE PER SCAN 004 15 112 CWI initialization bi 200 Er initialization bit module to expect a t 17 initialization words via switch or on power up 17 020 HE 10 Initialization Turns off rung 1 except for 020 first scan at
24. i read data available 00 252 200 1 Vt 15 15 035 252 200 E f L 0 15 SW1 CW1 Read Handshake ON TS 035 252 200 U 00 15 ON 15 112 020 020 7f OP 16 00 01 020 One shot for Write BT m 01 00 112 020 E U 16 00 020 252 200 1 1 01 16 0 16 020 252 SW1 CW1 Write Handshake 200 42 10 U 01 16 ON 16 endix A ASCII Module PLC 2 Family Processors END 037 Read SW1 SW2 and data BLOCK XFER READ EN DATA ADDR 050 17 MODULE ADDR 371 ids BLOCK LENGTH 14 DN FILE 252 267 17 BLOCK XFER WRITE ii Write CW1 CW2 EN initialization words and data DATA ADDR 051 16 MODULE ADDR 371 igi BLOCK LENGTH 14 DN FILE 200 215 16 327 253 137 035 Test for new valid data 035 a 4278 000 17 00 01 Moves new valid data from FILE TO FILE MOVE 063 Pt BTR file to storage file COUNTER ADDR 063 EN 01 POSITION 001 17 FILE LENGTH 014 B FILEA 254 267 FILER 600 613 0 RATE PER SCAN 0141 15 iE Load initialization words FILE TO FILE MOVE 061 COUNTER ADDR 061 EN 17 POSITION 001 17 020 FILE LENGTH 004 081 pL FILE A 570 573 10 FILER 202 205 DN RATE PER SCAN 004 15 112 CW1 initialization bit module to expect 200 m initialization bit module to expec a JE 17 initialization words via switch or on power up 17 020 He 10
25. one of the following conversion types 2 ASCII characters per word 1 ASCII character per word ASCII standard code 3 BCD characters per word 4 BCD characters per word 0 thru 9 4 hex characters per word 0 thru 9 A thru F When operating in report generation mode the module selects two ASCII characters per word for message characters You choose the data conversion for message variables BCD values placed between delimiters Your selection is limited to one of the following Conversion Type Data Characters 3 BCD characters per word 4 BCD characters per word How Binary and BCD Differ The PLC 3 manipulates message variables such as timer counter preset and accumulated values in signed binary sign in bit 16 If your program does not convert message variables to BCD the module will display erroneous values because the binary and BCD bit patterns of a value are different For example compare how the bit pattern 10110 would be interpreted in binary and in BCD Figure 3 10 4 52 Chapter 4 ASCII I O Module Tutorial Figure 3 10 Binary and BCD Interpretation of 10110 Binary BCD Place Value Place Value 128 64 32 16 8 4 2 1 80 4020 10842 1 10110 10110 164442 22 1044 42 16 NOTE To obtain the value in either base add the place values wherever a 1 appears 11838 1 Observe the difference between binary and BCD representation of an accumulated value free running timer in rungs 19 and RM20 of
26. rung 14 The cursor will illuminate the instruction title BLOCK XFER READ 2 Display the contents of the read block transfer file in hex Chapter 2 Getting Started with Your ASCII Module Press DISPLAY 1 Results The industrial terminal displays the name and numbers first 10 characters that you entered in step 2 For example ALLEN 12345 would be displayed as POSITION FILE DATA ASCII Equivalent 001 E010 status word one 002 0000 status word two 003 414C AL 004 4045 LE 005 4E20 N 006 3132 12 007 3334 34 Entering the eleventh character caused the module to transfer the data Note the space entered between ALLEN and 12345 The display of status word one E010 and status word two 0000 indicates normal status of the module 3 Terminate this display by pressing CANCEL COMMAND and return to ladder diagram Need Help If your display was all zeros the data did not transfer You may have altered the procedure Did you enter your program exactly as shown Did the module s CHANNEL ACTIVE LED go on Did you perform Procedure P1 before P2 Did you perform Step 1 in Procedure P2 Did you perform Step 3 in Procedure P2 2 13 Chapter 2 Getting Started with Your ASCII Module If you are still having trouble refer to Testing the ASCII Module and Cables to verify communication between the ASCII module and the industrial terminal If you suspect a cable problem check the 1770 CB cable
27. tides 020 Initialization Turns off rung 1 except for first scan at power up or via switch 02 A 21 Cll Module PLC 2 Family Processors Example Application Write Program A 22 Use this application write program Figure A 9 to display messages containing current values from an intelligent I O module The processor stores current values in a file 500 505 The source of the file could be read block transfers from an intelligent I O module The processor writes messages to the ASCII module for display on an industrial terminal using storage file 400 47 and write block transfer file 200 250 The storage file contains words for positioning current value data on the screen and words which store ASCII characters of your message The program moves current values words 500 thru 505 into appropriate locations in the storage file The scan counter controls the frequency at which write block transfers update the display If you want to demonstrate the use of this program to display messages load data into storage file 400 Table A A In this example the message contains an 8 digit position number for each of three axes Enter ASCII characters of your message message positioning codes and example 8 digit position numbers for each axis Load initialization data into file 200 Table A B Refer to section titled Formatting a Multi Line Message P 3 24 for an explanation of data in the stora
28. 0000 WO003 0000 RUNG NUMBER RM8 WO002 0000 P 1 L 04 16 Command word 1 Status word 1 16 write handshake WO005 0000 WO003 0000 RUNG NUMBER RM9 0002 0000 1 UR U 16 19 RUNG NUMBER 10 WB004 0000 Read status words 1 amp 2 BTR CNTL Vt and data BLOCK XFER READ EN 15 RACK 001 12 WB004 0000 GROUP 1 CNTL E MODULE 1 HIGH DN 05 DATA F0Q003 0000 15 LENGTH 0 CNTL CNTL 004 0000 L ER J 18 WB004 0000 BTW CNTL Write command words Lo BLOCK XFER WRITE H EN initialization data and message 17 RACK 001 02 data GROUP 1 CNTL MODULE _ 4 HIGH H DN DATA F0Q002 0000 05 LENGTH 0 CNTL CNTL 004 0000 L ER J 03 27 ns pendix A Cll Module PLC 2 Family Processors A 28 RUNG NUMBER RM11 Initialization Turn off rung 1 except for 1st scan at power up 0005 0000 J 00 wo003 0000 RUNG NUMBER RM12 1 Energize at power up to load initialization words Also energized on ri S 00 07 on 1st scan after processor selection of run monitor mode 01 50003 01 RUNG NUMBER RM13 WO005 0000 ize E T0001 xx Energize timer on power up TON TE Oo TIMER ON 001 17 1 0 SECOND 2 0001 15 1 RUNG NUMBER RM14 54 De energize timer after transferring initialization words NA j 0 15 01 RUNG NUMBER RM15 P Command word 1 initialization bit Module expects pd
29. 00000 00HO0H 00 00 PR OD UC ED 00H00H 00010 l PA RT S 00H 00HO00H 00HO0H 00 00 RADIX H START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 5052 4F44 5543 4544 202 0000 00010 2 20 5041 5254 5300 0000 0000 0000 0000 Store the delimiter preceding the BCD value in the lower byte of the word preceding the BCD storage word Store the delimiter following the BCD value in the upper byte of the word following the BCD storage word This is shown above If necessary add an extra space before the first delimiter to properly position it 3 Identify the storage word in the message file into which your program will move the message variable accumulated value In this example it is display word 7 4 Add program logic that moves your message variable into the proper storage word in your message file and moves your message file into the write block transfer file Figure 3 9 Add these rungs to the end of your program 4 47 Chapter 4 ASCII I O Module Tutorial Figure 3 9 Example Message Logic PLC 3 RUNG NUMBER RM18 T0004 TON 15 TIMER ON T0004 1 0 SECOND TP 60 TA 9 RUNG NUMBER RM19 10001 MOV MOV MOVE FROM A TO R MOVE FROM A TO R 04 A WTACC 004 WD006 0007 9 9 R WD006 0007 R WD006 0007 9 0000000000001001 RUNG NUMBER RM20 10001 MOV This rung entered MOVE FROM A TO R for comparison only A 04 R WO009 0007 0000000000001001
30. 00H00H OOHOOH AB 004 00 01 16 00010 00H QOHOOH 00 00 4 45 Chapter 4 ASCII I O Module Tutorial Formatting a Single Line Message 4 46 Notice the following BCD values are right justified between delimiters in the hex display One more storage word was used to store the 15 character string because of the justification of BCD values The data string was left justified in file storage The industrial terminal cannot correctly display BCD values in an ASCII display When your program transfers BCD values be sure you know how the data will be justified in the storage file Justification of BCD values can require extra storage words When formatting a message you store the message text and you write program logic to insert variables into your message Consider the message PRODUCED quantity PARTS The message text is PRODUCED PARTS The variable that you want to communicate is the quantity The variable can be timer or counter accumulated values analog I O values or any other data table word byte or bit that changes value You will use file MVF O6 0 to store your message The quantity in your message will be the BCD accumulated value of a free running timer You will move the accumulated value into your message storage file and store it in the storage word located between two BCD delimiters Format the message PRODUCED quan
31. 16 The module has its own internal fill characters that are not selectable When justifying data the module inserts fill characters according to the data conversion that you have selected Status Words Chapter 6 Function of Control Status Bits Internal Displayed at a Data Conversion Fill Character Data Terminal as 3 BCD per word 4 BCD per word 4 Hex per word Bit IW4 17 Function Reserved for Future Enhancements Description Reset it to zero The first two words in every read block transfer are status words Status word one SW1 reflects the module s response to command word one Status word two SW2 indicates the number of words and or data blocks transferred to the PC processor in each read block transfer Status Word One SW1 Bit SW1 00 Function Input Buffer Empty Description The module sets this bit to 1 when it detects that the buffer is empty The module resets this bit when data enters the input buffer Bit SW1 01 Function Input Buffer 5096 Full Description The module sets this bit when it detects that the buffer is 50 full The module resets this bit when the input buffer is less than 50 full Bit SW1 02 Function Input Buffer 75 Full Description The module sets this bit when it detects that the buffer is 75 full The module resets this bit when the input buffer is less than 75 full Bit SW1 03 Function Input Buffer Full Description The module latches this bit
32. 16 16 RUNG NUMBER RM12 WB004 0000 Read status word 1 amp 2 BTR CNTL it BLOCK XFERREAD HEN 15 RACK 001 12 WB004 0000 GROUP 1 CNTL Vt MODULE 4 HIGH H DN 05 DATA 0003 0000 15 LENGTH 0 CNTL Write command words 1 amp 2 CNTL 004 0000 ER initialization data and message 13 data WB004 0000 BTW CNTL f BLOCK XFER WRITE H EN 17 RACK 001 02 GROUP 1 CNTL MODULE 4 HIGH H DN DATA 0002 0000 05 LENGTH 0 CNTL 004 0000 L ER 03 46 Appendix ASCII Module PLC 2 Family Processors RUNG NUMBER RM13 Initialization Turns off rung 1 except for 0005 0000 1st scan at power up 00 RUNG NUMBER RM14 EO Example Read Write Program A read write program that you can use to transfer data to and or from your ASCII device is presented with rung descriptions in NO TAG Figure A 20 Example Read Write Program RUNG NUMBER RMO MOV MOVE FROMA TO R A WO0001 0000 10001 Load zeros into command word 1 with 00 selector switch or on first scan WO005 0000 0000000000000000 74 R WO0002 0000 00 0000000000000000 RUNG NUMBER RM1 WO003 0000 WO002 0000 Power up reset power up initialization bit 07 07 RUNG NUMBER RM2 WO003 0000 WO002 0000 WO005 0000 Status word 1 Command word 1 F 15 15 read data available WO003 0000 WO002 0000 02 15 15 RUNG NUMBER RM3 NOS tN nouns oe Status
33. 232 C pin functions Table 2 A RS 232 C Connector Pin Functions Signal Circuit 2 Transmitted Data Data Transfer to 1771 DA DCE Received Data 1771 DA Data Transfer to DTE DCE Request to Send DTE Tells the 1771 DA data is transmitted Clear to Send 1771 DA Tells DTE that data is DCE transmitted Enabled only if pin 4 is Vdc off Data Set Ready 1771 DA Tells DTE that 1771 DA DCE DCE is ready Signal Ground Common ground for all signals thru interface port on 1771 DA Receive Line Signal 1771 DA Tiedto 12V dc Detector DCE Data Terminal Ready DTE Tells 1771 DA DCE that DTE is ready Must be V dc to send or receive Current Loop Use the current loop for communicating up to approximately 500 cable feet between your ASCII device and ASCII module A current loop has high immunity to errors caused by electrical noise has no signal attenuation eliminates ground loops and is low cost A current loop is a loop that carries current generally 20mA between electronic equipment by means of a twisted pair of wires A transmitting device in the loop transmits digital signals by interrupting the current 3 2 Chapter 3 Choosing Module Features flow A receiving device in the loop senses the interruptions By convention a logic 1 corresponds to the presence of loop current a logic 0 corresponds to the absence of loop current A current loop transmitter or receiver can be
34. 2F00 Display The initialization word file is displayed in hex and binary respectively as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0003 0015 0000 2 00 START WO007 0000 WORD 2 3 4 5 00000 000000000000010 0000000000010101 0000110100001000 0010111100000000 NOTE Binary words 0 1 were omitted for brevity 3 Enter AS 23 AS A ENTER Refer to procedures in section titled Reading Data From Your ASCII Device P 1 28 Procedure P1 Connect the 1770 CB cable and set your industrial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode 3 ENTER 2 ENTER Procedure P2 Enter your data Procedure P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode Procedure P4 Observe how the data string is stored in data table file O6 0 Results The module transferred the data characters extracted the fill character added its own fill character and right justified the data 4 41 Chapter 4 ASCII I O Module Tutorial RADIX START WO006 0000 WORD 0 1 6 7 00000 00 00 00 00 52 00010 S4 00H00H OOHOOH 00 00 RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 2020 2020 2020 2020 2041 5332 00010 3341 5334 0000 0000 0000 0000 0000 0000 This feature does not allow your program to add data characters in place of
35. 7 Troubleshooting 7 8 Figure 6 2 Test Program PCL 2 Family 11 1 E 3 4 ef PUT 02 000 000 252 200 2 E 07 07 BLOCK XFER READ 011 EN DATAADDR 030 17 MODULE ADDR 111 BLOCK LENGTH 16 ue DN FILE 252 271 17 BLOCK XFER WRITE 011 1 EN Module location DATAADDR 031 16 rack 1 module group 1 slot 1 MODULE ADDR 111 111 BLOCK LENGTH 16 DN FILE 200 217 16 020 5 Y TEMPORARY END 02 Chapter 7 Troubleshooting Figure 6 3 Test Program PLC 3 I 0001 MOV MOVE FROMA 00 0001 0000 0005 0000 00000000000000 t R WO002 0000 00 0000000000000000 0003 0000 0002 0000 E 07 07 WB004 0000 BTR E alla E BLOCK XFER READ ee 15 AE i CNTL WB004 0000 GROUP MODULE 1 HIGH 4 CNTL 004 0000 13 WB004 0000 1 E BTW EN d BLOCK XFER WRITE RACK 001 a GROUP 1 DN MODULE 1 HIGH DATA 0002 0000 CNTL FB004 0000 03 0005 0000 00 7 9 Appendix PLC 2 Family Processors Complete Getting Started The complete Getting Started Program with rung desriptions is described Program PLC 2 Family in Figure A 1 Figure A 1 Complete Getting Started Program PLC 2 Family LADDER DIAGRAM DUMP START Loads zero
36. A 254 271 FILE R 34 RATE PER SCAN 16 15 4 13 Chapter 4 ASCII I O Module Tutorial Removing the Fill Character Whenever the module encounters the ASCII character that you defined in IW4 10 16 as the fill character to be removed the module removes it from the string Then the module transfers only data justifies the data and adds its own fill character The number of fill characters that it adds is equal to the number of those it removed The fill character that the module inserts is described in section titled Your ASCII Module Inserts Fill Characters 2 22 If your ASCII device uses fill characters for positioning data you may choose not to remove them because the position has meaning In this demonstration you will select a fill character that the module will remove and observe its operation 1 Increase the number of initialization words to four by setting appropriate bits Set IW1 0003 Use the procedure in section titled Setting Bits in Initialization Words P 3 4 2 Select the slash symbol as the fill character to be removed The ASCII is 2F in hex Set IW4 2F00 Display The file to file move instruction displays your settings as FILE DATA POSITION follows 001 0003 00000000 00000011 002 0015 00000000 00010101 003 0000 00001101 00000000 004 2F00 00101111 00000000 3 Enter AS 23 AS 4 RETURN Refer to procedures in section titled Reading Data f
37. ASCII logic into a cleared memory for tutorial chapters 1 and 3 in this manual Equipment That You Need You will need the following equipment Table 1 C using your existing system and or spare equipment Chapter 2 Getting Started with Your ASCII Module Table 1 Equipment PLC 3 Equipment Catalog Number PLC 3 Main Chassis 1775 1 Main Processor Module 1775 L1 L2 I O Scanner Programmer Interface Module 1775 S4A Memory Module 1775 MR Power Supply 1775 1 Industrial Terminal 1770 14 PLC 3 Keytop Overlay 1770 KDA 1 0 Chassis 1771 Al A2 A4 Remote 1 0 Adapter Module 1771 AS ASCII i O Module 1771 DA Twinaxial I O Interface Cable 1770 CD IT DH Adapter Cable 1770 CB PLC 3 Industrial Terminal Cable 1775 CAT 1 Chassis Power Cable 1775 CAP 2 Power Cable 1775 CH Terminators 1775 XT Supplied with the Industrial Terminal 2 Supplied with the PLC 3 Main Chassis If you use an existing system place the ASCII module in a chassis on a separate channel Use a spare scanner module cat no 1775 54 54 if necessary The ASCII module draws 1 3A from the backplane If you place the module in a chassis containing other modules be sure that the total current drain of all modules in the chassis does not exceed the maximum for the backplane and power supply 2 19 Chapter 2 Getting Started with Your ASCII Module How to Connect Your Equipment Connect your equipment using the appropriate cab
38. B 13 A B long line 3 9 ACK NAK 3 28 alphanumberic mode 2 10 ASCII acronym 2 1 control codes _C 5 BCD Binary Coded Decimal 3 14 block transfer block length 3 19 execution time _A 32 7 fault detection 40 _B 1 overview 30 5 block transfer timing Mini PLC 2 15 13 PLC 2 30 local system 11 PLC 2 30 remote system 8 reducing scan time 37 12 C command word one CW1 6 1 communication mode description 3 1 selection 3 12 configuration of module initialization words 3 12 programming plugs 3 11 connections 2 4 to channels A and B 2 5 control codes 5 conversion tables decimal octal heX ASCIl _C 2 hex binary ASCIl C 1 current loop 3 1 D data bits number of 3 27 data byte storage 3 27 Index data conversion 3 13 demonstration 4 17 data mode 3 13 delimiter demonstration 4 9 PC processor 3 23 demonstratinos header character removal trailing character removal 4 15 demonstrations data conversion 4 17 end of string 4 9 fill characters removal 4 14 greater than module s 4 11 justified data 4 8 margin justification 4 7 multiple line 4 24 report generation mode 4 19 right justified 4 20 single line 4 21 string length changing 4 5 E entering your program 2 25 equipment required 2 2 error recognition 7 1 Expand number of initialization words 4 5 F fill character demonstration 4 14 inser
39. Hex digit Module removes 15 characters max Zero characters for default Status Word One Function Channel Active Write Data Acknowledge Read Data Available Input String Exceeds ASCII Device Link Power up Initialization Input Buffer Empty Chapter 6 Function of Control Status Bits 0 Reset 1 The ASCII device is enabled Module toggles SW1 16 CW1 16 to tell PC that new data was received Module toggles SW1 15 CW1 15 when it detects a change in status or receives new data from ASCII device 0 Reset 1 Input string gt set string length in IW2 00 13 0 Reset 1 Module detects parity framing or overrun error in string from the ASCII device 0 Reset 1 Module ceases to operate Module sets it to zero 0 Reset 1 Module detects delimiter at end of string that is distributed over one or more block transfers 0 Reset by CW1 07 1 Power up initialization is complete Module sets it to zero 0 Reset when less than full 1 Output buffer full 0 Reset when data enters buffer 1 Output buffer empty 0 Reset by CW1 03 when input buffer is empty 1 Input buffer is full 0 Reset when less than 75 full 1 Input buffer is 75 full 0 Reset when less than 50 full 1 Input buffer is 50 full 0 Reset when data enters buffer 1 Input buffer is empty The module sets these bits unless toggled when it detects the subject condition 6 23 Cha
40. Load a brief program into processor memory Use the program Figure 6 2 for PLC 2 family controllers Figure 6 3 for PLC 3 controllers if your processor memory is empty If you have loaded your Getting Started Program insert only rungs 3 and 4 following rung 2 of the Getting Started Program Add a temporary end instruction PLC 2 family or an end rung PLC 3 controller 3 Set your industrial terminal to alphanumeric mode and select communication rate of 300 baud Do this by entering the following key sequence using the alphanumeric keytop overlay Press MODE SELECT 1213 RETURN The cursor appears at the upper left corner of a blank screen The module s CHANNEL ACTIVE LED illuminates when the industrial terminal is in alphanumeric mode and the module has power 4 Place the processor in run program mode PLC 2 family controller or in run monitor PLC 3 controllers 5 Enter characters on the keyboard Results Characters should be displayed as you enter them If not check the following The module s internal programming plugs are set correctly chapter 3 Figure 3 8 Cables to the I O chassis are connected correctly PLC 3 controller LIST functions are entered correctly and or adapter module switch is set correctly Does the proper channel number LED indicator illuminate on the 1775 S4A I O scanner and does the ACTIVE LED indicator illuminate on the 1771 AS remote I O adapter module 7 7 Chapter
41. ON T0001 17 4 1 0 SECOND P 2 T0001 TA 0 TD 15 1 p U aj L 15 01 10001 RUNG NUMBER RM15 0002 0000 J E 00 17 W0005 0000 1 L 01 Chapter 4 ASCII I O Module Tutorial RUNG NUMBER RM16 10001 KUEN C0004 T f MVF i FILES FROM A TO EN 00 12 WO005 0000 F0007 0002 C0004 s R FO002 0002 DN m COUNTER C0004 15 01 POS LEN 0 4 0004 MODE ALL SCAN ER 13 RUNG NUMBER RM17 ant MVF C0001 eh gt FILES FROMA R H EN 02 A WO003 0001 12 0000000000000000 FO003 0002 00 B WO001 0000 006 0002 DN 0000000000000000 COUNTER C0001 15 POS LEN 0 62 0001 MODE ALL SCAN 13 4 29 Chapter 4 ASCII I O Module Tutorial Setting Bits in Initialization Words 4 30 1 Place the PLC 3 processor in program load mode Press SHIFT LIST 3 ENTER on the PLC 3 front panel and insert the additional rungs exactly as shown on the industrial terminal To insert one or more rungs into your program place the cursor on the input instruction in the following rung Press INSERT SHIFT RUNG ENTER Then enter the instructions for one rung You must press RUNG 1 before inserting each new rung 2 After you enter the additional rungs create a source file file A for the file move instruction in rung 16 and a result file file R in rung 17 To set the size of the source file in ru
42. RUNG NUMBER RM21 10001 FILES FROMA TO R di A 0006 0002 R 0002 0002 COUNTER C0005 POS LEN 62 62 MODE ALL SCAN RUNG NUMBER RM22 4 48 Chapter 4 ASCII I O Module Tutorial 5 Transfer your message for display on the industrial terminal Refer to the procedures in section titled Writing Data To Your ASCII Device chapter 1 if necessary Procedure P1 Connect the 1770 CB cable and set the industrial terminal to alphanumeric mode check parameters Procedure P6 Enable the MVF instruction With the PLC 3 in run monitor enter 1001 04 and enable that bit then 1001 02 and enable that bit in that order Results The industrial terminal displays your message PRODUCED XXX PARTS The value XXX is the instantaneous accumulated value of the free running timer at the moment you enabled bit 1001 04 Formatting a Multi Line Message When formatting a multi line or multi column message use the ASCII equivalent of the following control codes for positioning the message Control Codes Hex or ASCII Equivalent CTRLP 10 Column number 38 fixed in this example 3B Line number 36 37 38 A 41 When you enter the ASCII equivalent of these control codes into the message file they will position the cursor at the column and line number that you specify Position Codes 1041 1038 00000000 1038 00000000 OD end of string delimiter 4 49 Chapter 4 ASCII I O Module Tutorial Fo
43. an end of string delimiter even though you have not selected it Initialization Word Four IW4 Bits IW4 00 03 Function Removes Header Characters Description Select the number of header characters up to 15 preceding the data string that you want the module to remove when it sends data to the PC processor data table If no bits are set the module defaults to zero no header characters are removed Set bit 00 03 to the binary code for the number of header characters that you want the module to remove Bits IW4 04 07 Function Removes Trailing Characters Description Select the number of trailing characters up to 15 following the data string that you want the module to remove when it sends data to the PC processor data table This number does not include the end of string delimiter unless you are sending the end of string delimiter to the processor If no bits are set the module defaults to zero no trailing characters are removed Set bits 04 07 to the binary code for the number of trailing characters that you want the module to remove Bits IW4 10 16 Function BCD Delimiter Removes Fill Character Description BCD Delimiter Report Generation Mode 6 11 Chapter 6 Function of Control Status Bits 6 12 When operating in report generation mode use these bits to select a BCD delimiter Insert a BCD delimiter before and after BCD numbers in your message The BCD delimiter instructs the module to convert and
44. and or some application dependent condition B 12 Appendix ASCII Module For PLC 3 Proessor Program the read and write block transfer instructions of your ASCII module in the same rung Figure A 16 Distribute your block transfer modules equally between all four scanner channels Distribute block transfer instructions equally throughout your program Place an equal number of non block transfer rungs between block transfer rungs For large numbers of block transfer instructions distribute groups of block transfer rungs equally throughout your program Place no more than four block transfer rungs consecutively in one group Within each group condition the next rung using the done bit of the previous block transfer instruction Consider an additional I O scanner module cat no 1775 S4A if you cannot otherwise reduce the block transfer times to meet your timing requirements During a write handshake the processor also can transfer write data to the ASCII module and during a read handshake the processor also can transfer read data Figure B 7 Example Block Transfer Programming 001 0000 BTR CNTL Mt BLOCK XFERREAD EN 15 RACK 001 12 001 0000 GROUP 1 CNTL F MODULE 4 HIGH DN 05 DATA Fr001 0005 15 LENGTH 0 CNTL CNTL 001 0000 13 WB001 0000 BTW CNTL BLOCK XFER WRITE H EN 17 RACK 001 02 GROUP 1 CNTL MODULE
45. bits of block transfer instructions Handshake logic uses control and status bits of the ASCII module Execution Time The time required to complete a read or write block transfer depends on factors that include the number of words of user program active I O channels on the scanner I O chassis entries in the rack list for the channel O channels on the scanner that contain block transfer modules block transfer modules on the channel if the I O chassis containing a block transfer module appears more than once in the I O chassis rack list count the module once each time the chassis appears in the rack list Typical time required to complete a read or write block transfer depends on the program scan and the scanner scan as follows Time read or write Program scan 2 Scanner scan Program Scan The program scan is approximately 2 5ms per 1K words of user program when using a mix of examine on off and block instructions Scanner Scan The time required for the scanner to complete a read or write block transfer depends on the number of other block transfer modules on the same scanner channel that are enabled simultaneously Use the following procedure to calculate the time required for the PLC 3 processor to perform all block transfers on the channel B 7 append B A CII Module For PLC 3 Processor B 8 1 Determine the number of active I O channels on the scanner 2 Determine the number of I O channel
46. block transfer routine B WO000 0400 to display message files 1 and 2 0100011101001111 RUNG NUMBER RM19 ee Timer starts its 5 second write block transfer one ON 15 routine TIMERON 170000 17 1 0 SECOND TP 5 T0002 TA 0 FX TD 15 RUNG NUMBER RM20 C0003 EQU Moves first message file into MVF EN A write block transfer file when timer FILES FROMA 12 i t accumulated value is 1 second 4 0000 0600 60003 B 000 0001 0000 0202 I DN 1 COUNTER C0003 15 POS LEN 00 14 0003 MODE ALL SCAN RUNG NUMBER 21 B0020 EQU A B 9 WTACC 0002 Initiates a write to the peripheral device when the timer 16 0 accumulated value is 2 seconds message file 1 and WN000 0002 4 seconds message 2 2 EQU A B WTACC 0002 0 B WN000 0004 4 RUNG NUMBER RM22 i 7 C0004 EQU _ oves second message file MVF I EN ae into write block transfer file FILESFROMA TO R 12 0 when the timer accumulated 0000 0700 C0004 value is 3 seconds B WN000 0003 R 0000 0202 I DN COUNTER C0004 15 POS LEN 00 14 0004 MODE ALL SCAN res Appendix ASCII Module For PLC 3 Proessor RUNG NUMBER RM23 T0002 1 LEE 0020 Unlatches write block transfer one shot timer after its routine is complete E U 15 5 seconds 15 RUNG NUMBER RM24 0003 This timer accumulated value is the message T0003 1 1 TON TE 15
47. but most data is written to your ASCII You want to maximize the number of characters that the 2596 Input 011 device module s output buffer can store before spilling data 7596 Output Can only display data Same as block above 10096 Output Record the percentage of input to output that you want the buffer to have by writing the corresponding 3 digit code in IW3 00 02 Use the form found at the end of this chapter or the boxes below 1 0 Buffer Size Chapter 3 Choosing Module Features Choosing Transmission Mode transmission mode that you choose is determined by the IW1 05 07 specifications of your ASCII device and the requirements of your application Table 2 1 Table 2 L Mode of Transmission If Your ASCII Device Is And Your Application Requires Then Select Using Code Full Duplex That your ASCII device displays data sent to the ASCII module Full Duplex with Echo That no data is displayed Full Duplex without Echo Simplex Read Only the transmission of data from your ASCII device Simplex Read or Full I GE Duplex Simplex Write Only the display of data received by your ASCII device Simplex Write or Full Duplex Half Duplex That your ASCII device displays data sent to the ASCII module Half Duplex with Echo That no data is displayed Half Duplex without Echo Record the mode of transmission selection by writing the 3 digit code in IW1 05 07 Use the form found at the end of this chapter the boxes
48. carriage return CR Setting this bit saves storing line feed control characters in the data table You can use this bit with IW3 04 When generating multi line messages select some control code such as escape for the end of string delimiter not carriage return Set this bit IW3 05 but not IW3 04 Use the carriage return to terminate each line 6 9 Chapter 6 Function of Control Status Bits 6 10 Bits IW3 06 07 Function Delay for Carriage Return Description Select a time for the ASCII module to delay outputting data to allow for the mechanical carriage return when using an unbuffered data terminal 06 Delay ms 50 100 200 Bits IW3 10 16 Function End of String Delimiter Description The end of string delimiter causes the module to transfer the string of characters to the PC processor data table single string transfer When you select multi string transfer the module transfers the number of strings that fills one block transfer In data mode select the end of string delimiter the same as that of your ASCII device If your ASCII device does not generate an end of string delimiter set IW3 17 Then the ASCII module ignores these bits Without an end of string delimiter the module transfers your data string immediately after its input buffer receives the next characters beyond your selected string length The next characters remain in the buffer as the beginning of the next string and the cycle
49. current loop allowing transfer of data to 1771 DA 13 Module Transmitter Circuit Source 1771 DA Supplies current for current loop interface 24 Module Receiver Circuit Return Return for module receiver circuit 3 3 Chapter 3 Choosing Module Features A B Long Line Use A B Long Line for communicating up to 5000 cable feet between an industrial terminal serving as an ASCII device and the ASCII module Refer to Table 2 D for a detailed listing of A B Long Line pin functions Table 2 D A B Long Line Connector Pin Functions Signal Name 2 Transmitted Data A B Long Line Device Data Transfer to 1771 DA 7 Transmitted Data Return Return for transmitted data 11 Received Data 1771 DA Data transfer to A B Long Line Device 25 Received Data Return Return for received data Selecting the Communication Mode The communication mode that you choose depends on the cable distance from your ASCII device to your ASCII module and on characteristics of your ASCII device Table 2 E Table 2 E Mode of Communication If Distance is Then Choose this Less Than And Your ASCII Device is Transmission Mode 50 feet Data Terminal Equipment DTE and conforms RS 232 C Figure 2 1 to RS 232 C without control lines 4 wire cable with control lines 8 wire cable Data Set modem and conforms to RS 232 C RS 232 C Figure 2 2 without control lines with control lines 4 wire cable 8 wire cable 500 feet DTE and pro
50. fit in 62 words Two words of each block transfer are reserved for status or command words The module will not divide a string between two or more block transfers when set for multiple string transfer If the rate of transfer between ASCII module and processor cannot keep up with the communication rate from the ASCII device data will be lost when the ASCII module s input buffer becomes full You can program the examination of the input buffer 75 full bit SW1 02 to alert the operator to turn off the ASCII device before the loss of data occurs When you use RS 232 C with control lines the module turns off the clear to send CTS signal when the input buffer is full Initialization Word Three IW3 Bit IW3 00 02 Function I O Buffer Split Description The I O buffer capacity is 1024 words You can subdivide the buffer between percentage of input and output according to the transmitting and receiving capacity of your ASCII device Select the percentage of input to output 00 Input Output 50 50 100 0 invalid for simplex write 75 25 25 75 0 100 invalid for simplex read Chapter 6 Function of Control Status Bits If the module detects an invalid I O buffer split it faults because of an initialization error The module disables its interface port and sets status bit SW1 12 Bit IW3 03 Function Margin Justification Description Reset this bit to zero default for right justification or set it for
51. from the module If not data in your read block transfer file will be written over in the next read block transfer Your program does this by moving new data from the read block transfer file into storage file MVF O6 0 in rung RM17 Figure 3 6 The rung moves only new data when transferred from the module Removing the Fill Character Whenever the module encounters the ASCII character that you defined in IW4 10 16 as the fill character to be removed the module removes it from the string Select a fill character to be removed that is identical to the fill character of your ASCII device Then the module transfers only data justifies the data and adds its own fill character equal in number to those it removed Refer to section titled Your ASCII Module Inserts Fill Characters P 2 22 If your ASCII device uses fill characters for positioning data remove them with caution because their positioning value can be nullified In this demonstration you will select a fill character and observe how the module removes it 4 40 Chapter 4 ASCII I O Module Tutorial 1 Increase the number of initialization words to four by setting appropriate bits Set IW1 20003 Use procedure in section titled String Length Less Than Module s String Length P 3 10 2 Select the slash symbol as the fill character to be removed using procedure in section titled Setting Bits In Initialization Words P 3 30 The ASCII is 2F in hex Set IW4
52. hex or binary as follows HEXADECIMAL BINARY DATA MONITOR DATA MONITOR POSITION FILE DATA POSITION FILE DATA 001 0000 001 00000000 00000000 002 0000 002 00000000 00000000 Header information was deleted for brevity 3 Enter initialization data into each file word by pressing INSERT after you have entered data into the command buffer at the bottom of the screen Press to move to the next word Enter data in binary or hex Binary is easier to understand because you set actual bits Hex is faster and more convenient when you can convert from binary to hex as follows Table 3 A Table 3 A Binary Hex Conversion 4 Terminate data entry and return to ladder diagram Press CANCEL COMMAND You will often use the above procedure and the procedures from chapter 1 in this tutorial Expanding the Number of Initialization Words Changing the Module s String Length Read Only Chapter 4 ASCII I O Module Tutorial The module has four words that you use to select operating features You do this by setting one or more bits for each feature that you want to use You increase the number of initialization words according to the module features that you want to use For example if you want a feature that is selected in initialization word three you must use initialization words one two and three 1 Set your module for initialization words one two and three using bits 00 and 01 of initialization word
53. in chassis Description Number Ch1 Ch2 Ch3 Ch4 Active I O channels 3 Block Transfer 1 0 channels 2 Block Transfer modules on each I O block transfer channel 3 0 1 0 I O chassis on each block transfer I O channel I O chassis in rack list 4 0 2 0 12828 2 Using information from the diagram of I O channels Figure A 12 look up the nominal time from the table in Figure A 13 B 10 CT2 CT3 CT4 Appendix B ASCII Module For PLC 3 Proessor Figure B 4 Nominal Time Table Step 2 Determine a time from the table Example values have been added Number of Active I O Channels 1 2 3 4 4 40 52 54 58 Active I O channels containing one or more 2 67 68 76 block transfer modules 3 98 99 4 123 Time ms Number of active I O channels 3 Number of active I O channels containing one more block transfer module 2 Time from table 68ms 12829 3 Compute the approximate transfer time for each block transfer channel Use values from your channel diagram Figure A 12 a value from the table Figure A 13 and the formula from step 6 above We make these calculations for you in Figure A 14 Figure B 5 Computing Channel Times Compute the scanner time for each block transfer channel Example values have been added Channel Time BT modules chassis 4a Time on BT channel on BT channel x9
54. in section titled Reading Data from Your ASCII Device P 1 10 Procedure P1 Set your industrial terminal to alphanumeric mode Procedure P2 Enter your data Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P4 Observe how data is stored in the data table Results The read block transfer file displays the five character string in positions 003 thru 010 Table 3 E Table 3 E String Length String Length Right Justified POSITION FILE DATA ASCII Equivalent status word one status word two Chapter 4 ASCII I O Module Tutorial Notice the following The new string data and fill characters completely replaced the previous data The data is right justified Fill character spaces 20 were added by the ASCII module String Length Greater Than Module s String Length When the module receives a string of data greater than the set string length it does the following Immediately transfers the number of characters equal to its set string length to the processor Sets bit 14 in status word one Input String gt Maximum SW1 14 Bit 14 is immediately reset when the processor confirms receipt of data Retains the balance of data in its input buffer Transfers the balance of data with new data when it receives enough new data to complete the string or when the new data contains an end of string delimiter In this demonstration you will enter a string of data greater than the set s
55. of the rear label If your industrial terminal cat no 1770 T3 TA series B is date coded T 8218 or earlier or is not date coded alternate cables and observe the following warning WARNING When cables are connect to channels A and B at the same time cross talk between these channels could cause the processor to misread inputs and or misapply outputs with possible damage to equipment and or injury to personnel For this reason do not remove the slide bar that prevents you from connecting cables to channels A and B at the same time If your industrial terminal cat no 1770 T3 TA series B is date coded T 8219 or later you can use channels A and B at the same time If alternating between channels A and B connect the 1770 CB cable to channel B when using the industrial terminal in alphanumeric mode as a data terminal Connect the 1772 TC cable to channel A when using the industrial terminal in PLC 2 ladder diagram mode As an alternative use a second industrial terminal in alphanumeric mode on channel B or use a Silent 700 data terminal Connect either to the 1770 CB cable Checking ASCII Module Configuration Your module is configured for RS 232 C operation when shipped from the factory If you suspect that its internal configuration settings of internal programing plugs has been altered you should check module configuration refer to section titled Choosing the Mode of Communication in chapter 3 Do this as follows 1 R
56. of transmission The simplex write mode disregards the status of the receive line which is indicated by ACTIVE the CHANNEL ACTIVE indicator 7 2 Chapter 7 Troubleshooting When the input buffer is full and when you use control lines the module signals the ASCII device to stop sending data If you do not use control lines and the ASCII device continues to send data when the input buffer is full the data spills over and is lost Typical examples of fault conditions displayed by status indicators and corrective action that you can take are shown in the troubleshooting chart Table 6 B If the FAULT indicator should remain on return the module to Allen Bradley for service 7 3 Chapter 7 Troubleshooting Table 6 B Troubleshooting Chart FAULT O BUFFER FULL O CHANNEL ACTIVE FAULT BUFFER FULL CHANNEL ACTIVE FAULT 9 BUFFER FULL CHANNEL ACTIVE FAULT O BUFFER FULL CHANNEL ACTIVE FAULT BUFFER FULL 5 How You Interpret Codes Status Word One 7 4 Normal operation ASCII characters are not transferred 1 Check for invalid initialization data but all LEDs give normal indication SW1 X4XX X any hex value 2 Check parity setting on ASCII device with setting of IW1 14 15 Hardware failure in module Return module for repair Input buffer full Loss of spillover 1 Check for loss of data data if control lines are not used 2 Increa
57. on when it detects that the buffer is full It is reset by CW1 03 when the input buffer is empty 6 13 Chapter 6 Function of Control Status Bits Bit SW1 04 Function Output Buffer Empty Description The module sets this bit when it detects that the output buffer is empty The module resets this bit when it detects that data entered the output buffer Bit SW1 05 Functions Output Buffer Full Description The module sets this bit when it detects that the output buffer is full The module resets this bit when the output buffer is less than full Bit SW1 06 Function Reserved for Future Enhancements Description The module sets this bit to zero Bit SW1 07 Function Power up Initialization Description The module sets this bit to show that the module has undergone power up initialization Buffers have been cleared and communication thru the module s interface port has been turned off This bit must be reset by program logic in order to complete the power up initialization routine This bit is reset by setting bit 07 of command word one CW1 07 When CW1 07 is set bits 07 15 and 16 of status word one are reset Then you can operate the module in default mode or initialize the module to any other operating mode Bit SW1 10 Function Data Complete Description The module sets this bit when it detects the end of string delimiter in a transfer When a long string of data is transferred over two or more bloc
58. one shot routine that transfers message files 1 and 2 to the peripheral device When the string of data containing GO is transmitted to the ASCII module s input buffer the module sets the new data flag SW2 gt 0 and transfers data and the new data flag to the processor data table Figure B 12 Example Application Program RUNG NUMBER RMO MOV B0020 Zero out CW1 on power up 1 f MOVE FROMA TO R 02 A WB000 0327 0000000000000000 R WO000 0200 0000000000000000 RUNG NUMBER RM1 ae Power up initialization rung oo i E 07 07 RUNG NUMBER RM2 00252 0020 07 10 RUNG NUMBER RM3 0020 T0001 I TON ME 10 Initialize for 2 seconds TIMER ON T0001 17 1 0 SECOND TP 2 T0001 TA 0 FTD 15 T0001 RUNG NUMBER RM4 B0020 i 60 15 10 25 append B A CII Module For PLC 3 Processor B 26 RUNG NUMBER RM5 00252 00200 B0035 15 15 00 00252 00200 izi 15 15 RUNG NUMBER RM6 B0035 00252 Read handshake rungs 00200 E L 00 15 15 RUNG NUMBER RM7 B0035 00252 00200 m m f 00 15 15 RUNG NUMBER RM8 B0020 B0020 1r 1 Write handshake rungs i os When B20 16 is high data is written to the module 16 00 01 RUNG NUMBER RM9 B0020 B0020 1 L L 01 00 0020 RUNG NUMBER RM10 B0020 yt 16 00 B0020 00252 BENG NUMBER BM 00200 at L 01 16 16 0020 00252 ane 00200 ae u 01 16 16 A
59. power up or via switch 02 A 17 Cll Module PLC 2 Family Processors Example Write Only Program A write only program for transferring data from your processor s data table to your ASCII device is presented with rung descriptions Figure 7 Figure A 7 Example Write Only Program LADDER DIAGRAM DUMP START 11 Loads zeros into command word CW1 200 J G PUT 17 000 with switch or first program scan 000 020 02 252 Swit Power up initialization bit reset 200 al XE 1 t Dd ae 07 power up initialization bit CW1 07 252 1r 5 1 Energize power up to laod initialization LA 07 words into write BT file OFF 10 020 Energize timer power u 062 3 power up TON 10 1 0 PR 002 AC 000 062 JE De energize after time out e 15 Initialization words sent OFF 10 112 020 020 RN 16 00 01 020 One shot for Write BT 020 f L 01 00 112 020 E U 16 00 020 252 200 f 1 016 swi Cw Write Handshake ONS 020 252 200 pec 01 16 16 18 Appendix ASCII Module PLC 2 Family Processors Read SW1 SW2 BLOCK XFER READ f e DATA ADDR oo y MODULE ADDR 371 37 BLOCK LENGTH 14 DN FILE 252 267 17 BLOCK XFER WRITE ui Write CW1 CW2 EN initialization words and data DATA ADDR 051 16 MOD
60. quarter rack Frequent re tries indicate I O communication problems The file length is application dependent four words per assigned rack number The display format is Bit Number binary count first quarter rack binary count second quarter rack binary count third quarter rack binary count fourth quarter rack binary count first quarter rack binary count second quarter rack Example Read Only Program A read only program for transferring data from your ASCII device into the data table of your processor is presented with rung descriptions in Figure A 18 B 16 Figure B 9 Example Read Only Program App endix B ASCII Module For PLC 3 Proessor RUNG NUMBER RMO MOV Te Load zeros into command word 1 with MOVE FROMA TO R 1 f gt 00 selector switch or on first scan A WO001 0000 WO005 0000 0000000000000000 E R WO002 0000 00 0000000000000000 RUNG NUMBER RM1 0003 0000 T ND WO002 0000 Power up reset power up initialization bit 1 oa 07 07 RUNG NUMBER RM2 WO003 0000 WO002 0000 WO005 0000 y 1r Status word 1 Command word 1 EN js Pos read data available bd 02 WO003 0000 WO002 0000 j E 15 15 RUNG NUMBER RM3 WO005 0000 WO003 0000 WO002 0000 1r 1 Status word 1 Command word 1 L p i read handshake 15 RUNG NUMBER RM4 WO005 0000 W0003 0000 1r 1 1 Status word 1 Command word 1 jt yt U 0
61. store numbers in the BCD format 3 or 4 characters per word that you chose in IW2 14 16 Select the BCD delimiter from any one of the following hex codes Refer to the Hex ASCII Conversion Table in the appendix C OA OF 2A 2F 4A 4F 6A 6F 1A 1F 3A 3F 5A 5F The module defaults to the colon as the BCD delimiter if you do not use initialization word four You can use the default value of IW4 10 16 only when you select three or fewer initialization words If you select four initialization words you must enter a value in IW4 10 16 This value cannot be the same value as the end of string delimiter that you entered in IW3 10 16 or an initialization error will occur This applies to both functions of TW4 10 16 BCD Delimiter and removing the fill character Description Removes Fill Character Data Mode When operating in data mode use these bits to select the fill character generated by the ASCII device that the module removes Some ASCII devices vary the number of data characters per string and insert fill characters to make all strings of equal length The module deletes the fill character whenever encountered in the string The module justifies the data changing its position and substitutes its own fill characters for the ones it removes Select the fill character to be removed identical to the fill character of your ASCII device The module removes the colon if you do not select a character using W4 10
62. switch to the RUN PROG position Results The industrial terminal displays the column of diagnostic codes in the upper left corner of the screen 12345678 ABCD4321 FACEBAC2 With a read write program you can enter the text of your message into processor memory by using the industrial terminal as an ASCII data terminal as compared with entering data with the data monitor mode of the industrial terminal described in the previous two examples When entering data from an ASCII data terminal you can use the rubout or delete key Pressing either key deletes the previous character from the ASCII module s input buffer You can delete one or more characters up to the entire string bounded by the previous end of string delimiter NOTE The correct operation of your module depends on proper handshake programming for read and write block transfer instructions Be sure to read the description of handshaking in chapter 4 and study the handshake programming examples Chapter 4 ASCII I O Module Tutorial PLC 3 Processors Adding Initialization Rungs Add initialization rungs and file move logic to your Getting Started Program Figure 3 6 rungs 12 thru 17 so that you can configure your module Figure 3 6 Getting Started Program PLC 3 10001 RUNG NUMBER RMO e MOV E MOVE FROMA TO R 00 0001 0000 0000000000000000 TLE R WO002 0000 00 0000000000000000
63. system time ST between 2 consecutive read block transfers ST 4TW 4TR 4 92 4 114 368 456 824ms This is the worst case time between two consecutive read block transfers in the 4 chassis remote configuration described in example problem 1 enabled ASCII module in each chassis A 10 Appendix ASCII Module PLC 2 Family Processors PLC 2 30 Local System The system scan time for a local PLC 2 30 system is the program scan time plus the processor I O scan time Each block transfer module will be updated during a program scan The procedure for calculating the worst case time between transfers can be done in three steps T Calculate the system values that are determined by the system configuration Program Scan PS 5ms 1K words x number of program words Processor I O Scan PIO z 1ms rack number x number of declared rack numbers Number of words transferred W 64 read or a write 2 Calculate the block transfer time T for the read or write operation T 0 1ms 0 075ms word x number of words transferred The same equation is used for either read or write transfer times 3 Calculate the worst case system time ST between transfers ST PS PIO T 1 read T 2 read T 3 read PS PIO T 1 write T 2 write T 3 write 2 PS T 1 read T 2 read T 3 read T 1 write T 2 write T 3 write Example Problem 2 A PLC 2 30 progr
64. terminal to PLC 3 mode Procedure P4 Observe how the data string is stored in data table file 06 0 Refer to the procedures in section titled Reading Data From Your ASCII Device P 1 10 RADIX START WO006 0000 WORD 0 1 00000 00HO0H 00 00 00010 2 3 4 5 00 00 OOHOOH 00 00 00HO0H RADIX H START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 2020 2020 2020 2020 2020 2031 00010 3233 3435 0000 0000 0000 0000 0000 0000 Results The file displays the character string in ASCII or in hex respectively The data is right justified Notice the following The data string of five characters was transferred when you entered the end of string delimiter The end of string delimiter was not transferred to the data table The module added fill characters blank in ASCII or 20 in hex in display words 2 3 4 5 and 6 to complete the string The data was right justified 4 36 Chapter 4 ASCII I O Module Tutorial String Length Less Than Module s String Length Left Justified In this demonstration you will set the margin justification bit IW3 03 and repeat the transfer of five characters 1 Setthe margin justification bit IW3 03 for left justification Display The initialization word file is displayed in hex and binary respectively as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0002 0015 0D08 000
65. the specifications of your ASCII device Chapter 3 Choosing Module Features Communication Rate Match the communication rate of your ASCII module with that of your ASCII device Set bits IW1 10 12 accordingly Your selections are Communication Rate Code 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud 110 baud Number of Data Bits Your ASCII device generates either seven or eight data bits per character Figure 2 11 The ASCII module neither stores nor outputs the eighth bit but must know if itis there Use the default value eight bit data if this information is not available Set bit IW1 113 accordingly Figure 2 11 Data Byte Storage in Module 0 Bit 8 Eighth bit is ignored by the ASCII Module 1 Bit2 Bits Bit4 Bits Bit6 Bit7 11830 3 27 Chapter 3 Choosing Module Features Parity Your ASCII device generates either odd even or no parity bit with each character Figure 2 12 Use the default value no parity if this information is not available Set bits IW1 14 15 accordingly Figure 2 12 Serial Data on RS 232 C Line Bit Bit2 Bits Bit4 Bit5 Bit6 Bit7 Bits d Last Stop Bit Start Bit Optional Optional or Marker Parity Bit Optional Bits 11831 Number of Stop Bits Your ASCII device generates either one or two stop bits Figure 2 12
66. the various steps required to execute the read or write operation B 5 append B A CII Module For PLC 3 Processor Figure B 2 Example Block Transfer Operation BTR CNTL BLOCK XFER READ EN a ASCII RACK 012 Module Kl GROUP 7 DN MODULE 1 HIGH DATA FD110 0000 ER Rack 12 LENGTH 64 13 Data Module Group 7 Upper Slot CNTL FB200 0012 Flow Word File 4 0 You must create the data file Data File FD110 large enough to handle the block Up to 64 word length that you entered in the block Up to ords transfer instruction 63 12 This file is created automatically Control File FB200 when you 10 words enter the block transfer instruction into your program 21 Block Transfer instruction goes true Appropriate status bits are set reset and the control file tells the I O scanner module the address of the data file Data from the block transfer I O module is transferred to the block transfer data file in the processor data table Upon completion of the block transfer the appropriate status bits are set reset NOTE The direction of data flow is reversed for a write block transfer operation B 6 Appendix ASCII Module For PLC 3 Proessor Block Transfer with the ASCII Module Your ladder program must contain read and write handshake logic This logic is separate from block transfer routines that use enable and done
67. this chapter or the boxes below Removed Fill Character 14 10 0 Your ASCII Module Inserts Fill Characters The module has two non selectable internal fill characters the space 20 hex that is displayed at a data terminal as a space and the null 00 hex that is not displayed When justifying data the module inserts fill characters according to the data conversion that you have selected It 3 22 Removing Header and Trailing Characters IW4 00 03 04 07 Chapter 3 Choosing Module Features inserts a space 20 hex for one ASCII or two ASCII characters per word conversion or it inserts a zero 00 hex for BCD and hex data conversion The module also adds a fill character to justified BCD data The fill character that it inserts is a zero for each missing digit The module also inserts zeros leading a BCD number if necessary to align the BCD number on a word boundary right justified Some ASCII devices such as bar code readers generate a series of characters that precede and or trail data characters Often some or all of these leading or trailing characters contain no information of use to the PC processor If your ASCII device generates header and or trailing characters that are not used you can remove them You can remove up to 15 characters of either type Figure 2 10 If you do not want to remove any set the corresponding bits to zero Figure 2 10 Removing Header and Trailing Characters Data Str
68. to acknowledge receipt Bit CW1 16 Function Write Data Available Description Your program must toggle this bit to transfer data from the ASCII module s output buffer to the ASCII device The toggled status CW 16 SW 16 accompanies the data The program must receive acknowledgment of the previous write block transfer toggled status of Initialization Words Chapter 6 Function of Control Status Bits SW 16 before it sends new data Otherwise new data could be mixed with old data or lost Bit CW1 17 Function Initialization Description Set this bit to tell the module that up to four initialize data words follow command word one and two Otherwise reset it to zero Command Word Two CW2 This word is reserved for future enhancements Reset it to zero Set bits in your initialization words to match the characteristics of your ASCII module to those of your ASCII device The bits in the four initialization words IW1 IW2 IW3 and IW4 are described below You can operate the module in data mode without setting initialization bits and without sending initialization data to the module However then the module operates only with default features Select additional features by setting initialization bits To operate in report generation mode you must set initialization bits Initialization Word One IW1 Bits IW1 00 01 Function Number of Initialization Words Description The setting of bits 00 and 01 tell
69. two SW2 6 16 stop bits 3 28 string length demonstration 4 11 A T trailing characters removal _3 23 transmission mode 3 25 troubleshooting 7 1 W writing data to ASCII device 2 1 6 Rockwell Automation Allen Bradley a Rockwell Automation Business has been helping its customers improve productivity and quality for more than 90 years We design manufacture and support a broad Allen Bradley range of automation products worldwide They include logic processors power and motion control devices operator interfaces sensors and a variety of software Rockwell is one of the world s leading technology companies Worldwide representation ZEEE Z gil JB Ji H M Argentina e Australia e Austria e Bahrain e Belgium Brazil e Bulgaria e Canada Chile China PRC Colombia Costa Rica e Croatia Cyprus e Czech Republic e Denmark e Ecuador e Egypt El Salvador Finland e France e Germany Greece e Guatemala e Honduras e Hong Kong Hungary Iceland e India e Indonesia e Ireland e Israel e Italy e Jamaica e Japan e Jordan e Korea e Kuwait e Lebanon Malaysia Mexico Netherlands e New Zealand Norway Pakistan Peru e Philippines e Poland Portugal e Puerto Rico Qatar e Romania e Russia CIS e Saudi Arabia e Singapore e Slovakia Slovenia South Africa Republic e Spain e Sweden Switzerland e Taiwan Thail
70. variable TIMER ON T0003 17 1 0 SECOND TA 820 X TD 15 RUNG NUMBER RM25 MOV MOV MOVE FROMA TO R MOVE FROMA TO A WTACC 0003 A WD000 0000 Converts message variable to correct for 843 844 mat and moves it to second message file 000 0000 R WO000 00713 844 0000100001000100 RUNG NUMBER RM26 Addresses Used in Example Application Program The following addresses are used in NO TAG for files the message variable and timers Initialization data is also shown Message file 1 FO000 0600 0615 Initialization Message file 2 0000 0700 0715 Words Message variable 0000 0713 Write block transfer file 0000 0200 0217 IW1 0007 Read block transfer file 0000 0252 0271 IW2 1028 Initialization file 0000 0570 0573 IW3 0008 Write block transfer timer T0002 IW4 2A00 Message variable timer T0003 B 29 0000000 0000001 000010 0000011 0000100 0000101 0000110 0000111 0001000 0001001 0001010 0001011 0001000 0001101 0001110 0001111 0010000 0010001 0010010 0010011 0010100 0010101 0010110 0010111 0011000 0011001 0011010 0011011 0011100 0011101 0011110 0011111 0100000 0100001 0100010 0100011 0100100 0100101 0100110 0100111 0101000 0101001 Appendix ASCII Conversion Tables Table C A Hex Binary ASCII Conversion 0101010 0101011 0101100 0101101 0101110 0101111 0110000 0110001 0110010 0110011 0110100 0110101 0110110 0110111 0111000 0111001 0111010 01
71. x 2K words 48ms Number of words transferred W 64 read 2 write 1 Calculate the block transfer time T for the read and write operation T 0 1ms 0 16ms word x 64 words read 0 1 10 24 10 34ms read T 0 1ms 0 16ms word x 2 words write 0 1 32 0 42ms write 2 Calculate the worst case system time ST between two consecutive read block transfers Example Read Only Program Appendix A ASCII Module PLC 2 Family Processors ST PS T read PS T write 48 10 34 48 0 42 107ms rounded This is the worst case time between two consecutive read block transfers for the Mini PLC 2 15 controller as described in example problem 3 A read only program for transferring data from your ASCII device into the data table of your processor is presented with rung descriptions Figure A 6 A 15 append A A CII Module PLC 2 Family Processors Figure A 6 Example Read Only Program LADDER DIAGRAM DUMP START 327 Loads zeros into command word one CW1 200 1 E 4 a PUT 17 000 with switch or first program scan 000 020 1 t 02 Swi Power up initialization bit reset 07 power up initialization bit CW1 07 252 Sve 51 Energize on power up to load initialization 200 E 07 words into write BT file OFF 10 020 Luis 062 Energize timer on power up TON 1 1 0 0 PR 002 AC 000 062 020
72. your program Output word WO009 0007 rung RM20 shows binary Output word R WO006 0007 rung RM19 shows BCD 2 Enable input bit 10001 04 and compare the binary and BCD values that are displayed just below output word R in the instruction Procedure P3 Connect the 1775 CAT cable and set the industrial terminal to PLC 3 mode Procedure P6 Enable bit 1001 04 With the PLC 3 in run monitor enter the bit and enable it Results Binary and BCD representation of selected accumulated values are tabulated in Table 3 Q Table 3 0 Comparison of Binary and BCD Interpretation of the Same Bit Pattern Accumulated W0009 0007 W0006 0007 Binary BCD 1 1 1001 1001 1010 1000 10100 100000 11110 110000 101000 1000000 110010 1010000 4 53 Chapter 4 ASCII I O Module Tutorial Converting Binary to BCD You convert binary values to BCD values by moving them to a decimal file Use a MOV instruction Source word A is the message variable in binary Destination word R is the message variable converted to BCD Your program converts binary to BCD in rung RM19 Figure 3 6 Using Output Files The PLC 3 makes no conversion when moving data out of or into output and input files Use output files to store your ASCII data and or messages along with message variables that your program has converted to BCD Inserting the Message Variable When you enter the message into the message storage file using the data monitor mode of the in
73. 0 START WO007 0000 WORD 2 3 4 00000 000000000000010 0000000000010101 0000110100001000 TT NOTE Binary words 0 1 and 5 were omitted for brevity 2 Enter 12345 ENTER Refer to the procedures in section titled Reading Data From Your ASCII Device if necessary Procedure P1 Connect the 1770 CB cable and set your industrial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode 3 ENTER 2 ENTER Procedure P2 Enter your data Procedure P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode Procedure P4 Observe how the data string is stored data table file 06 0 4 37 Chapter 4 ASCII I O Module Tutorial Results The file displays the five character string in ASCII or in hex respectively The data is left justified RADIX START WO006 0000 WORD 0 1 00000 00 00 00 00 00010 QOHOOH 00H00H 00 00 RADIX H START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 3132 3334 3520 2020 2020 2020 00010 2020 2020 0000 0000 0000 0000 0000 0000 Notice the following The data string of five characters was transferred when you entered the end of string delimiter The end of string delimiter was not transferred to the data table The data was left justified The module added fill characters blanks in ASCII or 20 in hex in display words 4 lower by
74. 00 up to 4 initialization words 17 WO005 0000 01 RUNG NUMBER RM16 me Load initialization words with MVF C0004 E FILES FROMA TO R EN 00 selector switch or at power up F0007 0002 12 0005 0000 FO002 0002 0004 f COUNTER C000 Y pn 01 POS LEN 0 4 C0004 MODE ALL SCAN RUNG NUMBER RM17 13 0005 0000 0001 lt GRT MVF 1 2 gt FILESFROMATOR 02 WO003 0001 12 0000000000000000 A F0003 0002 0001 B WO001 0000 R F0006 0002 DN 0000000000000000 COUNTER C0001 15 POS LEN 0 62 C0001 Moves new data from BTR file to storage file when data MODE ALL SCAN ER is set to PC 13 B 3 append B A CII Module For PLC 3 Processor RUNG NUMBER RM18 T0004 aee T0004 ut Free running timer for message format TON TE 15 demonstration TIMER ON T0004 17 1 0 SECOND TP 60 T0004 TA 9 TD 15 RUNG NUMBER RM19 10001 Ina 1 Moves free running timer MOV MOV 4 accumulated value into 0 message file between MOV FROMA TO R MOV FROMA TO R delimiters WTACC 0004 WD006 0007 9 9 R 0006 0007 R WD006 0007 9 0000000000001001 RUNG NUMBER RM20 10001 i Mn For comparison only MOV __ 04 MOV FROMA TO R WTACC 0004 9 WO009 0007 0000000000001001 RUNG NUMBER RM21 Tn Moves message file into BTW file a Ee TEES C0005 EN a for transfer to module AEN FO0
75. 000 RUNG NUMBER 8 WO002 0000 F MV L 04 16 Command word 1 Status word 1 16 write handshake WO005 0000 0003 0000 RUNG NUMBER RM9 WO002 0000 1r d qo U 16 n 19 RUNG NUMBER RM10 WB004 0000 Read status words 1 amp 2 CNTL Mee BTR VE and data BLOCKXFERREAD H EN 15 RACK 001 12 WB004 0000 GROUP 1 CNTL 3 MODULE 1 HiGH DN 05 DATA F0003 0000 15 LENGTH 0 CNTL CNTL 004 0000 ER 13 004 0000 BIW CNTL Write command 1 8 2 AR BLOCKXFERWRITE H EN initialization data and message 17 RACK 001 02 t 8 GROUP 1 CNTL MODULE 4 HIGH DN DATA 0002 0000 05 LENGTH 0 CNTL CNTL 004 0000 ER 03 Appendix ASCII Module For PLC 3 Proessor RUNG NUMBER RM11 Initialization Turn off rung 1 except for 1st scan at power up 19005 0000 00 RUNG NUMBER RM12 WO003 0000 219742205 WO005 0000 101 Energize at power up to load initialization words Also energized 1 A 07 on 1st scan after processor selection of run monitor mode 01 50003 01 RUNG NUMBER RM13 W0005 0000 ah z T0001 des Energize timer on power up TON 001 17 1 0 SECOND TP 2 0001 T gt TD 15 RUNG NUMBER RM14 a De energize timer after transferring initialization words 1 E CN 15 01 RUNG NUMBER RM15 nn Command word 1 initialization bit Module expects Mig e 2E V 7
76. 0000 0000 0000 START WO007 0000 WORD 0 1 2 00000 000000000000000 0000000000000000 0000000000000010 Changing the Module s String String length is a 3 digit BCD number You can set the string length in Length Read Only BCD or you can set the BCD digits in binary The binary equivalent of BCD and hex is identical for 0 thru 9 1 Set the string length to 15 characters in IW2 00 13 Use the procedure in section titled Setting Bits in Initialization Words for loading the file in rung 16 3 30 4 32 Chapter 4 ASCII I O Module Tutorial Display The initialization word file is displayed in hex or binary respectively as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0002 0015 0000 0000 START 0007 0000 WORD 1 2 3 00000 000000000000000 0000000000000010 0000000000010101 NOTE Binary words 0 4 5 were omitted for brevity 2 Demonstrate the string length by entering 16 data characters When you enter the 16th data character the module will transfer the string of 15 characters to the read block transfer file in the data table where you can display it Do the following example where you will read data from your ASCII device Refer to the procedures in section titled Reading Data From your ASCII Device chapter 2 if necessary Enter ALLEN BRADLEY 12 Note the space between the two words Procedure P1 Connect the 1770 CB cable and set your ind
77. 005 0000 CL cL 2 04 03 RUNG NUMBER RM8 0005 0000 0003 0000 0002 0000 J H L dhe JE 04 16 16 RUNG NUMBER RM9 WO005 0000 0003 0000 WO002 0000 t Tg U 04 16 16 Chapter 2 Getting Started with Your ASCII Module RUNG NUMBER RM10 WB004 0000 BTR CNTL 1 6 BLOCK XFER READ EN 15 RACK 001 12 GROUP 1 CNTL WB004 0000 MODULE 1 HIGH DN E DATA FO003 0000 15 05 LENGTH 0 CNTL CNTL FB004 0000 13 WB004 0000 i BTW CNTL BLOCK XFER WRITE 7 RACK 001 02 GROUP 1 CNTL MODULE 1 HIGH DN DATA FO002 0000 05 LENGTH 0 CNTL FB004 0000 Br 03 RUNG NUMBER RM11 WO005 0000 00 1 Connect the 1775 CAT cable to channel B of the industrial terminal 2 power to the I O chassis PLC 3 controller 3 off the memory protect switch on the front panel of the PLC 3 controller 4 Select program load mode on the PLC 3 front panel Press SHIFT LIST 3 ENTER 5 Turn on the industrial terminal It should automatically display ladder diagram mode If not Press SHIFT MODE 1 6 Enter the following key sequence on the industrial terminal keyboard before entering your program Press INSERT SHIFT RUNG ENTER 2 25 Chapter 2 Getting Started with Your ASCII Module 2 26 The displayed power bars will be replaced by I s at the left and right margins of t
78. 06 0002 12 002 0002 C0005 COUNTER coos T POS LEN 62 62 0005 MODE ALL SCAN 13 RUNG NUMBER RM22 EOP B 4 Block Transfer Programming Appendix B ASCII Module For PLC 3 Proessor Overview Block transfer is the method by which the PLC 3 processor communicates with the ASCII module The PLC 3 controller can perform read write and bidirectional block transfer operations During a block transfer read data is read from the I O module and is transferred to PLC 3 controller memory During a block transfer write data is transferred from memory and is written to the I O module Bidirectional block transfer requires both read and write operations Each operation can transfer a maximum of 64 words Block Transfer Operation Block transfer instructions use two files when transferring data and commands between the block transfer module and the PLC 3 processor a data file that contains data to be transferred and a control file that contains control bits module location data table address and length of the data file Figure A 11 Communication between module and processor is directed by the 1775 S4A scanner Once the instruction is enabled the scanner directs the transfer of data to or from the enabled block transfer module according to the information contained in the instruction s control file Once the instruction is enabled it automatically sets and resets its control bits in accordance with
79. 1 amp 2 011 2400 Baud 100 4800 Baud 010 Simplex Read 101 9600 Baud 011 Simplex Write 10 Words 110 110 Baud 1 283 111 110 Baud 100 Half Duplex w Echo i 101 Half Duplex w o 11 Words Record i Echo 1 2 3 amp 4 Hex Equivalent _ 12 wu 10 07 06 05 04 vo o o 0 0 1 3BCD Default 124 Maximum 999 0 1 0 4BCD 2 Record BCD Digit 2 BCD Digit 1 BCD Digit 0 Your Selections gt E E T of Stri imi Delay for CR LFif Send Data Buffer i 0 0 CR 0 5 Just input ARDT Del 00 0 ms 0 000 50 50 01 50 No 001 100 0 10 100 ms 010 25 75 11 200 ms 011 25 75 Selections wx T IW4 Fill Character Removed Number of Trailing Characters Number of Header Characters Removed Removed 0 15 0 15 Record Must not be same as IW3 10 16 binary binary ae ese p T T default value 3 32 11833 Chapter Objectives ASCII I O Module Tutorial You will use three general procedures in this tutorial Setting bits in your initialization words Reading data from your industrial terminal Writing data to your industrial terminal You will observe the results of setting bits in your initialization words by reading data from or writing
80. 1 or 0 in IW3 03 using the form found at the end of this chapter or the box pn the next page 3 16 Using the End of String Delimiter IW3 10 16 Chapter 3 Choosing Module Features If you choose report generation mode the module ignores this bit Margin Justification When the module encounters end of string delimiter in data received from the ASCII device the module allows the read block transfer of data to the processor If your ASCII device generates an end of string delimiter use that delimiter Refer to the specifications of your device When you use the carriage return as the end of string delimiter and the data terminal encounters the end of string delimiter the print head or the cursor of the data terminal returns to the left margin When using a data terminal select any ASCII character as the end of string delimiter except the same character as the BCD delimiter You will get an initialization error and the module will not operate In most applications you will select an end of string delimiter If you do not select an end of string delimiter the module will default to the null CTRL 0 as the end of string delimiter Refer to tables in appendix C 5 for the complete list of ASCII characters and their codes Sending End of String Delimiter to Processor Report Generation Mode Only IW3 04 In report generation mode you may want to send the end of string delimiter code to the processor Y
81. 10 Words 110 110 Baud 1 283 111 110 Baud 100 Half Duplex w Echo 101 Half Duplex w o 11 Words Record i Echo 1 2 384 Selections E 10 010 Hex Equivalent eae o7 06 5 04 vo o 2 0 0 0 2 ASCII Default 10 Maximum 62 0 0 1 3BCD 0 1 0 4BCD 0 1 1 1 ASCII Record i 1 0 0 4Hex igi BCD Digit 1 BCD Digit 0 Your Selections of Stri imi Delay for CR LFif Send Data Buffer Su IW3 0 0 CR 0 5 Just input ARDT Del 00 0 ms 0 000 50 50 01 50 001 100 0 10 100 010 75 25 11 200 011 25 75 100 0 100 Selections 4 Fill Character Removed Number of Trailing Characters Number of Header Characters Removed Removed 0 15 0 15 Record Must not be same as IW3 10 16 binary binary gee S SF spo default value 3 31 Chapter 3 Choosing Module Features Form 5176 Initialization Words for Generation Mode n Stop Parity Parity ak Los of Mode of Number of NAK Bits Enable Odd Rate Transmission Operation Initialization even Words 000 300 Baud 000 Full Duplex w Echo 00 Word 1 001 600 Baud 001 Full Duplex w o 01 Words 010 1200 Baud Echo
82. 11011 0111100 0111101 0111110 0111111 1000000 1000001 1000010 1000011 1000100 1000101 1000110 1000111 1001000 1001001 1001010 1001011 1001100 1001101 1001110 1001111 1010000 1010001 1010010 1010011 1010100 O uOzzErxXc cIgommuoo g vius x 1010101 1010110 1010111 1011000 1011001 1011010 1011011 1011100 1011101 1011110 1011111 1100000 1100001 1100010 1100011 1100100 1100101 1100110 1100111 1101000 1101001 1101010 11010111 1101100 1101101 1101110 1101111 1110000 1110001 1110010 1110011 1110100 1110101 1110110 1110111 1111000 1111001 1111010 1111011 1111100 111101 111110 1111111 gt lt lt lt 5 3 Ke KT KO 1 C 1 Appendix ASCII Conversion Tables Table C B Decimal Octa Hex ASCII Conversion DECIMAL OCTAL HEX ASCII CHARACTER OR CONTROL CONTROL SHIFT P NULL CONTROLA CONTROL B CONTROL C CONTROL D CONTROL E CONTROL F CONTROL G RINGS BELL CONTROL H BACKSPACE ON SOME TERMINALS CONTROL I HORIZONTAL TAB ON SOME TERMINALS CONTROL J LINE FEED CONTROL K CONTROL L FORM FEED ON SOME TERMINALS CONTROL M CARRIAGE RETURN CONTROL CONTROL O CONTROL P CONTROL Q CONTROL R CONTROL 5 CONTROLT CONTROL U CONTROL V CONTROL W CONTROL X CONTROL Y gt
83. 2 R 0002 0002 C0005 COUNTER 0005 4 E 5 POS LEN 62 2 OS 62 6 C0005 MODE ALL SCAN ER 13 RUNG NUMBER RM22 EOP A 29 Cll Module PLC 2 Family Processors Block Transfer Programming A 30 Overview Block transfer is the method by which the PLC 3 processor communicates with the ASCII module The PLC 3 controller can perform read write and bidirectional block transfer operations During a block transfer read data is read from the I O module and is transferred to PLC 3 controller memory During a block transfer write data is transferred from memory and is written to the I O module Bidirectional block transfer requires both read and write operations Each operation can transfer a maximum of 64 words Block Transfer Operation Block transfer instructions use two files when transferring data and commands between the block transfer module and the PLC 3 processor a data file that contains data to be transferred and a control file that contains control bits module location data table address and length of the data file Figure A 11 Communication between module and processor is directed by the 1775 54 scanner Once the instruction is enabled the scanner directs the transfer of data to or from the enabled block transfer module according to the information contained in the instruction s control file Once the instruction is enabled it automatically sets and resets its control
84. 2 15 read handshake 15 RUNG NUMBER RM5 0003 0000 ip Energize at power up to load initialization words Also energized on M qu 07 on 1st scan after processor selection of run monitor mode 01 S0003 doe Je dli 01 RUNG NUMBER RM6 WO005 0000 Energize timer on power up T0001 J TON TE 01 TIMER ON T0001 17 1 0 SECOND TP 2 0001 0 TD 15 append B A CII Module For PLC 3 Processor RUNG NUMBER RM7 T De energize timer after transferring initialization words it 15 01 RUNG NUMBER RM8 10001 Command word 1 initialization bit Module expects 0002 0000 00 up to 4 initialization words E WO005 0000 E 01 RUNG NUMBER RM9 10001 Load initialization words with MVF C0004 FILES FROMA TO R Y i UB EN 00 selector switch or at power up A 0007 0002 12 0005 0000 R 002 0002 C0004 VE COUNTER C004 4 p 01 POS LEN 0 4 0004 MODE ALL SCAN 13 RUNG NUMBER RM10 GRT WB004 0000 W0005 0000 Test for new valid data WO005 0000 gt E M C A WO003 0001 15 02 05 0000000000000000 B WO001 0000 0000000000000000 RUNG NUMBER RM11 WO005 0000 MVF C0001 lI FILES FROMA TO R EN 05 FO003 0002 12 R 0006 0002 C0001 Moves new data from BTR file to storage file when new data COUNTER C0001 DN is sent to PC 15 POS LEN 0 62 C0001 MODE ALL SCAN Appendix A
85. 349 4920 3738 3930 0000 3 You can display the file in other number bases by replacing the in step 2 with D for decimal B for binary or A for ASCII Compare the following displays Number Base Display Zero Value ASCII ASCH LA eee DE C 7 8 9 0 00 00 Decimal 000 Results Entering the eleventh character caused module to transfer the data Status word one E011 and status word two 0000 indicate normal operation of the module These are shown in display words 0 and 1 respectively 4 Terminate this display and return to ladder diagram Press SHIFT MODE 1 Need Help If your display was all zeros 00H00H ASCII display the data did not transfer You may have altered the procedure Did you enter your program exactly as shown Did the module s CHANNEL ACTIVE LED go on Did the CHANNEL 1 LED on your scanner go on Did the ACTIVE LED on your adapter go on Have you configured your PLC 3 controller LIST function 2 31 Chapter 2 Getting Started with Your ASCII Module Writing Data to Your ASCII Device 2 32 If you are still having trouble refer to Testing the ASCII Module and Cables to verify communication between the ASCII module and the industrial terminal If you suspect a cable problem check the 1770 CB cable Figure 1 7 Then try again starting with Procedure In this demonstration you will lo
86. 573 IW3 0008 Write block transfer timer T0002 4 2A00 Message variable timer T0003 A 54 Appendix For PLC 3 Family Processor Complete Getting Started The complete Getting Started Program with rung descriptions is Program PLC 3 described in Figure B 1 Figure B 1 Getting Started Program PLC 3 RUNG NUMBER RMO MOV 000 Load zeros into command word 1 with 0 1 F MOVE FROMA 00 selector switch on first scan A WO001 0000 0005 0000 0000000000000000 L R WO002 0000 00 0000000000000000 RUNG NUMBER RM1 WO003 0000 TRIN WO002 0000 Power up reset power up initialization bit E 07 07 RUNG NUMBER RM2 WO003 0000 W0002 0000 0005 0000 J I f Status word 1 Command word 1 AL d d read data available 15 15 02 WO003 0000 WO002 0000 f 1 15 15 append B A CII Module For PLC 3 Processor B 2 RUNG NUMBER RM3 W0003 0000 W0002 0000 woe 11 Status word 1 Command word 1 L DN A Read handshake 02 15 15 RUNG NUMBER RM4 WO003 0000 WEND 1 Status word 1 Command word 1 Wo0 ee iL 02 15 read handshake 15 10001 RUNG NUMBER RM5 WO005 0000 t U 02 03 RUNG NUMBER RM6 WO005 0000 10001 0005 0000 One shot to enable write block 1 1 TE transfer of new data of module 02 03 04 0005 0000 RUNG NUMBER RM7 0005 0000 ju b 04 03 WO005 0000 WO003 0
87. Active Transmitter Circuit pins 13 and 11 Isolation 500Vdc between customer and PC system circuitry Input Current Range 23 0mA max for mark state load must exceed 300 ohms OmA for space state Passive Transmitter Circuit pins 11 and 18 Isolation 500Vdc between customer and PC system circuitry Device and power supply must float referenced to module ground Input Current Range 55 0mA max for mark state max voltage across pins 11 and 8 is 2 29 nominal is 1V 220mA OmA for space state Reverse Voltage Limit 2 7V across pins 11 and 18 Appendix D Specifications RS 232 C Specifications Receiver Circuit Control pins 4 7 and 20 Isolation 500Vdc between customer and PC system circuitry Typical Input Voltage Range 3 to 25Vdc for Request to Send or Data Terminal Ready 3 to 25Vdc for signal inhibit Typical Input Impedance 3k to 7k ohms for 3 to 25Vdc and 3 to 25Vdc Receiver Circuit Data pins 2 and 7 Isolation 500Vdc between customer and PC system circuitry Typical Input Voltage Range 3 to 25Vdc for space state 3 to 25Vdc for mark state Typical Input Impedance 3k to 7k ohms for 3 to 25Vdc and 3 to 25Vdc Transmitter Circuit pins 3 5 6 and 7 Isolation 500Vdc between customer and PC system circuitry Output Voltage Range 5 to 15Vdc for space state 5 to 15Vdc for mark state D 3 Symbols Empty 2 1 3 22 4 16 6 18
88. C011 00000 00010001 11 Output buffer empty Output buffer empty Write data acknowledge Channel active E0001 11100000 50600001 Input buffer empty Output buffer conatins data Read data available Write data acknowledge Channel active 7 5 Chapter 7 Troubleshooting Table 6 D Buffer Status Codes Hex Binary Description 8011 10000000 00010001 ______ Input buffer empty A010 10100000 0001 000 nput buffer contains data A012 10100000 ely Input buffer 50 full A016 10100000 00010110 AA Input buffer 75 full A01F 10100000 00011110 AAA Input buffer 100 full Table 6 E Fault Status Codes 7 6 Description 00000000 00000001 ASCII device neither connected nor turned on Channel active light not on poe 00010000 Lost cable to ASCII device Channel active light not on 00100000 00010000 ASCII device lost power or turned off Loss of channel active was read to the processor 00100100 10010001 Initializating Error Input buffer empty Output buffer empty Power up initialization Invalid initialization data Read data available Channel active light is off Testing the ASCII Module and Cables Chapter 7 Troubleshooting You can verify cable connections and operation of your installed ASCII module on your industrial terminal as follows 1 Turn off power to I O chassis Place your module in module group 1 slot 1 Turn on power 2
89. Chapter 2 Getting Started with Your ASCII Module Results The following display appears at the upper left corner of the industrial terminal BRADLEY 12345 5 Terminate the display and return to ladder diagram Use the PLC 2 family keytop overlay Press MODE SELECT 11 Summary Now that you have demonstrated the transfer of data from your ASCII device to the data table and vice versa you are ready to use these procedures further First read the next chapter Choosing Module Features It defines key words and concepts Then in chapter 3 ASCII Tutorial you will use these procedures to demonstrate operating characteristics of your module Chapter 2 Getting Started with Your ASCII Module What You Need To Get Started 2 18 PLC 3 Processors You will demonstrate the operation of your ASCII module by reading data from the industrial terminal to the processor data table and by writing data from the data table to the industrial terminal You will use your industrial terminal as an ASCII device for entering data read and for displaying data write You will set up a test I O chassis with a PC processor power supply industrial terminal cables and your ASCII module You will need about an hour to complete the procedures in this chapter and about two hours to complete the procedures in chapter 3 You may want to record your application ladder diagram program before proceeding because you will need to load
90. E 4F D N i 50 51 AR a gt 52 AB c 53 54 gt A N i 55 AB lt 56 2 29 Chapter 2 Getting Started with Your ASCII Module 2 30 RADIX Hex ASCII Hex 4A W 57 4B 58 4 59 4D N 5A The industrial terminal displays the characters as you enter them If characters are not displayed check the program that you loaded into memory Check step 3 operating parameters for errors If you find no errors refer to Need Help below Procedure P3 Set Your Industrial Terminal to PLC 3 Mode 1 Connect the 1775 CAT cable to channel 2 Display your ladder diagram Press SHIFT MODE 1 Procedure P4 See How Data Is Stored in the Data Table 1 Display the block transfer read file Enter the address of that file O3 0 with the following key sequence Press DD O3 0 SHIFT A ENTER Results The name and numbers 11 characters or more that you entered are displayed For example if you had entered ASCII 7890123 the space between ASCII and 78790123 would count as an entered character and your display would show 10 characters as follows START 011 0248 WORD 0 1 00000 EOH11H 00H00H A 7 00HO00H Chapter 2 Getting Started with Your ASCII Module 2 Display the same file in hex Press H ENTER The following display appears RADIX A START WA011 0248 WORD 0 1 2 3 4 5 6 7 00000 E011 0000 4153 4
91. End of string EOS EOS delimiter Delimiter 1 Module ignores EOS delimiter 16 10 End of string Bits 10 13 First ASCII character Delimiter Bits 14 16 Second character The module defaults to null CTRL 0 if IW3 is not used 07 06 Delay for Carriage 00 Oms Return RG mode 01 50ms only 10 100ms 11 200ms 05 Line Feed if Carriage 0 Inhibits function Return 1 Enables function 04 Sends EOS Delimiter 0 Inhibits function to Processor RG 1 Enables function mode only 03 Margin Justification 0 Right justification Data mode only 1 Left justification In RG mode ASCII data is left justified BCD values within string are right justified automatically 6 21 Chapter 6 Function of Control Status Bits 6 22 Function 02 00 I O Buffer Split 000 50 50 Input output 001 100 0 Input 010 75 25 Input output 011 25 75 Input output all other 50 50 Default value when you do not select that initialization word Initialization Word Four Not used Removes Fill Character Data mode BCD Delimiter RG mode Removes Trailing Characters Removes Header Characters Set it to zero Bits 10 13 First ASCII character Bits14 16 Second character Module defaults to colon if IW4 is not used Bits 04 05 First Hex digit Bits 06 07 Second Hex digit Module removes 15 characters max Zero characters for default Bits 00 01 First Hex digit Bits 02 03 Second
92. Jea 00 up to 4 initialization words 17 WO005 0000 WES 01 RUNG NUMBER RM16 10001 TE 5 MVF C0004 Load initialization words with H FILES FROMA TO R EN 00 selector switch or at power up A FO007 0002 12 0005 0000 002 0002 C0004 m COUNTER C0004 01 POS LEN 0 4 C0004 MODE ALL SCAN RUNG NUMBER RM17 13 WO005 0000 C0001 1E 1 E A gt B FILESFROMA TOR EN 02 WO003 0001 12 0000000000000000 5 C0001 B WO001 0000 R FO006 0002 DN 0000000000000000 COUNTER C0001 cn POS LEN 0 62 C0001 Moves new data from BTR file to storage file when data MODE ALL SCAN ER is set to PC 13 Appendix ASCII Module PLC 2 Family Processors RUNG NUMBER RM18 T0004 Tm T0004 M Free running timer for message format TON TE 15 demonstration TIMER ON T0004 17 1 0 SECOND TA 9 TD 4 15 RUNG NUMBER RM19 ee Moves free running timer MOV MOV 3 n accumulated value into MOVFROMA TOR MOVFROMA TO R message file between WTACC 0004 WTACC 0004 delimiters 9 9 R WD006 0007 R WD006 0007 9 0000000000001001 RUNG NUMBER RM20 D For comparison only MOV MOV FROMA 04 A WTACC 0004 9 R WO009 0007 0000000000001001 RUNG NUMBER RM21 10001 MVF C0005 1 Moves message into BTW file FILES FROMA TO R 04 for transfer to module FO006 0002 1
93. NGTH 16 1 FILE 252 aPN 17 17 011 BLOCK XFER WRITE_ gy DATAADDR 031 46 MODULE ADDR 111 BLOCK LENGTH 16 1 FILE 5299 217 PN 16 020 7 END 00460 02 NOTE Configure the data table for two racks using SEARCH 5 0 before entering this program Installing Your ASCII Module Be sure that power to the I O chassis is turned off when installing or removing your ASCII module as follows 1 Remove power from the I O chassis 2 Insert the ASCII module in rack 1 module group 1 slot 1 The program makes the processor communicate with the ASCII module at that specific location If you must use another rack location and are familiar with block transfer operation change the rack group and slot number of the module address in the block transfer read and write instructions accordingly 3 Turn on power to the I O chassis Three LED indicators on the ASCII module illuminate momentarily Their functions are FAULT Normally off This red LED indicator illuminates when the module detects an internal fault 2 9 Chapter 2 Getting Started with Your ASCII Module Reading Data from Your ASCII Device 2 10 BUFFER FULL Normally off This yellow LED indicator illuminates when the input buffer becomes full CHANNEL ACTIVE This green LED indicator illuminates when the industrial terminal is on properly connected to the ASCII module s interface port and set for alph
94. O chassis in the system The file records the re tries occurring in each quarter rack Frequent re tries indicate I O communication problems The file length is application dependent four words per assigned rack number The display format is Bit Number Word Rack 17 13 12 10 07 o4 o3 o0 binary count first quarter rack binary count second quarter rack binary count third quarter rack binary count fourth quarter rack binary count first quarter rack binary count second quarter rack A read only program for transferring data from your ASCII device into the data table of your processor is presented with rung descriptions in Figure A 18 41 Cll Module PLC 2 Family Processors Figure A 18 Example Read Only Program RUNG NUMBER RMO 10001 MOV Load zeros into command word 1 with Fx MOVE FROMA TO R 00 selector switch or on first scan A WO0001 0000 W0005 0000 0000000000000000 E R WO0002 0000 00 0000000000000000 RUNG NUMBER RM1 W0003 0000 CLR WO002 0000 Power up reset power up initialization bit lE 1 0 07 07 RUNG NUMBER RM2 WO003 0000 0002 0000 WO005 0000 ID 1r Status word 1 Command word 1 ES 1 t 1 Ms ej read data available 15 15 02 WO003 0000 WO0002 0000 j f E 15 15 RUNG NUMBER RM3 WO005 0000 W0003 0000 0002 0000 1 Yep Status word 1 Command word 1 L N ee Read hands
95. PLC 3 Family Processor Complete Getting Started Program 3 Block Transfer Programming Example Read Only Program Example Write Only Program Example Read Write Program Example Application Read Write Program ASCII Conversion Tables Specifications Overview of This Manual Intended Audience Notational Conventions To Our Customers This manual tells you in a tutorial manner how to install and use your ASCII module In Chapter Entitled We Will Show You How To 1 Getting Started with Your ASCII Module 2 Choosing Module Features 3 ASCII Module Tutorial 4 Handshaking 5 Functions of Control and Status Bits 6 Troubleshooting Your ASCII Module Appendix Index Read data from your ASCII module and write data to it using an industrial terminal Choose module features so you can match your ASCII module with your ASCII device Select and demonstrate module features and format messages Program the handshaking logic that controls communication between your ASCII module and your PC processor Select desired features and read module status by describing the function of bits in command and status words Interpret status indicators and status codes and use a simple pro
96. SCII Module For PLC 3 Proessor RUNG NUMBER RM12 Read status word 1 amp 2 BTR CNTL VE and data BLOCKXFERREAD H EN 15 RACK 001 12 004 0000 GROUP 1 CNTL m e MODULE 1 HIGH H DN 05 DATA F0003 0000 15 LENGTH 0 CNTL CNTL 004 0000 ER 13 WB004 0000 CNTL T nu BTW 127 BLOCK XFER WRITE EN Main ization data and message 17 RACK 001 02 GROUP 1 CNTL MODULE 1 HIGH DN DATA 0002 0000 05 LENGTH 0 CNTL CNTL 004 0000 03 RUNG NUMBER RM13 Initialization Turns off rung 1 except for 0005 0000 1st scan at power up 00 RUNG NUMBER RM14 EOP B 19 Cll Module For PLC 3 Processor Example Write Only Program A write only program for transferring data from your processor s data table to your ASCII device is presented with rung descriptions in Figure 19 Figure B 10 Example Write Only Program RUNG NUMBER RMO MOV 10001 Load zeros into command word 1 with MOVE FROMA TO 00 selector switch or on first scan A WO001 0000 WO005 0000 0000000000000000 R WO002 0000 00 0000000000000000 RUNG NUMBER RM1 0003 0000 o PNE 0002 0000 Power up reset power up initialization bit f iu 07 07 RUNG NUMBER RM2 0003 0000 im Energize at power up to load initialization words Also energized on iri pu 07 on 1st scan after processor s
97. TL MODULE 1 HIGH DNj DATA FQ001 0004 05 LENGTH 0 CNTL CNTL FB001 0000 ER 03 Appendix ASCII Module PLC 2 Family Processors Special Considerations When using 1775 54 I O scanner with thumbwheel switch set to 1 only part of its data handling capacity is available for handling block transfers This scanner can store and transfer a maximum of 72 words at any one time from up to four block transfer modules across any of the active channels If a block transfer read instruction is enabled but the scanner s buffer cannot accept the instruction s block length the scanner is processing other blocks of data the block transfer instruction must wait for a subsequent scan when the scanner s buffer can accept all the words that the module has to transfer The same applies for a write block transfer instruction We suggest that you add an additional scanner if necessary Block Transfer Errors Once enabled a block transfer instruction in a 3 ladder program will set either a done bit or an error bit The instruction indicates an error when it illuminates the symbol Typical block transfer errors occur when You do not correctly enter the instruction rack group and module numbers do not match the location of the installed module You entered a file length greater than 64 You did not create the data file or the address that you entered does not match
98. ULE ADDR 100 110 size of the data table Initially displayed BLOCK LENGTH 01 y DN default values are governed by the I O FILE 110 110 rack configuration 06 Data Address First possible address in accumulated value area of data table Module Address Rack module group and slot number Block Length Number of words to be transferred 00 can be entered for default value or for 64 words File Address of first word in the file Storage is 100g above the data address Enable Bit EN Automatically entered from the module address Set on when rung containing the instruction is true Done Bit DN Automatically entered from the module address Remains on for 1 scan following successful transfer 11121 Data and Module Addresses The data address is the block transfer instruction address It is used to store the I O rack address of the ASCII module module address The module address is stored in BCD by rack module group and slot number and identifies the module s location in the I O rack You enter the data address in the instruction after you enter the instruction The data address of a block transfer instruction should be the first available address in the timer counter accumulated area of the data table This address is 030 for the Mini PLC 2 15 controller For the PLC 2 30 controller this address depends on the number of I O racks connected to the processor module i e address 020 for one I O rack 030 for two rack
99. ULE ADDR 371 497 BLOCK LENGTH 14 L DN FILE 200 215 16 Ue Load initialization words FILE TO FILE MOVE 061 l via switch or on power up COUNTER ADDR 061 EN 17 POSITION 001 17 020 FILE LENGTH 004 1 n FILEA 570 573 06 10 FILER 202 205 RATE PER SCAN 004 15 MG CW1 initialization bit module to expect 200 17 initialization words via switch or on power up 17 020 j f 10 Initialization Turns off rung 1 except for 020 first scan at power up via switch 02 END Example Read Write Program A read write program that you can use to transfer data to and or from your ASCII device is presented with rung descriptions Figure A 8 A 19 ns pendix A Cll Module PLC 2 Family Processors A 20 Figure A 8 Example Read Write Program LADDER DIAGRAM DUMP START Me 327 Loads zeros into command word one CW1 200 JI PUT 17 000 with switch or first program scan 000 020 1 t 02 252 Swi Power up initialization bit reset 200 07 power up initialization bit CW1 07 252 020 1r 5 1 Energize on power up to load initialization L L 2 07 words into write BT file OFF 10 020 Energize timer power u 1 ergize timer power up TON 10 1 0 PR 002 AC 000 062 020 De energize after time out 15 Initialization words sent OFF 10 DE Status word one SW1 Command word one CW1 is 15
100. UNG NUMBER RM13 Energize timer on power up TON TIMER ON T0001 1 0 SECOND TP 2 RUNG NUMBER RM14 15 De energize timer after transferring initialization words WO005 0000 T0001 TE 15 RUNG NUMBER 15 01 10001 Command word 1 initialization bit Module expects 0002 0000 up to 4 initialization words 17 01 RUNG NUMBER RM16 Load initialization words with MVF 00 selector switch or at power up FILES FROMA TO R WO005 0000 A FO007 0002 R FO002 0002 COUNTER C0004 POS LEN 0 MODE ALL SCAN RUNG NUMBER RM17 GRT mut WB004 0000 WO005 0000 Testf e new valid data 0005 0000 A WO003 0001 0000000000000000 B WO001 0000 0000000000000000 WO005 0000 RUNG NUMBER RM18 MVF FILES FROMA TO R A F0003 0002 R FO006 0002 Moves new data from BTR file to storage file when data COUNTER 0001 is set to PC POS LEN 0 MODE ALL SCAN RUNG NUMBER RM19 A 49 append A A CII Module PLC 2 Family Processors Example Application Read Write This program allows you to display two messages files on demand Program NO TAG One message file contains a message variable timer accumulated value When you enter the word GO from the keyboard of the peripheral device your program starts a five second write block transfer one shot routine that transfers message files 1 and 2 to the peripheral device When the string of data containing GO is trans
101. Use the default value one stop bit if this information is not available Set bit IW1 16 accordingly ACK NAK Some ASCII devices require an ACK NAK response from the ASCII module An acknowledgment of no errors found in a string ACK or acknowledgment of an error found in the string NAK is required by some ASCII devices in order to complete its transmission Other ASCII devices do not require acknowledgment The ASCII module does not require an ACK NAK to complete its transmission Most ASCII devices do not require transmission acknowledgment Set bit IW1 17 accordingly 3 28 Chapter 3 Choosing Module Features Record features that apply to your ASCII device by writing a 0 or 1 in corresponding bits W1 10 17 using the form found at the end of this chapter or the boxes below Bit Number IW1 17 16 15 14 13 12 11 10 Communciation rate code Number of Data Bits 0 8 1 7 Parity 0 Odd 1 Even Parity Enable 0 1 Yes Stop Bits 0 1 two 0 1 Yes Selecting the Number of Select the number of initialization words for transfer to the ASCH module Initialization Words IW1 00 01 after deciding which of the module features are required for your ASCII device and application You select module features by setting bits in four initialization words Set the number of initialization words equal to the highest numbered initializatio
102. ad data characters into the write block transfer file and observe how they are displayed by the industrial terminal You will use the industrial terminal in PLC 3 mode to load data Then you will change the industrial terminal to alphanumeric mode and observe the transferred data The procedures that you will follow are described below P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode P5 Load data into the file P1 Connect the 1770 CB cable and set your industrial terminal to alphanu meric mode P6 Enable the transfer of new data Procedure P3 Set Your Industrial Terminal to PLC 3 Mode NOTE Skip this procedure if the industrial terminal is already in PLC 3 mode 1 Connect the 1770 CAT cable to channel B 2 Set your industrial terminal to PLC 3 mode and display the beginning of your ladder diagram program Press SHIFT MODE 1 Procedure P5 Load Data into a File 1 Place the processor in program load mode using the PLC 3 front panel Chapter 2 Getting Started with Your ASCII Module Press SHIFT LIST 3 ENTER 2 Display the file that you want to load by entering the address of that file 02 0 with the following key sequence Press DD O2 0 SHIFT A ENTER 3 Load ASCII data into the file starting with the third word display word 2 for block transfer instructions the first word for file move instructions The first and second words of a write block transfer instructi
103. all input data as 7 bit ASCII characters 6 5 Chapter 6 Function of Control Status Bits 6 6 Bit IW1 14 Function Parity Description Reset it to zero default for odd parity Set it for even parity Ignore it if you do not enable parity IW1 15 0 Bit IW1 15 Function Parity Enable Description Reset it to zero default when your ASCII device does not generate a parity bit Set it when your ASCII device generates a parity bit for each character See IWI 14 Bit IW1 16 Function Stop Bits Description Reset it to zero default when your ASCII device generates only one stop bit per character Set it when your ASCII device generates two consecutive stop bits per character Refer to chapter 2 Figure 2 12 Bit IW1 17 Function ACK NAK Description Reset it to zero default when the ASCII device does not require an ACK NAK from the module to complete the transmission Set it when an acknowledgment of no error per character string ACK or error found in the string is required by the ASCII device to complete the transmission The ASCII module does not require an ACK NAK to complete its transmission Initialization Word Two IW2 Bit IW2 00 13 Function Number of ASCII Characters Per String read only Description In data mode enter a 3 digit BCD number for the maximum number of ASCII characters per string generated by your ASCII device Count header and trailing characters not removed by
104. ammable controller is controlling four I O racks in a local configuration Figure A 5 Otherwise this example problem is identical to example problem 1 A 11 ns pendix A Cll Module PLC 2 Family Processors A 12 1771 AL Figure A 5 Local System Example PLC 2 30 1771 DA Rack No 1 1771 DA 1771 DA 1771 DA 1771 AL 1771 AL 1771 AL Rack 2 Rack 3 Rack No 4 11841 Solution The facts of the problem are Program length words Number of chassis 4 rack numbers Number of block transfer words W 64 read or 2 write 1 Calculate the system values Processor Scan Time PS 5ms 1K words x words 20ms Processor I O Scan Time PIO z 0 5ms rack number x 4 rack numbers 2ms Number of Words Transferred W 64 read or 2 write Appendix ASCII Module PLC 2 Family Processors 2 Calculate the block transfer times T for the read and write operation T 2 0 1 0 075ms word x 64 words 0 1 4 8 4 9115 read T 0 1 0 075ms word x 2 words 0 1 0 15 0 25ms write 3 Calculate the worst case system time ST between 2 consecutive read block transfers The module toggles to a read operation in the scan following completion of the write operation and vice versa ST PS PIO T 1 T 2 T 3 T 4 writes PS PIO T 1 2 T 3 T 4 reads ST 2PS 2PIO 4T read 4T write 2 20
105. an asterisk showing its status 1 or 0 1000 0001 02 0 2 Set the bit using the PLC 3 front panel Press 1 ENTER Results The industrial terminal displays Chapter 2 Getting Started with Your ASCII Module BRADLEY 12345 at the upper left corner of the screen 3 Reset the bit using the PLC 3 front panel Press 0 ENTER 4 Terminate the display and return to ladder diagram by connecting the 1770 CB cable to channel B and entering the following keystrokes on the industrial terminal keyboard Press SHIFT MODE I Summary Now that you have demonstrated how data is transferred from your ASCII device to the data table and vice versa you are ready to use these procedures further Next read Choosing Module Features Chapter 2 It will define key words and concepts Then in Chapter 3 ASCII Tutorial you will use these procedures to demonstrate operating characteristics of your module 2 35 Chapter Objectives Choosing the Mode of Communication Choosing Module Features Because of the many types of ASCII devices available and the variety of possible applications you must configure your module according to the ASCII device and specific application that you have chosen To do this you must make some decisions We will show you how to configure your module using programming plugs and by setting bits in initialization words Following the description of each module feature we will show you how to reco
106. and e Turkey United Arab Emirates United Kingdom United States Uruguay Venezuela e Yugoslavia Allen Bradley Headquarters 1201 South Second Street Milwaukee WI 53204 USA Tel 1 414 382 2000 Fax 1 414 382 4444 Publication 1771 6 5 13 May 1987 Supersedes Publication 1771 6 5 13 February 1986 PN 955102 62 Printed in USA
107. anner in which data is displayed by your ASCII device or stored in the data table Table 2 H Margin justification is particularly evident when the number of data characters transferred is less than maximum Your choice of margin justification depends on the mode of module operation Table 2 1 Chapter 3 Choosing Module Features Table 2 H Margin Justification When Each New Line Is Displayed and Data Is Stored in the Data Justified with the Same Table by Placing Left margin The first character in the upper byte of the Example Text is left justified lowest word address Blanks or zeros fill the higher word addresses Example PLC 2 Family ABCD 00 0000 Example PLC 3 Family ABCDEF000000 Right margin The last character in the lower byte of the Example Dollar values are right highest word address Blanks or zeros fill the justified lower word addresses Example PLC 2 Family 0000 00AB CDEF Example PLC 3 Family 000000ABCDEF Table 2 1 Margin Justification Mode of Operation When Module Your Justification Is Mode of Operation Is Data Mode Either left or right you select Report ASCII data is left justified BCD values contained in the string of ASCII data are right Generation justified Mode Record your selection based on your choice of module operation If you choose data mode choose either left justification IW3 03 1 or right justification W3 03 0 Record your selection by writing a
108. ansfer Set the string length equal to the longest string of characters that your ASCII device can generate in your application Record the string length in IW2 11 13 by writing the BCD value of the string length using the form found at the end of this chapter or the boxes below ASCII Characters String v vol or 05 04 co oef oto 3 19 Chapter 3 Choosing Module Features Determining Block Transfer The highest number of words that you can transfer in one block transfer is Length 64 You must include two command words in each write block transfer and two status words in each read block transfer in addition to your data words You can also transfer up to four initialization words Figure 3 9 Figure 2 9 Block Lengths for Read and Write Block Transfers Initialization WRITE Block WRITE Block READ Block 1716 15 14 13 12 11 10 07 06 05 04 03 02 01 00 17 16 15 14 13 12 11110 07 06 05 04 03 020100 17161514 13 12 11 10 07 06 05 04 03 02 01 00 Command Word No 1 A Word No 1 A Status Word No 1 Command Word No 2 Command Word No 2 Status Word No 2 Initialize Data Word No 1 Initialize Data Word No 2 Initialize Data Word No 3 64 Words max Data 64 Words max Data Initialize Data Word No 4 Y Y
109. ansfer These are publications 1772 804 and 1772 806 respectively The remainder of this section describes block transfer concepts for programming the ASCII module using the block instructions of the Mini PLC 2 15 and PLC 2 30 programmable controllers Bidirectional Block Transfer Bidirectional block transfer is the performance of alternating read and write operations A read operation transfers data from the module to the processor data table A write operation transfers data from the data table to the module User program logic contains the block transfer read instruction and block transfer write instruction The format of these block instructions and definitions of terms are shown in Figure A 2 A 3 append A A CII Module PLC 2 Family Processors Figure A 2 Block Format Block Transfer Instructions A block transfer instruction is programmed 010 in the ladder diagram by depressing the BLOCK XFER READ EN 4 BLOCK XFER key followed by 1 for a DATAADDR 030 07 READ or 0 for a WRITE The appropriate read or write block as shown will MODULE ADDR 100 110 appear on the industrial terminal screen BLOCK LENGTH 01 pN FILE 110 110 07 Numbers shown are default values 010 Numbers in shaded areas must be BLOCK XFER WRITE EN replaced by user entered values The DATAADDR 030 06 number of default address digits initially displayed 3 4 or 5 will depend the MOD
110. anumeric mode In this demonstration you will enter data and observe how it is stored in the processor data table You will use the industrial terminal in alphanumeric mode as an ASCII data terminal when you enter data Then you will change the industrial terminal to PLC 2 mode and observe the transferred data by displaying the contents of the block transfer read file You will use the following procedures In Procedure You Will Set your industrial terminal to alphanumeric mode P2 Enter your data P3 Set your industrial terminal to PLC 2 mode P4 See how data is stored in the data table Later in this chapter and in chapter 3 you will combine these procedures with others The order in which you will perform them may vary Even if you are familiar with these procedures we suggest that you read them completely If you deviate from them proper operation may not occur If you have not already done so load the Getting Started Program Figure 1 3 into processor memory Procedure P1 Set Your Industrial Terminal to Alphanumeric Mode 1 Turn on the industrial terminal 2 Insert the Alphanumeric Keytop Overlay cat no 1770 K AA Chapter 2 Getting Started with Your ASCII Module To avoid switching keytop overlays every time you change the industrial terminal operating mode you can label numbers letters and RETURN on the corresponding keytops of the PLC 2 family overlay 3 Select alphanumer
111. as follows PLC 2 PLC 3 Description Address Address Command 15 CW1 15 200 15 WD002 0000 15 Word 1 16 CW1 16 200 16 WD002 0000 16 Status 15 SW1 15 252 15 WD003 0000 15 Word 1 16 SW1 16 252 16 WD003 0000 16 Choose program addresses that are compatible with your programming needs Chapter Objectives Command Words Function of Control and Status Bits In this chapter you will read about control bits found in command word one and in four initialization words You will also read about status bits found in status words one and two The first two words in every write block transfer are command words Command word one contains control bits Command word two is set to zero and is reserved for future enhancements The bits in command word one CW1 are as follows Command Word One CW1 Bit CW1 00 Function Reserved for Future Use Description Reset this bit to zero Bit CW1 01 Function Reserved for Future Use Description Reset this bit to zero Bit CW1 02 Function Reserved for Future Enhancements Description Reset it to 0 Bit CW1 03 Function Resets input buffer full bit Description Set this bit to reset status bit 03 input buffer full in status word one This turns off the BUFFER FULL LED indicator Otherwise reset this bit to zero Bit CW1 04 06 Function Reserved for Future Enhancements Description Reset it to zero Bit CW1 07 Function Resets power up and handshaking bits 6 1
112. ate 001 600 baud 010 1200 baud 011 2400 baud 100 4800 baud 101 9600 baud 110 110 baud 111 110 baud 07 06 05 Mode of 000 Full duplex with echo Transmission 001 Full duplex without echo 010 Simplex read 011 Simplex write 100 Half duplex with echo 101 Half duplex without echo all other codes are invalid 04 03 02 Mode of Operation 000 Data mode 001 Report Generation RG mode 01 00 Number of 00 Word 1 Initialization Words 01 Words 1 2 10 Words 1 2 and 3 11 Words 1 2 3 and 4 Default value when you do not select that initialization word 6 20 Chapter 6 Function of Control Status Bits Initialization Word Two Bit Function 17 Single or Multiple 0 Module sends single string String Transfer 1 Module sends two or more strings per Rate block transfer 16 15 14 Data conversion 000 2 ASCII characters per word 001 3 BCD characters per word 010 4 BCD characters per word 011 1 ASCII character per word 100 4 Hex characters per word 13 00 Number of ASCII Bits 00 03 BCD digit 0 Characters per Bits 04 07 BCD digit 1 String Bits 10 13 BCD digit 2 Data mode default 10 max 62 RG mode default 124 max 999 Default value when you do not select that initalization word Must select either one in RG mode Initialization Word Three Function Enables 0 Module transfers data when it detects
113. ated value into message a LGJ 021 021 020 Stores data for write BT to module FILE TO FILE MOVE 060 Ys COUNTER ADDR 060 EN 01 POSITION 001 17 FILE LENGTH 016 FILEA 40 417 060 FILER 200 221 DN RATF PER SCAN 016 15 Unconditional Read BT to processor BLOCKXFERREAD a SW1 SW2 and dat DATA ADDR 030 17 and data MODULE ADDR 111 i BLOCK LENGTH 16 DN FILE 252 271 17 011 Unconditional Write BT to module BLOCK XFER WRITE ENH CW1 CW2 and dat DATA ADDR 031 16 and data MODULE ADDR 111 m BLOCK LENGTH 16 DN FILE 200 217 16 020 RICE FILE TO FILE MOVE 061 1r Stores initialization data 061 1 COUNTER ADDR EN A 10 POSITION 001 17 FILE LENGTH 004 FILEA 570 573 061 FILER 202 205 DN RATE PER SCAN 004 15 Appendix ASCII Module PLC 2 Family Processors 020 ir Initialization bit tells module up to 4 ur 10 initialization words follow command words 17 Initialization Turns off 1st rung except D for first scan at power up 02 END 00464 table is controlled by program logic using block transfer programming The Mini PLC 2 15 and PLC 2 30 programmable controllers use block transfer instructions The PLC 2 20 uses multiple get instructions for programming block transfer Refer to the July 1982 or later edition of the Programming and Operations Manual for the Mini PLC 2 15 or PLC 2 30 for a detailed description of block tr
114. bc inc 2 The longest data string read from the ASCII device determines the block length of the read block transfer instruction In the PLC 2 family the read and write block lengths must be equal to ensure correct operation For PLC 3 processors the block lengths can be different 3 20 Removing the Fill Character Data Mode Only IW4 10 16 Chapter 3 Choosing Module Features Compute block length by dividing the number of data characters in the longest string length by the type of data storage i e 1 2 3 or 4 characters per word For example a string of 80 data characters having 2 ASCII characters per word data storage would require a block transfer block length of 42 words Don t forget to add two status words or two command words 80 2 2 40 2 42 A string of 37 data characters having 3 BCD characters word of data storage would require a block length of 15 words Round remainders to the next highest whole number 37 3 2 12 1 3 2 13 2 15 When you have mix of BCD and ASCII data characters in report generation mode allow space for right justification of BCD values within the data string Overestimate your read block transfer block length Observe how the transferred data is stored then reduce the block length if possible Some ASCII devices add fill characters such as spaces nulls or some ASCII symbol when sending data to the module These devices have the capability to vary the numb
115. between processor and remote distribution panel and the remote distribution panel I O scan time Assume that for a remote system the remote distribution panel can process only one block transfer operation per remote distribution panel scan The procedure for calculating the worst case time between transfers under normal operating conditions can be done in three steps 1 Calculate the system values that are determined by the system configuration Program Scan PS Sms 1K words x number of program words Processor I O Scan PIO 0 5ms rack number x declared rack numbers Remote Distribution I O Scan RIO 7ms chassis x number of chasses Number of Words Transferred W 64 words for one operation 2 words for the other 2 Calculate the block transfer time TW for the write operation and TR for a read operation TW PS PIO 2 RIO 0 5W 13 TR PS PIO 2 RIO 0 5W 4 These equations are valid for up to 10 000 cable feet between the remote distribution panel and remote I O chassis and for a baud rate of 57 6k or 5 000 cable feet at 115k baud rate 3 Calculate the worst case system time ST between transfers ST Sum of transfer times of all block transfer modules in a system taken worst case read or write Appendix ASCII Module PLC 2 Family Processors Example Problem 1 A PLC 2 30 programmable controller is controlling 4 I O racks in remote configuration Figure A 4 An ASCII m
116. bits in accordance with the various steps required to execute the read or write operation Appendix ASCII Module PLC 2 Family Processors Figure A 11 Example Block Transfer Operation BTR CNTL T BLOCK XFER READ EN kn ASCII RACK 012 Module Kl GROUP 7 DN MODULE 1 HIGH DATA FD110 0000 ER Rack 12 13 LENGTH Module Group 7 ot Data Upper Slot CNTL FB200 0012 Flow Word File 4 DERE 0 You must create the data file Data File FD110 large enough to handle the block Un to 64 word length that you entered in the block Up to ords transfer instruction 63 12 This file is created automatically Control File FB200 n when you 10 words enter the block transfer instruction into your program 21 Block Transfer instruction goes true Appropriate status bits are set reset and the control file tells the 1 0 scanner module the address of the data file Data from the block transfer I O module is transferred to the block transfer data file in the processor data table Upon completion of the block transfer the appropriate status bits are set reset NOTE The direction of data flow is reversed for a write block transfer operation 31 append A A CII Module PLC 2 Family Processors A 32 Block Transfer with the ASCII Module Your ladder program must contain read and write handshake logic This logic is separate from block transfer ro
117. ce P 1 14 Set your industrial terminal to alphanumeric mode Switch the processor mode select switch to the RUN PROG position Results Your industrial terminal displays the following BRADLEY BRADLEY is displayed in a position eight spaces from the left margin This example is equivalent to transferring seven right justified data characters when the set string length is 15 characters and the data conversion is 2 ASCII characters per word In this demonstration you will select an end of string delimiter and demonstrate its use Select the carriage return CR as the end of string delimiter and set IW3 10 16 accordingly The ASCII code for carriage return is OD in hex 0001101 in binary 1 SetIW3 10 16 for the end of string delimiter CR and reset the margin justification bit IW3 03 to zero for right justification using the procedure in section titled Setting Bits in Initialization Words P 3 4 4 9 Chapter 4 ASCII I O Module Tutorial 4 10 DISPLAY The file to file move instruction displays your setting as follows FILE DATA 003 0000 00001101 00000000 String Length Less Than Module s String Length Whenever the ASCII module receives an end of string delimiter from the ASCII device it transfers the data in its input buffer to the processor To demonstrate this you will enter a data string less than the set string length as determined by IW2 00 13 1 Enter 12345 RETURN Refer to the procedures
118. ce When multiple strings are transferred in one read block transfer program logic can detect the error but cannot detect which string s contained the error The module resets this bit when it detects no errors Bit SW1 14 Function Input String Exceeds Maximum Description The module sets this bit when it detects an input string longer than the string length that you selected in IW2 00 13 module transfers the number of characters equal to the set string length The remaining string characters spillover are stored in the module s input buffer as the first data of the next string If the spillover was terminated by an end of string delimiter the module would transfer it as another string If not terminated by a delimiter subsequent data strings could be out of sequence The bit is reset when the module processes a string without spillover 6 15 Chapter 6 Function of Control Status Bits 6 16 Bit SW1 15 Function Read Data Available Description When the module detects a change in its status or receives new data from the ASCII device it toggles this bit Then the module sends new status and or data to the processor with the toggled status of this bit The module must receive acknowledgment in a subsequent write block transfer toggled status of CW1 15 before it can send new status and or data When sending new data to the processor the module also enters the number of transferred data words into status word two
119. culating the worst case time between block transfers will be covered for the following cases PLC 2 30 remote and local systems and Mini PLC 2 15 controller Appendix ASCII Module PLC 2 Family Processors Figure A 3 Example Data Table Locations for Bidirectional Block Transfers Lr 010 Data Table RW 1 1 Block length code 013 Output image table low byte RW Data Addresses contains module 1 3 0 040 address 130 rack 1 module group 3 1 1 3 0 041 slot 0 RW 1 1 113 Input image table low byte R Read bit W Write bit 3 0 0 140 Storage locations of file addresses 4 0 0 141 T Read block transfer file length set to Read Block Transfer File 300 00 which allows a 64 word transfer 347 F 7 400 Write block transfer file length set to Write Block Transfer File 00 which allows a 64 word transfer 447 EE re reeset a 013 BLOCK XFER READ EN DATA ADDR 040 ii MODULE ADDR 130 DN BLOCK LENGTH 00 07 FILE 300 347 013 BLOCK XFER WRITE DATA ADDR 041 ie MODULE ADDR 130 DN BLOCK LENGTH 00 06 FILE 400 447 11839 A 7 append A A CII Module PLC 2 Family Processors A 8 PLC 2 30 PLC 2 20 Remote System The system scan time for a remote PLC 2 30 or PLC 2 20 system is the sum of the processor scan time the processor I O scan time
120. d words 1 amp 2 CNTL 004 0000 ER initialization data and message 13 data WB004 0000 CNTL BTW E BLOCKXFER WRITE H EN 17 RACK 001 02 GROUP 1 CNTL MODULE 4 HIGH DN DATA F0002 0000 05 LENGTH 0 CNTL CNTL 004 0000 03 21 Append B A CII Module For PLC 3 Processor RUNG NUMBER RM13 Initialization Turns off rung 1 except for V 7 1st scan at power up 00 RUNG NUMBER RM14 Example Read Write Program A read write program that you can use to transfer data to and or from your ASCII device is presented with rung descriptions in Figure B 11 Figure B 11 Example Read Write Program RUNG NUMBER RMO MOV 10001 Load zeros into command word 1 with F MOVE FROMA TO R 00 selector switch or on first scan A WO001 0000 0005 0000 0000000000000000 L WO002 0000 00 0000000000000000 RUNG NUMBER RM1 0003 0000 WO002 0000 Power up reset power up initialization bit 1 C 07 07 RUNG NUMBER RM2 WO003 0000 WO002 0000 WO005 0000 jai 1r Status word 1 Command word 1 EN Td S read data available 15 15 02 WO003 0000 10002 0000 Ja 1 E 15 15 RUNG NUMBER RM3 0005 0000 0003 0000 WO002 0000 1r 1r Status word 1 Command word 1 L To read handshake 4 02 15 15 22 Appendix ASCII Module For PLC 3 Proessor
121. data to your ASCII device The procedures for reading and writing data were covered in chapter 1 The procedure for setting bits in your initialization words is covered after you have added initialization logic to your program As in chapter 1 this chapter is divided into two parts One is for PLC 2 family processors the other is for the PLC 3 processor Proceed to the part that pertains to your processor 4 1 Chapter 4 ASCII I O Module Tutorial PLC 2 Family Processors Adding Initialization Rungs You must add initialization rungs to your Getting Started Program Place the processor mode select switch in the PROG position and insert the additional rungs exactly as shown Figure 3 1 To insert one or more rungs into your program place the cursor on the output instruction in the previous rung Press INSERT RUNG then enter the instructions for one rung You must press INSERT RUNG before inserting each new rung Figure 3 1 Program With Initialization Rungs PLC 2 Family 020 327 START 200 1 F A a PUT 02 000 000 252 200 2 4 E 07 07 252 020 3 J p L PIE 07 OFF 10 020 062 4 11 TON xi 10 0 1 These PR 005 Rungs AC 000 062 020 U 15 OFF 10 020 063 6 t TON 02 0 1 063 063 PR 300 1 lE AC 000 F 15 17 252 200 035 7 H 15 15 00 252 200 15 15 4 2 Chapter 4 ASCII I O Module Tuto
122. dustrial terminal do the following 1 Identify the file word s that you reserved for the message variable Figure 3 9 RM19 WO006 0007 2 Separate the message variable from the rest of the message using BCD delimiters 3 Locate the first delimiter in the lower byte of the word before the second delimiter in the upper byte of the word after the word s containing the message variable 4 Enter the first word containing the message variable as the destination word R in the decimal to output MOV instruction Figure 3 9 RM 19 WO006 0007 For example refer to rung 19 Figure 3 9 and display the message file O6 0 Look at display words 6 7 and 8 containing the delimiters and message variable The message variable is stored in word 7 Summary Chapter 4 ASCII I O Module Tutorial When programming your module in report generation mode do the following Convert message variables such as timer counter accumulated values to BCD by moving them to a decimal file Use output files for storing messages to avoid unwanted conversions Move message variables into words segregated by delimiters in your message file With a read write program you can enter the text of your message into processor memory by using the industrial terminal as an ASCII data terminal as compared with entering data in the data monitor mode of the industrial terminal described in sections titled Formatting a Single Line Message and Forma
123. e data table Even if you are familiar with these procedures read them completely If you deviate from these procedures proper operation may not occur If you have not already done so load the Getting Started Program Figure 2 8 into processor memory Procedure 1 Set Your Industrial Terminal to Alphanumeric Mode 1 Turn on the industrial terminal 2 Connect the 1770 CB cable to channel B of the industrial terminal 3 Select alphanumeric mode Press SHIFT MODE 2 The CHANNEL ACTIVE LED on the module illuminates Chapter 2 Getting Started with Your ASCII Module 4 Set operating parameters Communication rate to 300 baud Press A as needed until the communication rate as displayed on the screen reaches 300 baud Hardware handshaking to ON Press D DUPLEX to FULL Press F Band C to any setting E and G thru M to OFF Press ENTER to load parameters The prompt ENTERING ALPHANUMERIC TERMINAL MODE tells you the terminal is ready for your input Procedure P2 Enter Your Data 1 Check that the PLC 3 controller is operating in run monitor Use the PLC 3 front panel Press SHIFT LIST 2 ENTER 2 Enter data such as your first name followed by a couple of numbers Enter 11 characters counting the space between your name and numbers Select the characters from commonly used data characters Table 1 D Table 1 D Commonly Used Data Characters Hex ASCII Hex A 2 4
124. e difference between the storage of left and right justified data by looking at the first and last words In left justified data spaces or fill characters if needed are added to the last file word In right justified data space or fill characters if needed are added to the first file word If the number of characters transferred is less than the string length that you set in IW2 00 13 the module completes the string by inserting fill characters or spaces Fill characters or spaces are stored ahead of the data lower addresses for right justified data or following the data higher addresses for left justified data Demonstrating Margin Justification Storage In this demonstration you compare data table storage of right justified data with left justified data When the module operates in data mode margins are right justified default unless you select left justified The demonstration in the section titled Changing the Module s String Length Read Only showed data table storage of right justified data Table 3 B In this demonstration you set the margin justification bit IW3 03 for left justification repeat the procedures in Changing the Module s String Length Read Only P 3 5 and compare the two displays 1 SetIW3 03 for left justification using the procedure in section titled Setting Bits in Initialization Words 4 7 Chapter 4 ASCII I O Module Tutorial Display Your file to file move instruction dis
125. e one of the following types of data conversion 3 BCD characters per word 4 BCD characters per word String length is from 1 to 999 characters Your margin is left justified for ASCII data but right justified for BCD val ues within the ASCII data Select data mode using code 000 or report generation mode using code 001 Record your selection in IW1 02 04 using the initialization word form found at the end of this chapter or the boxes below Mode of Operation 3 13 Chapter 3 Choosing Module Features Using BCD Delimiters Report Generation Mode Only IW4 10 16 Choosing Data Conversion IW2 14 16 Data conversion refers to the number and type of characteers that you store in a data table word The selections of data conversion from which you choose depend on the mode of module operation Table 2 G Table 2 G Data Conversion Data mode you must select one type of data 2 ASCII word conversion quantity and type of characters 3 BCD word per word To change data conversion you 4 BCD word must reinitialize the module 1 ASCII word 4 Hex word Report generation mode your text is 2 ASCII BCD word characters per word You must select either 3 4 BCD word BCD or 4 BCD characters per word for your BCD values within your text Record your selection based on your choice of module operation by writing the code in IW2 14 16 using the form found at the end of this chapter or the boxes below Data
126. ecommend that you examine word SW2 gt 0 as a new data condition and examine the status of the read block transfer done bit BTR 07 17 Acknowledgment The module must receive acknowledgment of the read block transfer your program toggles handshake bit CW 1 15 before it can transfer new read data Your program should detect that the module acknowledged receipt of the write block transfer module toggles handshake bit SW1 16 before your program enables another write block transfer Handshaking Words Handshaking is communicated by means of command word one and status word one Do not allow data files to overlap the addresses of command and status words The first two words of read and write block transfer files are reserved for command and status words Data files which your program moves into the write block transfer file or out of the read block transfer file should overlap all but the first two words of the read or write block transfer files PLC 2 family controller example If the read and write block transfer files start at addresses 400 and 500 respectively the corresponding data files should start at 402 and 502 respectively PLC 3 controller example If the read and write block transfer files start at 003 0000 and 002 0000 respectively the corresponding data files should start at 003 0002 and 002 0002 Chapter 5 Handshaking Reading Status and or Data from Handshaking in a read operation requires the mod
127. either of two types active source or passive sink An active transmitter supplies current to the loop Any receivers or other transmitters within that loop must be passive units that accept the supplied loop current Alternately an active receiver supplies current to passive transmitters or other passive receivers in the loop Current sources that power a current loop vary in complexity The simplest is a resistor and voltage source More complex current sources contain active elements or integrated circuits to provide constant current under various power supply and load conditions Refer to Table 2 B and Table 2 C for a detailed listing of current loop pin functions Table 2 B Current Loop Connector Pin Functions Passive Receive Passive Transmit Module Transmitter Circuit Peripheral or Power Supply Controls current loop allowing peripheral device to read data Module Receiver Circuit Peripheral Device Completes current loop allowing transfer of data to 1771 DA Module Transmitter Circuit Return Return for module transmitter circuit Module Receiver Circuit Return Return for module receiver circuit Table 2 C Current Loop Connector Pin Functions Passive Receive Active Transmit Pin No Signal Name Source Function 11 Module Transmitter Circuit Controls current loop allowing Control and Return peripheral device to read data Serves as return for transmitter circuit 12 Module Receiver Circuit Peripheral Device Completes
128. election of run monitor mode 01 50003 1 f 01 RUNG NUMBER RM3 WO005 0000 Energize timer on power up T0001 t TON 01 T0001 17 1 0 SECOND P 2 0001 0 TD 15 RUNG NUMBER RM4 00 De energize timer after transferring initialization words 1 t 15 01 RUNG NUMBER RM5 10001 Command word 1 initialization bit Module expects 0002 0000 ME ECT 00 up to 4 initialization words 17 WO005 0000 01 B 20 Appendix ASCII Module For PLC 3 Proessor RUNG NUMBER RM6 10001 Load initialization words with MVF C0004 E FLESFROMA TOR gp _ 00 selector switch or at power up A 007 0002 12 WO005 0000 0002 0002 0004 E COUNTER C004 zu 01 POS LEN 0 MODE gg 13 S000 RUNG NUMBER RM7 0005 0000 1 U 02 03 RUNG NUMBER RM8 po 2 One shot to enable write block 0 5 0 transfer of new data to module 04 WO005 0000 RUNG NUMBER RM9 WO005 0000 12 1 04 03 WO005 0000 0003 0000 RUNG NUMBER RM10 0002 0000 E F 1 04 16 Command word 1 Status word 1 16 write handshake 0005 0000 WO003 0000 RUNG NUMBER RM11 0002 0000 JE M UJ 04 16 16 RUNG NUMBER RM12 WB004 0000 Read status words 1 amp 2 BTR CNTL 1 BLOCKXFERREAD EN 15 RACK 001 12 WB004 0000 GROUP 1 CNTL MODULE DN 05 DATA FQ003 0000 15 LENGTH 0 CNTL Write comman
129. emove covers from the module s printed circuit board Chapter 2 Getting Started with Your ASCII Module 2 Locate the programming plugs and set them according to RS 232 C without control lines figure 2 8 Entering the Started Program You may want to record on tape the ladder diagram of your application program before proceeding because you will need to load ASCII logic into a cleared memory for chapters 1 and 3 Using your industrial terminal enter the Getting Started Program Figure 1 3 into processor memory At this point you do not need to understand how the program works but you should enter it exactly as shown 2 7 Chapter 2 Getting Started with Your ASCII Module 2 8 Figure 1 3 Getting Started Program PLC 2 Family LADDER DIAGRAM DUMP 32 START 200 F 16 Put 02 000 000 252 200 07 07 020 063 t TON 02 01 PR 300 063 063 000 15 17 250 200 035 bp 15 45 00 252 200 1515 035 252 200 jue L 00 15 OFF 15 035 252 200 U 00 15 OFF 15 063 251 020 020 ek AE 000 100 00 01 020 020 JE L 01 OFF 00 063 247 020 jG F 000 200 OFF 00 020 252 200 L 001 46 ON 16 020 252 200 je U 01 46 ON 16 Chapter 2 Getting Started with Your ASCII Module 011 BLOCK XFER READ ey DATA ADDR 030 MODULE ADDR 111 BLOCK LE
130. en with Ne 8723 urrent Source eceive or Return Equiv 24 2 Received Data Receive with Passive Current Source Return D are RUE 1 Solder an external ground wire 14 ga to the drain wire at the cable connector Connect it to the I O chassis ground lug Ground the shield at this end only NOTE Device and its power supply must float in respect to the module for passive transmit 11825 3 8 Chapter 3 Choosing Module Features Use a 25 pin male D shell connector such as Amp DB 25P for your cable connections to the ASCII module Terminate the shield to pin 1 at the module end only Figure 2 6 A B Long Line Connections 5000 ft max Industrial Terminal ASCII Module Channel B Drain Wire Shield 1 Ground Q Transmitted Data Receive eum Belden 8723 or Equiv G Received Data Transmit Receive Return 1 Solder an external ground wire 14 ga to the drain wire at the cable connector Connect it to the I O chassis ground lug Ground the shield at this end only 11826 Figure 2 7 RS 232 C Simplex Write Connections Refer to Specifications in Appendix D Device ASCII Module DTE DCE To I O Drain Wire Shield i Chassis Ground 1 Signal Ground AB Q Q Receive M Received Data BB Transmit 3 lt Belden 8723 or 8 Equiv 1 Solder an external ground wire 14 ga to the drain wire at the cable connector Con
131. er of data characters and to add fill characters so that the sum of data and fill characters is always the same for each transfer The module removes the fill character that you select whenever the module encounters it in the data received from the device For example suppose the device inserted a dash as the fill character 2D in hex after data characters and varied the number of data characters sent to the module Then the device generated the following two transfers 31 33 32 35 36 39 38 2D 2D 2D 2D first transfer 37 35 39 31 2D 2D 2D 2D 2D 2D 2D second transfer 3 21 Chapter 3 Choosing Module Features The module would remove the fill character and store the data as follows assume right justified data a string length of 11 and two ASCII characters per word First Second Transfer Transfer The module removed the fill characters inserted by the device 2D hex right justified the data and added its own fill character 20 hex Select any ASCII character as the fill character that the module will remove except Any character that otherwise would be included in the data The end of string delimiter that you chose in section titled Using the End of String Delimiter IW3 10 16 P 2 17 ASCII characters and their codes are listed in tables in appendix A Record your selection by writing the 7 bit ASCII code in binary or hex in IW4 10 16 for the fill character to be removed Use the form found at the end of
132. er your data Procedure P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode Procedure P4 Observe how the data string is stored in data table file 06 0 Chapter 4 ASCII I O Module Tutorial Results The file displays the 15 data characters which include ASCII characters and BCD values segregated by delimiters RADIX H START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 4142 4344 002 1234 2 35 3641 00010 4243 0000 0000 0000 0000 0000 0000 0000 RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 00 00 OOHOOH AB OOH 12H 4 15 6A 00010 BC QOHOOH OOHOOH 00H00 00 00 OOHOOH Notice the following The BCD delimiter is stored as a character in the string The number of characters transferred is 15 The data is stored in seven words The ASCII display did not correctly present BCD digits see hex display The industrial terminal cannot correctly display BCD values in an ASCII display 3 For comparison of data storage enter the following The BCD delimiter segregates five digits instead of four Enter ABCD 12345 6ABC ENTER Results The file displays 15 data characters which include ASCII characters and BCD values segregated by delimiters RADIX H START WO006 0000 WORD 0 1 2 4 5 00000 0000 0000 4142 002F 0001 00010 4142 4300 0000 0000 0000 RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000
133. f this byte These bits are entered automatically in the instruction when you enter the module address The done bit has the identical bit number as the enable bit but the done bit is set in the module s input image table word The done bit is set in the scan that the transfer is made provided that the transfer was successfully completed The done bit remains set for one program scan Example Instructions Example bidirectional block transfer instructions and their associated data table map are shown in Figure A 3 The time for a block transfer read or write operation for PLC 2 family processors depends on the system scan time s the number of words to be transferred the I O configuration and the number of enabled block A 5 Cll Module PLC 2 Family Processors A 6 transfer instructions in the ladder diagram program during any program scan A block transfer module will not accept another transfer until finished processing the previous transfer For a worst case calculation of the time between block transfers assume that the number of enabled block transfer instructions during any program scan is equal to the number of block transfer modules in the system Also assume that the ASCII module is transferring 64 words in a write or read operation and 2 words in the alternate operation The module will toggle when done from one operation to the other in the next program scan The method for cal
134. f your message file Table 3 N 4 22 Chapter 4 ASCII I O Module Tutorial Do this by entering the following rungs Figure 3 5 just ahead of the rung in which you just stored your message Figure 3 5 Example Programming for the Message Variable 065 065 t TON 15 01 PR 300 AC 000 065 405 PUT 000 000 3 In this demonstration you will select the following features Four initialization words using IW1 00 01 Report generation mode using IW1 02 04 Data conversion of 3 BCD digits per word using IW2 14 16 Slash symbol as BCD delimiter using W4 10 16 Set the bits in all four initialization words using the procedure in section titled Setting Bits in Initialization Words P 3 4 Display The file to file move instruction displays your settings as follows FILE DATA POSITI Hex Binary ON 0007 00000000 00000111 1015 00010000 00010101 0000 00001101 00000000 2F00 00101111 00000000 4 Display your message the industrial terminal Typically you would enable your message with a pushbutton switch and program logic In this example set your industrial terminal to alphanumeric mode and switch the processor s mode select switch to the RUN PROG position 4 23 Chapter 4 ASCII I O Module Tutorial Formatting a Multi Line Message Results Your industrial terminal displays PRODUCED XXX PARTS where XXX is the accumulated value of the free running timer that your program
135. fill characters removed from the string This feature changes the position of the data Removing Header and Trailing When header and trailing characters are removed from a data string only Characters the balance is counted as data in the string Trailing characters are not removed until the data string exceeds the set string length The first characters of the string are counted by the module as header characters and can be removed regardless of the number of characters in the string 1 Set the number of header characters three and trailing characters four to be removed be setting IW4 00 03 and IW4 04 07 to 3 hex and 4 hex respectively Use the procedure in section titled Demonstrating End of String Delimiter P 3 9 Retain previous initialization data Display The initialization word file is displayed in hex and binary respectively as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0003 0015 0000 2F43 START WO007 0000 WORD 2 3 4 5 00000 000000000000010 0000000000010101 0000110100001000 0010111100000000 NOTE Binary words 0 1 were omitted for brevity 2 Enter 0123456789012345678901 ENTER Refer to procedures in section titled Reading Data From Your ASCII Device P 1 28 if necessary 4 42 Selecting Report Generation Mode Data Conversion and BCD Delimiter Chapter 4 ASCII I O Module Tutorial Procedure P1 Connect the 1770 CB cable and set your industr
136. ge file This program will display current values if you add the source of current data This could be a read block transfer instruction that transfers current value data from an intelligent I O module into words 500 thru 505 Or it could be a file move instruction that moves current values into words 500 thru 505 from elsewhere in the data table 10 11 12 13 Figure A 9 Example Application Program Appendix A ASCII Module PLC 2 Family Processors Scan counter 035 lt CTU PR 81 AC 000 035 lt CTU BRANCH END PR 81 AC 000 020 177 200 F G PUT 02 000 000 300 200 E 07 07 300 020 js L 07 OFF 10 020 1 02 020 032 1 TON PR 010 AC 000 032 020 U 15 OFF 10 300 200 E L 16 OFF 16 300 200 TU U 16 OFF 16 020 200 E de M 10 17 500 411 PUT 000 004 501 413 PUT 000 999 502 426 PUT 000 000 Initialization Same rung description as previous examples vi Write handshake rungs Moves current value data from the read block transfer file into write data storage area A 23 Cll Module PLC 2 Family Processors 503 430 14 G PUT 000 000 504 443 mE PUT 000 000 505 445 PUT 000 000 035 020 FILE TO FILE MOVE 033 17 PME COUNTER ADDR 033 Moves updated current value 10 10 POSITION 001 17 data into write block t
137. gram to test your ASCII module Program block transfer communication and estimate the time required for read write handshaking We have included numerous example programs Locate concepts and definitions in the text We assume that you are familiar with operating and programming your Allen Bradley controller Because of the functions that your module performs your programming skills should include file manipulation and message formatting Refer to the Programming and Operations Manual for your PLC 2 family controller or to the Programming Manual for your PLC 3 controller Some chapters in this manual contain examples of how you enter data or commands When you read these chapters remember the following notational conventions Preface To Our Customers Some Tips on Using This Manual A symbol or word in brackets represents a single key you would press These include keys such as ENTER SHIFT or Spaces would be entered as shown except that the space preceding and following the brackets is not an entered space We put a space before the left bracket and after the right bracket to make it easier to read Numbers and capital letters not in brackets would be entered as shown Punctuation such as commas and symbols such as would be entered as shown For example typical data and a typical command that you would enter on the industrial terminal keyboard are as follows Enter ALLEN 123 AB ENTER da
138. gth IW2 00 13 3 18 Determining Block Transfer Length 3 20 Removing the Fill Character Data Mode Only IW4 10 16 3 21 Removing Header and Trailing Characters IW4 00 03 04 07 3 23 Choosing I O Buffer Size IW3 00 02 13 24 Choosing Transmission Mode 1 05 07 3 25 Choosing Single or Multiple Transfers 2 17 3 25 Selecting Delay for Carriage Return 3 06 07 3 26 Setting Remaining Bits in 1 10 17 3 26 Selecting the Number of Initialization Words 1 00 01 3 29 Recording Bit Settings in Initialization Words 3 30 Table of Contents ASCII I O Module Tutorial 4 1 Chapter 4 1 PLC 2 Family 5015 4 2 Adding Initialization Rungs 4 2 Setting Bits in Initialization Words 4 4 Expanding the Number of Initialization Words 4 5 Changing the Module s String Length Read Only 4 5 Justifying 4 7 Demonstrating End of String Delimiter 4 9 Removing the Fill Character 4 14 Removing Header and Trailing Characters 4 15 Demonstrating Data Co
139. hake i 02 15 15 RUNG NUMBER RM4 WO005 0000 W0003 0000 1r 1 E Status word 1 Command word 1 ONU Vt read handshake 00 02 15 15 RUNG NUMBER RM5 WO003 0000 101 Energize at power up to load initialization words Also energized on ee 07 on 1st scan after processor selection of run monitor mode 01 50003 Jt 01 RUNG NUMBER RM6 WO005 0000 Energize timer on power up T0001 1 f TON 01 10001 17 1 0 SECOND TP 2 T0001 TA 0 10 15 42 endix A ASCII Module PLC 2 Family Processors App RUNG NUMBER RM7 ae De energize timer after transferring initialization words dion 15 01 RUNG NUMBER RM8 To Command word 1 initialization bit Module expects 0002 0000 1 00 up to 4 initialization words 17 WO005 0000 RUNG NUMBER RM9 10001 Load initialization words with MVF C0004 L FILES FROMA TO R Y ES EN 00 selector switch or at power up A 007 0002 12 0005 0000 R 002 0002 C0004 D COUNTER C0004 DN oi POS LEN 0 3 M C0004 MODE ALL SCAN ER 13 RUNG NUMBER RM10 GRT 004 0000 0005 0000 Test for new valid dala 0005 0000 m A gt B M hea A WO003 0001 15 02 05 0000000000000000 B WO001 0000 0000000000000000 RUNG NUMBER RM11 WO005 0000 MVF C0001 lI FILES FROMA TO R EN 03 A FO003 0002 12 R F0006 0002 C0001 Moves new data from BTR file
140. hanumeric Keytop Overlay Processor Interface Cable IT DH Adapter Cable Power Cable 1771 CJ CK 1 0 Interconnect Cable 1777 CB CA Local Adapter Module 1771 AL Termination Plug 1777 CP 2 2 Chapter 2 Getting Started with Your ASCII Module Power Supply 1771 1 Power Cable 1771 CL Note You must use battery back up The ASCII module draws 1 3A from the backplane Be sure that the total current drain of all modules in the chassis does not exceed the maximum for the backplane and power supply If you use an existing system consider disconnecting all other chassis except the one containing your ASCII module Disconnect field wiring arms from output modules for safety purposes How to Connect Your Equipment Connect your equipment with the appropriate cables Figure 1 1 for Mini PLC 2 15 controllers Figure 1 2 for PLC 2 20 or 2 30 controllers Be sure that the end of your IT DH adapter cable labeled CHANNEL B is connected to channel B on the industrial terminal 2 3 Chapter 2 Getting Started with Your ASCII Module Figure 1 1 Connections for Mini PLC 2 I5 Controller
141. he screen The prompt EDITING will blink 7 Enter your instructions and addresses Refer to the PLC 3 Programming Manual publication 1775 801 as needed NOTE Be sure that you have entered the prefix F file in the addresses of your block transfer read BTR and block transfer write BTW instructions Create a nominal 64 word file for your BTR and BTW data files as follows Press CR file address gt 100 Y ENTER where the symbols are not entered but designate data that you enter Example file addresses are O3 0 and O2 0 8 Assemble your program Press ASM Y ENTER The power bars now become solid lines 9 Check your program using the consecutive display mode starting with the first rung Press SHIFT DISPLAY ENTER SR ENTER Use RUNG 4 and RUNG as needed to move from rung to rung Installing Your ASCII Module Be sure that power to the I O chassis is turned off when installing or removing your ASCII module as follows 1 Turn off power to the I O chassis 2 Insert the ASCII module in rack 1 module group 1 slot 1 The program makes the processor communicate with the ASCII module at that specific location If you must use another rack location and are familiar with programming block transfer instructions change Chapter 2 Getting Started with Your ASCII Module the rack group and slot number of the module address in the block transfer read and write instructions accordingly Turn on p
142. ial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode S ENTER 2 ENTER Procedure P2 Enter your data Procedure P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode Procedure P4 Observe how the data string is stored in data table file 06 0 Results The module removed header and trailing characters and transferred 15 data characters the set string length Figure 3 8 Figure 3 8 Removed Header and Trailing Characters 15 character string 012 34567890123456178901 3 header characters removed 4 trailing characters removed 11837 RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 00HO0H 00 00 3 45 6 7 89 01 23 00010 45 67 00H00H 00 00 RADIX H START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 0000 0000 2033 3435 3637 3839 3031 3233 00010 3435 3637 0000 0000 0000 0000 0000 0000 Notice the following Although you entered 22 characters the module removed the first three characters and the four trailing characters The module transferred 15 characters the set string length In report generation mode you can mix BCD digits with ASCII characters The module sets the ASCII data conversion to two ASCII characters per word You select the type of data conversion for BCD digits either three BCD or four BCD digits per word in initializati
143. ic mode Press 12 on the keyboard The ASCH module s CHANNEL ACTIVE LED illuminates 4 Set the communication rate to 300 baud Press 13 RETURN The cursor in the upper left corner of a blank screen tells you the terminal is ready for your input 5 Change the processor mode select switch to the RUN PROG position Failure to do this step now will prevent a transfer Procedure P2 Enter Your Data 1 Besure the processor mode select switch is in the RUN PROG position 2 Enter data such as your first name followed by a couple of numbers Enter 11 characters including a space between your name and numbers Table 1 B 2 11 Chapter 2 Getting Started with Your ASCII Module 2 12 Table 1 B Commonly Used Data Characters 0 1 2 3 4 5 6 7 8 9 ETTAC IOTmOOU N Xxz cdomovoz The industrial terminal displays the characters as you enter them If characters are not displayed check the program that you loaded into memory If you find no errors refer to Need Help below 3 Change the processor mode select switch to the PROG position Failure to do this step now will prevent correct operation Procedure P3 Set Your Industrial Terminal to PLC 2 Mode 1 Press MODE SELECT 2 Change the keytop overlay to PLC 2 family 3 Select PLC 2 mode Press 11 on the keyboard Procedure P4 See How Data Is Stored in the Data Table 1 Move the cursor to the rung containing the read block transfer instruction
144. inal to PLC 2 mode Procedure P4 Observe how data is stored in the data table Results The read block transfer file displays the 15 data characters in positions 003 thru 010 Table 3 L Table 3 L Storage of BCD and ASCII Characters POSITION FILE DATA ASCII Equivalent status word one status word two CD Notice the following The data string is left justified BCD digits in the string are right justified The module inserted leading zeros in positions 005 through 008 The number of characters transferred is 15 3 For comparison enter a string with a different number of BCD values Observe how they are stored Enter ABC 123456 A123 Formatting Single Line Message Chapter 4 ASCII I O Module Tutorial Results The read block transfer file displays the 15 data characters in positions 003 thru 010 Table 3 M Table 3 M Storage of BCD and ASCII Characters POSITION FILE DATA ASCII Equivalent status word one status word two A B Notice the following The module used fewer leading zeros The module used one less storage word to store the 15 character string When your program transfers BCD values be sure you know how the data will be stored how leading or trailing zeros will position data into different storage addresses When formatting a message you store the message text and you write program logic to insert variables into your message Consider the message PRODUCED qua
145. ing Trailing Characters m 11829 Header Characters T Record the number of trailing characters W4 04 07 and the number of header characters in IW4 00 03 that you want to remove Write the binary code for the numbers on the form found at the end of this chapter or in the boxes below Data Characters Remove up to 15 header and or trailing characters Removed Removed Trailing Trailing Characters Characters 3 23 Chapter 3 Choosing Module Features Choosing 1 0 Buffer Size Your ASCII module has a 1536 word 3072 byte buffer for I O data The IW3 00 02 percentage of buffer memory that you choose for input and output depends on the operation of your ASCII device and on relative transmission rates into and out of the ASCII module s I O buffer You should proportion the size of your input and output buffers for maximum storage Table 2 K so that the buffer does not fill and result in loss of data a condition known as spillover Table 2 K I O Buffer Size Using When Your ASCII Device And When Select Code Is bidirectional You want to divide buffer space equally 50 Input 50 Output Can only generate input data to the ASCII module You want to maximize the number of characters that the 100 Input module s input buffer can store before spilling data Is bidrectional but most data is read from the ASCII Same as block above 75 Input 010 device 25 Output Is bidirectional
146. initialization data and message 001 0000 data BK BLOCK XFER WRITE RACK 001 GROUP 1 MODULE 1 HIGH DATA 0000 0200 LENGTH 16 CNTL 001 0000 RUNG NUMBER RM14 0020 Moves four word initialization to the write block MVE transfer instruction FILES FROMA TO R A 0000 0570 R 0000 0202 COUNTER 0001 POS LEN 0 MODE ALL SCAN RUNG NUMBER RM15 0020 CW1 17 is the initialization bit 10 RUNG NUMBER RM16 RUNG NUMBER RM17 NEG WB001 000 B0035 A lt gt B m A WO000 0253 15 00 03 0000000000000000 Test for new valid data 0005 0000 B WB00 0327 0000000000000000 52 Appendix ASCII Module PLC 2 Family Processors RUNG NUMBER RM18 0005 0000 EQU A B 03 A WO000 0254 Keyboard entry GO and valid data test 01 00011101 001111 start the write block transfer routine WO000 0400 to display message files 1 and 2 0100011101001111 RUNG NUMBER RM19 B0020 Timer starts its 5 second write block transfer one shot TON routine TIMER ON 1 0 SECOND TP 5 TA 0 15 RUNG NUMBER RM20 EQU oe Moves first message file into MVF write block transfer file when timer FILES FROMA TO R A accumulated value is 1 second A FO000 0600 WN000 0001 R 0000 0202 1 COUNTER C0003 POS LEN 0 MODE ALL SCAN RUNG NUMBER RM21 EQU WTACC 0002 Initiates a write to the peripheral device when the timer 0 accumulated value is 2 seconds me
147. inserted When formatting a multi line or multi column message using the industrial terminal use the ASCII equivalent of the following control codes for positioning the message Control Codes Hex or ASCII Equivalent CTRL P 10 Column number 31 32 33 3B Line number 31 32 33 A 41 When you enter the ASCII equivalent of these control codes into the message file they will position the cursor at the column and line number that you specify For example suppose you want to display a column of 8 digit diagnostic codes that indicate the status of system operation The diagnostic codes are the variable that your program moves into your message file at the appropriate addresses In this example set initialization words Table 4 0 as follows Table 3 0 Example Initialization Words Initialization Words Selected Features IW1 0007 Report generation mode 4 initialization words 300 baud IW2 2032 4 BCD characters word 32 characters string IW3 0000 End of string delimiter is carriage return 4 00 BCD delimiter is a colon Chapter 4 ASCII I O Module Tutorial For a display of the following diagnostic codes 12345678 ABCD4321 FACEBAC2 your message file Table 4 P would appear as Table 3 P Example Message File POSITION FILE DATA Description FILE DATA A Column number Line number BCD delimiter Diagnostic code Diagnostic code BCD delimiter CTROL P Column number Line
148. ion mode the module selects two ASCII characters per word for message characters You choose the data conversion for message variables BCD values placed between delimiters Your selection is limited to one of the following 3 BCD characters per word 4 BCD characters per word The manner in which the module converts data depends on the type of data conversion that you select For example if you load a file with ASCII characters and transfer the file to the industrial terminal for display the module will interpret the data according to the data conversion that you selected You will demonstrate this by transferring data in a file to file move instruction Table 3 J from processor to industrial terminal The industrial terminal will display the data Table 3 K one line at a time Each line is the result of selecting a different data conversion Table 3 J Storage File POSITION FILE DATA Chapter 4 ASCII I O Module Tutorial Table 3 K Display of Converted Data 2 ASCII word 1234 ABCD MO 1 ASCII word 2 4 B D 0 4 Hex word 3132 3334 4142 4344 20AB CDEF 4 BCD word 3132 3334 4142 4344 20AB CDEF 3 BCD word 132 334 142 344 0AB DEF 1 2 ASCII word conversion examines the 7 bit code in each byte AB 10101011 CD 11001101 M EF 11101111 0 Note that lower case letters are displayed as upper case letters 2 Bits 10 17 are not used in 1 ASCII word conversion 3 Bits 14 17 are not used in 3 BCD word conversion Ve
149. is achieved Become familiar with the following operations Refer to the Complete Getting Started Program with rung descriptions for PLC 2 family or PLC 3 controllers in the appendix Write Data is transferred to the module in each write block transfer The module inhibits transmission of data to the ASCII device until one shot handshaking is achieved Then the module transmits data to the ASCII device in a single transmission The module will not transmit more data to the device until the module receives one shot handshaking with new data When your program writes data to the ASCII module the program must toggle the write handshake bit CW1 16 The status of this bit accompanies the data When the module detects the changed status of the handshake bit it transmits the data to the ASCII device 5 1 Chapter 5 Handshaking 5 2 Read Data and or module status is transferred to the processor data table with each block transfer When the ASCII module detects a change in its status receives new data that is terminated by an end of string delimiter in its input buffer and or receives a string greater than the one specified in IW2 the module toggles the handshaking bit SW1 15 The module also places data in status word two SW2 Bit SW1 15 and SW2 accompany new data Your program logic should be written to inhibit using the read data and or module status until confirmed as new by examining bit SW1 15 and word SW2 We r
150. is detected Block transfer errors can occur intermittently due to electrical noise in the environment and may not be critical to system operation This allows your system to continue operation and allows you to observe the frequency and location of such errors The processor can record where faults are occurring in the I O chassis and the frequency of occurrence observe this information you must create the following files Refer to section titled Entering the Getting Started Program step 7 1 26 for the procedure B 15 append B A CII Module For PLC 3 Processor Adapter Status Status file 2 52 0 This file records I O faults occuring in each I O chassis in your system It identifies the location by rack number to within a quarter I O rack 32 I O points or four module slots The file length is application dependent one word for assigned rack numbers 0 3 two words for 0 7 three words for 0 11 and so forth Each displayed bit represents a fault detected within the quarter rack The display format is Bit Number rack 3 rack 2 rack 1 rack 0 rack 7 rack 6 rack 5 rack 4 For example bit 00 indicates a fault at rack 0 first quarter chassis bit 01 at rack 0 second quarter chassis and so forth Adapter Re try Status file 3 53 0 This file counts the number of transmissions attempted between the scanner and each I O chassis in the system The file records the re tries occurring in each
151. itialization Words File 200 for Industrial Terminal ADDR Contents 25 append A A CII Module PLC 2 Family Processors For PLC 3 Family Processor Complete Getting Started The complete Getting Started Program with rung descriptions is described Program PLC 3 in Figure B 1 Figure A 10 Getting Started Program PLC 3 RUNG NUMBER RMO MOV 10004 Load zeros into command word 1 with 0 f MOVE FROMA TO R 00 selector switch or on first scan A WO0001 0000 WO005 0000 0000000000000000 eae R WO0002 0000 00 0000000000000000 RUNG NUMBER RM1 WO003 0000 AINE WO002 0000 Power up reset power up initialization bit NC 07 07 RUNG NUMBER RM2 WO003 0000 0002 0000 WO005 0000 1 f 1r Status word 1 Command word 1 Y as Pigs read data available 15 15 02 WO003 0000 0002 0000 1 15 15 26 endixA ASCII Module PLC 2 Family Processors RUNG NUMBER RM3 WO003 0000 WO002 0000 1r Status word 1 Command word 1 L P We Read handshake RUNG NUMBER RM4 W0003 0000 eee 1 r Status word 1 Command word 1 ne 02 0000 p V read handshake o 02 15 15 10001 RUNG NUMBER RM5 WO005 0000 Pd u 02 03 RUNG NUMBER RM6 WO005 0000 E One shot to enable write block d transfer of new data of module 02 03 04 0005 0000 RUNG NUMBER RM7 0005 0000 L 04 03 WO005
152. k transfers the module sets this bit only in the last transfer containing the end of string delimiter For example when a 300 character string is transferred over three block transfers the bit is not set until the third transfer Figure 5 1 Chapter 6 Function of Control Status Bits Figure 5 1 Operation of Data Complete Bit Block Transfer Data Status of SW1 10 BT1 containing SW1 SW2 and first 124 characters SW1 10 0 BT2 containing SW1 SW2 and second 124 characters W1 10 0 BT3 containing SW1 SW2 and remaining characters SW1 10 1 with end of string delimiter BT block transfer The module also sets this bit when it transfers a string equal to the set string length when the input string exceeds maximum SW1 14 1 Bit SW1 11 Function Reserved for Future Enhancements Description The module sets this bit to zero Bit SW1 12 Function Initialization Error Description The module sets this bit and ceases to operate when it detects an error in your initialization data For example the same character has been selected for delimiter and fill character It is reset when the module receives valid initialization data Refer to Initialization Errors Table 6 A for a complete list of settings that cause an initialization error Bit SW1 13 Function ASCII Device or Link Error Description The module sets this bit when it detects a parity framing or overrun error in the string of characters from the ASCII devi
153. le H P nu UI ul ji Sj 1771 AS Romote T 1772 1C 1 O Adapter Module Processor Interface Cable 2 20 11820 1 Connectthe chassis power cable between the power supply and the processor chassis Chapter 2 Getting Started with Your ASCII Module 2 Connect the I O power cable between the power supply and the I O chassis 3 Connect the twin axial cable between the I O scanner in the processor chassis and the remote I O adapter module in the I O chassis Figure 1 6 Figure 1 6 Twinaxial Cable Terminations Terminals 1 0 Scanner Module Line 1 Q Line 1 Channel J shield CD Shield Channel Line 2 D D Line 2 Channel e T Nod Shield S Shield Channel Clear Line 2 e E xd Terminator Resistor Cat No 1770 XS or 1770 XT 150 ohm 0 5 W TR 1770 CD Twinaxial Cable Terminals on field Wiring Arm of 1770 AS Adapter Module Terminator Resistor Cat No 1770 XT 150 ohm 0 5 W NOTE Absence of a terminator resistor can cause block transfer errors 11821 4 Connect the industrial terminal cable between channel B of the industrial terminal and the processor chassis 2 21 Chapter 2 Getting Started with Your ASCII Module 5 Connect the IT DH adapter cable between the ASCII module and channel B of the industrial terminal Channel B Periodically you will have to switch the cables that connec
154. ledge Incomplete String Port Disable Self Diagnostics Not used Resets Power up and Handshaking Not used Resets Input Buffer Full Bit Not used Reserved for future use Reserved for future use 0 Reset 1 Up to four initialization words will follow command words CW1 CW2 Toggled status CW 16 SW 16 tells module that transfer contains new data Toggled status CW 15 SW 15 tells module that processor received previous transfer 0 Reset 1 Used for installation debugging not for normal operation 0 Reset 1 Disables communication thru the interface port 0 Reset 1 Enables self diagnostics You must re initialize the module Set them to zero 0 Reset 1 Resets SW1 07 Initialization bit W1 15 Read data available bit and SW1 16 Write data acknowledge bit Set them to zero 0 Reset 1 Resets SW1 03 buffer full Set it to zero Reset this bit to zero Reset this bit to zero 6 19 Chapter 6 Function of Control Status Bits Initialization Word One 17 ACK NAK 0 Not used by ASCII device 1 ACK NAK required by device 16 Stop Bits 0 Device generates one stop bit 1 Device generates two stop bits 15 Parity Enable 0 Device does not use parity bit 1 Device generates a parity bit 14 Parity 0 Odd 1 Even 13 Number of Data Bits 0 Device generates 8 bit data 1 Device generates 7 bit data 12 11 10 Communication 000 300 baud R
155. left justification of data in data mode The module ignores this bit when operating in report generation mode You can select either right or left justification of data in data mode only When operating in report generation mode ASCII data is left justified BCD numbers included in the ASCII data string are right justified Justification refers to the positioning of string data in the data table when the transferred string length is less than the set string length It also refers to the positioning of string data that is displayed by an ASCII device Refer to P 3 7 for additional information on justification Bit IW3 04 Function Sends End of String Delimiter to PC Description Set this bit when you want to send the end of string delimiter to the processor for storage in the data table Otherwise reset this bit to zero When generating single line messages select the carriage return as the end of string delimiter set this bit and set IW3 05 Output Line Feed if Carriage Return Use this bit only in report generation mode If the module detects that you set this bit in data mode the module defaults due to an initialization error The module disables its interface port and sets status bit SW1 12 Bit IW3 05 Function Output Line Feed If Carriage Return Description Reset this bit to zero default to inhibit this function Set this bit when you want line feed LF transmitted automatically whenever the ASCII module transmits a
156. les Figure 1 5 Figure 1 5 Connections for PLC 3 Controller 1775 CAT Industrial Terminal Cable 120V AC L1 L2 1775 P1 Power Supply e ET Q PLC 3 1771TA O c Industrial Terminal H Q Q Chassis rear view 2 E LT 1 yo 979 RAM 0 e H 7f S S UNIT 5 5 A eating pas iS Clk y E LI 1 ES IM A A 1775 S4A SN Scanner Channel B a i in 1775 1 Lip Change Cables Chassis 1771 DA ASCII 8 required Power Cable a 1 0 Module 8 2 1770 CD ET Twinaxial Cable A2 4 1771 10 000 ft assis o nid oal edh JL 1770 CB IT DH Cable I O Channel E a Adapter Cab
157. mitted to the ASCII module s input buffer the module sets the new data flag SW2 gt 0 and transfers data and the new data flag to the processor data table Figure A 21 Example Application Program RUNG NUMBER RMO MOV B0020 Zero out CW1 on power u ee MOVE FROMA TO 02 A WB000 0327 0000000000000000 R WO000 0200 0000000000000000 RUNG NUMBER RM1 Power up initialization rung RUNG NUMBER RM2 RUNG NUMBER RM3 TON TE Initialize for 2 seconds TIMER ON T0001 1 0 SECOND TP 2 TD RUNG NUMBER RM4 A 50 Appendix ASCII Module PLC 2 Family Processors RUNG NUMBER RM5 00252 00200 B0035 1 15 15 00 00252 00200 4 15 15 RUNG NUMBER RM6 0035 00252 Read handshake rungs 00200 e L 00 15 15 RUNG NUMBER RM7 B0035 00252 00200 e U 00 15 15 RUNG NUMBER RM8 B0020 B0020 B0020 LE 4 0 16 00 01 B0020 RUNG NUMBER RM9 Biwi L 01 00 B0020 RUNG NUMBER RM10 B0020 Write handshake rungs U 16 When B20 16 is high data is written to the module 00 B0020 00252 BUNGINUMEER 00200 L 01 16 16 B0020 00252 RUNG NUMBER RM12 00200 E 31 01 16 16 51 append A A CII Module PLC 2 Family Processors RUNG NUMBER RM13 WB001 0000 BLOCK XFER READ 15 RACK 001 WB001 0000 GROUP 1 MODULE 1 HIGH 05 DATA 0000 0252 LENGTH 16 CNTL FB001 0000 Write command words 1 amp 2
158. ms x 8 4 1 x 9ms 204ms 3x9ms 231ms CT2 Nota block transfer channel 68ms 1 2 1 x 9ms 68ms 9ms 77ms CT4 Notan active channel A 36 Appendix ASCII Module PLC 2 Family Processors 4 Compute the approximate read or write block transfer time for channel 1 and channel 3 Figure A 15 Figure A 15 Computing Block Transfer for Each Channel Step 4 Compute the read or write block transfer time Example values have been added Program Scan Time program 2 5ms K words x 20K words 2 5ms x 20 50ms Scanner Scan Time read or write 231ms for channel 1 and 77ms for channel 3 from step 3 Block Transfer Timer per Channel Channel 1 Program Scan 2 Scanner Scan 50ms 2 231ms 50ms 462ms 512ms Channel 3 Program Scan 2 Scanner Scan 50ms 2 77ms 50ms 154ms 204ms Reducing Scan Time Due to the asychronous scan relationship between program and scanner and the serial operation of each channel in the scanner we suggest that you optimize the overall scan time Although recommendations are application dependent we make the following recommendations as general guidelines Whenever possible control the manner in which block transfer instructions are enabled For example if only a few block transfer modules require frequent transfer of data program them to run continually Inhibit block transfer instructions of those modules that require less frequent transfer
159. n mix BCD digits with ASCII characters The module sets the ASCII data conversion to two ASCII characters per word You select the type of data conversion for BCD digits either three BCD of four BCD digits per word in initialization word two IW2 If you want to transfer BCD digits increase the number of initialization words to four in IW and select the BCD delimiter in W4 In this demonstration you will select the following Four initialization words using IW1 00 01 Report generation mode using IW1 02 04 Data conversion of 3 BCD digits per word using IW2 14 16 Slash symbol as BCD delimiter using W4 10 16 1 Setthe bits in all four initialization words using the procedure in section titled Setting Bits in Initialization Words P 3 4 Display The file to file move instruction displays your settings as FILE DATA POSITION follows 001 00000000 00000111 002 00010000 00010101 003 00001101 00000000 004 00101111 00000000 4 19 Chapter 4 ASCII I O Module Tutorial 4 20 Next you will demonstrate the transfer of BCD digits to the data table and observe how BCD digits are stored with ASCII characters when the data string contains both 2 Enter ABCD 1234567 A12 2 Use procedures in section title Reading Data From Your ASCII Device chapter 1 if necessary Procedure P1 Set your industrial terminal to alphanumeric mode Procedure P2 Enter your data Procedure P3 Set your industrial term
160. n of the module the other form for report generation mode of operation These modes of operation are described next in this chapter You can also record your selections in the space provided in the text that describes each module feature Then at the end of the chapter you will be asked to rewrite the codes onto the appropriate initialization word form You will use this information in chapter 4 when you demonstrate module features Choosing the Mode of Module Operation IW1 02 04 Chapter 3 Choosing Module Features The mode of module operation that you choose depends on the application and type of ASCII device Typically use data mode when you are reading data from an ASCII device such as a bar code reader Use report generation mode when you are writing messages to an ASCII data terminal Table 2 F Table 2 F Mode of Module Operation Use When Data Mode All of your data is converted by the ASCII module and stored in the data table as a single data type using any one of the following data conver sions 2 ASCII characters per word 1 ASCII character per word 3 BCD characters per word 4 BCD characters per word 4 Hex characters per word String length is from 1 to 62 characters You want to select right to left justified margins and or data Report Generation Mode You want to mix ASCII characters with BCD values In addition to the 2 ASCII characters per word that your module uses in report generation mode you must choos
161. n word used For example if you need a feature found in word four you must select all four initialization words Number of Words Word 1 Words and 2 Words 1 2 and 3 Words 1 2 3 and 4 Review your selections of module features Record the code for the number of initialization words that you need in IW1 00 01 Use the form found at the end of this chapter or the boxes below Number of Initialization Words Wi 3 29 Chapter 3 Choosing Module Features Recording Bit Settings in Initialization Words 3 30 The next two pages are forms for recording bit settings in the four initialization words Form 5175 is for data mode operation of your module form 5176 for report generation mode Copy these forms and use them to record your selections of module features You will use the information that you record on these forms in chapter 3 to set bits in initialization words and to demonstrate the features that you have selected Chapter 3 Choosing Module Features Form 5175 Initialization Words for Data Mode T w 9 9 IW ACK Stop Parity Parity 1 of Mode of Number of NAK Bits Enable Odd i Rate Transmission Operation Initialization even Words 000 300 Baud 000 Full Duplex w Echo 00 Word 1 001 600 Baud 001 Full Duplex w o Echo 01 Words 010 1200 Baud 1 amp 2 011 2400 Baud 100 4800 Baud 010 Simplex Read 101 9600 Baud 011 Simplex Write
162. ncluding one ASCH module Channel 2 contains two I O chassis with no block transfer modules Channel 3 contains two I O chassis with one ACII module Channel 4 is made inactive through processor LIST You can compute the read or write block transfer times for the supervisory processor in this example in four steps Each of the following steps is explained by an accompanying figure 1 Diagram the I O channels of your PC system Figure showing the number of block transfer modules in each I O chassis block transfer I O channels I O chassis entries in the rack list for each block transfer I O channel active I O channels per scanner A block transfer I O channel is a channel that contains one or more block transfer modules located in any chassis connected to the channel An I O chassis can appear more than once in a rack list of I O chassis Count it and the block transfer module s that it contains as often as it is listed Appendix ASCII Module PLC 2 Family Processors Figure A 12 Diagramming 1 0 Channels Step 1 Diagram the chassis connected in series to each channel up to four of your scanner module Then fill in the information called for below Example values have been added 1 1 0 2 0 2 0 0 Scanner 3 1 0 4 Make interactive thru processor LIST 1 0 Chassis n number of block transfer module
163. nect it to the I O chassis ground lug Ground the shield at this end only NOTE Jumper pin 2 to pin 18 at the module end of the cable special case 11827 3 9 Chapter 3 Choosing Module Features 3 10 Setting the Module s Programming Plugs Implement your choice of cable configuration by setting programming plugs inside the module Remove the module s left hand cover plate the one without the labels Locate and adjust the programming plugs according to Figure 2 8 NOTE The locations of programming plug sockets Figure 2 8 are labeled thru E16 on the printed circuit board The settings of programming plugs are defined as follows IN refers to the plug jumpering the pair of pins at the designated location 1 2 or 2 3 refers to the pins on which you insert the plug Pins 1 and 3 are labeled on the circuit board next to the pins OUT refers to removing the plug or inserting it on only one pin electrically floating You can store up to four plugs in the area labeled JUMPER STORAGE at the right hand side of the board SPECIAL CASE When operating an ASCII device in RS 232 C simplex write mode without a transmit line from the ASCII device Figure 2 7 jumper pin 2 to pin 18 at the cable connector module end of cable and insert a programming plug in location E16 on the ASCII module Re assemble the module after you have finished setting and or checking the programming plugs Chapter 3 Choosing Module Feature
164. ng 16 to 4 words word 0 thru 3 press CR O7 3 Y ENTER for rung 16 PLC 3 file display starts with word 0 Initialization words 1 2 3 and 4 are numbered in the display as words 2 3 4 and 5 because of the addresses assigned in the file move instruction To set the size of the result file in rung 17 to 64 words words 0 thru 100 octal press CR O6 100 Y ENTER for rung 17 3 Check the data table to see that file O7 0 was properly created Press the following key sequence to display file O7 0 DD O7 3 ENTER 4 Check that file O6 0 was properly created Press RUNG The file initialization words is the file move instruction in rung 16 Set bits in your initialization words to select desired module features as shown in the following steps Chapter 4 ASCII I O Module Tutorial 1 Display the initialization file FO007 0002 Press DD O7 2 The cursor is on the first word of the file word 2 2 Convert the data to hex or binary Press SHIFT H ENTER for hex SHIFT B ENTER for binary 3 Enter hex or binary data into each file word word 2 thru 5 by pressing ENTER after you have entered data into the command buffer at the bottom of the screen Press to move the next file word Do not load data into words 1 and 2 They are not part of the initialization file When entering data binary is easier to understand because you set actual bits Hex is faster and more convenient when you convert fr
165. ns of your ASCII device Some ASCII devices generate the same string length for each transfer by adding fill characters described later when the amount of data in each transfer varies The device adds fill characters and an end of string delimiter at the end of each message Table 2 J 3 18 Chapter 3 Choosing Module Features Table 2 J String Length You Determine Maximum If Your ASCII Device String Length By Automatically places the end of string delimiter to separate Setting the module s string length to data such as bar codes the longest length that the ASCII device can transmit module in data mode Is a data terminal Setting the string length to the longest message or line and entering the end of string delimiter at the end of each message or line report generation mode You will use the string length to determine the block length of the read block transfer instruction and the size of the data table file that receives the string Refer to section titled Determining Block Transfer Length P 2 20 and to section titled Choosing Single or Multiple Transfers IW2 17 P 2 25 for additional information If the string length from the ASCII device exceeds the string length that you set for the module the next character beyond the set string length received in the module s input buffer causes the module to transfer the string That character and any additional characters remain in the input buffer until the next tr
166. ntity PARTS The message text is PRODUCED PARTS The variable that you want to communicate is the quantity The variable can be timer or counter accumulated values analog I O values or any other data table word byte or bit that changes value Format the message PRODUCED quantity PARTS as follows 1 Create a file for your message using file A source file of a file to file move instruction FFM 060 in rung 17 Load your message text Table 3 N into file A of FFM 060 starting with position 001 Equivalent data table addresses are listed in the left hand column the message is tabulated in the right hand column Use the slash as your BCD delimiter 4 21 Chapter 4 ASCII I O Module Tutorial Do this using procedure P5 in section titled Writing Data To Your ASCII Device chapter 2 Table 3 N Message File HEXADECIMAL DATA MONITOR Equivalent POSITION FILE A DATA ASCII Equivalent Word Address Store the delimiter preceding the BCD value in the lower byte of the word preceding the BCD storage word Store the delimiter following the BCD value in the upper byte of the word following the BCD storage word Table 3 N If necessary add an extra space before the first delimiter to properly position it 2 Program the insertion of the variable using get put instructions In this example use the accumulated value of free running timer 065 as the variable Your program will put this value into word 405 position 006 o
167. ntroller cat no 1772 LP2 your programming will be lengthier because its processor does not have file move or block transfer instructions Getting Started with Your ASCII Module is a hands on exercise By going step by step through two easy examples you will quickly learn operation of your module s basic features This chapter is divided into two sections one for PLC 2 family processors the other for PLC 3 processors Proceed to the section that pertains to your processor 2 1 Chapter 2 Getting Started with Your ASCII Module PLC 2 Family Processors What You Need to Get Started You will demonstrate the operation of your ASCII module by reading data from the industrial terminal to the processor data table and by writing data from the data table to the industrial terminal You will use your industrial terminal as an ASCII device for entering data read and for displaying data write You will need to set up a PC processor with an I O chassis power supply industrial terminal cables and your ASCII module You will need about an hour to complete the tutorial exercises in this chapter and about two hours to complete those of chapter 3 once you have the equipment operating properly Equipment That You Need You will need the following equipment Table 1 A using your existing system and or spare equipment Table 1 Equipment PLC 2 Family ASCII I O module Industrial Terminal PLC 2 Family Keytop Overlay Alp
168. number A BCD delimiter Diagnostic code Diagnostic code BCD delimiter CTRLP Column number Line number A BCD delimiter Diagnostic code Diagnostic code BCD delimiter EOS delimiter Notice the following Home position of the cursor appears once position 001 before you specify line and column numbers Column numbers remain constant at 31 in this example Line numbers advance by one 31 32 33 in this example BCD delimiter precedes and follows the variable End of string EOS delimiter is placed at the end of this single string You would have entered zeros for your variables diagnostic codes in positions 005 and 006 011 and 012 017 and 018 when setting up your file Your program inserts values when you enable the display 4 25 Chapter 4 ASCII I O Module Tutorial 4 26 Verify that this message file displays the diagnostic codes as shown 1 Load the message file into the file to file move instruction 9rung 15 exactly as shown in table 3 P Use procedures P3 and P5 from Writing Data to Your ASCII Device P 1 14 Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P5 Load data into the file to file move instruction 2 Set your initialization words Table 4 0 3 Change the block length of the BTW instruction rung 17 from 16 to 22 4 Change your industrial terminal to alphanumeric mode Transfer data to the industrial terminal by changing the processor mode select
169. nversion 4 17 Selecting Report Generation Mode Data Conversion and BCD Delimiter 4 19 Formatting a Single Line Message 4 21 Formatting a Multi Line Message 4 24 3 Processors 4 27 Adding Initialization Rungs 4 27 Setting Bits in Initialization Words 4 30 Expanding the Number of Initialization Words 4 32 Changing the Module s String Length Read Only 4 32 Justifying Dalai 4 34 Demonstrating End of String Delimiter 4 35 Removing the Fill Character 4 40 Removing Header and Trailing Characters 4 42 Selecting Report Generation Mode Data Conversion and BCD Delimiter 4 43 Formatting a Single Line Message 4 46 Formatting a Multi Line Message 4 49 Demonstrating Data Conversion 4 52 ees 4 55 Handshaking 5 1 Chapter 5 1 Understanding Handshaking Fundamentals 5 1 Reading Status and or Data from the Module 5 3 Function of Control and Status Bits
170. odule is located in each rack Assume that 64 words are transferred in each read and two words are transferred in each write operation and that the ladder diagram program contains 4K words K 1024 There are no other block transfer modules in the system Figure A 4 Remote System Example 1772 SD PLC 2 30 10 000 System 1771 DA 1771 DA 1771 DA 1771 DA 1771 AS 1771 AS 1771 AS 1771 AS Rack No 1 Rack No 2 Rack No 3 Rack No 4 11840 What is the worst case time between two consecutive read block transfers from the same module in this system Solution A 9 append A A CII Module PLC 2 Family Processors The facts of the problem are Program length 4K words Number of chassis 4 rack numbers Number of block transfer words 64 words read 2 words write 1 Calculate the system values Processor Scan Time PS 5ms 1K words x 4K words 20ms Processor I O Scan Time PIO 0 5ms rack number x 4 rack numbers 2ms Remote Distribution I O Scan Time RIO 7ms chassis x 4 chassis 28ms Number of Words Transferred 64 read or 2 write 2 Calculate the block transfer times TW for a write and TR for a read operation TW PS IO 2 RIO 0 5W 13 TW 20 2 2 28 0 5 2 13 TW 92ms write TR PS 2 RIO 0 5W 4 TR 20 2 2 28 0 5 64 4 TR 114ms read 3 Calculate the worst case
171. oggled and that SW2 gt 0 5 3 Chapter 5 Handshaking 54 Table 5 A Logic Conditions for a Read SW1 15 z CW1 15 Program acts on new module status a only and or b SW2 gt 0 and Program acts on new data a and b BTR 07 17 1 and at processor Program sets CW1 15 SWf1 15 to acknowledge SW1 15 2CW1 15 at Module resets for next transfer of new data module and or status Module sets SW1 15 CW1 15 to transfer new status and or data and sets SW2 gt 0 to transfer new data A read only program requires only read handshaking A read write program requires both read and write handshaking Writing Data to the Module Handshaking in a write operation requires your program to toggle bit 16 in command word one CW1 16 When the toggled bit status is transferred with data to the ASCII module the module processes the data to the output buffer where it is transferred to the ASCII device Your program must contain a one shot to ensure that CW1 16 is toggled only once with each transfer of new data After the module processes the data it toggles bit 16 in status word one SW1 16 and returns the toggled bit status to the processor to acknowledge receipt Figure 4 2 and Table 5 B Chapter 5 Handshaking Figure 4 2 Write Handshaking The Ladder Program Data Transfer The Module Toggles bit CW1 16 and transfers its new status with data to the module gt
172. om binary to hex as follows 4 terminate the file display and return to ladder diagram press CANCEL COMMAND Initialization data must be transferred to the module before the module can respond to features that you selected The initialization logic that you added Figure 3 6 allows you to initialize the module by changing the PLC 3 operating mode from program load to run monitor and back again Press 3 ENTER 2 ENTER You will use the above procedure and the procedures from chapter 1 often in this tutorial 4 31 Chapter 4 ASCII I O Module Tutorial Expanding the Number of The module has four words that you use to select operating features You Initialization Words do this by setting one or more bits for each feature that you want to use You increase the number of initialization words according to the module features that you want to use For example if you want a feature that is selected in initialization word four you must use all four initialization words 1 Setyour module for initialization words 1 2 and 3 using bits 00 and 01 of initialization word one IW1 00 01 The bit setting is 02 in hex or 10 in binary Use the procedure in section titled Setting Bits in Initialization Words steps 1 thru 4 for loading the file in rung 16 Display The initialization word file is displayed in hex and binary respectively as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0002
173. on are reserved for command words handshaking Press ENTER and after loading each word For example if you load the following BRADLEY 1234 Your file will appear as RADIX START 011 0248 WORD 0 1 00000 60 00 00HO00H 4 Change the display to hex and observe how the equivalent data is displayed Press SHIFT H ENTER Your file display will change to the following RADIX START WA011 0248 WORD 0 1 2 3 4 5 6 7 00000 E011 0000 4252 4144 4045 5920 3132 3334 Check the display of data to be sure that you entered all data exactly as shown Procedure P1 Set Your Industrial Terminal to Alphanumeric Mode 2 33 Chapter 2 Getting Started with Your ASCII Module 1 Connect the 1770 CB cable to channel B 2 Select alphanumeric mode Press SHIFT MODE 2 3 Check operating parameters Communication rate is 300 baud Hardware handshaking is ON DUPLEX is FULL B and C are any setting E and G thru M are OFF Press ENTER to load parameters The module s CHANNEL ACTIVE LED turns on 4 Change the operation of your PC 3 controller to run monitor from the PLC 3 front panel Press SHIFT LIST 2 ENTER Procedures P6 Enable the Transfer of New Data 1 Set bit 1001 02 to enable program logic the write block transfer handshaking using the PLC 3 front panel Press CLEAR SHIFT IO SHIFT BIT BIT 2 DISPLAY The front panel displays the bit address with
174. on word two IW2 If 4 43 Chapter 4 ASCII I O Module Tutorial you want to transfer BCD digits increase the number of initialization words to four in IW and select the BCD delimiter in IW4 In this demonstration you will select the following Four initialization words using IW1 00 01 Report generation mode using IW1 02 04 4 BCD digits per word data conversion using IW2 14 16 Slash symbol as BCD delimiter using W4 10 16 1 Setthe bits in all four initialization words using the procedure in section titled Setting Bits in Initialization Words P 3 30 Display The initialization word file is displayed in hex and binary respectively as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0007 2015 0000 2 00 START WO007 0000 WORD 2 3 4 5 00000 0000000000000111 0010000000010101 0000110100000000 0010111100000000 NOTE Binary words 0 1 were omitted for brevity Next you will demonstrate the transfer of BCD digits to the data table and observe how BCD digits are stored with ASCII characters when the data string contains both 2 Enter ABCD 12324 56ABC ENTER Use procedures in section titled Reading Data From Your ASCII Device chapter 1 if necessary Procedure P1 Connect the 1770 CB cable and set your industrial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode S ENTER 2 ENTER Procedure P2 Ent
175. one IW 00 01 Use the procedure in the section titled Setting Bits in Initialization Words P 3 4 Results Position 001 contains initialization word one IW1 This chapter will show both the binary and hex display File Data POSITION Hex Binary 001 0020 00000000 00000010 String length is a 3 digit BCD number You can set the string length in BCD or you can set the BCD digits in binary The binary equivalent of BCD and Hex is identical for 0 thru 9 1 Setthe string length to 15 characters in IW2 00 13 using the procedure in the section titled Setting Bits in Initialization Words DISPLAY The file to file move instruction displays your setting as follows File Data POSITION Hex Binary 0015 00000000 00010101 4 5 Chapter 4 ASCII I O Module Tutorial 4 6 2 Demonstrate the string length by entering 16 data characters When you enter the 16th data character the module transfers the string of 15 characters to the read block transfer file in the data table where you can observe it The sixteenth character is not transferred but remains as the first character in the input buffer Do the following example where the processor will read data from your ASCII module Refer to the procedures in section titled Reading Data from Your ASCII Device P 1 28 Enter ALLEN BRADLEY 12 enter spaces as shown Procedure P1 Set your industrial terminal to alphanumeric mode Procedure P2 Enter your data P
176. one ASCII module Channel 2 contains two I O chassis with no block transfer modules Channel 3 contains two I O chassis with one ACII module Channel 4 is made inactive through processor LIST You can compute the read or write block transfer times for the supervisory processor in this example in four steps Each of the following steps is explained by an accompanying figure 1 Diagram the I O channels of your PC system Figure B 3 showing the number of block transfer modules in each I O chassis block transfer I O channels I O chassis entries in the rack list for each block transfer I O channel active I O channels per scanner A block transfer I O channel is a channel that contains one or more block transfer modules located in any chassis connected to the channel An I O chassis can appear more than once in a rack list of I O chassis Count it and the block transfer module s that it contains as often as it is listed B 9 append B A CII Module For PLC 3 Processor Figure B 3 Diagramming 1 0 Channels Step 1 Diagram the chassis connected in series to each channel up to four of your scanner module Then fill in the information called for below Example values have been added 1 1 0 2 2 0 0 3 1 0 4 Make interactive thru processor LIST I O Chassis n number of block transfer modules
177. onversion to another only by re initializing the module When operating in report generation mode you must select either 3 BCD or 4 BCD characters per word for storing BCD numbers The module automatically selects 2 ASCII characters per word for non BCD data Your choice of 3 BCD or 4 BCD characters per word depends on your requirements for manipulating data and or on the characteristics of your ASCII device When the module detects an invalid setting for data conversion it faults due to an initialization error Refer to Fill Character Bit IW4 10 16 and Your ASCII Module Inserts Fill Characters P 2 22 6 7 Chapter 6 Function of Control Status Bits 6 8 Bit IW2 17 Function Single or Multiple String Transfer Rate Description Reset it to zero default when you want the module to send a single string to the PC processor in a block transfer or when more than one block transfer is required to transfer the string Set it when you want the module to send more than one string in each block transfer This feature is limited to strings that fill 31 words or less Select this feature when the transmission rate of data from the ASCII device to the ASCII module s input buffer exceeds the transmission rate of single string block transfers to the PC processor The block transfer time in a remote system is approximately the same regardless of the number of strings contained in a transfer So send as many full strings as you can
178. ory If you suspect that its internal configuration settings of internal programming plugs has been altered you should check module configuration refer to section titled Choosing the Mode of Communication in chapter 2 Do this as follows 1 Remove the covers from the module s printed circuit board 2 Locate the programming plugs and set them according to RS 232 C without control lines Figure 2 8 Entering the Getting Started Program Using your industrial terminal enter the Getting Started Program Figure 1 8 into processor memory At this point you do not need to understand how the program works but you should enter it exactly as shown 2 23 Chapter 2 Getting Started with Your ASCII Module 2 24 Figure 1 8 Getting Started Program PLC 3 ne RUNG NUMBER RMO uoi TE MOVE FROM A TO R 00 WO001 0000 W0005 0000 0000000000000000 R WO002 0000 0000000000000000 RUNG NUMBER 1 0003 0000 0002 0000 E 07 07 RUNG NUMBER RM2 WO003 0000 WO002 0000 0005 0000 t dm 15 15 02 WO003 0000 0002 0000 J 1 1 15 15 RUNG NUMBER RM3 WO005 0000 0003 0000 0002 0000 L 02 15 15 RUNG NUMBER RM4 0005 0000 1 0003 0000 0002 0000 Tr if J H U L LAL 02 15 10001 RUNG NUMBER RM5 WO005 0000 0 02 03 RUNG NUMBER RM6 10001 0005 0000 0005 0000 lr t 02 03 04 0005 0000 RUNG NUMBER RM7 0
179. ou would do this if you want to display single line messages and your program uses the carriage return as the end of string delimiter You may also want line feed with each carriage return In this kind of report generation application you would send the end of string delimiter to the processor by setting IW3 04 21 You would enable line feed on carriage return by setting IW3 05 1 Chapter 3 Choosing Module Features Record the 7 bit ASCII code in binary or hex for the end of string delimiter in IW3 10 16 using the form found at the end of this chapter or the boxes on the next page End of String Delimiter 14 10 0 Setting String Length String length is the maximum number of characters that your ASCII IW2 00 13 module can transfer as a unit from the ASCII device to the processor data table You set the string length to match that of your ASCII device data mode or according to your message requirements report generation mode up to the maximum that the module can handle The maximum number of characters that your ASCII module can handle as a string depends on the module s mode of operation In data mode the module can handle a string of up to 62 characters per block transfer In report generation mode the module can handle a string of up to 999 characters transferred over several block transfers The string of characters sent from the device to the module can be fixed or varied in length Refer to the specificatio
180. ower to the I O chassis Three LED indicators on the ASCII module illuminate momentarily Their functions are FAULT Normally off This red LED indicator illuminates when the module detects an internal fault BUFFER FULL Normally off This yellow LED indicator illuminates when the input buffer becomes full CHANNEL ACTIVE This green LED indicator illuminates when the industrial terminal is on properly connected to the ASCII module s interface port and set for alphanumeric mode 2 27 Chapter 2 Getting Started with Your ASCII Module Reading Data from Your ASCII Device 2 28 In this demonstration you will enter data and observe how it is stored in the processor data table You will use the industrial terminal in alphanumeric mode as an ASCII data terminal when you enter data Then you will change the industrial terminal to PLC 3 mode and observe the transferred data by displaying the contents of the block transfer read file You must alternate cables that connect to channel B of the industrial terminal one cable for alphanumeric mode the other for PLC 3 mode You will simulate the action of an input bit through the PLC 3 front panel to enable a write block transfer You will use the following procedures P1 Connect the 1770 CB cable and set your industrial terminal to alphanumeric mode P2 Enter your data P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode P4 See how data is stored in th
181. plays your setting as follows File Data 003 0008 00000000 000010000 2 Repeat step 2 of section titled Changing the String Length Results The read block transfer file displays the 15 data characters in positions 003 thru 010 with the data left justified Table 3 C Table 3 C String Length Left Justified POSITION FILE DATA ASCII Equivalent status word one status word two The module placed the space 20 in position 010 because it left justified the data Displaying Right Justified Data In this demonstration assume that your margin justification bit IW3 03 had been reset for right justification in data mode only and that initialization words one and two are set as follows W1 0002 and IW2 20015 1 Use file to file move instruction to store data you want write block transferred to your industrial terminal for display Load your file to file move instruction rung 15 exactly as shown Table 4 D starting in position 001 Use the procedure in section titled Writing Data to Your ASCII Device P 1 14 Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P5 Load data into the file to file move instruction 4 8 Demonstrating End of String Delimiter Chapter 4 ASCII I O Module Tutorial Table 3 D String Length Right Justified POSITION FILE DATA ASCII Equivalent 2 Display the data on your industrial terminal using the procedure in entitled Writing Data to Your ASCII Devi
182. ppendix ASCII Module For PLC 3 Proessor RUNG NUMBER RM13 WB001 0000 BTR CNTL 1 L 1 READ 15 RACK 001 12 WB001 0000 GROUP 1 CNTL E MODULE 4 HIGH DN 05 DATA F0000 0252 15 LENGTH 16 CNTL CNTL 001 0000 ER Write command words 1 amp 2 M initialization data and message i data WB001 0000 BTW CNTL J E BLOCK XFER WRITE EN 9 17 RACK 001 02 GROUP 1 CNTL MODULE 1 HIGH H DN DATA F0000 0200 05 LENGTH 16 CNTL CNTL 001 0000 RUNG NUMBER 14 03 Moves four word initialization file to the write block MVF ed NE transfer instruction FILES FROMA TO R 12 000 0570 0001 F0000 0202 DN COUNTER 0001 15 POS LEN 0 4 C0001 MODE ALL SCAN E RUNG NUMBER RM15 B0020 CW1 17 is the initialization bit 00200 10 17 RUNG NUMBER RM16 0020 fo 02 RUNG NUMBER RM17 NEG 001 000 B0035 Test for new valid data WO005 0000 A lt gt B 195 A WO000 0253 15 00 03 0000000000000000 B WB00 0327 0000000000000000 B 27 append B A CII Module For PLC 3 Processor B 28 RUNG NUMBER RM18 0005 0000 0020 E FOU L 03 A WO000 0254 Keyboard entry GO and valid datatest 01 0001 1101 001 111 start the write
183. pter 6 Function of Control Status Bits Status Word Two Function Number of strings per Bits 10 13 BCD digit 0 Block Transfer when Bits 14 17 BCD digit 1 transferring multiple strings 2 17 1 Number of Words per Bits 00 03 BCD digit 0 String Bits 04 07 BCD digit 1 The module sets these bits unless toggled when it detects the subject condition Chapter Objectives Recognizing Initialization Errors Troubleshooting In this chapter you will read about recognizing initialization errors interpreting status indicators and status codes for troubleshooting purposes We will also show you how to conduct a test to verify that your ASCII module is operating correctly If you should set bits of initialization words to an invalid range the module detects an initialization error and will not operate Invalid settings of initialization words are listed in Table 6 A Table 6 A Initialization Errors Feature Word Bit Invalid Setting or Range Mode of module operation IW1 02 04 Above 001 binary Mode of transmission IW1 05 07 Above 101 binary String length IW2 00 13 Data mode above 62 characters Either mode non BCD digits using A F hex Data conversion IW2 14 16 Data mode above 100 binary Report generation mode 000 1 ASCII word 011 2 ASCII word 100 4 hex word above 100 binary buffer split IW3 00 02 Simplex read 100210096 output Simplex write 001 100 inpu
184. r C D D D D D N S E C E 5 F G R U 1 Some ASCII control codes are generated using non standard keystrokes 2 Will be displayed when Control Code Display option is set on C 5 Appendix Specifications General Specifications Function Interfaces a programmable controller with block transfer capability and an ASCIl device For use as a Data Communications Equipment DCE Available Interfaces RS 232 C Current Loop 20mA A B Long Line Communication Rates User selectable 110 300 600 1200 2400 4800 9600 baud Buffer Memory 1 5K words 3K bytes Module Location 1771 I O Chassis Backplane Current Requirement 1 3A Environmental Conditions Operational Temperature 32 to 140 F 0 to 60 C Storage Temperature 40 to 185 F 40 to 85 C Relative Humidity 5 to 95 without condensation Between 8 and 10 Between 30 and 32 Current Loop Specifications D 1 Appendix D Specifications Passive Receive Circuit pins 12 and 24 Isolation 3000Vdc between customer and PC system circuitry 500V us common mode transient immunity Input Current Range 4 0mA to 20 0mA for mark state 0 0mA to 0 5mA for space state Nominal Input Voltage Range 1 51V 4mA to 2 05V 20mA for mark state 0 0V to 1 10V 0 5mA for space state Reverse Input Voltage Limit 5 0V between pins 12 and 24 No reverse voltage protection
185. r example suppose that you want to display a column of 8 digit diagnostic codes that indicate the status of system operation The diagnostic codes are the variable that your program moves into your message file at the appropriate addresses To display the following diagnostic codes 12345678 ABCD4321 FACEBAC2 you will load your message file in hex as follows Do this later in step 2 RADIX START WO006 0000 WORD 0 1 2 3 00000 0000 0000 1041 1038 00010 3A00 1038 3B37 413A 00020 3B36 413A FACE BAC2 Notice the following The home position of the cursor 1041 appears once before you specify line and column numbers The column numbers remained constant at 31 in this example The line numbers advanced by 31 32 33 in this example The BCD delimiter precedes and follows the variable The end of string delimiter OD is placed at the end of this single string Normally you would enter zeros for variables diagnostic codes when setting up your file and your program would move real values into the storage words for the variables In this example you will load the diagnostic codes into the file 4 50 Chapter 4 ASCII I O Module Tutorial Verify that this message file will display the diagnostic codes as shown 1 Set your initialization words as follows RG mode 4 initialization words 300 baud IW1 0007 4 BCD characters word 32 characters string IW2 2032 End of s
186. r wrote over the first and is displayed in the read block transfer file Table 3 G Figure 3 2 Division of Data Between Two Transfers 123456878901234567890ABCDEF G 1st transfer 2nd transfer 15 characters terminated by RETURN 11834 4 12 Chapter 4 ASCII I O Module Tutorial Table 3 G Transfer of Balance of String POSITION FILE DATA ASCII Equivalent Your program must include instructions for processing new data read from the module If not data in your read block transfer file will be written over in the next read block transfer You can do this by examining whether status word two SW2 contains data using a greater than instruction When the value in SW2 is greater than zero new data flag move new read block transfer data to an alternate storage file Your program can process it before it is overwritten by the next transfer of new data Figure 3 3 Make the address of the source file of the file to file move instruction file A the same address as the read block transfer file Also examine the BTR done bit Figure 3 3 Example Programming New Data Flag BT Done SW2 gt 0 Bit Storage 327 253 11 035 Bit 1G se HH H 000 17 00 BLOCK XFER READ 011 DATA ADDR 030 MEN MODULE ADDR wi 17 BLOCK LENGTH 16 DN FILE 252 271 47 Bit FILE TO FILE MOVE 035 1 E COUNTER ADDR 035 HEN POSITION 001 17 FILE LENGTH 16 FILE
187. ransfer FILE LENGTH 040 area once ever 100 program FILE A 400 447 083 Scans FILER 202 251 DN RATE PER SCAN 040 15 020 FILE TO FILE MOVE 037 TRU 8 E COUNTER ADDR a a ee 10 POSITION 001 17 FILE LENGTH 004 FILEA 254 257 087 FILER 202 203 DN RATE PER SCAN 004 15 NC BLOCK XFER READ B XS CHASE EAS 19 i ock transfer rungs DATA ADDR 030 17 Read occur unconditionally MODULE ADDR 411 i Writes occur ER 4 once every 100 scans after BLOCK LENGTH py power up FILE 300 350 17 020 041 XS BLOCK XFER WRITE e i DATA ADDR 031 a 035 MODULE ADDR 411 141 BLOCK LENGTH 41 10 FILE 200 250 N 020 21 02 Appendix ASCII Module PLC 2 Family Processors Table A A Example Message Storage File 400 CONTENTS 400 1033 1033 1 303B COLUMN 30 ROW 07 NOTE This could be 303B 2 3037 3741 3 4100 instead of 4 words as shown 404 4185 5 4953 AXIS 1 6 2031 7 203D 10 203A 411 1234 1234 5678 12 3A3A 13 5678 14 3A00 415 1033 16 303B COLUMN 30 ROW 10 17 3130 20 4100 421 4185 22 4953 AXIS 2 2032 24 203D 25 203A 426 ABCD ABCD 4321 27 3A3A 30 4321 31 3A00 432 1033 33 303B COLUMN 30 ROW 13 34 3133 35 4100 436 4158 37 4953 40 2033 AXIS 3 41 203D 42 203A 443 FACE FACE BAC2 44 45 BAC2 56 3A0D Message variable Table A B Example In
188. ransfer instructions whenever an error is detected Block transfer errors can occur intermittently due to electrical noise in the environment and may not be critical to system operation This allows your system to continue operation and allows you to observe the frequency and location of such errors The processor can record where faults are occurring in the I O chassis and the frequency of occurrence To observe this information you must create the following files Refer to section titled Entering the Getting Started Program step 7 P 1 26 for the procedure A 40 Example Read Only Program Appendix A ASCII Module PLC 2 Family Processors Adapter Status Status file 2 52 0 This file records I O faults occuring in each I O chassis in your system It identifies the location by rack number to within a quarter I O rack 32 I O points or four module slots The file length is application dependent one word for assigned rack numbers 0 3 two words for 0 7 three words for 0 11 and so forth Each displayed bit represents a fault detected within the quarter rack The display format is Bit Number rack 3 rack 2 rack 1 rack 0 rack 7 rack 6 rack 5 rack 4 For example bit 00 indicates a fault at rack 0 first quarter chassis bit 01 at rack 0 second quarter chassis and so forth Adapter Re try Status file 3 53 0 This file counts the number of transmissions attempted between the scanner and each I
189. ransferring multiple strings the module will not split a string between two block transfers and the string length cannot exceed the number of characters that can be transferred in 31 words Two strings of 31 words three strings of 20 words and so forth must total 62 words or less Remember that two of the 64 block transfer words are reserved for status words Do not confuse the transfer of multiple strings per block with the transfer of one long string between two or more block transfers The module will split one long string between block transfers when you have selected single string transfer IW2 17 0 Command word one status word one and status word two are summarized in Figure 5 2 Figure 5 3 and Figure 5 4 respectively Command initialization and status words are summarized in the tables on the following pages Copy the figures and tables so that you can refer to them as needed Figure 5 2 Command Word One CW1 Chapter 6 Function of Control Status Bits Figure 5 3 Status Word One SW1 Figure 5 4 a enm Full Status Word Two SW2 17 18 15 14 12 10 o 06 05 03 02 01 00 Number of Strings per Block Transfer Number of Data Words per String 00 62 00 62 BCD Digit 1 BCD Digit 0 BCD Digit 1 BCD Digit 0 6 18 Command Word One Chapter 6 Function of Control Status Bits 11 10 07 06 05 04 03 02 01 00 Write Data Available Read Data Acknow
190. rd your decision whether to use the feature and when appropriate the quantity pertaining to the feature At the end of this chapter you will consolidate your decisions on a worksheet You can use the worksheet to configure your module for your specific ASCII device and application This manual uses the following notation when referring to initialization words and bits There are four initialization words to configure your module IW1 IW2 IW3 and IW4 Bits within an initialization word are shown in parentheses after the word For example bits 10 thru 17 in initialization word three would appear as W3 10 17 The ASCII module responds to three modes of communication RS 232 C Current Loop 20mA A B Long Line RS 232 C Use this mode for communicating up to approximately 50 cable feet between a printer or CRT and the ASCII module The Electronics Industry Association EIA standard RS 232 C sets data and control line voltage levels for serial data communication Data transmission is negative true logic 5 to 15Vdc for a logic 1 5 to 15Vdc for a logic 0 Control line commands are positive true logic 5 to 15Vdc for enable 5 to 15Vdc for inhibit The standard also specifies a 25 pin connector and defines pin functions Most systems use only the following pins 3 1 Chapter 3 Choosing Module Features transmit data receive data request to send clear to send ground Refer to Table 2 A for a detailed listing of RS
191. repeats In report generation mode select any ASCII character as the end of string delimiter If a series of BCD numbers in a string is divided by a block transfer either one of two results can occur If the string of correct length is divided by a block transfer the balance of BCD characters will be transferred correctly in the next transfer If you erroneously allowed the string to exceed your selected string length the balance of the BCD numbers will be transferred as ASCII characters Do not enter the same ASCII character in IW3 10 16 and IW4 10 16 or allow them to be equal by default When you not using W4 IWA 10 16 defaults to the colon hex in either mode of module operation Therefore when using three initialization words or fewer do not user the colon 3A hex as your end of string delimiter When the Chapter 6 Function of Control Status Bits module detects that IW3 10 16 is equal to IW4 10 16 it will not operate due to an initialization error Bit IW3 17 Function Enables End of String Delimiter Description Reset it to zero default to enable the end of string delimiter that you selected in IW3 10 16 Set it when not using an end of string delimiter When set the module will transfer your data string when its input buffer receives the next character beyond your selected string length When the end of string delimiter is not enabled 1 3 17 1 the null character CTRL 0 is treated as
192. rial 035 252 200 Et 1 00 15 15 035 252 200 9 1 amp 00 15 OFF 15 063 251 020 020 10 a 4 t lt 000 100 00 01 020 020 1 f L 01 OFF 00 063 247 020 2 eH L 000 200 OFF 00 020 252 200 13 F t L 01 16 ON 16 020 252 200 l4 i 01 16 16 020 FILE FILE MOVE 060 15 COUNTER ADDR 060 EN 01 POSITION 001 17 FILE LENGTH 020 FILE A 400 423 060 FILE R 202 225 DN RATE PER SCAN 020 5 BLOCK XFER READ 011 T DATA ADDR 030 pH MODULE ADDR ev BLOCK LENGTH 16 0 FILE 252 271 17 17 BLOCK XFER WRITE ott DATAADDR 031 E MODULE ADDR BLOCK LENGTH 16 DN FILE 200 217 16 020 FILE TO FILE MOVE 061 18 ea COUNTER ADDR 061 EN 10 POSITION 001 17 porem ow 70 57 FILE R d ou LDN RATE PER SCAN 004 15 020 200 19 E 10 17 020 20 END 00460 02 Add This Rung Add These Rungs 4 3 Chapter 4 ASCII I O Module Tutorial Setting Bits in Initialization Words 4 4 Set bits in your initialization words to select desired module features as follows 1 Place the cursor on the file to file move instruction in rung 18 It contains the file of initialization words 2 Display the file Press DISPLAY 1 for hex or DISPLAY 0 for binary The file is displayed either in
193. rify the conversions Table 3 K as follows 1 Load the file of the file to file move instruction rung 15 starting at position 001 exactly as shown in Table 3 J Use procedure P3 and P5 from Writing Data to Your ASCII Device P 1 14 Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P5 Load data into the file to file move instruction 2 Setinitialization word one to data mode and select three initialization words Set IW 1 0002 Use the procedure in section titled Setting Bits in Initialization Words P 3 4 3 Change your data conversion to 2 ASCII characters per word and set the string length to 12 IW2 0012 4 Remove the BCD delimiter from initialization word four Set TW4 0000 5 Change operation of your industrial terminal to alphanumeric mode Transfer data to the industrial terminal by changing the processor mode select switch to the RUN PROG position Results The industrial terminal displays 1234ABCD MO table 4 K linel 6 Verify the remaining conversions in lines 2 3 4 and 5 Table 3 K by setting IW2 16 14 as follows 4 18 Selecting Report Generation Mode Data Conversion and BCD Delimiter Chapter 4 ASCII I O Module Tutorial Bit Setting Conversion 16 15 14 Hex Setting 1 ASCII word IW2 3012 4 Hex word IW2 4012 4 BCD word IW2 2012 3 BCD word IW2 1012 Results The industrial terminal displays the corresponding line in Table 3 K In report generation mode you ca
194. rocedure P3 Set your industrial terminal to PLC 2 mode Procedure P4 Observe how data is stored in the data table Results The read block transfer file displays the 15 data characters in positions 003 thru 010 Table 3 B Table 3 B String Length Display Position File Data ASCII Equivalent 001 A010 or E010 status word one 002 0000 status word two 003 2041 A 004 4C4C LL 005 454E EN 15 006 2042 B transferred 007 5241 RA characters 008 444 DL 009 4559 EY 010 2031 The space 20 in position 003 was placed there by the module due to right justification of data Justifying Data Chapter 4 ASCII I O Module Tutorial Initialization Error If the characters were not displayed when you entered them ALLEN BRADLEY 12 and the display of transferred data contained only the code X4XX in status word one you have an initialization error X is any value Repeat the procedure in section titled Setting Bits in initialization Words P 3 4 exactly as shown setting IWI 00 01 10 in binary or 2 in hex A setting of IW1 00 01 11 in binary or 3 in hex will not work in this example The module justifies data before it transfers this data to the processor data table The module left justifies data by placing the first character in the upper byte of the first word address of the file The module right justifies data by placing the last character in the lower byte of the last word of the file You can tell th
195. rom Your ASCII Device if necessary Procedure P1 Set your industrial terminal to alphanumeric mode Procedure P2 Enter your data Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P4 Observe how data is stored in the data table Results The module transferred the data characters extracted the fill character added its own fill character and right justified the data Table 3 Removing Header and Trailing Characters Chapter 4 ASCII I O Module Tutorial Table 3 H Extraction of Fill Character POSITION FILE DATA ASCII Equivalent status word one status word two This feature does not allow your program to add data characters in place of fill characters removed from the string This feature changes the position of data When the module removes header and trailing characters from a data string it counts only the balance of characters as data in the string The module does not remove trailing characters until the data string exceeds the set string length The module counts the first characters of the string as header characters and removes them regardless of the number of characters in the string 1 Setthe number of header characters three and trailing characters four to be removed by setting IW4 00 03 IW4 04 07 to three and four respectively Use the procedure in section titled Setting Bits in Initialization Words P 3 4 Display The file to file move instruction displays your
196. s Figure 2 8 Programming Plug Locations and Settings Jumper E4 E5 Storage E9 9 p E E6 E E12 R M m Y T T E16 Hg Y Y 5 ll E14 E11 E10 E13 Bottom of Module RS 232 C KB Programming Without Long Plug Control With Current Line Location Lines Control Loop Operation mmmmmmmmm 10 E 11 E 12 E 13 1 3 prong connector 1 2 place programming plug toward pin 1 as labeled on the circuit board 2 3 place programming plug toward pin 3 as labeled on the circuit board 2 See Special Case Choosing the Mode of Communication 3 Remove E4 when initializing the module IW 1 B05 B06 B07 half duplex mode 3 11 Chapter 3 Choosing Module Features 3 12 Setting and Recording Initialization Words The remaining features are configured by using initialization words These words are write block transferred to the module at power up or upon command You will record your selections of module features by writing codes 0 or 1 for corresponding initialization bits You can do this with either of the initialization word forms at the end of this chapter Use one form for data mode operatio
197. s etc to 070 for six racks and 200 for seven racks When more than one block transfer module is used the data addresses should be consecutive A4 Block Transfer Timing Appendix A ASCII Module PLC 2 Family Processors Two consecutive data addresses must be used in bidirectional block transfer Both contain the I O rack address of the ASCII module A boundary word containing zeros should be entered in the data table following the last block transfer data address When the processor sees this boundary word it will terminate the block transfer search routine so subsequent data table values cannot be interpreted as rack module group and slot numbers associated with block transfer data addresses File Addresses The block transfer read and write instructions each require a file The file of the read instruction receives data transferred from the module The file of the write instruction temporarily holds data to be sent to the module Each file address is stored in the preset area of the data table 100g above the corresponding data address in the accumulated area You enter the file address in the instruction after you enter the instruction The files themselves can be located elsewhere in the data table Enable and Done Bits The read enable bit is bit 07 or 17 of the module s output image table byte depending on whether the block transfer module is in a lower or upper slot respectively The write enable bit is bit 06 or 16 o
198. s in chassis Description Number Chi Ch2 Ch3 Ch4 Active I O channels 3 Block Transfer I O channels 2 Block Transfer modules on each 1 0 block transfer channel 3 0 1 0 I O chassis on each block transfer I O channel I O chassis in rack list 4 0 2 0 12828 2 Using information from the diagram of I O channels Figure A 12 look up the nominal time from the table in Figure A 13 A 35 append A A CII Module PLC 2 Family Processors Figure A 13 Nominal Time Table Step 2 Determine a time from the table Example values have been added Number of Active 1 Channels 1 2 3 4 4 40 52 54 58 Active I O channels containing one or more 2 67 68 76 block transfer modules 3 98 99 123 Time ms Number of active I O channels 3 Number of active I O channels containing one or more block transfer module 2 Time from table 68ms 12829 3 Compute the approximate transfer time for each block transfer I O channel Use values from your channel diagram Figure A 12 a value from the table Figure A 13 and the formula from step 6 above We make these calculations for you in Figure A 14 Figure A 14 Computing Channel Times Step3 Compute the scanner time for each block transfer channel Example values have been added CT Channel Time CT Nomina BT modules 1 O chassis 4 1 Time on BT channel on BT channel CT1 68
199. s into command word one es CW1 on first program scan 200 LG PUT 02 000 000 252 Sets resets power up initialization bit CW1 07 200 E 07 07 252 Set at power up to load initialization words 2 i into BT write file and allows initialization 5 0 j 07 using processor mode select switch OFF 10 020 Energizes initialization timer at power up 062 i TON 10 0 1 PR 005 AC 000 yo Resets timer after transfer of initialization words 4 A S C 15 OFF 10 020 One shot energizes timer for write handshaking 063 j t TON 02 2 063 300 1 000 215 17 292 Dd Read handshaking CW1 SW1 099 I E 15 15 Module toggles SW1 15 when it sends new status 00 252 200 or ASCII string Then program toggles CW1 15 NEU in either of next two rungs to acknowledge receipt 1L dL of data 15 15 035 252 200 ioe L ait wale 00 15 Read BT handshaking acknowledgment of new data ON 15 A 1 Asis A A Cll Module A 2 PLC 2 Family Processors 035 252 200 E 4 t a 00 15 ON 15 063 251 020 020 ak SIMA 000 100 0 01 020 Write BT one shot 020 Lor GE 01 OFF00 063 247 020 e uU 000 200 OFF00 020 252 200 1 18 Write handshaking toggles CW1 16 020 252 200 u 01 16 ON 16 065 Free running timer for message format example 15 01 PR 300 AC 021 065 Puts accumul
200. s the module the number of initialization words you will use to transfer initialization data to the module 00 Words Used word 1 words 1 and 2 words 1 2 and 3 words 1 2 3 and 4 O 6 3 Chapter 6 Function of Control Status Bits Bits IW1 02 04 Function Mode of Module Operation Description Choose data mode default when You want to automatically convert ASCII characters to any one of five data types for convenient data table storage and usage Your data string is from 1 to 62 characters Choose report generation mode when Your data is message oriented You want to include BCD numbers in your message Your data string is from 1 to 999 characters Select the mode of module operation from the following 04 03 02 Mode of Operation Data mode Report generation Invalid When the module detects an invalid setting of bits 02 04 or bits 05 07 it faults due to an initialization error The module disables its interface port and sets status bit SW1 12 Bit IW1 05 07 Function Mode of Transmission Description The modes of transmission that the module can handle are full or half duplex with or without echo and simplex read or write The codes for setting modes of transmission are Mode of Transmission Full duplex with echo default Full duplex without echo Simplex read Simplex write Half duplex with echo Half duplex without echo Invalid 64 Chapter 6
201. s with block transfer modules 3 Use this table to determine the nominal block transfer time using the numbers from steps 1 and 2 Channels with Block Transfer 1 Active 2 Active 3 Active 4 Active Modules Channel Channels Channels Channels 1 40 2 3 4 Block transfer times typically are similar regardless of the type of block transfer module or the number of words transferred Nominal read block transfer times typically are faster than nominal write block transfer times by approximately 10ms In this example consider them the same 4 Count the number of block transfer modules on the channel If a chassis containing block transfer modules is repeated in the rack list count chassis and modules as often as listed 5 Count the number of I O chassis entries in the rack list for the channel 6 Calculate the block transfer time for the scanner as follows Nominal BT modules 1 O chassis 4 a Scanner Time Nomi Me onthe m f rack list X 9ms PLC 3 Example Computation As an example we will compute the read or write block transfer time between the supervisory processor and an ASCII module in an I O channel with no other block transfer modules and in an I O channel with two other block transfer modules in the following system Appendix ASCII Module For PLC 3 Proessor User program contains 20K words Channel 1 contains four I O chassis with a total of three block transfer modules including
202. s word one you have an initialization error Repeat the procedure in section titled Setting Bits in Initialization Words exactly as shown setting W1 00 01 10 in binary or 2 in hex A setting of W1 00 01 11 in binary or 3 in hex will not work in this example Justifying Data The module justifies data before it transfers this data to the processor data table The module left justifies data by placing the first character in the upper byte of the first word address of the file The module right justifies Chapter 4 ASCII I O Module Tutorial data by placing the last character in the lower byte of the last word of the file You can tell the difference between the storage of left and right justified data by looking at the first and last words In left justified data spaces or fill characters if needed are added to the last file word In right justified data spaces or fill characters if needed are added to the first word If the number of characters transferred using an end of string delimiter is less than the string length that you set in IW2 00 13 the module completes the string by inserting fill characters or spaces The fill characters or spaces are stored ahead of the data lower numbered storage words for right justified data or following the data higher numbered storage words for left justified data Demonstrating End of String In this demonstration you will select an end of string delimiter and Delimiter demonstrate i
203. se ratio or input buffer to output buffer in IW3 00 02 3 Increase block transfer rate by transferring multiple strings in each transfer Set IW2 17 1 and modify your program 4 Decrease communication rate from ASCII device ASCII characters are transferred 1 Check programming plugs for correct but all LEDS are OFF placement See section titled Setting the Module s Programming Plugs P 2 11 2 Ifa multiple port ASCII device is being used check for use of correct port 3 Check 1772 TC Cable During installation and start up you will find the codes displayed in status word one SW1 very helpful You can observe them when you display the read block transfer file in your program s BLOCK XFER READ instruction Typical codes for correct operation Table 6 C buffer status Table 6 D and fault status Table 6 E are shown on the following pages Chapter 7 Troubleshooting Table 6 C Correct Operation Codes Hex Binary Description A011 0100000 10091 1 Input buffer empty Output buffer empty Read data available Channel active 8010 10000000 P eu Input buffer contains data Output buffer empty Channel active A010 Nus Input buffer contains data Output buffer empty Read data available Channel active E010 1100000 oy we Input buffer contains data Output buffer empty Read data available Write data acknowledge Channel active
204. setting as follows FILE DATA POSITION Hex Binary 004 2F43 000010111 01000011 2 Enter 1234567890123456789012 Chapter 4 ASCII I O Module Tutorial 4 16 Refer to procedures in section titled Reading Data From your ASCII Device P 1 10 Procedure P1 Set your industrial terminal to alphanumeric mode Procedure P2 Enter your data Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P4 Observe how data is stored in the data table Results The read block transfer file displays 15 data characters Table 3 1 Removed header and trailing characters are shown in Figure 3 4 Table 3 1 Display After Removing Characters POSITION FILE DATA ASCII Equivalent status word one status word two set string length 15 data characters Figure 3 4 Removed Header and Trailing Characters lt 15 character string 1234567880123456788012 3 header characters removed 4 trailing characters removed 11835 Chapter 4 ASCII I O Module Tutorial Demonstrating Data Conversion When in data mode select a data conversion type compatible with the characters transmitted by the ASCII device Your selection is limited to one of the following conversion types 2 ASCII characters per word 1 ASCII character per word ASCII standard code 3 BCD characters per word 4 BCD characters per word 0 thru 9 4 hex characters per word 0 thru 9 A thru F When operating in report generat
205. ssage file 1 and B WNO000 0002 4 seconds message file 2 2 EQU WTACC 0002 0 B WN000 0004 4 RUNG NUMBER RM22 Moves second message file EQU A B into write block transfer A WTACC 0002 0 MVF FILES FROMA TO R when the timer accumulated A 0000 0700 value is 3 seconds F0000 0202 COUNTER C0004 POS LEN 0 MODE ALL SCAN 000 0003 3 A 53 append A A CII Module PLC 2 Family Processors RUNG NUMBER RM23 T0002 X 0020 Unlatches write block transfer one shot timer after its routine is complete U 15 5 seconds 15 RUNG NUMBER RM24 T0003 This timer accumulated value is the message T0003 TON TE 15 variable TIMER ON T0003 17 1 0 SECOND TP 999 T0003 TA 820 me RUNG NUMBER RM25 MOV MOV MOVE FROMA TO R MOVE FROMA TO R A WTACC 0003 A WD000 0000 Converts message variable to correct format 843 844 and moves it to second message file R WD000 0000 Wp000 0713 844 0000100001000100 RUNG NUMBER RM26 EOD Addresses Used in Example Application Program The following addresses are used in NO TAG for files the message variable and timers Initialization data is also shown Message file 1 0000 0600 0615 Initialization Message file 2 0000 0700 0715 Words Message variable FO000 0713 Write block transfer file FO000 0200 0217 IW1 0007 Read block transfer file 0000 0252 0271 IW2 1028 Initialization file 0000 0570 0
206. t Send EOS delimiter to PC IW3 04 Set in data mode 7 1 Chapter 7 Troubleshooting Feature Word Bit Invalid Setting or Range End of string delimiter IW3 10 16 Same value as 4 10 16 when you use IW3 and 4 hex when you do not use 4 is default of IW4 10 16 when 4 is not used BCD delimiter IW4 10 16 No value entered when using all four initialization words 00 hex is an illegal BCD delimiter value How You Interpret Status There are three LED status indicators on the front of the module They Indicators are labeled FAULT BUFFER FULL CHANNEL ACTIVE The location of these LED indicators and how you interpret them is described in Figure 6 1 Figure 6 1 Status Indicators FAULT This red indicator illuminates when the module ASCII detects an internal hardware fault It is normally off BUFFER FULL This yellow indicator illuminates when the input buffer is O full It must be reset by program logic using CW1 03 FAULT CHANNEL ACTIVE This green indicator illuminates when an ASCII device is turned on and is properly connected to the INTERFACE port The module examines only the received data line for channel active O indication This indicator does not monitor communication between the BUFFER processor and the ASCII module FULL NOTE In RS 232 C and current loop modules disregard the CHANNEL CHANNEL ACTIVE indicator when in simplex mode
207. t to channel B of the industrial terminal You will use the industrial terminal cable cat no 1775 CAT when using the industrial terminal in PLC 3 mode and entering or displaying data in the PLC 3 data table You will use the IT DH adapter cable cat no 1770 CB when using the industrial terminal in alphanumeric mode as an ASCII device connected to your ASCII module Besure to observe the labels on the cable connectors and connect each to its designated port Also if the IT DH adapter cable is too short or not available make your own It should not exceed 50 feet Figure 1 7 Figure 1 7 Minimum Connections in the 1770 CB Cable Protective Ground Connectors 1 1 25 pin D Shell Male Connector 2 Transmitted Data 9 Cable Kit 1770 XXP each 3 Received Data 3 end 7 Ground Cable Belden 8723 or equivalent 18 18 In cable but not o5 25 required for ASCII module ASCII Module Industrial Terminal Interface Port Channel B 11819 2 22 Chapter 2 Getting Started with Your ASCII Module Refer to your PLC 3 Programmable Controller Installation and Operation Manual publication 1775 800 for additional installation information such as switch settings for the adapter module and I O chassis and for grounding information Checking ASCII Module Configuration Your module is configured for RS 232 C operation when shipped from the fact
208. t to the I O chassis ground lug Ground the shield at this end only NOTE AB thru CD refer to RS 232 C circuit labels 11822 3 5 Chapter 3 Choosing Module Features Figure 2 2 RS 232 C Connections 50 ft max Data Set to Data Set Refer to specifications in Appendix D Device ASCII Module Data Set DCE DCE Drain Wire Shield Dos Ground Received Data BB Receive s Receive Belden Signal Ground AB ees 8723 UP J Equiv Transmit XX Transmit E Transmitted Data BA Belden 8778 z or 4 Request to Send CA 4 Equiv Clear to Send CB Control Data Set Ready CC Lines a ui a Received Line Signal Detector 1 du xS Data Terminal Ready dis s 1 Tied 12Vdc 2 Solder an external ground wire 14 ga to the drain wire at the cable connector Connect it to the I O chassis ground lug Ground the shield at this end only NOTE AB thru CD refer to RS 232 C circuit labels diis 3 6 Chapter 3 Choosing Module Features When configured for current loop and you use terminals 13 and 11 for transmit your ASCII module powers its own transmit loop Figure 2 3 and Figure 2 4 Your module can accept an active receive current loop powered by the ASCII device In this case module operation is passive transmit and you use module terminals 11 and 18 Figure 2 5 Figure 2 3 Current Loop Connections 500 ft Max Device is Ac
209. ta Enter DD O3 0 SHIFT A ENTER PLC 3 command We have included numerous examples of CRT displays resulting from data or commands that you enter All CRT displays are shown with a shaded background Enter all commands on the industrial terminal keyboard The only exception is for some PLC 3 entries where we tell you to use the PLC 3 front panel Read chapters 1 and 2 before proceeding to other chapters of this manual that pertain to your needs For example you may want to use only selected module features chapter 3 and read only selected bit descriptions chapter 5 We have developed forms to assist you in selecting module features and in troubleshooting Make a copy of each of the following and refer to them as needed Initialization Words for Data Mode Form 5175 chapter 2 nitialization Words for Report Generation Mode Form 5176 chapter 2 Command and Status Words Figure 5 2 5 4 chapter 5 Fault Status Table 6 E chapter 6 Typical Applications Preface To Our Customers You will use several procedures frequently in the tutorial chapters of this manual You may want to memorize the steps or have a reference copy of the following procedures Reading Data From Your ASCII Device Writing Data To Your ASCII Device Setting Bits in Initialization Words You can use an ASCII I O module to input data to the processor from a data source such as a bar code reader output messages from the processor to a displa
210. te 5 6 7 20 and 11 to complete the string String Length Greater Than Module s String Length When the module receives a string of data greater than the set string length it does the following Immediately transfers the number of characters equal to its set string length to the processor Sets bit 14 in status word one Input String gt Maximum SW1 14 The bit is immediately reset when the processor confirms receipt of data Retains the balance of data in its input buffer Transfers the balance of data with new data when it receives enough new data to complete the string or when the new data contains an end of string delimiter 4 38 Chapter 4 ASCII I O Module Tutorial In this demonstration you will enter a string of data greater than the set string length and observe how it is stored in the data table Retain the same initialization data 15 character string length end of string delimiter and left justified data 1 Enter 01234567890123456789 ENTER Refer to the procedures in section titled Reading Data From Your ASCII Device P 1 10 Procedure P1 Connect the 1770 CB cable and set your industrial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode 3 ENTER 2 ENTER Procedure P2 Enter your data Procedure P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode Procedure P4 Observe how the data string is stored
211. the file you created Read and write error bits illuminate at the same time when the error source is the module address entry or the file length entry in the instruction block You have a communication problem You did not correctly connect the twinaxial cable to the scanner You did not connect a terminator resistor to each end of the twinaxial cable When the scanner encounters a communication fault it tries twice to complete the transfer It sets the error bit after the second unsuccessful try A 39 append A A CII Module PLC 2 Family Processors When the scanner encounters a communication fault it tries twice to complete the transfer It sets the error bit after the second unsuccessful try When the scanner and or processor detects a block transfer error the transfer is halted Transfers from the module are prevented until Your program clears the instruction s control word clears the error Figure A 17 You locate and correct the error Figure A 17 Resetting the Control Word after a Block Transfer Error CTRL WORD MOV jt MOV FROMA TO R 03 A STORAGE WORD 2 0000000000000000 R CTRLWORD 0000000000000000 Detecting Faults Block transfer error detection and resulting processor shutdown are safety features of Allen Bradley programmable controllers We recommend that you adapt such safety features to your application However you may want your program to reset block t
212. the module as part of the string length In report generation mode enter a 3 digit BCD number for the number of characters generated by your longest message line Normally the end of string delimiter is not counted as a character in the string data mode or report generation mode Count the end of string delimiter as a character in your string only if you send the end of string delimiter to the processor by setting IW3 04 Chapter 6 Function of Control Status Bits The default string length of the module is 10 characters in data mode 124 characters in report generation mode The maximum string length that the module can accept is 62 characters in data mode and 999 characters in report generation mode When the module detects that you set the string length greater than 62 characters in data mode it faults due to an initialization error The module disables its interface port and sets bit SW1 12 Bits W2 14 16 Function Type of Data Conversion Description When operating in data mode select any one of five types of data conversion to match your ASCII device or to match your requirements for manipulating data Ew moe 2 ASCII characters word 3 BCD characters word 4 BCD characters word 1 ASCII character word 4 HEX characters word Invalid The type of data conversion refers to the manner in which data is converted by the module and stored in the processor data table You can change from one type of data c
213. the number of I O channels with block transfer modules 3 Use this table to determine the nominal block transfer time using the numbers from steps and 2 Channels with Block Transfer 1 Active 2 Active 3 Active 4 Active Modules Channel Channels Channels Channels Block transfer times typically are similar regardless of the type of block transfer module or the number of words transferred Nominal read block transfer times typically are faster than nominal write block transfer times by approximately 10ms In this example consider them the same 4 Count the number of block transfer modules on the channel If a chassis containing block transfer modules is repeated in the rack list count chassis and modules as often as listed 5 Count the number of I O chassis entries in the rack list for the channel 6 Calculate the block transfer time for the scanner as follows Nominal BT modules 1 O chassis 4 scannar Time ls onthe f rack list X 9ms PLC 3 Example Computation As an example we will compute the read or write block transfer time between the supervisory processor and an ASCII module in an I O channel with no other block transfer modules and in an I O channel with two other block transfer modules in the following system A 33 append A A CII Module PLC 2 Family Processors A 34 User program contains 20K words Channel 1 contains four I O chassis with a total of three block transfer modules i
214. tion 3 22 H handshaking acknowledgment 5 2 fundamentals 5 1 read operation 5 2 reading status and or 5 3 words 5 2 write operation 5 1 writing data 5 4 initialization rungs 4 2 initialization word four IW4 6 11 initialization word one IW1 6 3 initialization word three IW3 6 8 initialization word two IW2 6 6 initialization words expanding number of 4 5 notation 3 1 setting bits in 4 4 installation of module 2 9 J justifying data 4 7 M margin justification demonstration 4 7 4 8 message formatting message variable inserting 4 22 multiple line 4 24 single line 4 21 mode of module operation 3 13 demonstration 4 19 module and cable test 7 7 N need help 2 12 P P2 Enter your data 2 11 P3 Set your industrial terminal to PLC 2 mode 2 12 P4 See how data is stored in the data table 2 12 P5 Load data into an instruction file 2 1 parity 3 28 programming plugs 3 10 programs example application plugs 22 read only 15 read write A 19 write only 18 R reading data from your ASCII device 2 10 RS 232 C 3 1 5 serial data 3 28 Set bits in initialization words _4 4 simlex write special case 3 10 slide bar 2 6 special consideration A 39 B 1 specification of module _D 1 status codes buffer status 7 6 correct operation 7 5 fault status 7 6 status indicators 7 2 status word one SW1 6 13 status word
215. tity PARTS as follows 1 Inthis demonstration you will increase the string length to 21 characters the length of your message Otherwise use the same initialization data as before Four initialization words using IW1 00 01 Report generation mode using IW1 02 04 String length of 21 characters using IW2 00 13 4 BCD digits per word data conversion using IW2 14 16 Slash symbol as BCD delimiter using IW4 10 16 Set the bits in all four initialization words using the procedure in section titled Setting Bits in Initialization Words P 3 30 Display The initialization word file is displayed in hex as follows Chapter 4 ASCII I O Module Tutorial RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0007 2021 0000 2 00 2 Enter PRODUCED 0000 PARTS ENTER Refer to the procedures in section titled Reading Data From Your ASCII Device P 1 28 Procedure P1 Connect the 1770 CB cable and set your industrial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode 3 ENTER 2 ENTER Procedure P2 Enter your data Procedure P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode Procedure P4 Observe how the data string is stored in data table file O6 0 Display Your 21 character message is stored in file O6 0 You can display it in ASCII or in hex as follows RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7
216. tive Transmit Passive Receive Refer to specifications in Appendix D Device ASCII Module Drain Wire Shield ee Ground Transmitted Data es 3 M27 9 Belden Transmit with Passive 8723 Current MR Return i Receive or 24 quiv Received Data Passive Receive Transmit with Return Current Source OE 1 Solder an external ground wire 14 ga to the drain wire at the cable connector Connect it to the I O chassis ground lug Ground the shield at this end only is 3 7 Chapter 3 Choosing Module Features Figure 2 4 Current Loop Connections 500 ft max Device is Passive Transmit Passive Receive Refer to specifications in Appendix D Device ASCII Module Drain Wire Shield ok Ground Transmitted Data 2 12 Belden Passive Transmit 4 20mA mark state Passive 8723 Receive or Power Return Supply I ANNI a Equiv Received Data Passive Receive Transmit with Current Source Return OUO 1 Solder an external ground wire 14 ga to the drain wire at the cable connector Connect it to the I O chassis ground lug Ground the shield at this end only 11824 Figure 2 5 Current Loop Connections 500 ft max Device is Active Transmit Active Receive Refer to specifications in Appendix D Device ASCII Module Drain Wire Shield Chasis roun Transmitted Data E 12 Beld
217. to storage file when data COUNTER C0001 DN is setto PC 15 POS LEN 0 62 0001 MODE ALL SCAN IERI A 43 append A A CII Module PLC 2 Family Processors RUNG NUMBER RM12 Read status word 1 amp 2 CNTL Vt and data BLOCKXFERREAD H EN 15 RACK 001 12 WB004 0000 GROUP 1 CNTL m e MODULE 1 HIGH DN 05 DATA F0003 0000 15 LENGTH 0 CNTL CNTL 004 0000 13 WB004 0000 CNTL BTW E 1 BLOCK XFER WRITE EN s ization data and message 17 RACK 001 02 f GROUP 1 CNTL MODULE 1 HIGH DN DATA 0002 0000 05 LENGTH 0 CNTL CNTL 004 0000 03 RUNG NUMBER RM13 Initialization Turns off rung 1 except for 0005 0000 1st scan at power up 00 RUNG NUMBER RM14 EOP A 44 Example Write Only Program Appendix A ASCII Module PLC 2 Family Processors A write only program for transferring data from your processor s data table to your ASCII device is presented with rung descriptions in Figure 19 Figure A 19 Example Write Only Program RUNG NUMBER RMO MOV om Load Zeros into command word 1 with MOVE FROMA 00 selector switch or on first scan A WO0001 0000 0005 0000 0000000000000000 7 WO0002 0000 00 0000000000000000 RUNG NUMBER RM1 WO003 0000 TIR 0002 0000 Power up reset power up initialization bit Jit C
218. tring delimiter is a carriage return BCD delimiter is a colon IW4 3A00 Display The initialization word file is displayed in hex as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 0000 0000 0007 2032 0000 00 00000 2 Writing over the previous data load the message into 06 0 hex display as shown above Load diagnostic codes into display words 6 and 7 14 and 15 22 and 23 Refer to procedures P3 and P5 from section titled Writing Data To Your ASCII Device chapter 1 Procedure P3 Connect the 1775 CAT cable and set the industrial terminal to PLC 3 mode Procedure P5 Load data into the file O6 0 3 Transfer your message for display on the industrial terminal Refer to the procedures in section titled Writing Data to Your ASCII Device chapter 1 Procedure P1 Connect the 1770 CB cable and set the industrial terminal to alphanumeric mode check parameters Procedure P6 Enable the MVF instruction With the PLC 3 in run monitor enter 1001 04 and enable that bit then 1001 02 and enable that bit in that order Results The industrial terminal displays the column of diagnostic codes at the left of the screen 123245678 ABCD4321 FACEBAC2 4 51 Chapter 4 ASCII I O Module Tutorial Demonstrating Data Conversion When in data mode select a data conversion type compatible with the characters transmitted by your ASCII device Your selection is limited to
219. tring length and observe its storage in the data table The set string length IW2 00 13 is 15 characters 1 Enter 12345678901234567890 Do not enter RETURN Refer to procedures in section titled Reading Data from Your ASCII Device P 1 10 Procedure P1 Set your industrial terminal to alphanumeric mode Procedure P2 Enter your data Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P4 Observe how data is stored in the data table Results The read block transfer file displays the number of characters equal to the string length 15 in positions 003 thru 010 Table 3 F 4 11 Chapter 4 ASCII I O Module Tutorial Table 3 F Transfer of Full String POSITION FILE DATA ASCII Equivalent status word one status word two Notice how the 15 characters of the string are stored right justified and that the module added one fill character Characters 6 7 8 9 and 0 remain in the module s input buffer They will be erased in step 2 because the procedure clears the input buffer 2 Enter 12345678901234567890ABCDEFG RETURN Refer to procedures in section title Reading Data from Your ASCII Device if necessary Procedure P1 Set your industrial terminal to alphanumeric mode Procedure P2 Enter your data Procedure P3 Set your industrial terminal to PLC 2 mode Procedure P4 Observe how data is stored in the data table Results Two transfers took place in step 2 Figure 3 2 The second transfe
220. ts use You will select the carriage return CR as the end of string delimiter and set IW3 10 16 accordingly The carriage return is the ENTER key on the industrial terminal keyboard The ASCII carriage return is OD in hex 0001101 in binary 1 SetIW3 10 16 for the end of string delimiter CR using the procedure in section titled Setting Bits in Initialization Words P 3 4 Display The initialization word file is displayed in hex and binary respectively as follows RADIX H START WO007 0000 WORD 0 1 2 3 4 5 00000 0000 0000 0002 0015 0000 0000 START WO007 0000 WORD 2 3 4 00000 000000000000000 0000000000010101 0000110100000000 NOTE Binary words 0 1 5 were omitted for brevity 4 35 Chapter 4 ASCII I O Module Tutorial String Length Less Than Module s String Length Right Justified Whenever the ASCII module receives an end of string delimiter from the ASCII device it transfers the data in its input buffer to the processor You will enter a data string less than the set string length as determined by IW2 00 13 You will also observe how the data is stored in the data table file 1 Enter 12345 ENTER Procedure P1 Connect the 1770 CB cable and set your industrial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode S ENTER 2 ENTER Procedure P2 Enter your data Procedure P3 Connect the 1775 CAT cable and set your industrial
221. tting a Multi Line Message When entering data from an ASCII data terminal you can use the rubout or delete key Pressing this key deletes the previous character from the ASCII module s input buffer You can delete one or more characters up to the entire string bounded by the previous end of string delimiter NOTE correct operation of your module depends on proper handshake programming for read and write block transfer instructions Be sure to read the description of handshaking in chapter 4 block transfer programming in appendix A and study the handshake programming examples 4 55 Chapter Objectives Understanding Handshaking Fundamentals Handshaking In this chapter you will read about the use of handshaking to control the transfer of data from the ASCII module to the PC processor and vice versa The term handshaking refers to a set of software bits that coordinate the transfer of data between two devices Handshaking ensures that new data is neither duplicated nor lost Your ladder program must contain read and write handshake logic This logic is separate from block transfer routines that use enable and done bits of block transfer instructions Handshaking requires the successful completion of both a read and write block transfer to read new data from the module or write new data to the module The handshake logic uses control and status bits of the ASCII module New data is transferred only after correct handshaking
222. ule to toggle bit 15 in the Module status word one SW1 15 when the module transfers a change in module status and or new data to the processor When it transfers new data to the processor the module also sets in status word two SW2 the number of data words per string that it 1s transferring After the processor receives and processes new status and or data your program must toggle bit 15 in command word one CW1 15 and return the toggled status to the module to acknowledge receipt Figure 4 1 and Table 5 A Figure 4 1 Read Handshaking The ASCII Module Data Transfer The Ladder Program Toggles SW1 15 when it receives new data from the ASCII device and or detects a change in module status Sets the number of transferred words per string in SW2 when new data is transferred SW1 15 BTR 07 17 and SW2 gt 0 for new data SW1 15 for change in status Detects that SW1 15 has been toggled Acts on the change in module status according to program logic When it also detects SW2 gt 0 and BTR 07 17 it acts on new data according to program logic Toggles CW1 15 and returns its new status to acknowledge receipt CW1 15 SW1 15 Repeats the cycle when it detects a change in CW1 15 and when new data is received from the ASCII device and or when module detects a change in its status NOTE A read block transfer of data can occur every scan Your program should process new data only when it detects that SW1 15 has been t
223. until enabled by a timer and or some application dependent condition A 37 append A A CII Module PLC 2 Family Processors A 38 Program the read and write block transfer instructions of your ASCII module in the same rung Figure A 16 Distribute your block transfer modules equally between all four scanner channels Distribute block transfer instructions equally throughout your program Place an equal number of non block transfer rungs between block transfer rungs For large numbers of block transfer instructions distribute groups of block transfer rungs equally throughout your program Place no more than four block transfer rungs consecutively in one group Within each group condition the next rung using the done bit of the previous block transfer instruction Consider an additional I O scanner module cat no 1775 54 if you cannot otherwise reduce the block transfer times to meet your timing requirements During a write handshake the processor also can transfer write data to the ASCII module and during a read handshake the processor also can transfer read data Figure A 16 Example Block Transfer Programming 001 BTR CNTL 1 BLOCK XFER READ X EN 15 RACK 001 12 WB001 0000 GROUP 1 CNTL MI MODULE 1 HIGH DN 05 DATA F1001 0005 15 LENGTH 0 CNTL CNTL FB001 0000 ER 13 ex oe BTW CNTL p uk BLOCK XFER WRITE d EN 17 RACK 001 02 GROUP 1 CN
224. ustrial terminal to alphanumeric mode check parameters Initialize the module by changing PLC 3 operation mode 2 Procedure P2 Enter your data Procedure P3 Connect the 1775 CAT cable and set your industrial terminal to PLC 3 mode Procedure P4 Observe how the data string is stored data table file 06 0 4 33 Chapter 4 ASCII I O Module Tutorial Results The example 15 character data string is displayed in ASCII or hex respectively as follows RADIX START WO006 0000 WORD 0 1 2 3 4 5 6 7 00000 10H 00H00H A LL EN B RA DL 00010 E Y 1 QOHOOH 00H00H 00 00 RADIX H START WO006 0000 00000 2010 0000 2041 4C4C 454E 2042 5241 4446 4559 2031 0000 0000 0000 0000 0000 0000 The number of characters transferred was 15 the value you set in TW2 00 13 Bes 0 1 2 3 4 5 6 7 The module added a fill character blank in ASCII or 20 in hex in the first data word display word 2 ahead of the data string due to right justification of data Block Transfer Error If characters were not displayed when you entered them examine the BTR and BTW instructions for an error You clear an error by resetting control word FB004 0000 bits 03 and 13 Press DD B4 0 O ENTER CANCEL COMMAND Initialization Error If characters were not displayed when you entered them but the display of transferred data contained only the code X4XX in statu
225. utines that use enable and done bits of block transfer instructions Handshake logic uses control and status bits of the ASCII module Execution Time The time required to complete a read or write block transfer depends on factors that include the number of words of user program active I O channels on the scanner I O chassis entries in the rack list for the channel I O channels on the scanner that contain block transfer modules block transfer modules on the channel if the I O chassis containing a block transfer module appears more than once in the I O chassis rack list count the module once each time the chassis appears in the rack list Typical time required to complete a read or write block transfer depends on the program scan and the scanner scan as follows Time read or write Program scan 2 Scanner scan Program Scan The program scan is approximately 2 5ms per 1K words of user program when using a mix of examine on off and block instructions Scanner Scan The time required for the scanner to complete a read or write block transfer depends on the number of other block transfer modules on the same scanner channel that are enabled simultaneously Use the following procedure to calculate the time required for the PLC 3 processor to perform all block transfers on the channel Appendix ASCII Module PLC 2 Family Processors 1 Determine the number of active I O channels on the scanner 2 Determine
226. vides a 20mA current source for the transmit line only Current Loop Figure 2 3 The module powers its own transmit line DTE and requires a 20mA external current source for its transmit line Current Loop Figure 2 4 You add the power supply for the DTE DTE and provides 20mA current sources for Current Loop Figure 2 5 transmit and receive lines The module operates in passive transmit 5000 feet industrial terminal or contains a line driver Long Line Figure 2 6 receiver for A B long line operation 3 4 Chapter 3 Choosing Module Features The functions of the cable conductors Figure 2 1 thru Figure 2 7 are referenced to your ASCII device not to your ASCH module Figure 2 1 RS 232 C Connections 50 ft max Data Terminal to Data Set Refer to specifications in Appendix D Device ASCII Module Data Terminal Data Set DCE Equipment DTE Drain Wire Shield Ge Ground 2 Transmitted Data BA 2 T it Receive Belden ee Signal Ground AB 8723 D or Receive Transmit Equiv Received Data BB lt x 3 Belden 8778 or Equiv T Request to Send CA Y Y Clear to Send CB Control Data Set Ready CC Lines Received Line Signal Detector 1 Data Terminal Ready 31542555 Y Y e 1 Tied to 12Vdc 2 Solder an external ground wire 14 ga to the drain wire at the cable connector Connect i
227. word 1 Command word 1 eee lt 02 15 199 15 47 append A A CII Module PLC 2 Family Processors RUNG NUMBER RM4 WO005 0000 dry Status word 1 Command word 1 d a 15 read handshake 15 10001 RUNG NUMBER RM5 0005 0000 U 02 03 RUNG NUMBER RM6 an a One shot to enable write block WO005 0000 02 1 03 transfer of new data of module 04 W0005 0000 RUNG NUMBER RM7 WO005 0000 L 04 03 WO005 0000 0003 0000 RUNG NUMBER RM8 0002 0000 E 3 L 04 16 Command word 1 Status word 1 write handshake WO005 0000 0003 0000 RUNG NUMBER RM9 wo002 0000 E 1 U 04 16 16 RUNG NUMBER RM10 004 000 Read status word 182 BTR and data BLOCK XFER READ 15 RACK 001 004 0000 GROUP 1 MODULE 1 HIGH 05 DATA 0003 0000 LENGTH 0 CNTL FB004 0000 Write command words 1 amp 2 initialization data and message data WB004 0000 BTW BLOCK XFER WRITE RACK 001 GROUP 1 MODULE 1 HIGH DATA 0002 0000 LENGTH 0 004 0000 RUNG NUMBER 11 Initialization Turns off rung 1 except for 0005 0000 1st scan at power up 00 0003 0000 BUN MPE AMIZ WO005 0000 Energize at power up to load initialization words Also energized on L 07 on 1st scan after processor selection of run monitor mode 01 48 Appendix ASCII Module PLC 2 Family Processors R
228. y device or bidirectionally exchange messages and or data between an intelligent data terminal and the processor Typical examples are as follows Type of Device Applications Bar code readers Input Part recognition sorting inventory control Keypads Input Enter values change data Dot matrix scrolling Output Display warnings or diagnostic messages displays terminals or print production reports printers Intelligent data Input Output Enter values change data monitor or terminals troubleshoot a process Computers Input Output Exchange data files Getting Started With Your ASCII Module ASCII is the acronym for American Standard Code for Information Interchange The standard includes a 7 bit code for 128 data and control characters With your ASCII I O module you can transfer data by means of the I O scan from an ASCII device to the PC processor data table and vice versa The module has two modes of operation data mode and report generation mode In data mode you can transfer ASCII BCD or hex characters Generally use this mode to transfer data to the processor data table In report generation mode you can include BCD values in the string of ASCII characters Generally use this mode when you want to transfer messages You can use your ASCII module with any Allen Bradley programmable controller that has an expandable data table block transfer capability and uses the 1771 I O structure If you use a PLC 2 20 co

Download Pdf Manuals

image

Related Search

Related Contents

Consulter le livret - Ateliers de découverte urbaine  障害のある方への マナーブック  Kenwood KAC-929 Car Stereo System User Manual  Instrucciones de instalación y mantenimiento  Eglo FORNES  Project presentation  

Copyright © All rights reserved.
Failed to retrieve file