Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 16 of 23

Bulletin 1771 Communication Controller Module (Cat. Nos. 1771-KE, -KF) User's Manual, pages 151 to 160

Pages 151 to 160 of 228

The original document is the PDF (9.6 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1771-KE

Page 151 read from a scan by OCR; it may hold reading errors

Page 6-11

Data Manipulation

Table 6.A Binary Codes for PLC-4 Logical Addresses

° x GCIrEITIITL x LITT i) TLELEGTITIIITITIrTIrT@rIrcrIrrrrrrcrriririririririrriic bal xm adadkaadaa “ aoaa jem Ao0annananoanananaantnaanaannaanadcannaanaanaad nN x agdadada “ aada a Oanmnonaonanaanonaaadnaanaanaaadkanaanhnoaoadanad o x andnadaada «x agaada a OMamgmanaoannaoanonaananaaoaannaAoananaoanonoooanadnad wt oOo rororor o rord a Ororororororocororororororor Oororororor w Oo Orreooeorr Cc OoOrreo oO rrOorrocorrocoorrocoorroorroorr oOorroeoorrTraGag © oO o00rrTrsr o ocoeor - rroocoococorrr rOoCcoeOrrrroooorrrr aco CoCrrrr foo o 90000000 ee 7 -“rO0O0C0C0C0O0OOrrer er errr rT oOoOoCcoCo9V 00 rrrrrerr TOO = a co o coo00c°oo°c o coor Oo OO0Orrrer rrrrrrrrrrrrewocoooccaco0co cooococo°0orrTr oO oO oo000000 o co°o°o =) oeo00ococooo0oo0occecoooo0 coc 0OrrrrrrTrTr rrr Te TT S oOo oo0000c0c o o000 o ako RoRololosolonokokolonohoo hoses soko osoroho mono menen sok okakogokoaka) = oO ooo0o0090 Oo o00c0°0 oO atoleiolelalolololeololeLeLolokolelela Lele leLolemenemelesesekalokekekoga 2 n 3 r oOo eooo0o0°oco0oo oOo o000 =) eoleoleeteolelolore hoe Lolokelekes eleolelosleoleolololomeneom ones oesokeogokokoko go) oO i oO o7oocooco°oco0o Oo o000 o eleleolalelelolealeleleleololokoleloloeoseleloLeLeolomeremeLenelelolokekosok=) Pal a = go oo0o0000 o 90000 o oetealeloleleaLeleloleoletonolelolosoleoleLeleonemeonemesetocelosesogekeg=) = ld Oo o0o0c00o0c0o°o Oo o00°o o jeeteoRololololelosolehe Bere oleleLesoleloleo sole merem ose ekokoesa=sokokoka: .]

TON YF OMAR OMYAMNAT DORON ONUTYANT ODM OADKRHONUTANT OD oe FT Oeoyer pata) av | PEP OOOH OOMOOOHOOT TTS S STE T FP PPP PPP PEEPS zo oO rrrrrrn oO rrrT ine) wrrerr rrr rr rrr rrr rere Te eee ee er Or eee ee eee

TAOS oO oO o oO oO Oo oO oO oO o 2 rAMNTMOR ae SE a F OP BO SO Se SOS ese Segoe se geese oo Segre gesgese a ee RE RSE wopul g | t%adeqnqi goede qnoeqogcadadoda dao dqadocaocada © o9o00090 0 tir 4 6&6 +¥F Bb © K B&B ®B FF fF Fe fF fF Fe TF TF = ~ Z2eezee2e nouwuwn wn wo » bo = he i, - a i =, _ ro, _ = _, os ¥ * Donon fos] oo] ~, - a] al - po), Pa) ~~ - oa) -_ Par), rar) ~ ag |v e®eeeoeve | on soeaoae}| ol}]OOOOO O90 9 9 O90 9 82,09 G9 9 G9 9 9 v2 | 8 soooo0o| & SSSSF/ ETS & = EEE SE EE EE EE Pes EF EE EE E 1 3 2 SSeS gs BO 7 o 0 808 © © © 09 8 8 8 DB 3H o oo &© & & Ogiz2sssssss|eoooo/o/F& £ € £E EE EE £€ FE FE FE EE FE EFEEEEE a3 | > ©®HHHGGGH | 3 SSS5]/ 5 7F © F FF FFF FF FF -F FFF FF

