Download Softmotion User Manual
Transcript
Chapter 8 - The Library SM_Trafo.lib 8 8.1 The Library SM_Trafo.lib Overview This library is an extension for the SM_CNC.lib and provides modules, which can be used for transformation of GEO- to drive coordinates and the axis control. There are modules which control drives with target values, and simultaneously watch the target values and detect jumps. Besides that there are modules for mathematic forward and backward transformation for some usual kinematics. Instances of the forward-transformation-modules can be connected with the also provided visualization-templates, which allow an immediate and simple visualization. 8.2 ControlAxis function blocks SMC_ControlAxisByPos This function block writes target positions n to a drive structure and checks the structure for jumps. Inputs of the function block: iStatus: SMC_INT_STATUS State of the Interpolation module. Gets connected with the homonymous output of SMC_Interpolator. bEnable: BOOL Controls the axis as long as is TRUE. bAvoidGaps: BOOL TRUE: The module watches position and velocity. If the velocity exceeds the limit, which is stored in the axis(fSWMaxVelocity), then the module will set output bStopIpo and move the axis according to the parameters fGapVelocity, fGapAcceleration and fGapDeceleration to this position and then will delete output bStopIpo. fSetPosition: LREAL Target position of the axis. Typically this is an output of the Transformation module. fGapVelocity, fGapAcceleration, fGapDeceleration: LREAL Move parameters for bridging a jump. Outputs of the function block: bCommandAborted : BOOL (Default: FALSE) TRUE: The module has been aborted by another one. bError : BOOL (Default: FALSE) TRUE: An error has occurred in the module. SoftMotion in CoDeSys 2.3 8-1