The text of a manual · part 55 of 70
SLC 500 Instruction Set Reference Manual, pages 541 to 550
Pages 541 to 550 of 694
The original document is the PDF (7.2 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 1747-L514
Page 541
SLC Status File
B-21
Table B.2 Status File Functions (Continued) Address
Classification
Description
Fixed 5/01
S:4
Status
Free Running Clock
•
5/02
5/03
5/04
5/05
•
•
•
•
•
•
•
•
Only the first 8 bits (byte value) of this word are assessed by the processor. This value is zeroed at powerup in the REM Run mode. You can use any individual bit of this byte in your user program as a 50% duty cycle clock bit. Clock rates for S:4/0 to S:4/7 are: 20, 40, 80, 160, 320, 640, 1280, and 2560 ms. The application using the bit must be evaluated at a rate more than two times faster than the clock rate of the bit. This is illustrated in the following example for SLC 5/02 and higher processors. Dynamic Config
TIP
All 16 bits of this word are assessed by the processor. The value of this word is zeroed upon power up in the REM Run mode or entry into the REM Run or REM Test mode. It is incremented every 10 ms thereafter. You can write any value to S:4. It will begin incrementing from this value. You can use any individual bit of this word in your user program as a 50% duty cycle clock bit. Clock rates for S:4/0 to S:4/15 are: 20, 40, 80, 160, 320, 640,1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, and 655360 ms The application using the bit must be evaluated at a rate more than two times faster than the clock rate of the bit. In the following example, bit S:4/3 toggles every 80 ms, producing a 160 ms clock rate. To maintain accuracy of this bit in your application, the instruction using bit S:4/3 (O:1/0 in this case) must be evaluated at least once every 79.999 ms.
160 ms
S:4/3 cycles in 160 ms
S:5
S:4 O:1 ] [ ( ) 0 3 Both S:4/3 and Output O:1/0 toggle every 80 ms. O:1/0 must be evaluated at least
•
Minor Error Bits The bits of this word are set by the processor to indicate that a minor error has occurred in your ladder program. Minor errors, bits 0 to 7, revert to major error 0020H if any bit is detected as being set at the end of the scan. HHT users: If the processor faults for error code 0020H, you must clear minor error bits S:5/0-7 along with S:1/13 to attempt error recovery.
Publication 1747-RM001G-EN-P - November 2008
Page 542
B-22
SLC Status File
Table B.2 Status File Functions (Continued) Address
Classification
Description
Fixed 5/01
5/02
5/03
5/04
5/05
S:5/0
Dynamic Config
Overflow Trap Bit
•
•
•
•
•
When this bit is set by the processor, it indicates that a mathematical overflow has occurred in the ladder program. See S:0/1 for more information. If this bit is ever set upon execution of the END, TND, or REF instruction, major error (0020) will be declared. To avoid this type of major error from occurring, examine the state of this bit following a math instruction (ADD, SUB, MUL, DIV, DDV, NEG, SCL, TOD, or FRD), take appropriate action, and then clear bit S:5/0 using an OTU instruction with S:5/0 or a CLR instruction with S:5. S:5/1
NA
Reserved
•
•
•
•
•
S:5/2
Dynamic Config
Control Register Error Bit
•
•
•
•
•
•
•
•
•
The LFU, LFL, FFU, FFL, BSL, BSR, SQO, SQC, and SQL instructions are capable of generating this error. When bit S:5/2 is set, it indicates that the error bit of the control instruction has been set. If this bit is ever set upon execution of the END, TND, or REF instruction, major error (0020) will be declared. To avoid this type of major error from occurring, examine the state of this bit following a control register instruction, take appropriate action, and then clear bit S:5/2 using an OTU instruction with S:5/2 or a CLR instruction with S:5. S:5/3
Dynamic Config
Major Error Detected while Executing User Fault Routine Bit When set, the major error code (S:6) represents the major error that occurred while processing the fault routine due to another major error. If this bit is ever set upon execution of the END, TND, or REF instruction, major error (0020) will be declared. To avoid this type of major error from occurring, examine the state of this bit inside your fault routine, take appropriate action, and then clear bit S:5/3 using an OTU instruction with S:5/3 or a CLR instruction with S:5. Application example: Suppose you are executing your fault routine for fault code 0016H Startup Protection. At rung 3 inside this fault routine, a TON containing a negative preset is executed. When rung 4 is executed, fault code 0016H is overwritten to indicate code 0034H, and S:5/3 is set. If your fault routine did not determine that S:5/3 was set, major error 0020H would be declared at the end of the first scan. To avoid this problem, examine S:5/3, followed by S:6, prior to returning from your fault routine. If S:5/3 is set, take appropriate action to remedy the fault, then clear S:5/3.
Publication 1747-RM001G-EN-P - November 2008
Page 543
SLC Status File
B-23
Table B.2 Status File Functions (Continued) Address
Classification
Description
S:5/4
Dynamic Config
M0-M1 Referenced on Disabled Slot Bit
Fixed 5/01
5/02
5/03
5/04
5/05
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
This bit is set whenever any instruction references an M0 or M1 module file element for a slot that is disabled (via its I/O slot enable bit). When set, the bit indicates that an instruction could not execute properly due to the unavailability of the addressed M0 or M1 data. If this bit is ever set upon execution of the END, TND, or REF instruction, major error (0020) is declared. To avoid this type of major error from occurring, examine the state of this bit following a M0-M1 referenced instruction, take appropriate action, and then clear bit S:5/4 using an OTU instruction with S:5/4 or a CLR instruction with S:5. S:5/5 to S:5/7
NA
Reserved Reserved for minor errors that revert to major errors at the end of the scan.
S:5/8
Status
Memory Module Boot Bit When this bit is set by the processor, it indicates that a memory module program has been transferred to the processor. This bit is not cleared by the processor. Your program can examine the state of this bit on entry into the REM Run mode to determine if the memory module content has been transferred. Bit S:1/15 will be set to indicate REM Run mode entry. This information is useful when you have an application that contains retentive data and a memory module that has only bit S:1/10 set (Load Memory Module on Memory error). Use this bit to indicate that retentive data has been lost. This bit is also helpful when using bits S:1/11 (Load Memory Module Always) or S:1/12 (Load Memory Module Always and Run) to distinguish a power up REM Run mode entry from a REM Program (or REM Test) mode to REM Run mode entry.
S:5/9
Status
Memory Module Password Mismatch Bit This bit is set on REM Run mode entry, whenever loading from the memory module is specified (word 1, bits 11 or 12) and the processor user program is password protected, and the memory module program does not match that password. Use this bit to inform your application program that an autoloading memory module is installed but did not load due to a password mismatch.
S:5/10
Status
STI (Selectable Timed Interrupt) Overflow Bit This bit is set whenever the STI timer expires while the STI routine is either executing or disabled and the pending bit is already set.
Publication 1747-RM001G-EN-P - November 2008
Page 544
B-24
SLC Status File
Table B.2 Status File Functions (Continued) Address
Classification
Description
S:5/11
Status
Battery Low Bit
Fixed 5/01
5/02
5/03
5/04
5/05
•
•
•
•
•
•
•
•
•
•
•
•
•
This bit is set whenever the Battery Low LED is on. The bit is cleared when the Battery Low LED is off. S:5/12
Status
Discrete Input Interrupt Overflow Bit This bit is set whenever the DII interrupt occurs while still executing the DII subroutine or whenever the DII interrupt occurs while pending or disabled.
S:5/13
Dynamic Config
Unsuccessful Operating System Load Was Attempted This bit is set whenever an operating system memory module load is attempted and is unsuccessful. Unsuccessful loads can occur when either the protection jumper is in the protect position or is missing, or if the operating system memory module is incompatible with the SLC 5/03, SLC 5/04, or SLC 5/05 processors’ hardware platform. Examine the state of this bit with your user program to diagnose this condition.
S:5/14
Status
Channel 0 Modem Lost This bit indicates the status of the modem connected to Channel 0 (RS232 serial port). The state of the bit is determined by: • the protocol Channel 0 is configured for • the Control Line selected • the states of DCD (Data Carrier Detect) and DSR (Data Set Ready) If the bit is set, then the modem is not properly connected to Channel 0 or it is in a state where unreliable communication exchanges may take place via Channel 0. The following conditions apply: • If Channel 0 is disabled or configured for DH-485, the bit is always cleared. • If Channel 0 is configured for one of the DF1 protocols in System Mode or Generic ASCII in User Mode, then the Control Line selection determines how DCD and DSR affect the modem status: - If Control Line = NO HANDSHAKING: The bit is always set. - If Control Line = FULL-DUPLEX or HALF-DUPLEX WITHOUT CONTINUOUS CARRIER: The bit is set if DSR goes inactive and cleared when DSR goes active. (DCD has no affect on modem status in this case.) - If Control Line = HALF-DUPLEX WITH CONTINUOUS CARRIER: The bit is set if either DSR goes inactive or DCD remains inactive for more than 10 seconds. This bit is cleared when both DSR and DCD go active.
Publication 1747-RM001G-EN-P - November 2008
Page 545
SLC Status File
B-25
Table B.2 Status File Functions (Continued) Address
Classification
Description
S:5/15
Status
ASCII String Manipulation Error
Fixed 5/01
5/02
5/03
5/04
5/05
•
•
•
This bit applies to SLC 5/03 (OS301 and higher), SLC 5/04, and SLC 5/05 processors. This bit is set to 1 when an attempt is made to process a string using an ASCII instruction that exceeds 82 characters in length.
Publication 1747-RM001G-EN-P - November 2008
Page 546
B-26
SLC Status File
Table B.2 Status File Functions (Continued) Address
Classification
Description
Fixed 5/01
5/02
5/03
5/04
5/05
S:6
Status
Major Error Fault Code
•
•
•
•
•
•
•
•
•
•
•
•
•
A hexadecimal code is entered in this word by the processor when a major error is declared. Refer to S:1/13. The code defines the type of fault, as indicated on the following pages. This word is not cleared by the processor. Error codes are presented, stored, and displayed in a hexadecimal format. If you enter a fault code as a parameter in an instruction in your ladder program, you must convert the code to decimal. For example, if you program an EQU instruction to go true when the error 0016 occurs, enter S:6 as source A and 22, the decimal equivalent of 0016H, as source B: EQU EQUAL Source
A
S:6
Source
B
22
Application example: You can declare your own application specific major fault by writing a unique value to S:6 and then setting bit S:1/13. SLC 5/02 processor users: Interrogate the value of S:6 in your fault routine to determine the type of fault that occurred. If your program was saved with the test single step enabled, you can also interrogate S:20 and S:21 to pinpoint the exact rung that was executing when the fault occurred. Fault Classifications: Faults are classified as Non-User, Non-Recoverable, and Recoverable. Non-User Non-Recoverable Recoverable Fault User Fault User Fault The fault routine does not execute.
The fault routine executes for 1 pass. (You may initiate a MSG instruction to another node to identify the fault condition of the processor.)
The fault routine may clear the fault by clearing bit S:1/13.
Error code descriptions and classifications are listed on pages B-27 through B-34. Categories are: • powerup errors • going-to-run errors • runtime errors • user program instruction errors • I/O errors
Publication 1747-RM001G-EN-P - November 2008
•
Page 547
SLC Status File
B-27
Table B.3 S:6 Error Codes Address
S:6 continued
Error Code (Hex)
Errors
Fault Classification NonUser
Processor
User NonRecov
Recov
Fixed 5/01
5/02
5/03
5/04
5/05
0001
NVRAM error.
X
•
•
•
•
•
0002
Unexpected hardware watchdog timeout.
X
•
•
•
•
•
0003
Memory module memory error. This error can also occur while going into the REM Run mode.
X
•
•
•
•
0004
Memory error occurred while in the Run X mode.
•
•
•
•
0005
Reserved
X
•
•
•
0006
Reserved
X
•
•
•
0007
Failure during memory module transfer.
X
•
•
•
0008
Internal software error.
X
•
•
•
0009
Internal hardware error.
X
•
•
•
0010
The Processor does not meet the required revision level.
X
•
•
•
•
•
0011
The executable program file number 2 is absent.
X
•
•
•
•
•
0012
The ladder program has a memory error. X
•
•
•
•
•
0013
• The required memory module is absent or
•
•
•
•
•
X
• S:1/10 or S:1/11 is not set as required by the program. 0014
Internal file error.
X
•
•
•
•
•
0015
Configuration file error.
X
•
•
•
•
•
0016
Startup protection after power loss. Error condition exists at powerup when bit S:1/9 is set and powerdown occurred while running.
•
•
•
•
0017
NVRAM/memory module user program mismatch.
•
•
•
0018
Incompatible user program - Operating system type mismatch. This error can also occur during powerup.
•
•
•
0019
Missing or duplicate label was detected.
•
•
•
001F
A program integrity problem occurred during an online editing session.
•
•
•
X
X X
X X
Publication 1747-RM001G-EN-P - November 2008
Page 548
B-28
SLC Status File
Table B.3 S:6 Error Codes (Continued) Address
S:6 continued
Error Code (Hex)
Errors
Fault Classification NonUser
0020
A minor error bit is set at the end of the scan. Refer to S:5 minor error bits.
0021
Remote power failure of an expansion I/O chassis occurred.
TIP
ATTENTION
User NonRecov
Recov X
X
Processor Fixed 5/01
5/02
5/03
5/04
5/05
•
•
•
•
•
•
•
•
•
•
A modular system that encounters an over-voltage or over-current condition in any of its power supplies can produce any of the I/O error codes listed on pages -32 and -34 (instead of code 0021). The over-voltage or over-current condition is indicated by the power supply LED being off. Fixed and FRN 1 to 4 SLC 5/01 processors - If the remote power failure occurred while the processor was in the REM Run mode, error 0021 will cause the major error halted bit (S:1/13) to be cleared at the next powerup of the local chassis. SLC 5/02 processors and above and FRN 5 SLC 5/01 processors Power to the local chassis does not need to be cycled to resume the REM Run mode. Once the remote chassis is re-powered, the CPU will restart the system.
0022
The user watchdog scan time has been exceeded.
X
0023
Invalid or non-existent STI interrupt file.
0024
•
•
•
•
X
•
•
•
•
Invalid STI interrupt interval (greater than 2559 ms or negative).
X
•
•
•
•
0025
Excessive stack depth/JSR calls for STI routine.
X
•
•
•
•
0026
Excessive stack depth/JSR calls for I/O interrupt routine.
X
•
•
•
•
0027
Excessive stack depth/JSR calls for user fault routine.
X
•
•
•
•
0028
Invalid or non-existent “startup protection” fault routine file value.
•
•
•
•
0029
Indexed address reference outside of entire data file space (range of B3:0 through the last file). ATTENTION
002A
Indexed address reference is beyond specific referenced data file.
Publication 1747-RM001G-EN-P - November 2008
•
X X
•
The SLC 5/02 processor uses an index value of zero for the faulted instruction following error recovery.
X
•
•
•
•
Page 549
SLC Status File
B-29
Table B.3 S:6 Error Codes (Continued) Address
S:6 continued
Error Code (Hex)
Errors
Fault Classification NonUser
Processor
User NonRecov
Recov
Fixed 5/01
5/02
5/03
5/04
5/05
002B
Either the file number exists, but it is not the correct file type, or the file number does not exist.
X
•
•
•
002C
The indirectly referenced element does not exist, but the file type is correct and it exists. For example, T4:[N7:0] N7:0=10, but T4 only goes to T4:9.
X
•
•
•
002D
Either a subelement is referenced incorrectly or an indirect reference has been made to an M-file.
X
•
•
•
002E
Invalid DII Input slot.
X
•
•
•
002F
Invalid or non-existent DII interrupt file.
•
•
•
X
I/O Errors ERROR CODES: The characters xx in the following codes represent the slot number, in hexadecimal. If the exact slot cannot be determined, the characters xx become 1F. RECOVERABLE I/O FAULTS (SLC 5/02, SLC 5/03, SLC 5/04, and SLC 5/05 processors only): Many I/O faults are recoverable. To recover, you must disable the specified slot, xx, in the user fault routine. If you do not disable slot xx, the processor will fault at the end of the scan.
TIP
An I/O card that is severely damaged may cause the processor to indicate that an error exists in slot 1 even though the damaged card is installed in a slot other than 1.
Publication 1747-RM001G-EN-P - November 2008
Page 550
B-30
SLC Status File
Slot xx
Slot xx
Slot xx
Slot xx
8 9 10 11 12 13 14 15
08 09 0A 0B 0C 0D 0E 0F
16 17 18 19 20 21 22 23
10 11 12 13 14 15 16 17
24 25 26 27 28 29 30
18 19 1A 1B 1C 1D 1E 1F
(2)
0 1 2 3(1) 4 5 6 7
Publication 1747-RM001G-EN-P - November 2008
00 01 02 03 04 05 06 07
(3)
(1)
This value indicates that the slot was not found (500 fixed controller).
(2)
Slot Numbers (xx) in hexadecimal
(3)
This value indicates that the slot was not found (SLC 5/01, SLC 5/02, SLC 5/03, SLC 5/04, and SLC 5/05 processors).