(continued)

Page 152 read from a scan by OCR; it may hold reading errors

Page 6-12

Data Manipulation

Table 6.A Binary Codes for PLC-4 Logical Addresses (Cont.)

Binary Code

PLC-4 Data Table

Location words Bit , 151413 12 1110 9

= 1), - a oo “i a ia] > wo to = o

Timer/Ctr 19: Timer/Ctr 20: Timer/Ctr 21: Timer/Ctr 22: Timer/Ctr 23: Timer/Ctr 24: Timer/Ctr 25: Timer/Ctr 26: Timer/Ctr 27: Timer/Ctr 28: Timer/Ctr 29: Timer/Ctr 30: Timeér/Ctr 31:

Timer/Ctr 32:

Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre Acc Pre

1

Sa ee re ree ans Cee Cire Ce ans i Se Cs CO SO

[ee re ee Ds NWOAROAOAN WOAH SFPHrAUHK AAU NNNDYNMNY DPD CH NMNWAOAANWOODOANWAUDND

U oholoRoRoRoLoRokolohoRoloLoloKoeRoloLokoloieloRolehohet=| elelekehoRolafololoLololeloholcehololeolelololelololoRelo) SoleloRehokelololololoLelolcloleRololololohalololelono ee ohne Relolololelololola!| ooo ka Lola kela Li ia aaa ant aLolalalole) HAMA ODDOH2A24N DDD OAA AAG OO OAH AAD COpA40 0243002200440 02420024004 H=O+20j=04+0+0- 04042004045 045040-40 VUVVUVVVUVVUVUVVVUVVVUVVVVVUUVUVUU VUVVVVUVVUVVVUVUVVVVVVVUVUUVUVUND VUVVVUVVUVVUUVUVVDVUVVVVUVVUVDVUV VV TITITIITILTIILTILTIITILTIITITiTrmriiririiziz

O00 0 0C CC TCTCOCOO OC COB sen ae aon nnn nnn ini i oo0ccocoococooo0ocedc~ - occcoccccecceccCC090 oocoocoeoocooocoo oO BB HH HHH ooooococoo°ocoeodoccocoeocoo00oocco0cccca

Legend:

“words These are the number of words which can be read or written to a given location.

ref'd”

*

These codes are unused because of “holes” in the address space of PLC-2 family products (0 to 7 and 100 to 107 octal). Reads or writes to these codes will be rejected in error, as

H Selects high byte when 1, low byte when zero.

These addresses are illegal for Bit Write commands. XXX “DON’T CARE” bits.

PPP This is a bit pattern that selects the desired controlier in the PLC-4 Microtrol loop; “000” selects controller #1, “001” selects controller #2, etc.

6.2.2 Physical addressing is the type of addressing a computer would

Physical Addressing use to send a privileged command to a PC station. In particular, you would use physical addressing to upload or download PC memory. The recommended procedure for doing this is to use a series of physical read or write commands that begin at physical address 0000 and proceed sequentially to the end of PC memory.

Page 153 read from a scan by OCR; it may hold reading errors

Page 6-13 Data Manipulation

6.2.2.1 PLC

6.2.2.2 PLC-2

Because of the differences in PC memory organization, the physical addressing scheme varies somewhat with controller type.

PLC controllers use physical addresses that are exactly the same values as the corresponding logical addresses. Remember that the logical address is a byte address, so the physical address will also be a byte address. For example, the logical byte address of the 17th word in PLC memory is 32 decimal, and the physical address of that word is also 32 decimal.

To send a physical read or write command to a PLC station, put the PLC physical address in the ADDR field of the command message format (chapter 5). Be sure to encode the low byte of the physical address as the first byte in the ADDR field.

