Topic: DMD0541

Help File Version: 2.9.4.37

SGRSTI - Indexed Disable Stage


The Indexed Disable Stage (SGRSTI) instruction is used to disable a specific stage within a contiguous range of stages. The instruction uses the Index value to select one of the stages within that range, and then disable the selected stage. The Last / Exception Stage in the defined range is the error handling (exception) stage. Any time the Index value is not within the defined range of stages, the Last / Exception Stage will be selected.

 

For example, if the Index has a value of 7, and First Stage is S12, and Last / Exception Stage is S21, then the instruction would disable Stage S19 (S12 + 7). If the value in Index had been larger than the range created in the instruction (e.g. value of 11; S12 + 11 = S23) or a negative value, then the Last / Exception Stage is disabled (S21).

 

 

Like all of the other stage programming instructions this one must be placed in a Program; stage instructions cannot be placed in a Task, a Subroutine, or an Interrupt Service Routine. Stage programming instructions can only reference stages in the same Program code block, they cannot reference stages in a different Program code block.

 

To switch between displaying the fully qualified stage reference ($Main.S0) and the abbreviated name (S0), go to the View -> Options -> Ladder Tab -> Misc. Options and check the 'Abbreviate Stage Names (Use S0 over $Main.S0)' option.

 

For a complete discussion on Stage Programming and how to use the Stage programming instructions effectively, refer to the Help Topic on Stage Programming Concepts.

 


Parameters:

Note: Use the F9 key to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.

 

Index is the memory location where the Index value is located. This can be any readable numeric location.

 

First Stage is the first stage in the range of stages. The First Stage can only be a stage in the same Program; it cannot reference a stage in a different Program. The First Stage reference can be entered using its fully qualified name (for example MyProgram.S0 through MyProgram.S126) or simply its stage number (for example S0 through S126).

 

Last / Exception Stage is the final stage in the contiguous range of stages. The Last Stage can only be a stage in the same Program; it cannot reference a stage in a different Program. The Last / Exception Stage reference can be entered using its fully qualified name - for example MyStage.S0 through MyStage.S127 - or simply its stage number - for example S0 through S127.

 


Status Display:

 

The status display shows the current Index value and which Stages in the contiguous range are enabled .

 


See Also:

JMP - Jump To Stage

 

JMPI - Indexed Jump

 

SG - Stage

 

SGRST - Disable Stage

 

SGRSTI - Indexed Disable Stage

 

SGRSTR - Disable Range of Stages

 

SGSET - Enable Stage

 

SGSETI - Indexed Enable Stage

 

SGDIVRG - Jump to Multiple Stages

 

SGCONVRG - Converge Multiple Stages to SG

 


Related Topics:

Stage Programming Concepts

Introduction

 

Example 1 - A Simple 2-State Process

 

Stage Transition Instructions

 

Example 2 - A Lamp On / Off Controller

 

Example 3 - A Garage Door Opener

 

Review - Steps to Writing Successful Stage Programs

 


Example: