SMC_RAMPTYPE (ENUM) ¶ TYPE SMC_RAMPTYPE : InOut: Name Initial trapez 0 sinsquare 1 quadratic_ramp 2 quadratic_smooth_ramp 3
SMC_SWITCHING_STATE (ENUM) ¶ TYPE SMC_SWITCHING_STATE : InOut: Name Initial SMC_ST_SWITCHED_OFF 0 SMC_ST_SWITCHING_ON 1 SMC_ST_SWITCHED_ON 2 SMC_ST_SWITCHING_OFF 3 SMC_ST_UNEXPECTED_SWITCHED_OFF 4 SMC_ST_HOMING 5 SMC_ST_INITIALIZING 255
SMC_BacklashCompensation (FB) ¶ FUNCTION_BLOCK SMC_BacklashCompensation This function block can be used to compensate the backlash which arises for example at a belt drive or in a gear-box. For this purpose a (usually virtual) master axis gets mirrored on the real slave axis, whose backlash should be compensated. The function block works similar to a phasing function block, the phase depends on the direction of the master axis. If the master axis starts in a certain direction, the slave axis does the same plus an additional movement (distance: fBacklash ) in this direction; if the master axis inverts, the slave axis also turns around and additionally covers the double distance fBacklash in this new direction. Take care that the master axis and the slave axis are at the same position when the module starts working, because otherwise the slave axis would be positioned on the master axis. InOut: Scope Name Type Initial Comment Inout Master AXIS_REF_SM3 Reference to master axis Slave AXIS_REF_SM3 Reference to slave axis Input bExecute BOOL Rising edge: Starts the execution of the function block. It stays active until the slave axis gets interrupted by another movement, or if an error occurs. fBacklash LREAL Distance/Backlash to be compensated. fCompensationVel LREAL Additional velocity, which should be used for the compensation. fCompensationAcc LREAL Additional acceleration, which should be used for the compensation. fCompensationDec LREAL Additional deceleration, which should be used for the compensation. fCompensationJerk LREAL Additional jerk, which should be used for the compensation. eBacklashMode SMC_BACKLASH_MODE SMC_BL_AUTO The mode of backlash compensation. SMC_BL_AUTO : Direction in which the master axis moves; determines the compensation direction. SMC_BL_POSITIVE : Compensation in positive direction, independent on the movement of the master axis. SMC_BL_NEGATIVE : Compensation in negative direction, independent on the movement of the master axis. SMC_BL_OFF : No compensation eBacklashStartState SMC_BACKLASH_STARTSTATE SMC_BL_START_NONE The start condition of the axis. SMC_BL_START_NEGATIVE : The slave axis is under traction in negative direction, that is: a movement in negative direction needs no compensation; in case of a movement in positive direction the double fBacklash -distance will be made up. SMC_BL_START_POSITIVE : The slave axis is under traction in positive direction, that is: a movement in positive direction needs no compensation; in case of a movement in negative direction the double fBacklash -distance will be made up. SMC_BL_START_NONE : The slave axis is not under traction; a movement in positive or negative direction will cause a corresponding compensating movement of distance fBacklash . Output bBusy BOOL TRUE : Execution of the function block is not finished yet. bCommandAborted BOOL TRUE : Command has been aborted by another command. bError BOOL TRUE : Error has occured within the function block. iErrorID SMC_ERROR Error identification bCompensating BOOL TRUE : While compensating a backlash.
SMC_GetOverride (FB) ¶ FUNCTION_BLOCK SMC_GetOverride This function block returns the velocity, acceleration and jerk override factors of an axis. InOut: Scope Name Type Comment Inout Axis AXIS_REF_SM3 Reference to the axis Input Enable BOOL TRUE : The override factors are read continuously Output Valid BOOL TRUE : The override factors are read successfully Busy BOOL TRUE : Function block is in operation Error BOOL TRUE : Error has occurred during execution ErrorID SMC_ERROR Error identification VelFactor LREAL The override factor for the velocity AccFactor LREAL The override factor for the acceleration/deceleration JerkFactor LREAL The override factor for the jerk
SMC_Homing (FB) ¶ FUNCTION_BLOCK SMC_Homing This function block causes the execution of a homing sequence. If SMC_Homing is executed, the axis is moved at fVelocityFast in the direction specified by nDirection as long as the reference switch is open ( bReferenceSwitch := TRUE ). Once the reference switch is closed ( bReferenceSwitch := FALSE ), the axis is decelerated and driven at fVelocitySlow (the direction depends on the homing mode). At the point at which the reference switch opens again ( bReferenceSwitch := TRUE ), the following actions are performed: the index pulse and index position are used (optionally), the reference position fHomePosition is set, the drive is stopped. (The order of these actions depends on the homing mode, see SMC_HOMING_MODE .) InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Input bExecute BOOL Rising edge: Starts the execution of the function block. fHomePosition LREAL Home position; set after homing (in technical unit [u]) fVelocitySlow LREAL Low velocity; used to drive out of the reference switch [u/s] fVelocityFast LREAL High velocity; used until reference switch is found [u/s] fAcceleration LREAL Value of the acceleration (increasing energy of the motor) [u/s^2] fDeceleration LREAL Value of the deceleration (decreasing energy of the motor) [u/s^2] fJerk LREAL Value of the Jerk [u/s^3] nDirection MC_Direction negative The direction for the fast movement searching the reference switch. ( positive or negative ) bReferenceSwitch BOOL TRUE TRUE : The switch is open (the drive is not in the switch) FALSE : The switch is closed (the drive is in the switch) fSignalDelay LREAL Time [s] for bReferenceSwitch to be transmitted. nHomingMode SMC_HOMING_MODE FAST_BSLOW_S_STOP Homing mode bReturnToZero BOOL TRUE : Moves to position zero after homing. bIndexOccured BOOL TRUE : Index pulse has been detected, the index position is stored in input fIndexPosition . fIndexPosition LREAL Position where index occured bIgnoreHWLimit BOOL Disables the limit switch handling in the driver by setting bHWLimitEnable to FALSE during homing. Please note that for most servo drives, this is necessary but not sufficient to disable the limit switch handling in the drive. Often, the limit switch handling in the drive must be deactivated by other means before calling SMC_Homing, and reactivated when SMC_Homing is done. (For example by writing a drive-specific configuration object.) Output bDone BOOL TRUE : Homing has been done. bBusy BOOL TRUE : FB is not idle. bCommandAborted BOOL TRUE : Commanded motion has been interrupted by any motion FB acting on the same axis except MoveSuperImposed . bError BOOL TRUE : Error has occured within function block. nErrorID SMC_ERROR Error identification* bStartLatchingIndex BOOL For some homing modes, the index pulse is evaluated. TRUE : Storing of the index pulse has been started and must be done by the application. The result is expected in the inputs bIndexOccured and fIndexPosition .
SMC_Inch (FB) ¶ FUNCTION_BLOCK SMC_Inch This function block causes a gradual motion on the axis, which is carried out step by step. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis Input InchForward BOOL TRUE : Axis is moved with the dynamic values Velocity , Acceleration , Deceleration and Jerk in a positive direction until Distance has been travelled. If InchForward is set to FALSE and back to TRUE , a further motion is started. If InchForward is set to FALSE before Distance has been travelled, the axis is immediately decelerated to the velocity value zero. Busy is then set to FALSE . If InchBackward and InchForward are TRUE at the same time, then no motions are carried out. InchBackward BOOL TRUE : Axis is moved with the dynamic values Velocity , Acceleration , Deceleration and Jerk in a negative direction until Distance has been travelled. If InchBackward is set to FALSE and back to TRUE , a further motion is started. If InchBackward is set to FALSE before Distance has been travelled, the axis is immediately decelerated to the velocity value zero and Busy is then set to FALSE . If InchBackward and InchForward are TRUE at the same time, then no motions are carried out. Distance LREAL Distance that is travelled Velocity LREAL Positive velocity in [u/s] Acceleration LREAL Positive acceleration in [u/s²] Deceleration LREAL Positive deceleration in [u/s²] Jerk LREAL Positive jerk in [u/s³] Output Busy BOOL FALSE TRUE : Function block operating CommandAborted BOOL FALSE TRUE : Execution has been interrupted by another function block instance operating on Axis . CommandAborted remains set as long as InchForward or InchBackward is set, but for at least one cycle. Error BOOL TRUE : Error has occurred while InchForward or InchBackward have been set for one cycle. ErrorId SMC_ERROR Error identification
SMC_MoveContinuousAbsolute (FB) ¶ FUNCTION_BLOCK SMC_MoveContinuousAbsolute This function block executes an absolute movement with a given end-velocity. In contrast to MC_MoveAbsolute , it will not reach the target position with zero velocity, but with the specified EndVelocity . It is designed for generating via movements. Once the target position has been reached, the function block sets the InEndVelocity output and keeps this velocity until interrupted by another movement. Note Take care when using MC_SetOverride while this function block is active. If AdaptEndVelToAvoidOvershoot is set to FALSE, reducing the acceleration or jerk override or changing the velocity override can lead to a position overshoot or reversal. This happens if the (potentially overridden) EndVelocity cannot be reached from the current state using the overridden Acceleration , Deceleration , and Jerk limits. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis Input Execute BOOL Rising edge: Starts the execution of the function block. Position LREAL Target position (in technical units [u]) Velocity LREAL Value of maximum velocity (not necessarily reached) [u/s] EndVelocity LREAL Unsigned value of end velocity [u/s] EndVelocityDirection MC_Direction current Determines dthe irection of end velocity. Permissible values: positive , negative , current ; Not applicable: shortest , fastest Acceleration LREAL Value of acceleration (increasing energy of the motor) [u/s²] Deceleration LREAL Value of deceleration (decreasing energy of the motor) [u/s²] Jerk LREAL Value of the jerk [u/s³] Direction MC_Direction shortest Direction of movement, only used for modulo axes. Permissible values: positive , negative , current , shortest Not applicable: fastest AdaptEndVelToAvoidOvershoot BOOL In some cases, a given EndVelocity may lead to a position overshoot. For example, if the remaining distance is too short to reach the end velocity from the current velocity and acceleration, then the axis may turn in opposite direction, leading to an overshoot. Another case is an end velocity that has opposite direction to the distance to be travelled. To arrive at the target position with this velocity, the axis will first exceed the position, reverse and accelerate to the end velocity, again causing an overshoot. If the input AdaptEndVelToAvoidOvershoot is TRUE, then the effective end velocity will be adapted in order to avoid an overshoot. These are the two situatons where an overshoot will be avoided: First, if the remaining distance is too short to reach the desired EndVelocity. In this case, the effective end velocity is reduced (if the current velocity is lower) or increased (if the current velocity is higher) to the closest velocity that can be reached in the given distance. Second, if the direction of the end velocity is opposite to the direction of the movement. In this case, the effective end velocity will be set to zero. Note that the direction of the movement is not determined by the current velocity and acceleration, but by the sign of the distacne to the target position. Note that the output InEndVelocity is set only after the programmed end velocity has been reached. Once the given position has been reached the output PositionReached is set and the axis is accelerated or decelerated to the given (programmed) EndVelocity. Output InEndVelocity BOOL TRUE : Commanded posiotion has been reached and the programmed EndVelocity has been reached. If AdaptEndVelToAvoidOvershoot is FALSE, this output rises to TRUE in the same cycle as PositionReached . Otherwise, it may rise to TRUE later. PositionReached BOOL TRUE : Commanded position has been reached. Axis runs with commanded velocity``EndVelocity`` (or possibly slower if AdaptEndVelToAvoidOvershoot has been set). Busy BOOL TRUE : Execution of function block has not been finished yet. CommandAborted BOOL TRUE : Command has been aborted by another command. Error BOOL TRUE : Error has occurred within the function block. ErrorID SMC_ERROR Error identification
SMC_MoveContinuousRelative (FB) ¶ FUNCTION_BLOCK SMC_MoveContinuousRelative This function block executes a relative movement with a given end-velocity. In contrast to MC_MoveRelative , it will not reach the target position with zero velocity, but with the specified EndVelocity . It is designed for generating via movements. Once the target position has been reached, the function block sets the InEndVelocity output and keeps this velocity until interrupted by another movement. Note Take care when using MC_SetOverride while this function block is active. If AdaptEndVelToAvoidOvershoot is set to FALSE, reducing the acceleration or jerk override or changing the velocity override can lead to a position overshoot or reversal. This happens if the (potentially overridden) EndVelocity cannot be reached from the current state using the overridden Acceleration , Deceleration , and Jerk limits. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis Input Execute BOOL Rising edge: Starts the execution of the function block. Distance LREAL Relative (signed) distance to travel (in technical units [u]) Velocity LREAL Value of maximum velocity (not necessarily reached) [u/s] EndVelocity LREAL Unsigned (!) value of end velocity in [u/s]. This end velocity may also be higher than Velocity. EndVelocityDirection MC_Direction current Determines direction of end velocity. permissible values: positive , negative , current . Not applicable: shortest , fastest . Acceleration LREAL Value of acceleration (increasing energy of the motor) [u/s²] Deceleration LREAL Value of deceleration (decreasing energy of the motor) [u/s²] Jerk LREAL Value of the Jerk [u/s³] AdaptEndVelToAvoidOvershoot BOOL In some cases, a given EndVelocity may lead to a position overshoot. For example, if the remaining distance is too short to reach the end velocity from the current velocity and acceleration, then the axis may turn in opposite direction, leading to an overshoot. Another case is an end velocity that has opposite direction to the distance to be travelled. To arrive at the target position with this velocity, the axis will first exceed the distance, reverse and accelerate to the end velocity, again causing an overshoot. If the input AdaptEndVelToAvoidOvershoot is TRUE, then the effective end velocity will be adapted in order to avoid an overshoot. These are the two situatons where an overshoot will be avoided: First, if the remaining distance is too short to reach the desired EndVelocity. In this case, the effective end velocity is reduced (if the current velocity is lower) or increased (if the current velocity is higher) to the closest velocity that can be reached in the given distance. Second, if the direction of the end velocity is opposite to the direction of the movement. In this case, the effective end velocity will be set to zero. Note that the direction of the movement is not determined by the current velocity and acceleration, but by the sign of the distacne to the target position. Note that the output InEndVelocity is set only after the programmed end velocity has been reached. Once the given distance has been travelled the output DistanceTravelled is set and the axis is accelerated or decelerated to the given (programmed) EndVelocity. Output InEndVelocity BOOL TRUE : Commanded distance has been travelled and the programmed EndVelocity has been reached. If AdaptEndVelToAvoidOvershoot is FALSE, this output rises to TRUE in the same cycle as DistanceTravelled . Otherwise, it may rise to TRUE later. DistanceTravelled BOOL TRUE : Commanded distance has been travelled. Axis runs with commanded velocity``EndVelocity`` (or possibly slower if AdaptEndVelToAvoidOvershoot has been set). Busy BOOL TRUE : Execution of function block has not been finished yet. CommandAborted BOOL TRUE : Command has been aborted by another command. Error BOOL TRUE : Error has occurred within the function block. ErrorID SMC_ERROR Error identification
MC_MoveVelocity (FB) ¶ FUNCTION_BLOCK MC_MoveVelocity This function block causes an endless motion at a specified velocity. Example Use of MC_MoveVelocity The following illustration shows how two instances ( First and Second ) of the function block MC_MoveVelocity are combined. In the left-hand part of the illustration the Second instance is called after the First instance. If First achieves the specified velocity 3000, then the First output InVelocity is ANDed with the Next signal. This causes Second to move at velocity 2000. In the right-hand part of the illustration the execution is started by First , which aborts the previously executed Second instance and therefore the output InVelocity of the Second instance is set to False. Although First is still accelerating in order to reach velocity 3000, it is interrupted and aborted because the Test signal starts the execution of Second . Now Second will decelerate the velocity to 2000 after which the InVelocity of the Second instance is set to TRUE. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis Input Execute BOOL TRUE : Starts execution. Velocity LREAL Maximum velocity in techincal units per second [u/s]. Is always positive. 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 current The direction of the movement. Only current, positive, and negative are allowed. 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 InVelocity BOOL TRUE : The set velocity has been reached for the first time. Busy BOOL TRUE : Function block is in operation. Active BOOL Indicates that the FB has control on the axis CommandAborted BOOL FALSE 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_PositionProfile (FB) ¶ FUNCTION_BLOCK MC_PositionProfile This function block is designed for commanding a time-position locked motion profile. Note If Axis does not reach standstill after this movement and no subsequent movement is commanded in the same cycle when Done is set, then Axis switches to the errorstop state and reports error SMC_MOVING_WITHOUT_ACTIVE_MOVEMENT . Hint A shift between different profiles can be managed. Alternatively to MC_PositionProfile a cam function block coupled to a virtual master can be employed. Example Time/Position profile ¶ The time/velocity and time/acceleration profiles are similar to the position profile with sampling points on the velocity or acceleration lines. Warning MC_MoveSuperimposed is not supported on top of MC_PositionProfile . Forecasts that are set up by SMC_SetForecast are not supported. InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis TimePosition MC_TP_REF Reference to time/position description Input Execute BOOL Rising edge: Starts the execution of the function block. ArraySize INT Dimension of the array PositionScale LREAL 1 Overall position scaling factor Offset LREAL Overall position offset ([u]) Output Done BOOL TRUE : The profile has been completed. Busy BOOL TRUE : The execution of function block has not been finished yet. CommandAborted BOOL TRUE : The command has been aborted by another command. Error BOOL TRUE : Error has occurred within the function block. ErrorID SMC_ERROR Error identification