PLC-2 controllers use physical addresses that are directly related to the logical addresses. To convert a given logical address to its corresponding physical address, move bit 7 of the logical address to bit position 1 and shift bits 1 through 6 to the left one position. Figure 6.8 illustrates the conversion process for logical word address 121. Remember that the logical PLC-2 address is a byte address, so the physical address will also be a byte address.

Bit Number (Octal)

Logical Byte Address

Physical Byte Address

PLC-2 Word Address=121 Octal Logical Byte Address=242 Octal Physical Byte Address= 0046 Hex

High Byte Low Byte aN Ys a NZ \

17 16 15 14 13 12 1110 7 6 & 4 3 2 1 =O

0 ofofofofofvoy;,o;1}, OF Poyoyoyryo

11397

Figure 6.8, Converting PLC-2 Logical to Physical Address

Page 154 read from a scan by OCR; it may hold reading errors

Page 6-14 Data Manipulation

6.2.2.3 PLC-3

6.2.2.4 PLC-4 Microtrol

To send a physical read or write command to a PLC-2 station, put the PLC-2 physical address in the ADDR field of the command message format (chapter 5). Be sure to encode the low byte of the physical address as the first byte in the ADDR field.

PLC-3 controllers use physical addresses that are related to logical addresses by means of pointers. Since no two PLC-3 systems are configured identically, the pointers are not fixed. Therefore, there is no algorithm for converting logical to physical PLC-3 addresses.

The PLC-3 physical address is a word address. It goes in the 4- byte field labeled “PLC-3 physical addr” in the PLC-3 physical read or write command message format (chapter 5). The format for this physical address field is:

PLC-3 Physical Address

First byte A24|A23)A22|A21{A20)A191A18]A17 Second byte | 0 0 0 6) 0 0 0 0 Third byte A8 | A7 | A6 | AS | A4 | AB] A2 | At Fourth byte }A16/A15/A14/A13/A12/A11]A10] AQ

In this format, Al through A24 represent the 1 to 24 bits of the physical address value. For example, to address a command message to physical word address 12,200 decimal (002FA8 hex), you would use the following binary code in the address field:

First byte 0}O;O/0/O|/0];O;0] (value 00 hex) Second byte |0/0/0/0/0|/0}0/0] (always 00 hex) Third byte 1]0}1]/011/O0;0;0] (value A8 hex)) Fourth byte |0/0]1/0}1/1/1]}1] (vatue 2F hex)

The recommended procedure for uploading or downloading PLC-3 memory is to begin at physical address 0000 and proceed sequentially to the end of memory. Since a single physical read or write command can transfer only about 120 words of data, it will take many such commands to upload or download the entire PLC-3 memory. Therefore, each successive physical read or write should begin at the next physical address after the one where the previous command stopped.

PLC-4 Microtrol controllers use physical addresses that begin at 00 for the first word of memory and continue to 5FF hex for the last word of memory. Figure 6.9 is a map of PLC-4 physical memory.

Page 155 read from a scan by OCR; it may hold reading errors

Page 6-15 Data Manipulation

6.2.3 Symbolic Addressing

Physical Btye

Addres (HEX) 0 Read Only 13 Read/Write 29 2A Force Table 34 32 1/O and Flags Bit Store Bits 7F Times/Counters EF 100 Program Area Sequencer Table 5FEF

11703

Figure 6.9, PLC-4 Physical Memory

Specifying a physical address in PLC-4 privileged commands requires 3 bytes. The first byte is the identification number for a particular controller in the loop, and it is labeled “PLC-4 sel” in the command message formats (chapter 5). The next two bytes contain the physical address of a word in the selected controller’s memory, and they are labeled ADDR in the command message formats (chapter 5). When encoding the physical address, be sure to put the low byte of the address value in the first byte of the ADDR field.

Symbolic addressing uses ASCII symbols to represent a logical address. Only PLC-3 controllers can accept symbolic addresses. Before using a symbolic address in a message, you must first define the symbol at the PLC-3 that is to receive the message (refer to publication 1775-801).

