Siemens SCL programming instruction status information

1. Status information that needs to be considered when programming

When stepping through motion control commands, make sure to wait for the active command to complete before starting a new command!

Using the status messages of the Motion Control instructions and the "StatusBits" tag of the technology object, you can check whether the active command has been completed.

In the following example, follow the sequence shown. If this order is not followed, an axis or command error will be displayed.

1.1 Enabling the axis with the Motion Control instruction "MC_Power"

The axis can only execute motion jobs if it is enabled, by ANDing the variable <axis name>.StatusBits.Enable=TRUE with the output parameter Status=TRUE of the motion control instruction "MC_Power", it will be checked whether the axis is enabled.

1.2 Acknowledging errors with Motion Control instruction "MC_Reset"

 Errors requiring acknowledgment must be acknowledged with "MC_Reset" before enabling the Motion Control instruction.

Before enabling the new command, it is necessary to check whether the error has been successfully acknowledged by ANDing the variable <axis name>.StatusBits.Error=FALSE with the output parameter Done=TRUE of the Motion Control instruction "MC_Reset".

1.3 Home the axis using the motion control instruction "MC_Home"

The axis must be homed before the MC_MoveAbsolute command can be started. You can check whether the axis has been homed by ANDing the variable <Axis name>.StatusBits.HomingDone=TRUE with the output parameter Done=TRUE of the Motion Control instruction "MC_Home".

1.4 Avoid using the same background multiple times

All information for motion control commands is stored in the instance DB.

Do not use this background to start a new command if you want to keep track of the state of the current command. If you want to track commands individually, you need to use a different context. If one instance is used for several Motion Control commands, the status and error messages of the individual commands will overwrite each other.

2. The command output parameter Done signal changes

2.1 Command execution completed

If the Motion Control command has been completely executed before it is concluded, this is indicated by the value TRUE at the output parameter "Done". The signal state of the input parameter "Execute" influences the display duration at the output parameter "Done":

2.2 Abort command

If the Motion Control command was aborted during execution, this is indicated by the value TRUE at the output parameter "CommandAborted". The signal state of the input parameter "Execute" influences the display duration at the output parameter "CommandAborted":

2.3 Error during command execution

If the Motion Control command was aborted during execution, this is indicated by the value TRUE at the output parameter "CommandAborted". The signal state of the input parameter "Execute" influences the display duration at the output parameter "CommandAborted":

3. Error display of motion control statements

The Motion Control instruction indicates all errors in the Motion Control command and technology object at the Motion Control instruction output parameters "Error", "ErrorID" and "ErroInfo".

If the output parameter "Error" has the value TRUE, the entire command or parts thereof cannot be executed. The cause of the error is indicated by the value of the output parameter "ErrorID". The value of the output parameter "ErrorInfo" returns detailed information on the cause of the error.

3.1 Traversing errors with axis stop (e.g. hardware limit switch approached)

If the axis is running, the axis will be stopped with the configured deceleration or emergency stop deceleration, depending on the error.

Such errors are indicated in the wrong triggering of the Motion Control instruction and the Motion Control instruction "MC_Power".

3.2 Operating errors without axis stop (e.g. axis not homing)

Running errors without an axis stop occur during user program execution.

If the axis is running, it will continue to run, such errors are only indicated in the motion control instruction that triggered the error.

3.3 Configuration error in Motion Control instruction (e.g. wrong value for parameter "Velocity")

A parameterization error will occur if incorrect information is specified in the input parameters of a Motion Control instruction.

If the axis is running, it will continue to run, such errors are only indicated in the motion control instruction that triggered the error.

3.4 Incorrect configuration of the "Axis" technology object (e.g. invalid value for "Acceleration")

Configuration errors occur if one or more parameters are incorrectly configured in the axis configuration, or if editable configuration data are incorrectly modified during program runtime. Stops a running axis with the configured emergency stop deceleration.

Such errors are indicated in the wrong triggering of the Motion Control instruction and the Motion Control instruction "MC_Power".

3.5 Incorrect configuration of the "Command Table" technology object (e.g. invalid value for "Speed")

Configuration errors occur if one or more parameters are incorrectly configured in the axis configuration, or if editable configuration data are incorrectly modified during program runtime. If the axis is running, it will continue to run.

Such errors are only indicated in the Motion Control instruction "MC_CommandTable".

3.6 Internal errors

When an internal error occurs, the axis will be stopped. Such errors are indicated in the wrongly triggered Motion Control instruction and sometimes also in the Motion Control instruction "MC_Power".

Guess you like

Origin blog.csdn.net/viixin/article/details/130720964