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

The text of a manual · part 54 of 70

SLC 500 Instruction Set Reference Manual, pages 531 to 540

Pages 531 to 540 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 531

SLC Status File

B-11

Table B.2 Status File Functions (Continued) Address S:1/12

Classification

TIP continued

Description

Fixed 5/01

All modes in the fixed, SLC 5/01, and SLC 5/02 processors are considered to be remote because they do not have a keyswitch.

5/02

5/03

5/04

5/05

•

•

•

•

•

•

•

The memory module you install in the processor must have a status file bit S:1/12 set. Loading takes place if the master password and/or password in the processor and memory module match. Loading can also take place if the processor has neither a password not master password. When S:1/12 is set in the status file of the user program in RAM, it does not require the presence of the memory module to enter the REM Run or REM Test mode. Application example: Set both S:1/11 and S:1/12 to autoload and run every power cycle, and require the presence of the memory module to enter the REM Run or REM Test modes. 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 REM Run each and every power cycle. To program this feature, use the Data Monitor function. Then store the program in the memory module. This feature is particularly useful when you are troubleshooting hardware failures with “spares” (replacement modules). Use this feature to facilitate application logic upgrades in the field without a programming device. You may choose not to overwrite data files on a per file basis.

Publication 1747-RM001G-EN-P - November 2008

Page 532

B-12

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:1/13

Dynamic Config

Major Error Halted Bit

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

This bit is set by the processor any time a major error is encountered. The processor 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 places all outputs in a safe state and energizes the fault LED, or • 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 required, 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 be placed in a safe state and the fault LED will be energized. When you clear bit S:1/13 using a programming device, the processor mode changes from fault to either Remote Program, or Remote Idle Suspend depending on the previous mode of the processor. You can move a value to S:6, then set S:1/13 in your ladder program to generate an application specific Major Error.

TIP

TIP

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 REM Program, REM Run, or REM Test). Also, clear S:6 to avoid the confusion of having an error code but no fault condition. Do not re-use error codes that are defined in the SLC error code list in chapter as application specific error codes. Instead, create your own unique codes. This prevents you from confusing application errors with system errors. We recommend using error codes FFOO to FFOF to indicate application specific major errors. When you clear bit S:1/13 using a programming device, the processor mode changes from fault to either Program, Run, or Idle Suspend depending on the previous mode of the processor. You can move a value to S:6, then set S:1/13 in your ladder program to generate an application specific major error.

ATTENTION

•

If you clear this bit with the keyswitch in RUN, the processor immediately enters the RUN mode.

You can clear faults S:1/13 and S:6 by cycling the keyswitch to PROGram and then to RUN

Publication 1747-RM001G-EN-P - November 2008

Page 533

SLC Status File

B-13

Table B.2 Status File Functions (Continued) Address

Classification

Description

Fixed 5/01

5/02

5/03

5/04

5/05

S:1/14

Status

Access Denied Bit (OEM Lock)

•

•

•

•

•

•

•

•

•

•

This bit is set during execution of the startup protection fault routine. Refer to S:1/9 for more information.

•

•

•

•

STI (Selectable Timed Interrupt) Pending Bit

•

•

•

•

•

•

•

You can allow or deny future access to a processor file. Set this bit to deny access. This indicates 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” 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. Program 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 or HHT) may not access the ladder program. 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

Status

First Pass Bit 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 REM Run or REM 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 REM Test or REM Run mode.

S:2/0

Status

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, power up, exit of the REM Run mode, or execution of a true STS instruction. The STI pending bit will not be set if the STI timer expires while executing the fault routine.

•

This bit is set if the STI timer expires while executing the DII subroutine or fault routine.

Publication 1747-RM001G-EN-P - November 2008

Page 534

B-14

SLC Status File

Table B.2 Status File Functions (Continued) Address

Classification

Description

S:2/1

Static Config

STI (Selectable Timed Interrupt) Enabled Bit

Fixed 5/01

5/02

5/03

5/04

5/05

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

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 (S:31) and STI setpoint (S:30) are non-zero. If clear, when an interrupt occurs, the STI subroutine does not execute and the STI Pending bit is set. The STI Timer continues to run when disabled. The STD instruction clears this bit.

S:2/2

Dynamic Config

Use the Data Monitor function to set and clear this bit, or address this bit with your ladder logic program. 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, the STI subroutine does not execute and the STI pending bit is set. The STI timer continues to run. The STD instruction clears this bit.

Status

STI (Selectable Timed Interrupt) Executing Bit When set, this bit indicates that the STI timer has timed out and the STI subroutine is currently being executed. This bit is cleared upon completion of the STI routine, powerup, or REM Run mode entry. Application example: You can examine this bit in your fault routine to determine if your STI was executing when the fault occurred.

S:2/3

Static Config

Index Addressing File Range Bit When clear, the index register can only index 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. This bit is selected at the time you save your program. The SLC 5/03 and higher processors allow you to index from 0:0 to the last data file.

TIP S:2/4

Static Config

Change this bit while in the offline mode only. Save the program after changing the bit. Saved with Single Step Test Enabled Bit

•

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 requires 0.375 instruction words (3 bytes) per rung of additional memory. This bit is selected at the time you save your program.

TIP

This bit is not applicable to the SLC 5/03 and higher processors since its functionality is always available and requires no special compile time selection.

Publication 1747-RM001G-EN-P - November 2008

Page 535

SLC Status File

B-15

Table B.2 Status File Functions (Continued) Address

Classification

Description

S:2/5

Status

Incoming Command Pending Bit (Channel 1)

Fixed 5/01

5/02

5/03

5/04

5/05

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

This bit is set when the processor determines that another node on the network has requested information or supplied a command to it. This bit can be set at any time. This bit is cleared when the processor services the request (or command). Use this bit as a condition of an SVC instruction to enhance the communication capability of your processor. S:2/6

Status

Message Reply Pending Bit (Channel 1) This bit is set when another node on the network has supplied the information you requested in the MSG instruction of your processor. This bit is cleared when the processor stores the information and updates your MSG instruction. Use this bit as a condition of an SVC instruction to enhance the communication capability of your processor.

S:2/7

Status

Outgoing Message Command Pending Bit (Channel 1) 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. It remains cleared if there are no further messages waiting. Use this bit as a condition of an SVC instruction to enhance the communication capability of your processor.

S:2/8

Dynamic Config

CIF (Common Interface File) Addressing Mode This bit controls the mode used to address elements in the CIF file (data file 9) when processing a communication 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 the 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.

Publication 1747-RM001G-EN-P - November 2008

Page 536

B-16

SLC Status File

Table B.2 Status File Functions (Continued) Address

Classification

Description

S:2/9

Static Config

Memory Module Program Compare

Fixed 5/01

5/02

5/03

5/04

5/05

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

When this bit is set inside a valid program that is contained in a memory module, no modification of the NVRAM user program files is allowed. This includes online editing, program downloading, and clear memory commands. Use this feature to prevent a programming device from altering the NVRAM program from the program contained in the Memory Module. If a memory module is installed with this bit set, and a different NVRAM user program is contained in NVRAM, the processor will not enter the Run mode. You must transfer the memory module program to NVRAM in order to enter the Run mode. S:2/10

Static Config

STI Resolution Selection (1 ms or 10 ms) Bit This bit is cleared by default. When clear, this bit uses a 10 ms timebase for the STI Setpoint (S:30) value. For example, the value 4 uses a 40 ms STI setpoint. When set, this bit uses a 1 ms timebase for the STI Setpoint (S:30). For example, the value 4 uses a 4 ms STI setpoint. To program this feature, use the Data Monitor function to set, clear, or address this bit with your ladder program.

S:2/11

Status

Discrete Input Interrupt Pending Bit When set, this bit indicates that the DII accumulator (S:52) equals the DII preset (S:50) and the ladder file number specified by the DII file number (S:46) is waiting to be executed. It is cleared when the DII file number (S:46) begins executing, or on exit of the REM Run or REM Test mode.

S:2/12

Dynamic Config

Discrete Input Interrupt Enabled Bit To program this feature, use the Data Monitor function to set, clear, or address this bit with your ladder program. This bit is set in its default condition. If set, it allows execution of the DII Subroutine if the DII file (S:46) is non-zero. If clear, when the interrupt occurs, the DII subroutine does not execute and the DII Pending bit is set. The DII function continues to run anytime the DII file (S:46) is non-zero. If the pending bit is set, the enable bit is examined at the next end of scan.

S:2/13

Status

Discrete Input Interrupt Executing Bit When set, this bit indicates that the DII interrupt has occurred and the DII subroutine is currently being executed. This bit is cleared on completion of the DII routine, power up, or REM Run mode entry. Application example: You can examine this bit in your fault routine to determine if your DII was executing when the fault occurred.

Publication 1747-RM001G-EN-P - November 2008

Page 537

SLC Status File

B-17

Table B.2 Status File Functions (Continued) Address

Classification

Description

S:2/14

Dynamic Config

Math Overflow Selection Bit

Fixed 5/01

5/02

5/03

5/04

5/05

•

•

•

•

Set this bit when you intend to use 32-bit addition and subtraction. When S:2/14 is set, and the result of an ADD, SUB, MUL, or DIV instruction cannot be represented in the destination address (underflow or overflow), • the overflow bit S:0/1 is set, • the overflow trap bit S:5/0 is set, and • the destination address contains the unsigned truncated least significant 16 bits of the result The default condition of S:2/14 is reset (0). When S:2/14 is reset, and the result of an ADD, SUB, MUL, or DIV instruction cannot be represented in the destination address (underflow or overflow), • the overflow bit S:0/1 is set, • the overflow trap bit S:5/0 is set, and • the destination address contains 32767 if the result is positive or - 32768 if the result is negative.