The symbolic address field can be from 1 to 8 bytes long. The first byte contains the ASCII code for the first character in the symbol name, the second byte contains the ASCII code for the second character, and so on. If the symbol name is more than 8 characters long, encode only the first 8 characters.

Page 156 read from a scan by OCR; it may hold reading errors

Page 6-16 Data Manipulation

To use a symbolic address in a command message, encode the symbol in the field labeled “ASCII symbol” in the command message formats (chapter 5). Note that the message formats show a byte of value zero before and after the symbolic address field. You must include these zero bytes because they act as delimiters to distinguish the symbolic address from other fields in the message.

NOTE: PLC-3 controllers can also transmit commands that contain symbolic addresses. If you plan to transmit this type of command message to your computer from a PLC-3 station, then you must write computer application programs that are capable of accepting these commands and interpreting the symbolic addresses.

Page 157 read from a scan by OCR; it may hold reading errors

Chapter

Error Reporting

7.0 General

7.1

ERROR WORD in User Programming (1771-KG, 1771-KA, and 1774-KA Modules)

This chapter contains a list of error codes associated with Data Highway start-up and run-time situations. The error information is available in three places: the PC application program, the internal error counters in each module, and the STS byte in the header of a message packet. The first section deals with the PC application program’s error word and is the most accessible to the user.

The second section lists internal error counters, bytes of information stored in RAM in each Data Highway module. These numbers can be read only by issuing a diagnostic read command from a device connected to one of the modules that supports an RS-232-C port.

Section 7.4 explains the STS byte that is contained in the command header. This data is presented as part of the RS-232 protocol and is available only to modules that support this (e.g., KE/KF module).

A brief note: Error codes pointing to traffic problems or other ambiguous situations should be dealt with only after a troubleshooter has thoroughly tested the highway cabling for shorts and bad connections. Most application problems can be traced initially to bad cabling. What can be very frustrating is that bad cabling does not necessarily mean that a point is completely shorted or completely open. Some traffic may get through (narrowed bandwidth), but the frequency of re-tries on a given message becomes very high.

An error code word specified in the header rung is the primary source of explanation for programming problems and runtime problems. Error codes are stored in this word for most events that can be observed by a Data Highway user.

It is important to note that the display of an error code ata given location does not necessarily mean a faulted condition exists on the highway. Due to the nature of the polling algorithm and the built-in re-try and recovery procedures, random noise or contention can easily be ignored if normal procedures are followed. For example, Error 89 is primarily an indication of heavy use at one node, rather than a faulted condition. The appearance of a code like Error 89 is then a user application question, and should be dealt with by understanding the trade-offs between performance and node utilization. Obviously pre-scan errors (1-29) indicate a program

Page 158 read from a scan by OCR; it may hold reading errors

Page 7-2 Error Reporting problem and should be fixed immediately; but merely trapping and halting on run-time errors, without understanding the relationship of the error to loading factors and node utilization, does not allow efficient operation of the Data Highway.

A troubleshooter should also make full use of the counter (high-byte in the error word) to record frequency of errors. This contributes to any application solution that requires redistribution of node traffic.

The error code word is four BCD digits wide. The uppermost digit is not displayed by the Industrial Terminal in the GET instruction in the header rung, but this is the least valuable part of the error code and can often be ignored. If necessary, this number can be easily displayed using GET BYTE and a PUT. The lower two digits are always the error number. Each number indicates a different condition, which is explained in the paragraphs below. The meaning of the upper two digits varies depending on the error number.

There are about 50 different error numbers that can be broken up into two major and four minor groups:

Pre-scan Errors: These are mostly communication zone syntax errors. They are numbered 1 to 29. They are detected as the KA module pre-scans the communication zone just before it starts scanning start bits.

Note that no syntax errors are detected in the header rung. If the pre-scanner does not recognize the header rung it will decide that it is not a header rung, and will continue scanning until the end of memory or until it finds a valid header rung.

Pre-scan errors always cause the module to turn on the PROG light and enter an error state. When the keylock is turned to PROGRAM the error state is exited and the PROG light turned off.

