Equipment Sequence command (SCMD)
This instruction applies to the
Logix Designer
5580 P-controllers. The Logix Designer
5580 P-controllers also support controller redundancy.
TIP:
When using this instruction with
ControlLogix
redundancy system, outputs controlled by this instruction may not be bumpless during redundancy switchover, if the instruction and sequence program are not scheduled in the highest priority task.
WARNING:
When using redundancy with an
Equipment Sequence
, sequence execution may not be as expected after switchover if the phase and sequence are not scheduled on the same task.Use the
Equipment Sequence
command (SCMD) instruction to change the state of an Equipment Sequence
. The SCMD instruction can send these commands to an Equipment Sequence
: START, RESTART, HOLD, STOP, ABORT, RESET, PAUSE, RESUME, and AUTOPAUSE. The calling program must either be attached as owner to the Equipment Sequence
or there is no owner of the Equipment Sequence
before the SCMD instruction can run. Use the SATT instruction to attach to an Equipment Sequence
. In addition, the Equipment Sequence
must be in the correct state (see chart below) for the command to execute successfully.Like the SCMD instruction, the
Equipment Sequence
Override instruction (SOVR) also changes the state of an Equipment Sequence
, but it changes the state regardless of ownership. If the SCMD instruction must execute regardless of ownership, use an SOVR instruction instead of an SCMD instruction.
IMPORTANT:
The SOVR instruction is intended for emergencies only. Control Engineers should use caution when deciding to use it.
This is a transitional instruction. Follow these steps when using it:
- In ladder logic, insert an instruction to toggle the rung-condition-in from false to true each time the instruction should execute.
- In a Structured Text routine, insert a condition for the instruction to cause it to execute only on a transition.
The SCMD instruction command transitions an
Equipment Sequence
to another state. SCMD instruction commands may only be processed in certain states, with the exceptions of PAUSE, RESUME, and AUTOPAUSE, which are valid in all states. The table lists the states in which commands are valid.Command | Valid in these states |
---|---|
START | Valid in the IDLE state. |
RESTART | Valid in the HELD state. |
HOLD | Valid in the RUNNING and RESTARTING states. |
STOP | Valid in the RUNNING, HOLDING, RESTARTING, and HELD states. |
ABORT | Valid in the RUNNING, HOLDING, RESTARTING, STOPPING, and HELD states. |
RESET | Valid in the ABORTED, STOPPED, and COMPLETE states. |
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
SCMD(Sequence Name, Sequence Command, Result)
Operands
Ladder Diagram
Operand | Data Type | Format | Description |
Sequence Name | SEQUENCE | Name of the Equipment Sequence | Equipment Sequence to perform the command. |
Command | Command Enum | Enumeration of the command | Command to send to the Equipment Sequence . Send one of these commands: START, RESTART, HOLD, STOP, ABORT, RESET, PAUSE, RESUME, or AUTOPAUSE. |
Result | DINT | Tag | For an instruction to return a success or failure code, enter a DINT tag where the result code is stored. Otherwise, enter 0. |
Structured Text
The operands are the same as for the Ladder Diagram.
Guidelines for using the SCMD Instruction
Guideline | Details |
---|---|
Limit execution of the SCMD instruction to a single scan. | Limit the execution of the SCMD instruction to a single scan. Each command applies to only a specific state or states. Once the Equipment Sequence changes state, the command is no longer valid. To limit execution, use methods such as:Run the SCMD instruction within a P1 Pulse (Rising Edge) or P0 Pulse (Falling Edge) action. Place a one-shot instruction before the SCMD instruction. Run the SCMD instruction and then advance to the next step. |
The Equipment Sequence must be either owned by the program to command it or have no owners for the program to command it. | The ownership instructions are Attach (SATT) and Detach (SDET). |
SCMD Result Codes
Code (Desc) | Description |
---|---|
0 | The command was successful. |
24578 | The command is not valid for the current state of the Sequence. |
24579 | The caller is attached to this Sequence, but it is not the current Owner of it. A higher priority application is currently the Owner of this sequence. |
24580 | The caller is not attached to the Sequence. |
24594 | The Equipment Sequence is unscheduled, inhibited, or in a task that is inhibited. |
24604 | An equal or higher priority command is being processed. |
24631 | Too many sequence parameter or step tags are defined per step, so events cannot be handled and the START command failed. |
Arithmetic Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Index Through Arrays for operand related faults.
Execution
At instruction execution, the SCMD instruction commands the specified
Equipment Sequence
.Ladder Diagram
Condition | Action Taken |
---|---|
Prescan | No action taken |
Rung-condition-in is false | No action taken |
Rung-condition-in is true | The instruction executes. |
Postscan | No action taken |
Structured Text
Condition | Action Taken |
---|---|
Prescan | No action taken |
Rung-condition-in is false | No action taken |
Rung-condition-in is true | The instruction executes. |
Postscan | No action taken |
Example
Ladder Diagram
Structured Text
if (CommandControl) then
SCMD(Make_Product_101, Start, Result);
end_if
Provide Feedback