Movement ¶ Direct SMC_FollowPosition (FunctionBlock) SMC_FollowPositionVelocity (FunctionBlock) SMC_FollowSetValues (FunctionBlock) SMC_FollowVelocity (FunctionBlock) SMC_SetTorque (FunctionBlock) SMC_TrackAxis (FunctionBlock) SMC_TrackSetValues (FunctionBlock) MC_AccelerationProfile (FunctionBlock) MC_Halt (FunctionBlock) MC_HaltSuperImposed (FunctionBlock) MC_Home (FunctionBlock) MC_Jog (FunctionBlock) MC_MoveAbsolute (FunctionBlock) MC_MoveAdditive (FunctionBlock) MC_MoveRelative (FunctionBlock) MC_MoveSuperImposed (FunctionBlock) MC_MoveVelocity (FunctionBlock) MC_PositionProfile (FunctionBlock) MC_SetOverride (FunctionBlock) MC_Stop (FunctionBlock) MC_VelocityProfile (FunctionBlock) Master/Slave MC_CamIn (FunctionBlock) MC_CamOut (FunctionBlock) MC_GearIn (FunctionBlock) MC_GearInPos (FunctionBlock) MC_GearOut (FunctionBlock) MC_Phasing (FunctionBlock) SMC_BacklashCompensation (FunctionBlock) SMC_GetOverride (FunctionBlock) SMC_Homing (FunctionBlock) SMC_Inch (FunctionBlock) SMC_MoveContinuousAbsolute (FunctionBlock) SMC_MoveContinuousRelative (FunctionBlock)
MC_MoveAbsolute (FB) ¶ FUNCTION_BLOCK MC_MoveAbsolute This function block causes the axis to be moved to an absolute position and uses the values for Velocity , Deceleration , Acceleration and Jerk . If no further actions are pending, the execution ends with velocity 0. (See: standstill ) Example Use of MC_MoveAbsolute The following illustration shows two possibilities for combining two instances ( First and Second ) of the type MC_MoveAbsolute . In the left-hand part of the diagram the Second instance is called after the First instance. If First has reached the specified position of 6000 and the input Velocity is 0, then the Done output will cause the Second instance to move the axis to the position 10000. In the right-hand part of the diagram, the execution is started by Second while First is still operating. The motion caused by First is interrupted and aborted by the Test signal which is transmitted during the constant velocity phase of First . Second steers directly to position 10000, even though position 6000 has not yet been reached. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Input Execute BOOL TRUE : Starts execution. Position LREAL Target position of the motion in technical units [u], can be negative or positive. Velocity LREAL Maximum velocity in techincal units per second [u/s]. Is always positive. Is not necessarily reached. Acceleration LREAL Acceleration in [u/s²]. Is always positive. Increasing motor energy Deceleration LREAL Deceleration in [u/s²]. Is always positive. Decreasing motor energy Jerk LREAL Maximum magnitude of jerk in [u/s³] Direction MC_Direction shortest The direction is used for modulo axes to determine the modulo-period in which the target position is reached. For finite axes, the input is ignored. BufferMode MC_BUFFER_MODE Defines the chronological sequence of the FB relative to the previous block. If the function block is Busy, then only BufferMode=Aborting is allowed. Output Done BOOL TRUE : End position has been reached. Busy BOOL TRUE : Function block is in operation. If no further actions are pending, the execution ends with velocity 0. Active BOOL Indicates that the FB has control on the axis CommandAborted BOOL TRUE : The execution is interrupted by an other function block. Error BOOL TRUE : Error has occurred. ErrorID SMC_ERROR Error identification
MC_MoveAdditive (FB) ¶ FUNCTION_BLOCK MC_MoveAdditive This function block causes a controlled motion that adds the specified distance to the last specified target position. The axis is thereby in the discrete_motion mode. The current target position can result from a preceding motion of MC_MoveAdditive that was aborted. If the function block runs in the continuous_motion mode, the specified distance is added to the current position during the processing time. Example Use of MC_MoveAdditive The illustration shows how the First instance of the type MC_MoveAbsolute and the Second instance of the type MC_MoveAdditive are combined. The axis is in the discrete_motion mode. In the left-hand part of the illustration Second is called after First . If First has reached the specified position of 6000, the velocity is 0 and the Done is set, Second will cause the axis to move to the position 10000. In the right-hand part of the illustration, the execution is started by Second while First is still operating. The motion of First is interrupted and aborted by the Test signal which is transmitted during the constant velocity phase of First . The distance 4000 is added to the last commended position of 60000. Then Second moves the axis to the resulting position 10000. Sequence of two complete actions: Sequential execution of two complete motions Second motion interrupts first motion: Motion of “Second” interrupts the motion of “First” InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Reference to axis Input Execute BOOL TRUE : Starts execution Distance LREAL Relative distance for the motion in technical unit [u] Velocity LREAL Maximum velocity Is always positive in [u/s]. Does not need to be achieved. Acceleration LREAL Acceleration Is always positive in [u/s²]. Increasing motor energy Deceleration LREAL Deceleration Is always positive in [u/s²]. Decreasing motor energy Jerk LREAL Is always positive in [u/s³]. Output Done BOOL TRUE : Distance has been achieved. Busy BOOL TRUE : Function block is in operation. CommandAborted BOOL TRUE : Execution has been interrupted by another function block instance operating on the axis. Error BOOL TRUE : Error has occurred. ErrorID SMC_ERROR Error identification
MC_MoveRelative (FB) ¶ FUNCTION_BLOCK MC_MoveRelative This function block commands a controlled motion of a specified distance. The motion ends in standstill (unless blended to a followup movement). Example Use of MC_MoveRelative The illustration shows how two instances ( First and Second ) of type MC_MoveRelative are combined. In the left-hand part of the illustration, Second is called after First . If First has reached the specified position distance 6000, the velocity is 0 and First.Done is set. Then the Second instance will cause the axis to move to position 10000. In the right-hand part of the illustration, the execution is started by Second while First is still operating. The motion of First is interrupted and aborted by the Test signal, which is transmitted during the constant velocity phase of First . The distance 4000 is added to the actual position 3250. Then Second moves the axis to the resulting position 7250. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Reference to axis Input Execute BOOL TRUE : Starts execution. Distance LREAL Relative distance for the motion in technical unit [u]. Velocity LREAL Maximum velocity in techincal units per second [u/s]. Is always positive. Is not necessarily reached. Acceleration LREAL Acceleration in [u/s²]. Is always positive. Increasing motor energy Deceleration LREAL Deceleration in [u/s²]. Is always positive. Decreasing motor energy Jerk LREAL Maximum magnitude of jerk in [u/s³] BufferMode MC_BUFFER_MODE Defines the chronological sequence of the FB relative to the previous block. If the function block is Busy, then only BufferMode=Aborting is allowed. Output Done BOOL TRUE : Distance has been achieved. Busy BOOL TRUE : Function block is in operation. Active BOOL Indicates that the FB has control on the axis CommandAborted BOOL TRUE : Execution has been interrupted by another function block instance operating on the axis. Error BOOL TRUE : Error has occurred. ErrorID SMC_ERROR Error identification
MC_MoveSuperImposed (FB) ¶ FUNCTION_BLOCK FINAL MC_MoveSuperImposed The function block causes an additional movement, on top of an ongoing (original) movement of the axis. The original movement is not aborted, instead the movement by the given distance is superimposed. If MC_MoveSuperImposed is active, a further aborting command on the same axis interrupts both commands, i.e. MC_MoveSuperImposed and the original command. A further buffered or blending command does _not_ interrupt the superimposed movement. The superimposed movement is continued in parallel. The function block MC_MoveSuperImposed must be called after the function block of the original movement. If a movement command is called after MC_MoveSuperImposed , the error SMC_MSI_INVALID_EXECUTION_ORDER is returned. If an instance of MC_MoveSuperImposed is active and a second instance of type MC_MoveSuperImposed is called, an error is reported by the second instance. If an instance of MC_MoveSuperImposed is active and is started again (with possibly different inputs) with a new rising edge on Execute , the active superimposed movement is aborted and replaced by the new superimposed movement, while the original motion function block remains active. The new distance is relative to the start of the first superimposed movement. This means that a new distance of 0 will result in a slowdown that cancels the effect of the first superimposed movement. To halt a superimposed movement, use the function block MC_HaltSuperImposed . While MC_HaltSuperImposed is active, no further superimposed movement can be started. In the standstill state of the axis, MC_MoveSuperImposed behaves like MC_MoveRelative . The Acceleration , Deceleration and Jerk inputs are additional values (not absolute values), which are added to the original movement. The original function block will always complete its movement within the same duration and with no consideration for any instance of MC_MoveSuperImposed acting at the same time. MC_MoveSuperImposed acts on the slave axis while MC_Phasing operates on the master axis. Example Use of MC_MoveSuperImposed The following illustration shows how the First instance of the type MC_MoveRelative is combined with the Second instance of the type MC_MoveSuperImposed . The signal curve of CommandAborted is not shown because the new command works on the same instance. The end position lies between 7000 and 8000 depending on the time behavior of the abortion of the second command set for MC_MoveSuperimposed . Use of MC_MoveSuperImposed and cam plate motion The double line of the slave Velocity indicates the effect on the Axis , which is in synchronized motion of cam plate execution and MC_MoveSuperimposed . The same applies to the associated slave position. Slave Velocity with MC_Superimposed : Slave Velocity under the influence of MC_SuperImposed . Slave Position with MC_Superimposed : Slave Position under the influence of MC_SuperImposed . InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Reference to the axis Input Execute BOOL A rising edge starts the superimposed movement. Abort BOOL Aborts an ongoing movement and resets all outputs. If set during an active movement, then the axis position will jump back to the position it would have had without the superimposed movement. Distance LREAL Additional distance in technical units [u]. If the FB interrupts itself, a superimposed movement aborted by a new superimposed movement, then the distance is relative to the start position of the interrupted superimposed movement. VelocityDiff LREAL Maximum velocity of the superimposed movement Acceleration LREAL Maximum acceleration of the superimposed movement Deceleration LREAL Maximum deceleration of the superimposed movement Jerk LREAL Maximum jerk of the superimposed movement Output Done BOOL TRUE : Distance is reached Busy BOOL TRUE : Function block is in operation. CommandAborted BOOL TRUE : Execution has been interrupted by another function block instance operating on Axis . Error BOOL TRUE : Error has occurred. ErrorID SMC_ERROR Error identification DistanceTravelled LREAL The superimposed distance travelled so far. Only set if Busy or Done. SuperImposedVelocity LREAL The current superimposed velocity. Only set if Busy or Done. SuperImposedAcceleration LREAL The current superimposed acceleration. Only set if Busy or Done.
Performance ¶ SMC_PerfStat (FunctionBlock) SMC_PerfTimerSum (Function) SMC_SeriesStat (FunctionBlock)
SMC3_BrakeStatus (FB) ¶ FUNCTION_BLOCK SMC3_BrakeStatus This function block reads the current status of a mechanical brake (if the brake is opened or closed). InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Input bEnable BOOL FALSE TRUE : Activates FB, else inactive. Output bValid BOOL TRUE : At least one value since enabling has been received. bBusy BOOL TRUE : FB is not idle. bError BOOL FALSE TRUE : Error has occured within the function block. nErrorID SMC_ERROR 0 Error identification bBrakeClosed BOOL TRUE : Brake is closed.
SMC_AxisDiagnosticLog (FB) ¶ FUNCTION_BLOCK SMC_AxisDiagnosticLog This function block is designed for writing cyclically a set of parameter values belonging to one axis to a file. This output file is ideal for diagnosis purposes. As the writing of data on a data medium usually needs some time, this module stores the collected data in a buffer of size 10 kByte and the data will not be written until module action WriteToFile is called. This action call should be placed in a slower (ca. 50 ms) task of lower priority, in order to prevent the actual motion task as well as the motion itself from being disturbed. As soon as the buffer is exceeded, the module will create an error output. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Input bExecute BOOL Rising edge: Starts the execution of the function block. bCloseFile BOOL The module closes the file as soon as this input gets TRUE. sFileName STRING(255) File name (preceded by path). bSetPosition BOOL TRUE : The associated value of the axis to be written to the file. bActPosition BOOL TRUE : The associated value of the axis to be written to the file. bSetVelocity BOOL TRUE : The associated value of the axis to be written to the file. bActVelocity BOOL TRUE : The associated value of the axis to be written to the file. bSetAcceleration BOOL TRUE : The associated value of the axis to be written to the file. bActAcceleration BOOL TRUE : The associated value of the axis to be written to the file. bySeparatorChar BYTE 9 ASCII-Code of the letter, which is to be written between two values of same date. sRecordSeparatorString STRING(3) ‘$R$N’ String to be written at the end of a date. eMode SMC_LOGGERMODE LOG_CONTINUOUS LOG_CONTINUOUS : Continuous logging into file. LOG_AT_CLOSE : Continuous logging into buffer (10kByte). When bCloseFile is set, the buffer content is written to file. Output bDone BOOL TRUE : Logging has been terminated and file is closed. bBusy BOOL FALSE TRUE : Execution of function block has not been finished. bError BOOL TRUE : Error has occurred within the function block. ErrorID SMC_ERROR Error identification bRecording BOOL FALSE TRUE : Module records. Structure: WriteToFile (Action)
SMC_CheckAxisCommunication (FB) ¶ FUNCTION_BLOCK SMC_CheckAxisCommunication Returns the current communication state of an axis. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Input bEnable BOOL TRUE : Starts the check Output bValid BOOL TRUE : The outputs are valid bError BOOL TRUE : Error has occurred. eErrorID SMC_ERROR Error identification bOperational BOOL TRUE : The communication state is operational (100). eComState SMC_CommunicationState The communication state, abstracted as an enumeration. wComState WORD The raw value of parameter 1013 ( wCommunicationState )
SMC_CheckLimits (FB) ¶ FUNCTION_BLOCK SMC_CheckLimits This function block may be employed for checking whether the current set points of the drive exceed the maximum values configured in the controller. The result of the check will be indicated by output bLimitsExceeded . InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Input bEnable BOOL TRUE : Starts the execution of function block. bCheckVel BOOL TRUE TRUE : Checks the velocity. bCheckAccDec BOOL FALSE TRUE : Checks the set acceleration and the set deceleration. Output bBusy BOOL TRUE : Execution of function block has nor been finished yet. bError BOOL TRUE : Error has occurred within the function block. iErrorID SMC_ERROR Error identification bLimitsExceeded BOOL TRUE : The current set points exceed the limits which are defined within the PLC configuration and stored within AXIS_REF_SM3 ( fSWMaxVelocity , fSWMaxAcceleration or fSWMaxDeceleration ).