For all pre-scan errors the upper two digits act as a pointer to the rung containing the error. Rungs are numbered from 1 to 99, then wrap around back to 0 through 99, and so on. The first rung after the header rung is number 1.

If no pre-scan error is detected, the error code word is set to all zeros at the end of the pre-scan.

Runtime Errors: For all runtime errors the first two digits of the code are a modulo 100 error counter. The first error is number 1.

Except as noted, the module continues operating after recovering from a runtime error.

Page 159 read from a scan by OCR; it may hold reading errors

Page 7-3 Error Reporting

Runtime errors are divided into the following groups:

1) Message formatting: numbered from 30 to 39, They are detected as a message is being formatted and before it is sent. A few of these errors result in the KA turning on the PROG light and entering the error state.

2) Reply errors: numbered between 50 and 59, and detected by the local station when a reply is received.

3) Remote errors: numbered from 80 to 89, and returned in the reply message from the remote station as the result of errors in execution of a message at the remote station. It should be noted that a Data Highway module will continue to generate replies as long as it is functioning properly. These errors are contained in the STS byte of the reply message.

4) Local errors: numbered 90 to 99 and detected by the local station; they are the result of being unable to properly transmit on the highway.

Error numbers are listed and explained below:

- 01: No longer used. In revisions previous to F for 1771-KA this code could be set as a result of intermittent hard errors on the KA to PC cable.

- 02: The pre-scan aborted because the test codes in RACKO are bad. This error should never occur, because if the test codes are ever bad the PC should fault before the KA ever gets to the pre-scan.

- 03: The KA or KG does not have enough internal memory to store the start bit index. This should only occur if the communication rung is very large. To correct this, the communication zone can be shortened, perhaps by combining commands or windows. It may also occur if a RAM hardware error corrupts the internal memory organization.

- 04: The first element of a memory access branch is nota GET. This condition can only be detected if no command rungs have yet been detected, and if the branch being processed started with a BST. (BST = Branch Start; BND = Branch End)

- 05: The address field of the first GET in a memory access branch contains an invalid Data Highway station address. The address must be less than 377.

- 06: The second element of a memory access branch is not a GET.

- 07: The third element of a memory access branch is not a GET.

- 08: Invalid window address in memory access branch: the address in the second GET is greater than the third GET.

Page 160 read from a scan by OCR; it may hold reading errors

Page 7-4 Error Reporting

- 09: There is something besides a BST or BND after the third GET of a memory access branch.

- 10: There is something other than a BST or output instruction after a BND in a memory access rung.

- 11: A rung in the communication zone starts with something besides a BST or an XIC, or the zone contains no command rungs and the terminating rung has been omitted.

- 12: The start bit address specified for a command rung is in the low byte of a word. Start bits must always be in the 10 to 17 range.

- 13: The second element of a command rung is not an XIC.

- 14: The command code (the low digit of the address) of the second XIC in a command rung is invalid.

- 15: The station address in the second XIC of a command rung is invalid. Station address must be less than 377.

- 16: An instruction or an opcode other than XIC, XIO, BST, or BND has been encountered in a bit control command rung, or the output element of the rung is incorrect.

. -17: The third element of a read or write command rung is not a GET.

- 18: The fourth element of a read or write command rung is not a GET.

- 19: The fifth element of a read or write command rung is not a GET.

- 20: The sixth element of a read or write command rung is not a legal output instruction.

- 21: The start of a command rung is not an XIC, or the terminating rung has been omitted. This error is only generated if valid command rungs precede it.

- 22: The word containing start/done/error bits is positioned so that it crosses a boundary in the data table. (For example, start bit 07710 means that the error bits would be in word 100, or 17710 means that the error bits would be located in the first word of the program).

- 23: An unprotected write or bit control command is specified and the DIP switch that enables sending of unprotected commands is off.

- 24: Not used in 1771-KA. - 25: Not used in 1771-KA.

- 26: Too many command rungs. A maximum or 255 command rungs can be programmed.

- 27: The default timeout is too large. Valid timeouts are from 011 to 407 octal. The value 010 causes the timeout to be disabled.