TIP

The status of bit S:2/14 has no effect on the DDV instruction. Also, it has no effect on the math register content when using MUL and DIV instructions. To program this feature, use the Data Monitor function to set or clear this bit. To provide protection from inadvertent data monitor alteration of your selection, program an unconditional OTL instruction at address S:2/14 to ensure the new math overflow operation. Program an unconditional OTU instruction at address S:2/14 to ensure the original math overflow operation. See page 4-7 in this manual for an application example of 32-bit signed math.

Publication 1747-RM001G-EN-P - November 2008

Page 538

B-18

SLC Status File

Table B.2 Status File Functions (Continued) Address

Classification

Description

S:2/15

Dynamic Config

Communications Servicing Selection Bit (Ethernet Channel 1 for SLC 5/05) (DH+ Channel 1 for SLC 5/04) (DH-485 Channel 1 for SLC 5/03) When set, only one communication request/command can be serviced per END, TND, REF, or SVC. When clear, all serviceable incoming or outgoing communication requests/commands can be serviced per END, TND, REF, or SVC. When clear, communication throughput increases. However, your scan time will increase if several communication requests/commands are received in the same scan. One communication request/command consists of either an incoming command, a message reply, or an outgoing message command. See S:2/5, S:2/6, and S:2/7 and S:33/7. To program this feature, use the Data Monitor function to set or clear this bit. To provide protection from inadvertent data monitor alteration of your selection, program an unconditional OTL instruction at address S:2/15 to ensure one request/command operation, or program an unconditional OTU instruction at address S:2/15 to ensure multiple request/command operation. Alternately, your program may change the state of this bit using ladder logic if your application requires dynamic selection of this function. Application example: Suppose you have a system consisting of an SLC 5/03 processor, programming software, and a DTAM. The program scan time for your user program is extremely long. Because of this, the programming device or DTAM takes an unusually long time to update its screen. Improve this update time by clearing S:2/15. In a case such as this, the additional time spent by the processor to service all communication at the end of the scan is insignificant compared to the time it takes to complete one scan. You could increase communication throughput even further by using an SVC instruction. See page 12-3 in this manual for more information.

Publication 1747-RM001G-EN-P - November 2008

Fixed 5/01

5/02

5/03

5/04

5/05

•

•

•

•

Page 539

SLC Status File

B-19

Table B.2 Status File Functions (Continued) Address

Classification

Description

Fixed 5/01

5/02

S:3L

Status

Current/Last 10 ms Scan Time

•

•

5/03

5/04

5/05

•

•

•

The value of this byte tells you how much time elapses in a program cycle. A program cycle includes: • scanning the ladder program, • housekeeping, • scanning the I/O, and • servicing of the communication port. The byte value is zeroed by the processor each scan, immediately preceding the execution of rung 0 of program file 2 (main program file) or on return from the REF instruction. The byte is incremented every 10 ms thereafter, and indicates, in 10 ms increments, the amount of time elapsed in each program cycle. If this value ever equals the value in S:3H Watchdog, a user watchdog major error will be declared (code 0022). The resolution of the scan time value is+0 to -10 ms. Example: The value 9 indicates that 80-90 ms has elapsed since the start of the program cycle.

TIP

When SVC or REF instructions are contained in your program, this value will appear to be erratic when you monitor it with a programming device. This is because the SVC or REF instructions allow this value to be read in mid-scan, while it is still incrementing.

•

Publication 1747-RM001G-EN-P - November 2008

Page 540

B-20

SLC Status File

Table B.2 Status File Functions (Continued) Address

Classification

S:3L continued

Description

Fixed 5/01

5/02

5/03

5/04

5/05

•

•

•

•

•

Application example: Your application requires that each and every program scan execute in the same length of time. You measure the maximum and minimum scan times and find them to be 40 ms and 20 ms. You can make every scan equal to precisely 50 ms by programming the following rungs as the last rungs of your program. MOV

1 ]LBL[

MOVE Source

S:3

Dest

N7:0

AND BITWISE Source

A

255

Source

B

N7:0

Dest

N7:0

LES LESS THAN Source A Source

1 (JMP)

N7:0

B

AND

5

This example assumes that your I/O scan and communication servicing takes less than 10 ms. If it exceeds 10 ms, the resolution of +0 to -1 tick (10 ms) must be added to the scan time. S:3H

Dynamic Config

Watchdog Scan Time Byte This byte value contains the number of 10 ms ticks allowed to occur during a program cycle. The default value is 10 (100 ms), but you can increase this to 250 (2.5 seconds) or decrease it to 2, as your application requires. If the program scan S:3L value equals the watchdog value, a watchdog major error will be declared (code 0022). This value is applied each END, TND, or REF.

Publication 1747-RM001G-EN-P - November 2008