The text of a manual · part 43 of 55
Hand-Held Terminal (Catalog Number 1747-PT1) User Manual: 27 - The Status File, pages 369 to 377
Pages 369 to 377 of 486, from Hand-Held Terminal (Catalog Number 1747-PT1) User Manual
The original document is the PDF (1.5 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-PT1
Page 369
Chapter
27
The Status File This chapter discusses the status file functions of the: • fixed • SLC 5/01 • SLC 5/02 processors All application examples shown are in the HHT zoom display.
Status File Functions
The SLC 5/02 processor has the functions of the fixed and SLC 5/01 processors plus the functions listed in the right-hand column of the figure below. The status file gives you information concerning the various instructions you use in your program, and other information such as EEPROM functionality. The status file indicates minor faults, diagnostic information on major faults, processor modes, scan time, baud rate, system node addresses, and various other data. Important: Do not write to status file data unless the word or bit is listed as read/write in the descriptions that follow. If you intend writing to status file data, it is imperative that you first understand the function fully. The status file S: consists of the following words:
Word S:0
Function Arithmetic Flags
Words 16 through 32 are functional for the SLC 5/02 only:
S:1L, S:1H
Processor Mode Status/Control
Word
Function
S:2L, S:2H
STI Bits/DH–485 Communications
S:16, S:17
Test Single Step – Start Step On – Rung/File
S:3L
Current Scan Time
S:18, S:19
Test Single Step – End Step Before – Rung/File
S:3H
Watchdog Scan Time
S:20, S:21
Test – Fault/Powerdown – Rung/File
S:4
Free Running Clock
S:22
Maximum Observed Scan Time
S:5
Minor Error Bits
S:23
Average Scan Time
S:6
Major Error Code
S:24
Index Register
S:7, S:8
Suspend Code/Suspend File
S:25, S:26
I/O Interrupt Pending
S:9, S:10
Active Nodes
S:27, S28
I/O Interrupt Enabled
S:11, S;12
I/O Slot Enables
S:29
User Fault Routine File Number
S:13, S:14
Math Register
S:30
Selectable Timed Interrupt Setpoint
S:15L
Node Address
S:31
Selectable Timed Interrupt File Number
S:15H
Baud Rate
S:32
I/O Interrupt Executing
27–1
Page 370
Chapter 27 The Status File
The following tables describe the status file functions, beginning at address S:0 and ending at address S:32. If a bullet (•) is present in the columns headed SLC 5/02 and SLC 5/01, Fixed, the function applies to the indicated processor(s). Address
Description
5/02
5/01, Fixed
S:0
Arithmetic Flags Read/write. The arithmetic flags are assessed by the processor following the execution of any math, logical, or move instruction. The state of these bits remains in effect until the next math, logical, or move instruction in the program is executed.
•
•
S:0/0
Carry Bit This bit is set by the processor if a mathematical carry or borrow is generated. Otherwise the bit remains cleared. This bit is assessed as if a function of unsigned math.
•
•
When an STI, I/O Slot, or Fault Routine interrupts normal execution of your program, the original value of S:0/0 is restored when execution resumes.
•
Overflow Bit This bit is set by the processor when the result of a mathematical operation does not fit in its destination. Otherwise the bit remains cleared. Whenever this bit is set, the overflow trap bit S:5/0 is also set (refer to S:5/0).
•
When an STI, I/O Slot or Fault Routine interrupts normal execution of your program, the original value of S:0/1 is restored when execution resumes.
•
Zero Bit This bit is set by the processor when the result of a math, logical, or move instruction is zero. Otherwise the bit remains cleared.
•
When an STI, I/O Slot, or Fault Routine interrupts normal execution of your program, the original value of S:0/2 is restored when execution resumes.
•
Sign Bit This bit is set by the processor when the result of a math, logical, or move instruction is negative. Otherwise the bit remains cleared.
•
When an STI, I/O Slot, or Fault Routine interrupts normal execution of your program, the original value of S:0/3 is restored when execution resumes.
•
Reserved
•
S:0/1
S:0/2
S:0/3
S:0/4 to S:0/15
27–2
•
•
•
•
Page 371
Chapter 27 The Status File
Address
Description
5/02
5/01, Fixed
S:1/0 thru S:1/4
Processor Mode/Status Read only. Bits 0 – 4 function as follows: 0 0000 = (0) Download in process 0 0001 = (1) Program mode (the fault mode exists when bit S:1/13 is set along with mode 0 0001) 0 0011 = (3) Suspend Idle (operation halted by SUS instruction execution) 0 0110 = (6) Run mode 0 0111 = (7) Test continuous mode 0 1000 = (8) Test single scan mode
•
•
0 1001 = (9)
Test single step (step until)
•
All other values for bits 0–4 are reserved or unallocated. S:1/5
Forces Enabled Bit Read only. This bit is set by the processor if you have enabled forces in a ladder program. Otherwise the bit remains cleared. The processor “Forced I/O” LED is on continuously when forces are enabled.
•
•
S:1/6
Forces Installed Bit Read only. This bit is set by the processor if you have installed forces in a ladder program. The forces may or may not be enabled. Otherwise the bit remains cleared. The processor “Forced I/O” LED flashes when forces are installed but not enabled.
•
•
S:1/7
Communications Active Bit Read only. This bit is set by the processor when at least one other node is present on the DH–485 link. Otherwise the bit remains cleared. When a device is active, it is a recognized participant in a DH–485 token-passing network.
•
•
S:1/8
Fault Override at Powerup Bit Read/write. When you set this bit, it causes the processor to clear the Major Error Halted bit S:1/13 and Minor error bits S:5/0 to S:5/7 on powerup, if the processor had previously been in the Run mode and had faulted. The processor then attempts to enter the Run mode. When this bit remains cleared (default value), the processor remains in a major fault state at power up. To program this feature, set this bit using the EDT_DAT function.
•
•
27–3
Page 372
Chapter 27 The Status File
Address
Description
5/02
S:1/9
Startup Protection Fault Bit Read/write. When this bit is set and power is cycled while the processor is in the Run mode, the processor will execute your fault routine prior to the execution of the first scan of your program. You then have the option of clearing the Major Error Halted bit S:1/13 to resume operation in the Run mode. If your fault routine does not reset bit S:1/13, the fault mode will result.
•
5/01, Fixed
To program this feature, set this bit using the EDT_DAT function, then program your fault routine logic accordingly. When executing the startup protection fault routine, S:6 (major error fault code) will contain the value 0016H. S:1/10
Load Memory Module on Memory Error Bit Read/ write. You can use this bit to transfer a memory module program to the processor in the event that a processor memory error is detected at power up. (A memory error means the processor cannot run the program in the RAM memory because the program has been corrupted, as detected by a parity or checksum error. This type of error is caused by battery or capacitor drain, noise, a power problem, etc.)
•
•
•
•
You must set S:1/10 in the status file of the program in the memory module. When a memory module is installed that has bit S:1/10 set, a processor memory error detected at power up will cause the memory module program to be transferred to the processor, and the Run mode to be entered. When S:1/10 is cleared in the memory module, the processor remains in a major fault condition if a memory error is detected on power up, regardless of memory module presence. When S:1/10 is also set in the status file of the user program in RAM memory, the memory module must be installed at all times to enter the Run or Test modes. Otherwise, the processor faults and S:6 contains error code 0013H. To program this feature, set this bit using the EDT_DAT function. Then store the program in the memory module. S:1/11
Load Memory Module Always Bit – Not applicable to series A fixed and SLC 5/01 processors Read/write. When this bit is set, you can overwrite a processor program with a memory module program by cycling processor power, with no need for a programming device. The processor mode after powerup will be as follows: Mode before Powerdown Test/Program Run Fault after Test/Program Fault after Run Continued on next page
27–4
After Powerup Program Run Program Run
Page 373
Chapter 27 The Status File
Address S:1/11
Description Continued from previous page:
5/02
5/01, Fixed
•
•
You must set S:1/11 in the status file of the program in the memory module. Loading will take place if the master password and/or password in the processor and memory module match. Loading will also take place if the processor has neither a password nor master password. When S:1/11 is also set in the status file of the user program in RAM memory, the memory module must be installed at all times to enter the Run or Test modes. Otherwise, the processor faults and S:6 contains error code 0013H.
!
ATTENTION: The overwriting process, including data tables, is repeated each time you cycle power.
To program this feature, set this bit using the EDT_DAT function. Then store the program in the memory module. S:1/12
Load Memory Module and Run Bit – Not applicable to series A fixed and SLC 5/01 processors
•
Read/write. With this bit, a user can overwrite a processor program with a memory module program by cycling processor power, with no need for a programming device. The processor will attempt to enter the Run mode, regardless of what mode was in effect before cycling power: Mode before Powerdown
After Powerup
Test/Program/Run/Fault
Run
The memory module you install in the processor must have status file bit S:1/12 set. Loading will take place if the master password and/or password in the processor and memory module match. Loading will also take place if the processor has neither a password nor master password. When S:1/12 is set in the status file of the user program in RAM memory, it does not require the presence of the memory module to enter the Run or Test modes. Application note: Set both S:1/11 and S:1/12 to 1) autoload and run every power cycle and 2) require the presence of the memory module to enter the Run or Test mode.
!
ATTENTION: If you leave the memory module installed, the overwriting process, including data tables, is repeated each time you cycle power. The mode is changed to Run each and every power cycle.
To program this feature, set this bit using the EDT_DAT function. Then store the program in the memory module. This feature is particularly useful when you are troubleshooting hardware failures with “spares” (replacement modules). This feature can also be used to facilitate application logic upgrades in the field without the need of a programming device.
27–5
Page 374
Chapter 27 The Status File
Address
Description
5/02
5/01, Fixed
S:1/13
Major Error Halted Bit Read/write. This bit is set by the processor any time a major error is encountered. The processor then enters a fault condition. Word S:6 Fault Code will contain a code which can be used to diagnose the fault condition. Any time bit S:1/13 is set, the processor either:
•
•
1) places all outputs in a safe state and indicates the program mode (00001) in bits S:1/0 – S:1/4, or 2) enters the user fault routine with outputs active, allowing the fault routine ladder logic to attempt recovery from the fault condition. If your fault routine determines that recovery is in order, clear S:1/13 using ladder logic prior to exiting the fault routine. If the fault routine ladder logic does not understand the fault code, or if the routine determines that it is not desirable to continue operation, exit the fault routine with bit S:1/13 set. The outputs will then be placed in a safe state and indicate the program mode (0 0001) in bits S:1/0–S:1/4.
•
When you clear bit S:1/13 using a programming device, the processor mode changes from fault to program, allowing you to re-enter the run or test modes. You can set this bit in your ladder program to generate an application-specific Major Error.
•
Important: Once a major fault state exists, you must correct the condition causing the fault, and you must also clear this bit in order for the processor to accept a mode change attempt (into program, run, or test). Also, clear S:6 (error code) to avoid the confusion of having an error code but no fault condition. Note that if a faulted program is uploaded into the HHT the fault (S:1/13 set) goes with it. If the program is then edited offline, you must clear the major fault bit in order to download and run the program again.
27–6
•
Page 375
Chapter 27 The Status File
Address
Description
5/02
5/01, Fixed
S:1/14
Access Denied Bit Read/write. You can allow or deny future access to a processor file. If you deny access, the processor sets this bit, indicating that a programming device must have a matching copy of the processor file in its memory in order to monitor the ladder program. A programming device that does not have a matching copy of the processor file is denied access.
•
•
•
•
To program this feature, select “Future Access Disallow” (SLC 5/02) or “Future Access No” (SLC 5/01) when saving your program. To provide protection from inadvertent data monitor alteration of your selection, program an unconditional OTL instruction at address S:1/14 to deny future access, or an unconditional OTU instruction at address S:1/14 to allow future access. When this bit is cleared, it indicates that any compatible programming device can access the ladder program (provided that password conditions are satisfied). When access is denied, the programming device (APS, HHT) may not display the ladder diagram or allow access to the EDT_DAT function unless the device contains a matching copy of the processor file. Functions such as change mode, clear memory, restore program, and transfer memory module are allowed regardless of this selection. A device such as the DTAM is not affected by this function. S:1/15
First Pass Bit Read/write. You can use this bit to initialize your program as the application requires. When this bit is set by the processor, it indicates that the first scan of the user program is in progress (following power up in the Run mode or entry into a run or test mode). The processor clears this bit following the first scan. When this bit is cleared, it indicates that the program is not in the first scan of a test or Run mode. This bit will be set during execution of the startup protection fault routine. See S:1/9.
•
S:2/0
STI (Selectable Timed Interrupt) Pending Bit Read only. When set, this bit indicates that the STI timer has timed out and the STI routine is waiting to be executed. This bit is cleared upon starting of the STI routine, powerup, Run mode exit, or execution of a true STS instruction.
•
S:2/1
STI (Selectable Timed Interrupt) Enabled Bit Read only. This bit is set in its default condition, or when set by the STE or STS instruction. If set, it allows execution of the STI if the STI file (word 31) and STI rate (word 30) are non–zero. If clear when the interrupt occurs, the STI subroutine does not execute and the STI pending bit is set. The STI Timer continues to run when disabled. The STI instruction clears this bit.
•
27–7
Page 376
Chapter 27 The Status File
Address
Description
5/02
S:2/2
STI (Selectable Timed Interrupt) Executing Bit Read only. This bit, when set, indicates that the STI timer has timed out and the STI subroutine is currently being executed. Application example: You could examine this bit in your fault routine to determine if your STI was executing when the fault occurred. This bit is cleared upon completion of the STI routine, powerup, or Run mode entry.
•
S:2/3
Index Addressing File Range Bit Read only. Selected by the user at the time the user program is saved. When clear, the index register can index only within the same data file of the specified base address. When set, the index register can index anywhere from data file B3:0 to the end of the last declared data file.
•
S:2/4
Saved with Single Step Test Enabled Bit Read only. This bit is selected by the user prior to saving the user program. When clear, the Single Step Test mode function is not available. Clear also indicates that debug registers S:16 through S:21 are inoperative. When set, the program can operate in the Single Step Test mode. See descriptions of S:16 through S:21. When set, your program will also require 0.375 instruction words (3 bytes) per rung of additional memory.
•
Note: The HHT can save a SLC 5/02 program that has this option enabled, but the Test Single Step mode is not available with the HHT. S:2/5
DH–485 Incoming Command Pending Bit Read only. This bit becomes set when the processor determines that another node on the DH–485 network has requested information or supplied a command to it. This bit can become set at any time. This bit is cleared when the processor services the request (or command).
•
You can use this bit as a condition of an SVC instruction to enhance the communications capability of your processor. S:2/6
DH–485 Message Reply Pending Bit Read only. This bit becomes set when another node on the DH–485 network has supplied the information that you have requested in the MSG instruction of your processor. This bit is cleared when the processor stores the information and updates your MSG instruction. You can use this bit as a condition of an SVC instruction to enhance the communications capability of your processor.
27–8
•
5/01, Fixed
Page 377
Chapter 27 The Status File
Address
Description
5/02
S:2/7
DH–485 Outgoing Message Command Pending Bit Read only. This bit is set when one or more messages in your program are enabled and waiting, but no message is being transmitted at the time. As soon as transmission of a message begins, the bit is cleared. After transmission, the bit is set again if there are further messages waiting, or it remains cleared if there are no further messages waiting.
•
5/01, Fixed
You can use this bit as a condition of an SVC instruction to enhance the communication capability of your processor. S:2/8
CIF (Common Interface File) Addressing Mode Applies to Series C and later SLC 5/02 processors only.
•
Read/write. This bit controls the mode used by the SLC 5/02 processor to address elements in the CIF file (data file 9) when processing a communications request. Word address mode – in effect when the bit is clear (0): This is the default setting, compatible with other SLC 500 devices on the DH–485 network. Byte address mode – in effect when the bit is set (1): This mode is used when a SLC 5/02 processor is receiving a message from a device on the network, possibly through a bridge or gateway. This setting is compatible with Allen-Bradley PLC inter-processor communication. S:2/9 thru S:2/13
Reserved
•
•
27–9