//This file was generated by the LASAL2 CodeGenerator  -- 
//Please, do not edit this file (it might be overwritten by the next generator run)
//{{LSL_DECLARATION

(*!
<Class
	Name               = "_AxisBase"
	Revision           = "1.58"
	GUID               = "{F52EA0ED-F06F-4DF2-8326-9B4FEA0E0D45}"
	RealtimeTask       = "true"
	DefRealtime        = "1 ms"
	CyclicTask         = "false"
	DefCyclictime      = "100 ms"
	BackgroundTask     = "true"
	DefBackground      = "100 ms"
	Sigmatek           = "true"
	OSInterface        = "false"
	HighPriority       = "false"
	Automatic          = "false"
	UpdateMode         = "Prescan"
	IconPath           = ".\Class\_AxisBase\LMCAxis.ico"
	SharedCommandTable = "true"
	Objectsize         = "(780,1080)"
	Comment            = "The CNC class represents a profile generator for 1 axis. It calculates the actual &#13;&#10;set position and provides with the set and actual values to the controller class.&#13;&#10;&#13;&#10;The CNC class also contains all the functions/interfaces needed to drive an axis.&#13;&#10;&#13;&#10;">
	<Channels>
		<Server Name="AxisStatus" GUID="{68B6CC31-3184-4BD8-9AEF-5517DF33D4FB}" Visualized="true" Initialize="false" WriteProtected="true" Retentive="false" Comment="Stateflags of the axis&#13;&#10;======================&#13;&#10;&#13;&#10;Bit 1: PowerOn - Set if the Axis is activated  &#13;&#10;Bit 2: IsReferenced - Set if the Axis is referenced&#13;&#10;Bit 3: InPosition - Set if the axis is in the correct position&#13;&#10;Bit 4: FiltRdy - Set if the Axis is in position and jerk filter is ready&#13;&#10;Bit 5: Decell - Set if the axis brakes; calculated by tic for tic&#13;&#10;Bit 6: PosLimActive - Set if the axis has achieved one of its end-positions&#13;&#10;Bit 7: SetFlg - Set by calling the SetPositon, CNCRefRun and NCRefRun functions Reset after activating the controller&#13;&#10;Bit 8: EnLesFlg - Set if the axis moves endless / infinitely&#13;&#10;Bit 9: DirFlg - Set if the Speed of the axis is negative&#13;&#10;Bit 10: EmergStop - Set if the axis stops, because an error occurs or the axis is deactivated&#13;&#10;Bit 11: Overflow- Set if a position overflow occurs&#13;&#10;Bit 12: MasterLock - Set if the slave-axis is coupled onto the master-axis&#13;&#10;Bit 13: AutoRun - Set if autotuning is running&#13;&#10;Bit 14: AutoStop - Set if autotuning is ready done&#13;&#10;Bit 15: ActDirFlag - Set if the Speed of the axis is negative&#13;&#10;Bit 16: HandFlag - Set if the function &quot;MoveHand&quot; or &quot;PowerOff&quot; is called.&#13;&#10;Bit 17: ModuloFlg - Set if the axis is defined as a modulo-axis&#13;&#10;Bit 18: NCMotion - Is set by the controller if the axis is in the NC positioning-mode&#13;&#10;Bit 19: NoActPosMeth - Set if the client &quot;ActPosition&quot; is not connected or the simulation mode is acting&#13;&#10;Bit 20: NoControlMeth - Set if the client &quot;LMCController&quot; is not connected or the simulation mode is acting&#13;&#10;Bit 21: NoRefMeth - Set if the client &quot;LMCReference&quot; is not connected or the Bit 19: &quot;NoActPosMeth&quot; is set&#13;&#10;Bit 22: NoActPosChk - Set if the client &quot;LMCSafety&quot; is not connected or HWReady is not connected (simulation mode is acting)&#13;&#10;Bit 23: NoPreCyclic - Set if the client &quot;LMCPreCyclicTrigger&quot; is not connected&#13;&#10;Bit 24: NoPostCyclic - Set if the client &quot;LMCPostCyclicTrigger&quot; is not connected&#13;&#10;Bit 25: DelayedMasterLock - configureable, alternative version of the MasterLock bit&#13;&#10;Bit 26: Standstill - Set if the axis is currently not moving.&#13;&#10;Bit 27: BrakeForPowerOff - Set, if the axis is currently stoping for power off.&#13;&#10;Bit 28: MasterError - Set, if some error of the master axis occured.&#13;&#10;Bit 29: SlaveError - Set, if some error of a coupled slave axis occured."/>
		<Server
			Name           = "Control"
			GUID           = "{813CA014-8D4F-4BB9-954A-F20F4611CBBF}"
			Visualized     = "true"
			Initialize     = "false"
			WriteProtected = "true"
			Retentive      = "false"
			Comment        = "This server is the interface to the user application, so that &#13;&#10;axis commands can be sent.&#13;&#10;&#13;&#10;Operation mode of the axis&#13;&#10;=========================&#13;&#10;&#13;&#10;PASSIVE_LMCAXIS  - The axis is in the passive rest state according to a reset&#13;&#10;WAITIDLE_LMCAXIS - The axis is in the passive rest state according to call of the methode &quot;PowerOn&quot;&#13;&#10;IDLE_LMCAXIS     - The axis is in an active rest state and ready for move-instructions&#13;&#10;MOVE_LMCAXIS     - The axis carries out a movement&#13;&#10;FOLLOW_LMCAXIS   - The axis is in the status: Follow&#13;&#10;STOPED_LMCAXIS   - The axis stops for the standstill&#13;&#10;LOCKED_LMCAXIS   - The slave axis couples to a master axis or is already coupled&#13;&#10;REFRUN_LMCAXIS   - The axis carries out a reference movement&#13;&#10;TUNEPOS_LMCAXIS  - The axis carries out a tune movement - in this case, it moves in the positive direction&#13;&#10;TUNENEG_LMCAXIS  - The axis carries out a tune movement - in this case, it moves in the negative direction&#13;&#10;ERROR_LMCAXIS    - An error occurred">
			<NewInst>
				<Function Name="IPRPowerOn" Comment="This command activates the position controller.">
					<InputParameter>
						<Parameter Name="Mode" Comment="Set direction of movement for the axis"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRPowerOff" Comment="This command deactivates the position controller.">
					<InputParameter>
						<Parameter Name="Mode" Comment="Shutdown mode&#13;&#10; --&gt; immediate shutdown of the controller&#13;&#10; --&gt; Ramp down after an emergency stop and subsequent shut-down of the controller"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRMoveRelative" Comment="axis relative position movement">
					<InputParameter>
						<Parameter Name="Position" Comment="distance of the movement [Application units]"/>
						<Parameter Name="Mode" Comment="MOVE_RELATIVE_TO_DESTINATION --&gt; Position is relative to the last target position&#13;&#10;MOVE_RELATIVE_TO_POSIITON    --&gt; Position is relative to the actual position"/>
						<Parameter Name="Speed" Comment="Axis speed of the movement [Application units / s]"/>
						<Parameter Name="Accel" Comment="Axis acceleration of the movement [Application units / s2]"/>
						<Parameter Name="Decel" Comment="Axis deceleration of the movement [Application units / s2]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRMoveAbsolute" Comment="axis movement to an absolute position">
					<InputParameter>
						<Parameter Name="Position" Comment="Targetposition for the axis [Application units]"/>
						<Parameter Name="Speed" Comment="Axis speed of the movement [Application units / s]"/>
						<Parameter Name="Accel" Comment="Axis acceleration of the movement [Application units / s2]"/>
						<Parameter Name="Decel" Comment="Axis deceleration of the movement [Application units / s2]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRMoveReference" Comment="Axis reference movement">
					<InputParameter>
						<Parameter Name="Mode" Comment="Defines the reference mode"/>
						<Parameter Name="Position" Comment="Reference position [Application units]"/>
						<Parameter Name="VRef1" Comment="Speed used when searching for the reference switch [Application units/s]"/>
						<Parameter Name="VRef2" Comment="Speed used when backing off from the reference switch [Application units/s]"/>
						<Parameter Name="Accel" Comment="Acceleration / deceleration used when searching for the reference switch and when backing off from it [Application units/sē]"/>
						<Parameter Name="PositionWindow" Comment="Distance within which the Z pulse must occur after leaving the reference switch [Application units]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRMoveEndless" Comment="Endless axis movement.">
					<InputParameter>
						<Parameter Name="Speed" Comment="Axis speed of the movement [Application units / s]"/>
						<Parameter Name="Accel" Comment="Axis acceleration of the movement [Application units / s2]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRMoveHand" Comment="This command is used for endless movement if no axis reference is done.">
					<InputParameter>
						<Parameter Name="Speed" Comment="Axis speed of the movement [Application units / s]"/>
						<Parameter Name="Accel" Comment="Axis acceleration of the movement [Application units / s2]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRStopMove" Comment="Stops axis movement.">
					<InputParameter>
						<Parameter Name="Decel" Comment="Axis deceleration of the movement [Application units / s2]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleGearVelocity" Comment="Speed coupling">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="pMaster" Comment="pointer to the master axis information. use method ReadMasterInfo()"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleDeltaPos" Comment="Offset position coupling">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="DeltaPos" Comment="Position difference between the master axis and the slave axis [Application units]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleUserPos" Comment="Coupling to a user position">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="pMasterPos" Comment="pointer to the master axis information. use method ReadMasterInfo()"/>
						<Parameter Name="DeltaPos" Comment="Position difference between the master axis and the slave axis [Application units]"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
						<Parameter Name="Mode" Comment="Mode = COUPLE_PROFILE_GEAR    --&gt; with gear&#13;&#10;Mode = COUPLE_PROFILE_NO_GEAR --&gt; without gear"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleProfilePos" Comment="This function is called from the class _LMCProfile for profile coupling">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="pMasterPos" Comment="pointer to the master axis information. use method ReadMasterInfo()"/>
						<Parameter Name="DeltaPos" Comment="Position difference between the master axis and the slave axis [Application units]"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
						<Parameter Name="Mode" Comment="Mode = COUPLE_PROFILE_GEAR    -&gt; with gear ratio&#13;&#10;Mode = COUPLE_PROFILE_NO_GEAR -&gt; without gear ratio"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleGearRelative" Comment="Relative gear coupling">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="pMaster" Comment="pointer to the master axis information. use method ReadMasterInfo()"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleGearAbsolute" Comment="Absolute gear coupling">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="DeltaPos" Comment="Position difference between the master axis and the slave axis [Application units]"/>
						<Parameter Name="pMaster" Comment="pointer to the master axis information. use method ReadMasterInfo()"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleCurveTab" Comment="Electronic CAM coupling">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="DeltaPos" Comment="Position difference between the master axis and the slave axis [Application units]"/>
						<Parameter Name="pMaster" Comment="pointer to the master axis information. use method ReadMasterInfo()"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
						<Parameter Name="Mode" Comment="Slave axis operating mode"/>
						<Parameter Name="pCurveData" Comment="Pointer to the curve data"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRSetSWEndPos" Comment="Set software end position.">
					<InputParameter>
						<Parameter Name="Mode" Comment="Type of the end position value"/>
						<Parameter Name="Position" Comment="Value for the corresponding SW end position. Depending on the parameter mode the units are either application units or internal units."/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRSetPosition" Comment="This method is used to set internal or external position">
					<InputParameter>
						<Parameter Name="Mode" Comment="Type of the position value"/>
						<Parameter Name="Position" Comment="Position value, depending on the parameter mode the units are either application units or internal units."/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRChangeCoupleSettings" Comment="Change coupling parameters">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="DeltaPos" Comment="Position difference between the master axis and the slave axis [Application units]"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRTuneAxis" Comment="Start tune function">
					<InputParameter>
						<Parameter Name="Position" Comment="Target or distance for the axis [Application units]"/>
						<Parameter Name="Speed" Comment="Maximum speed [Application units / s]"/>
						<Parameter Name="Accel" Comment="Axis acceleration [Application units / s2 ]"/>
						<Parameter Name="Mode" Comment=" INTERVALL__ACTPOSITION_POSITION          --&gt; Movement between the actual position and the position added to it.&#13;&#10; INTERVALL__ZERO_TO_POSITIVE_POSITION     --&gt; Movement between the specified position and 0&#13;&#10; INTERVALL__POSITON_IN_POSITIVE_DIRECTION --&gt; Relative movement in the positive direction&#13;&#10; INTERVALL__ZERO_TO_NEGATIVE_POSITION     --&gt; Movement between the specified negative position and 0&#13;&#10; INTERVALL__POSITON_IN_NEGATIVE_DIRECTION --&gt; Relative movement in the negative direction&#13;&#10;"/>
						<Parameter Name="WaitTime" Comment="A TuneTime is set [ms]. This Tunetime is simply a delay after each movement. "/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadPosition" Comment="Returns axis position depending on the selected mode">
					<InputParameter>
						<Parameter Name="Mode" Comment="Type of the position that should be read"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="Position" Comment="Internal position of the axis depending on the selected mode"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadVelocity" Comment="Reads the axis velocity">
					<InputParameter>
						<Parameter Name="Mode" Comment="Type of the axis velocity that should be read"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="Result" Comment="Axis velocity depending on the selected mode"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRInPosition" Comment="Checks whether the axis is in the position window.">
					<InputParameter>
						<Parameter Name="Mode" Comment="Position window unit&#13;&#10;0 --&gt; Position window in application units&#13;&#10;1 --&gt; Position window in internal units&#13;&#10;-1 --&gt; no Position window is used (Result = 1 if Flag InPosition and Flag FiltRdy is TRUE)"/>
						<Parameter Name="PositionWindow" Comment="value of the position window"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="Result" Comment="0 --&gt; Axis not in position&#13;&#10;1 --&gt; Axis in position"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadAxisStatus" Comment="Provides the actual axis status.">
					<OutputParameter>
						<Parameter Name="Status" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadAxisError" Comment="Provides the actual profile status.">
					<OutputParameter>
						<Parameter Name="AxisErrorInfo" Comment="Profile status of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadMasterInfo" Comment="Purveys a pointer to the master structure">
					<InputParameter>
						<Parameter Name="usDelay" InitValue="0"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="MasterPtr" Comment="Pointer to the master structure"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRSetFollowMode" Comment="Activate or deactivate the modus &quot;FOLLOW_LMCAXIS&quot;&#13;&#10;See description of the server &quot;Control&quot;">
					<InputParameter>
						<Parameter Name="Mode" Comment="Mode = DEACTIVATE_FOLLOW_MODE -&gt; deactive the status &quot;FOLLOW_LMCAXIS&quot;&#13;&#10;Mode = ACTIVATE_FOLLOW_MODE   -&gt;   active the status &quot;FOLLOW_LMCAXIS&quot;"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReferenceReady" Comment="Command returns the information if the axis is referenced">
					<OutputParameter>
						<Parameter Name="Refready" Comment="TRUE .. axis is referenced"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRInpositionOk" Comment="Command returns BUSY if movement is still active and READY if movement is finished">
					<InputParameter>
						<Parameter Name="Mode" Comment="Position window unit&#13;&#10;0 --&gt; Position window in application units&#13;&#10;1 --&gt; Position window in internal units&#13;&#10;-1 --&gt; no Position window is used (Result = 1 if Flag InPosition and Flag FiltRdy is TRUE)"/>
						<Parameter Name="PosWindow" Comment="value of the position window"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="Inposx"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCoupleGearPolynom" Comment="Method CoupleGearPolynom couples a slave axis to a master axis using a polynomial of higher order without jerks.&#13;&#10;  The slave starts with zero or non-zero velocity and should achieve a target velocity of vM*Multiplier/Divisor travelling sSlave units&#13;&#10;  while the master travels sMaster units with velocity vM. (Posmode=PolyCatch).&#13;&#10;  After the slave is catched it is locked (not permitted to go backwards) (PosMode=PolySync)&#13;&#10;  Method CoupleGearPolynom does the calculations which must be done only once, the cyclic calculations are done in method PolyLock.">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed of the axis for this movement [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum axis acceleration / deceleration [Application units / s2 ]"/>
						<Parameter Name="pMaster" Comment="pointer to the master axis information. use method ReadMasterInfo()"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
						<Parameter Name="sMaster" Comment="Distance coupled by the master"/>
						<Parameter Name="sSlave" Comment="Distance coupled by the slave"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRSetParameter" Comment="Sets the software parameters">
					<InputParameter>
						<Parameter Name="ParNr" Comment="Parameter number"/>
						<Parameter Name="Value" Comment="New value"/>
						<Parameter Name="Mode" Comment="For further information about the mode see the documentation of the class _LMCAxis"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRSetAdjustment" Comment="Sets server values">
					<InputParameter>
						<Parameter Name="No" Comment="Server-ID"/>
						<Parameter Name="Value" Comment="desired server value"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of the axis"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadParameter" Comment="Reads the software parameters.">
					<InputParameter>
						<Parameter Name="ParNr" Comment="Parameter number"/>
						<Parameter Name="Mode" Comment="Valid for paramters LMCAXIS_PAR_RD_V_MAX, LMCAXIS_PAR_RD_A_MAX, LMCAXIS_PAR_RD_REFPOS&#13;&#10;0 --&gt; Value is returned in [Application units]&#13;&#10;1 --&gt; Value is returned in [Internal units]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="Result" Comment="Software parameter"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadSWEndPos" Comment="This command reads the software end position">
					<InputParameter>
						<Parameter Name="Mode" Comment="0 --&gt; Maximum SW end position with cResolution_Fact [Application units]&#13;&#10;1 --&gt; Minimum SW end position with cResolution_Fact [Application units]&#13;&#10;2 --&gt; Maximum SW software end position without cResolution_Fact [Internal units]&#13;&#10;3 --&gt; Minimum SW software end position without cResolution_Fact [Internal units]"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="Position" Comment="Software end position Depending on the mode, either application units or internal units"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCalcMovingTime" Comment="Calculate the duration of a movement">
					<InputParameter>
						<Parameter Name="StartPos" Comment="Start-position in application units"/>
						<Parameter Name="EndPos" Comment="End-position in application units"/>
						<Parameter Name="Vstart" Comment="Start-velocity in application units"/>
						<Parameter Name="Vende" Comment="End-velocity in application units"/>
						<Parameter Name="Accel" Comment="Maximal allowed acceleration"/>
						<Parameter Name="Decel" Comment="Maximal allowed deceleration"/>
						<Parameter Name="Vmax" Comment="Maximal allowed velocity"/>
						<Parameter Name="pMovingTime" Comment="Pointer to the calculated result."/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CalcState" Comment="State of the calculation.&#13;&#10;0 -&gt; no error occured&#13;&#10;1 ... 19 -&gt; errorcodes"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRQuitError" Comment="Reset all axis errors">
				</Function>
				<Function Name="IPRCalcMaxSlavePath" Comment="Calculates the maximal possible slavepath for coupling by the function: &quot;CoupleGearPolynom&quot;">
					<InputParameter>
						<Parameter Name="MaxVel" Comment="Maximum speed [Application units / s]"/>
						<Parameter Name="MaxAcc" Comment="Maximum acceleration [application units / sē]"/>
						<Parameter Name="pMaster" Comment="pointer to the master axis information. use method ReadMaster()"/>
						<Parameter Name="GearMul" Comment="Multiplier for the gear ratio"/>
						<Parameter Name="GearDiv" Comment="Divisor for the gear ratio"/>
						<Parameter Name="sMaster" Comment="Distance coupled by the master"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="MaxSlavePath" Comment="Maximal possible slave path for successful coupling by the function &quot;CoupleGearPolynom&quot;"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRCalcExtToAppliPos" Comment="Calculates the internal position in application units&#13;&#10;of the input parameter">
					<InputParameter>
						<Parameter Name="Param" Comment="position to be converted"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="OutParam" Comment="internal position in application units"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRReadUserData">
					<InputParameter>
						<Parameter Name="index"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="Result"/>
					</OutputParameter>
				</Function>
				<Function Name="IPRGetMasterInformation">
					<InputParameter>
						<Parameter Name="pAxisID"/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="MasterErrorState"/>
						<Parameter Name="bProfileCoupled"/>
						<Parameter Name="bVjumpAllowed"/>
					</OutputParameter>
				</Function>
				<Function Name="IPR_SetErrorToMasterCoupleMonitoring">
					<InputParameter>
						<Parameter Name="AxisID"/>
					</InputParameter>
				</Function>
				<Function Name="IPRSetSafetyState">
					<InputParameter>
						<Parameter Name="Parameter" Comment="Parameter define safety state to interact."/>
						<Parameter Name="Mode" Comment="Mode defining specific type of method handling of given parameter."/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="CommandState" Comment="Status flags of command return value."/>
					</OutputParameter>
				</Function>
				<Function Name="IPRGetSafetyState">
					<InputParameter>
						<Parameter Name="Parameter" Comment="Parameter define safety state to interact."/>
						<Parameter Name="pPara1" Comment="Pointer to first return value"/>
						<Parameter Name="pPara2" Comment="Pointer to second return value"/>
						<Parameter Name="pPara3" Comment="Pointer to third return value"/>
						<Parameter Name="pPara4" Comment="Pointer to fourth return value"/>
						<Parameter Name="Mode" Comment="Mode defining specific type of method handling of given parameter."/>
					</InputParameter>
					<OutputParameter>
						<Parameter Name="QueryState" Comment="Query state of request&#13;&#10;READY ... Request successful - return values are valid&#13;&#10;BUSY ... Request ongoing - no values read&#13;&#10;ERROR ... Request failed - values invalid"/>
					</OutputParameter>
				</Function>
			</NewInst>
		</Server>
	</Channels>
	<RevDoku>
		<Owner Company="Sigmatek"/>
		<Dokumentation Revision="1.57" Date="2022-09-30" Author="StePhi" Company="Sigmatek" Description="1. Improvement: Improved method comment that parameter NextTick of method CalcSpeedChangePath() is only in effect when _JERK_PROFILE is used in _LMCAxisBase implementation."/>
		<Dokumentation Revision="1.56" Date="2021-09-13" Author="StePhi" Company="Sigmatek" Description="1. Improvement: Updated comments of methods CalcSpeedChangePath and CoupleCAM."/>
		<Dokumentation Revision="1.55" Date="2019-10-09" Author="VelGer" Company="Sigmatek" Description="1. Improvement: ChangeMoveSettings() Comments updated.&#13;&#10;2. Improvement: Data type _LMCAXIS_READPARAMETER_LREAL adapted so that the current acceleration can be read."/>
		<Dokumentation Revision="1.54" Date="2019-01-09" Author="SatChr" Company="Sigmatek" Description="Improvement: Method CalcSpeedChangePath provides a new input parameter NextTick."/>
		<Dokumentation Revision="1.53" Date="2018-08-13" Author="SatChr" Company="Sigmatek" Description="1. Improvement: CalcSpeedChangePath() new parameter NextTick"/>
		<Dokumentation Revision="1.52" Date="2018-06-14" Author="RodMar" Company="Sigmatek" Description="1. Add function QuickStop()"/>
		<Dokumentation Revision="1.51" Date="2017-03-13" Author="SatChr" Company="Sigmatek" Description="1. Improvement: Missing method SetDynSwEndPos added."/>
		<Dokumentation Revision="1.50" Date="2017-01-27" Author="SatChr" Company="Sigmatek" Description="comment edited"/>
		<Dokumentation Revision="1.49" Date="2016-10-14" Author="SatChr" Company="Sigmatek" Description="Improvement: New method SetUserData() added."/>
		<Dokumentation Revision="1.48" Date="2016-03-22" Author="SatChr" Company="Sigmatek" Description="1. Improvement: All move commands have been expanded with a new input parameter MaxJerk for enabling different jerk values.&#13;&#10;2. CleanUp: Not used, private methods deleted.&#13;&#10;3. Improvement: new method ReadParameterLREAL added."/>
		<Dokumentation Revision="1.47" Date="2016-03-14" Author="SatChr" Company="Sigmatek" Description="1. Improvement: New method ReadSlavePosCam added."/>
		<Dokumentation Revision="1.46" Date="2015-12-03" Author="SatChr" Company="Sigmatek" Description="1. Improvement: New method CalcSpeedChangePath added."/>
		<Dokumentation Revision="1.45" Date="2015-09-25" Author="SatChr " Company="Sigmatek" Description="1. Improvement: add some comments and default-values"/>
		<Dokumentation Revision="1.44" Date="2015-06-24" Author="PalHar" Company="Sigmatek" Description="Improvement: new parameter &quot;Modus&quot; added to the method ChangeMoveSettings()"/>
		<Dokumentation Revision="1.43" Date="2015-05-05" Author="FucHer" Company="Sigmatek" Description="1. Add some comments to the methods and variables.&#13;&#10;2. Improvement: methods CoupleGearPolynom_v0(), PolynomLock_v0()  added.&#13;&#10;3: Improved comments for methods CoupleCurveTab(), CoupleCAM() and structure _LMCAXIS_CURVE."/>
		<Dokumentation Revision="1.42" Date="2014-12-15" Author="HasHan&#13;&#10;SatChr" Company="Sigmatek" Description="Improvement: methods ChangeMoveSettings(), GetPosInfoBeforeRampDown(), CoupleProfilePosExtended(), CoupleUserPosExtended(), and CoupleDeltaPosExtended() added."/>
		<Dokumentation Revision="1.40" Date="2014-07-07" Author="HasHan&#13;&#10;SatChr" Company="Sigmatek" Description="1. Improvement: methode CoupleAdditivePosDiff() added for easier belt-coupling&#13;&#10;2. Improvement: methode CoupleCAM() for easier usage of the CAM coupling added."/>
		<Dokumentation Revision="1.30" Date="2014-04-11" Author="SatChr" Company="Sigmatek" Description="1. Improvement: New methode MoveShortestWay()"/>
		<Dokumentation Revision="1.20" Date="2013-07-18" Author="SliMic" Company="Sigmatek" Description="1. the MasterPtr can now be delayed with the ReadMaster function&#13;&#10;2. Add some comments to the methodes and variables"/>
		<Dokumentation Revision="1.10" Date="2013-02-08" Author="HasHan&#13;&#10;RauAnd" Company="Sigmatek" Description="1. Bugfix: add ReadUserData() for fetching UserData via NewInst Command&#13;&#10;2. Bugfix: added new NewInst Commands and comments to the existing NewInst Commands. Now all global methods can be called with NewInst Commands"/>
		<Dokumentation Revision="1.0" Date="2012-09-27" Author="RauAnd" Company="Sigmatek" Description="creation"/>
	</RevDoku>
</Class>
*)
_AxisBase : CLASS
	TYPE
	  _LMCAXIS_POSINFOMODE :  //! <Type Public="true" Name="_LMCAXIS_POSINFOMODE"/>
	  (
	    POSINFO_TIME,
	    POSINFO_DISTANCE
	  )$UDINT;
	  _LMCAXIS_READPARAMETER_LREAL :  //! <Type Public="true" Name="_LMCAXIS_READPARAMETER_LREAL"/>
	  (
	    LMCAXIS_PAR_RD2_JMAX,  //! <Type Comment="Reads the jerk [application units / sec^3 / 1000]&#13;&#10;mode=0: maximal jerk of the axis&#13;&#10;mode=1: jerk of the active move command" Name="_LMCAXIS_READPARAMETER_LREAL.LMCAXIS_PAR_RD2_JMAX"/>
	    LMCAXIS_PAR_RD2_ACC  //! <Type Comment="Reads the actual acceleration. If MoveType is not Jerk, zero is delivered." Name="_LMCAXIS_READPARAMETER_LREAL.LMCAXIS_PAR_RD2_ACC"/>
	  )$UDINT;
	  CmdControl :  //! <Type Public="true" Name="CmdControl"/>
	  (
	    IPRPowerOn,
	    IPRPowerOff,
	    IPRMoveRelative,
	    IPRMoveAbsolute,
	    IPRMoveReference,
	    IPRMoveEndless,
	    IPRMoveHand,
	    IPRStopMove,
	    IPRCoupleGearVelocity,
	    IPRCoupleDeltaPos,
	    IPRCoupleUserPos,
	    IPRCoupleProfilePos,
	    IPRCoupleGearRelative,
	    IPRCoupleGearAbsolute,
	    IPRCoupleCurveTab,
	    IPRSetSWEndPos,
	    IPRSetPosition,
	    IPRChangeCoupleSettings,
	    IPRTuneAxis,
	    IPRReadPosition,
	    IPRReadVelocity,
	    IPRInPosition,
	    IPRReadAxisStatus,
	    IPRReadAxisError,
	    IPRReadMasterInfo,
	    IPRSetFollowMode,
	    IPRReferenceReady,
	    IPRInpositionOk,
	    IPRCoupleGearPolynom,
	    IPRSetParameter,
	    IPRSetAdjustment,
	    IPRReadParameter,
	    IPRReadSWEndPos,
	    IPRCalcMovingTime,
	    IPRQuitError,
	    IPRCalcMaxSlavePath,
	    IPRCalcExtToAppliPos,
	    IPRReadUserData,
	    IPRGetMasterInformation,
	    IPR_SetErrorToMasterCoupleMonitoring,
	    IPRSetSafetyState,
	    IPRGetSafetyState
	  )$UINT;
	  t_e_LMCAXIS_GETSAFETYPARAMETER :  //! <Type Public   = "true" Comment  = "Public type which defines the allowed parameters of method GetSafetyData(). Check the comments of the single enum entries for more detailed information of the parameter.&#13;&#10;Available parameters:&#13;&#10;LMCAXIS_PAR_GET_SAFETY_SAFETYERROR - Reads the safety error information from either safety core 1 or safety core 2 (use mode to choose)&#13;&#10;LMCAXIS_PAR_GET_SAFETY_VERIFYSTATE - Reads the verify state of the connected axis. Does no trigger reading the a new value - the stored result of the hardware class is returned.&#13;&#10;LMCAXIS_PAR_GET_SAFETY_REFERENCESTATE - Reads the reference state of the connected axis. Does no trigger reading the a new value - the stored result of the hardware class is returned.&#13;&#10;LMCAXIS_PAR_GET_SAFETY_SBTSTATE - Reads the SBT state of the connected axis. Command triggers reading a new value by itself." Revision = "1.0" Name     = "t_e_LMCAXIS_GETSAFETYPARAMETER"> <RevDoku>  <Owner Company="Sigmatek"/>  <Dokumentation Revision="1.0" Date="2023-07-17" Author="StePhi" Company="Sigmatek" Description="Initial version of type"/> </RevDoku></Type>
	  (
	    LMCAXIS_PAR_GET_SAFETY_SAFETYERROR,  //! <Type Comment="The parameter mode can be used to choose if the safety error information of SC1 (Mode = 0) or SC2 (Mode = 2) should be returned.&#13;&#10;para1 = Safety Error Code&#13;&#10;para2 = Safety Error Information 1&#13;&#10;para3 = Safety Error Information 2&#13;&#10;para4 = Safety Error Information 3" Name="t_e_LMCAXIS_GETSAFETYPARAMETER.LMCAXIS_PAR_GET_SAFETY_SAFETYERROR"/>
	    LMCAXIS_PAR_GET_SAFETY_SAFETYFUNCERROR,  //! <Type Comment="Parameter to read the safety function error info &#13;&#10;para1 = SafeErrorWord&#13;&#10;para2 = SafeFunctionErrorID&#13;&#10;para3 = SafeFunctionInErrID&#13;&#10;para4 = SafeFunctionErrSubID&#13;&#10;Mode is not used for this parameter" Name="t_e_LMCAXIS_GETSAFETYPARAMETER.LMCAXIS_PAR_GET_SAFETY_SAFETYFUNCERROR"/>
	    LMCAXIS_PAR_GET_SAFETY_VERIFYSTATE,  //! <Type Comment="The parameter is used to read the verify state of the connected axis. The Mode parameter can be used to decide if the value from hardware class should be returned or the values should be read from the drive.&#13;&#10;para1 = Command State of request&#13;&#10; READY ... the command was processed successfully&#13;&#10; BUSY ... the command is still processed&#13;&#10; ERROR ... the command failed or no async communication is available / possible&#13;&#10;&#13;&#10;para2 = Verify Command state -  when command state is valid (READY) returns the actual state of the command. See the possible return values in DriveSafetyIF.h file.&#13;&#10; 16#0000000B ... response to command not yet received&#13;&#10; 16#40000000 ... command successfully processed&#13;&#10; 16#40000001 ... not all axes requiring verification have been verified&#13;&#10; 16#40000002 ... saving the HDSL verification state failed&#13;&#10; 16#40000003 ... command not allowed in current run state of drive&#13;&#10; 16#40000004 ... command executed but verification is not needed&#13;&#10; 16#40000005 ... programming of encoder index failed&#13;&#10;&#13;&#10;para3 = Execution State of request&#13;&#10; READY ... the verification is finished and the execution state is valid&#13;&#10; BUSY ... the verification is either still ongoing or the command is not processed already&#13;&#10; ERROR ... the command failed or no async communication is available / possible&#13;&#10;&#13;&#10;para4 = Verify Execution state -  when execution state is valid (READY) returns the actual state of the command. See the possible return values in DriveSafetyIF.h file.&#13;&#10; 16#00000000 ... state is unknown and not read&#13;&#10; 16#0000000B ... reading the state is busy&#13;&#10; 16#1A8C5E7B ... axis is not verified and verification is necessary&#13;&#10; 16#2B9D6F8C ... drive (all associated axis) are verified&#13;&#10; 16#30000000 ... no verification necessary for this axis&#13;&#10; 16#30000001 ... verification process started but programming of index not finished already&#13;&#10; 16#30000002 ... verification of axis complete - encoder index successfully programmed." Name="t_e_LMCAXIS_GETSAFETYPARAMETER.LMCAXIS_PAR_GET_SAFETY_VERIFYSTATE"/>
	    LMCAXIS_PAR_GET_SAFETY_REFERENCESTATE,  //! <Type Comment="The parameter is used to read the reference state of the connected axis. The Mode parameter can be used to decide if the value from hardware class should be returned or the values should be read from the drive.&#13;&#10;para1 = Command State of request&#13;&#10; READY ... the command was processed successfully&#13;&#10; BUSY ... the command is still processed&#13;&#10; ERROR ... the command failed or no async communication is available / possible&#13;&#10;&#13;&#10;para2 = Reference Command state -  when command state is valid (READY) returns the actual state of the command. See the possible return values in DriveSafetyIF.h file.&#13;&#10; 16#0000000B ... response to command not yet received&#13;&#10; 16#40000000 ... command successfully processed &#13;&#10; 16#40000002 ... Saving of offset or the reference state has failed.&#13;&#10; 16#40000003 ... command not allowed in current run state of drive&#13;&#10; 16#40000004 ... command executed but safe reference is not needed&#13;&#10; 16#40000005 ... programming of encoder index failed&#13;&#10; 16#40000010 ... safe reference was not started and command is not allowed at the moment&#13;&#10; 16#40000011 ... position has not moved far enough from zero position after start of safe reference&#13;&#10; 16#40000012 ... Acknowledged zero position deviates more than permitted from set safe position&#13;&#10;&#13;&#10;para3 = Execution State of request&#13;&#10; READY ... the verification is finished and the execution state is valid&#13;&#10; BUSY ... the verification is either still ongoing or the command is not processed already&#13;&#10; ERROR ... the command failed or no async communication is available / possible&#13;&#10;&#13;&#10;para4 = Reference Execution state -  when execution state is valid (READY) returns the actual state of the command. See the possible return values in DriveSafetyIF.h file.&#13;&#10; 16#00000000 ... state is unknown and not read&#13;&#10; 16#0000000B ... reading the state is busy&#13;&#10; 16#1A8C5E7B ... axis is not verified and verification is necessary&#13;&#10; 16#2B9D6F8C ... axis fully referenced&#13;&#10; 16#30000000 ... no safe reference necessary for this axis&#13;&#10; 16#30000001 ... safe referencing process started but process is waiting for axis movement&#13;&#10; 16#30000002 ... safe referencing process started but process is waiting for acknowledge of safe zero position&#13;&#10; 16#30000003 ... safe referencing of axis complete - zero position successfully programmed." Name="t_e_LMCAXIS_GETSAFETYPARAMETER.LMCAXIS_PAR_GET_SAFETY_REFERENCESTATE"/>
	    LMCAXIS_PAR_GET_SAFETY_SBTSTATE,  //! <Type Comment="This parameter is used to read the sbt state of the connected axis. The Mode parameter can be used to decide if the value from hardware class should be returned or the values should be read from the drive.&#13;&#10;para1 = safe brake test status - SBT state from safety fw&#13;&#10;&#13;&#10;para2 = brake test status -  SBT state from control fw&#13;&#10;&#13;&#10;para3 = brake test error info - error information from control fw&#13;&#10;&#13;&#10;para4 = time till next test -  countdown until next SBT test must be done" Name="t_e_LMCAXIS_GETSAFETYPARAMETER.LMCAXIS_PAR_GET_SAFETY_SBTSTATE"/>
	    LMCAXIS_PAR_GET_SAFETY_RUNSTATE,  //! <Type Comment="This parameter can be used to read the safety run state of the connected drive. The safety run state is returned casted to a DINT value.&#13;&#10;Mode := 0 ... Returns the safety run state stored in the _LMCAxis (default). The safety run state is updated via callback automatically.&#13;&#10;Mode := 1 ... Requests the actual safety run state from the hardware class. Only necessary when callback is not active." Name="t_e_LMCAXIS_GETSAFETYPARAMETER.LMCAXIS_PAR_GET_SAFETY_RUNSTATE"/>
	    LMCAXIS_PAR_GET_SAFETY_CNTRLSTATEWORD  //! <Type Comment="This parameter can be used to receive the current safe control word, safe state word, the active safety function and if the active safety function information is valid. This can be used to react to the currently active safe functions in the application. Especially when no automatic SS2 is done by the _LMCAxis object.&#13;&#10;pPara1 = SafeControlWord / DINT only lower two bytes are used&#13;&#10;pPara2 = SafeStateWord / DINT only lower two bytes are used&#13;&#10;pPara3 = ActiveSafeFnct / t_e_DRIVESAFETYIF_ActiveSafeFnct with bitwise mapping which safe function is currently active&#13;&#10;pPara4 = ActiveSafeFnctValid / iprStates to mark if pPara3 is valid." Name="t_e_LMCAXIS_GETSAFETYPARAMETER.LMCAXIS_PAR_GET_SAFETY_CNTRLSTATEWORD"/>
	  )$UDINT;
	  t_e_LMCAXIS_SETSAFETYPARAMETER :  //! <Type Public   = "true" Comment  = "Public type which defines the allowed parameters of method SetSafetyData(). Check the comments of the single enum entries for more detailed information of the parameter.&#13;&#10;Available parameters:&#13;&#10;LMCAXIS_PAR_SET_SAFETY_SETVERIFY - Command sends a verify command to the connected axis. The command automatically reads the verify state afterwards.&#13;&#10;LMCAXIS_PAR_SET_SAFETY_CLEARVERIFY - Command sends a clear verify command to the connected axis. The command automatically reads the reference state afterwards.&#13;&#10;LMCAXIS_PAR_SET_SAFETY_CLEARREFERENCE - Command sends a clear reference command to the connected axis. The command automatically reads the reference state afterwards." Revision = "1.0" Name     = "t_e_LMCAXIS_SETSAFETYPARAMETER"> <RevDoku>  <Owner Company="Sigmatek"/>  <Dokumentation Revision="1.0" Date="2023-07-17" Author="StePhi" Company="Sigmatek" Description="Initial version of type"/> </RevDoku></Type>
	  (
	    LMCAXIS_PAR_SET_SAFETY_SETVERIFY,  //! <Type Comment="With this parameter the verify state of the axis can be confirmed. The parameter Mode is not used." Name="t_e_LMCAXIS_SETSAFETYPARAMETER.LMCAXIS_PAR_SET_SAFETY_SETVERIFY"/>
	    LMCAXIS_PAR_SET_SAFETY_CLEARVERIFY,  //! <Type Comment="With this parameter the verify state of the axis can be cleared.&#13;&#10;Two different modes are available&#13;&#10;Mode = 0 ... Clears the verification of all axes (of this drive) and additionally resets the safe reference of the axis&#13;&#10;Mode = 1 ... Clears the verification of all axes (of this drive)" Name="t_e_LMCAXIS_SETSAFETYPARAMETER.LMCAXIS_PAR_SET_SAFETY_CLEARVERIFY"/>
	    LMCAXIS_PAR_SET_SAFETY_CLEARREFERENCE,  //! <Type Comment="With this parameter the reference state of the axis can be cleared. The parameter Mode is not used." Name="t_e_LMCAXIS_SETSAFETYPARAMETER.LMCAXIS_PAR_SET_SAFETY_CLEARREFERENCE"/>
	    LMCAXIS_PAR_SET_SAFETY_QUITERROR,  //! <Type Comment="Parameter to perform an safety error quit with the given level. The wanted reset level is given via the Mode parameter of the method.&#13;&#10;Available reset level:&#13;&#10;Mode = 1 .. Restart drive and acknowledge the error of a stop function (e.g. STO, SS1, SS2, SOS)&#13;&#10;Mode = 2 ... Quits safety error of safety function&#13;&#10;Mode = 4 ... Quits safety error of safety firmware (SafetyRunState = ERROR)" Name="t_e_LMCAXIS_SETSAFETYPARAMETER.LMCAXIS_PAR_SET_SAFETY_QUITERROR"/>
	    LMCAXIS_PAR_SET_SAFETY_CHANGESERVICEMODE  //! <Type Comment="The parameter can be used to change the service mode state of the connected drive.&#13;&#10;Mode := 1 ... Enter Service Mode&#13;&#10;Mode := 2 ... Leave Service Mode" Name="t_e_LMCAXIS_SETSAFETYPARAMETER.LMCAXIS_PAR_SET_SAFETY_CHANGESERVICEMODE"/>
	  )$UDINT;
	END_TYPE
  //Servers:
	Control 	: SvrChCmd__LMCAXIS_OPMODE;
	AxisStatus 	: SvrCh__LMCAXIS_STATUS;
  //Clients:
  //Variables:
		InstrSema 	: DINT;
		CmdFlags 	: _LMCAXIS_CMDERROR;
  //Functions:
				//! <Function Comment="init routine" Name="Init"/>
	FUNCTION VIRTUAL GLOBAL Init;
				//! <Function Comment="Real time work&#13;&#10;" Name="RtWork"/>
	FUNCTION VIRTUAL GLOBAL RtWork
		VAR_INPUT
			EAX 	: UDINT := EAX;
		END_VAR
		VAR_OUTPUT
			state (EAX) 	: UDINT;
		END_VAR;
				//! <Function Comment="for updating server data" Name="Background"/>
	FUNCTION VIRTUAL GLOBAL Background
		VAR_INPUT
			EAX 	: UDINT;
		END_VAR
		VAR_OUTPUT
			state (EAX) 	: UDINT;
		END_VAR;
				//! <Function Comment="This method activates the position controller." Name="PowerOn"/>
	FUNCTION VIRTUAL GLOBAL PowerOn
		VAR_INPUT
			Mode 	: _LMCAXIS_MOVEDIRECTION;			//! <Variable Comment="Set direction of movement for the axis&#13;&#10;" Name="PowerOn.Mode"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="PowerOn.CommandState"/>
		END_VAR;
				//! <Function Comment="This method deactivates the position controller." Name="PowerOff"/>
	FUNCTION VIRTUAL GLOBAL PowerOff
		VAR_INPUT
			Mode 	: _LMCAXIS_POWER_OFF_MODE;			//! <Variable Comment="Shutdown mode&#13;&#10; --&gt; immediate shutdown of the controller&#13;&#10; --&gt; Ramp down after an emergency stop and subsequent shut-down of the controller" Name="PowerOff.Mode"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="PowerOff.CommandState"/>
		END_VAR;
				//! <Function Comment="This method is used for endless movement if no axis reference is done." Name="MoveHand"/>
	FUNCTION VIRTUAL GLOBAL MoveHand
		VAR_INPUT
			Speed 	: DINT;			//! <Variable Comment="Axis speed of the movement [Application units / s]" Name="MoveHand.Speed"/>
			Accel 	: DINT;			//! <Variable Comment="Axis acceleration of the movement [Application units / sē]" Name="MoveHand.Accel"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="MoveHand.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="MoveHand.CommandState"/>
		END_VAR;
				//! <Function Comment="Endless axis movement." Name="MoveEndless"/>
	FUNCTION VIRTUAL GLOBAL MoveEndless
		VAR_INPUT
			Speed 	: DINT;			//! <Variable Comment="Axis speed of the movement [Application units / s]" Name="MoveEndless.Speed"/>
			Accel 	: DINT;			//! <Variable Comment="Axis acceleration of the movement [Application units / sē]" Name="MoveEndless.Accel"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="MoveEndless.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="MoveEndless.CommandState"/>
		END_VAR;
				//! <Function Comment="axis movement to an absolute position" Name="MoveAbsolute"/>
	FUNCTION VIRTUAL GLOBAL MoveAbsolute
		VAR_INPUT
			Position 	: DINT;			//! <Variable Comment="Targetposition for the axis [Application units]" Name="MoveAbsolute.Position"/>
			Speed 	: DINT;			//! <Variable Comment="Axis speed of the movement [Application units / s]" Name="MoveAbsolute.Speed"/>
			Accel 	: DINT;			//! <Variable Comment="Axis acceleration of the movement [Application units / sē]" Name="MoveAbsolute.Accel"/>
			Decel 	: DINT := 0;			//! <Variable Comment="Axis deceleration of the movement [Application units / sē]" Name="MoveAbsolute.Decel"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="MoveAbsolute.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="MoveAbsolute.CommandState"/>
		END_VAR;
				//! <Function Comment="axis movement to an absolute position. Chooses the shortest way for a modulo axis." Name="MoveShortestWay"/>
	FUNCTION VIRTUAL GLOBAL MoveShortestWay
		VAR_INPUT
			Position 	: DINT;			//! <Variable Comment="Target position for the axis [application units]" Name="MoveShortestWay.Position"/>
			Speed 	: DINT;			//! <Variable Comment="Speed of the axis [application units / sec]" Name="MoveShortestWay.Speed"/>
			Accel 	: DINT;			//! <Variable Comment="acceleration of the axis [application units / sē]" Name="MoveShortestWay.Accel"/>
			Decel 	: DINT := 0;			//! <Variable Comment="deceleration of the axis [application units / sē]" Name="MoveShortestWay.Decel"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="MoveShortestWay.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis." Name="MoveShortestWay.CommandState"/>
		END_VAR;
				//! <Function Comment="Axis reference movement" Name="MoveReference"/>
	FUNCTION VIRTUAL GLOBAL MoveReference
		VAR_INPUT
			Mode 	: _LMCAXIS_REFMODE;			//! <Variable Comment="Defines the reference mode" Name="MoveReference.Mode"/>
			Position 	: DINT;			//! <Variable Comment="Reference position [Application units]" Name="MoveReference.Position"/>
			VRef1 	: DINT;			//! <Variable Comment="Speed used when searching for the reference switch [Application units/s]" Name="MoveReference.VRef1"/>
			VRef2 	: DINT;			//! <Variable Comment="Speed used when backing off from the reference switch [Application units/s]" Name="MoveReference.VRef2"/>
			Accel 	: DINT;			//! <Variable Comment="Acceleration / deceleration used when searching for the reference switch and when backing off from it [Application units/sē]" Name="MoveReference.Accel"/>
			PositionWindow 	: DINT;			//! <Variable Comment="Distance within which the Z pulse must occur after leaving the reference switch [Application units]" Name="MoveReference.PositionWindow"/>
			RefJerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="MoveReference.RefJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="MoveReference.CommandState"/>
		END_VAR;
				//! <Function Comment="axis relative position movement" Name="MoveRelative"/>
	FUNCTION VIRTUAL GLOBAL MoveRelative
		VAR_INPUT
			Position 	: DINT;			//! <Variable Comment="distance of the movement [Application units]" Name="MoveRelative.Position"/>
			Mode 	: _LMCAXIS_MOVE_RELATIVE_MODE;			//! <Variable Comment="MOVE_RELATIVE_TO_DESTINATION --&gt; Position is relative to the last target position&#13;&#10;MOVE_RELATIVE_TO_POSIITON    --&gt; Position is relative to the actual position" Name="MoveRelative.Mode"/>
			Speed 	: DINT;			//! <Variable Comment="Axis speed of the movement [Application units / s]" Name="MoveRelative.Speed"/>
			Accel 	: DINT;			//! <Variable Comment="Axis acceleration of the movement [Application units / sē]" Name="MoveRelative.Accel"/>
			Decel 	: DINT := 0;			//! <Variable Comment="Axis deceleration of the movement [Application units / sē]" Name="MoveRelative.Decel"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="MoveRelative.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="MoveRelative.CommandState"/>
		END_VAR;
				//! <Function Comment="Stops axis movement." Name="StopMove"/>
	FUNCTION VIRTUAL GLOBAL StopMove
		VAR_INPUT
			Decel 	: DINT;			//! <Variable Comment="Axis deceleration of the movement [Application units / sē]" Name="StopMove.Decel"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="StopMove.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="StopMove.CommandState"/>
		END_VAR;
				//! <Function Comment="Stop Axis Movement intended for the MoveType _SCURVE_PROFILE. Other profiles behaive ident to StopMove. When calling  QuickStop the &#13;&#10;stop in MoveType _SCURVE_PROFILE corresponds to a _RAMP_PROFILE.&#13;&#10;" Name="QuickStop"/>
	FUNCTION VIRTUAL GLOBAL QuickStop
		VAR_INPUT
			Decel 	: DINT;			//! <Variable Comment="Axis deceleration of the movement [Application units / sē]" Name="QuickStop.Decel"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis&#13;&#10;" Name="QuickStop.CommandState"/>
		END_VAR;
				//! <Function Comment="Start tune function" Name="TuneAxis"/>
	FUNCTION VIRTUAL GLOBAL TuneAxis
		VAR_INPUT
			Position 	: DINT;			//! <Variable Comment="Target or distance for the axis [Application units]" Name="TuneAxis.Position"/>
			Speed 	: DINT;			//! <Variable Comment="Maximum speed [Application units / s]" Name="TuneAxis.Speed"/>
			Accel 	: DINT;			//! <Variable Comment="Axis acceleration [Application units / sē ]" Name="TuneAxis.Accel"/>
			Mode 	: _LMCAXIS_TUNE_MODE;			//! <Variable Comment=" INTERVALL__ACTPOSITION_POSITION          --&gt; Movement between the actual position and the position added to it.&#13;&#10; INTERVALL__ZERO_TO_POSITIVE_POSITION     --&gt; Movement between the specified position and 0&#13;&#10; INTERVALL__POSITON_IN_POSITIVE_DIRECTION --&gt; Relative movement in the positive direction&#13;&#10; INTERVALL__ZERO_TO_NEGATIVE_POSITION     --&gt; Movement between the specified negative position and 0&#13;&#10; INTERVALL__POSITON_IN_NEGATIVE_DIRECTION --&gt; Relative movement in the negative direction&#13;&#10;" Name="TuneAxis.Mode"/>
			WaitTime 	: UDINT;			//! <Variable Comment="A TuneTime is set [ms]. This Tunetime is simply a delay after each movement. " Name="TuneAxis.WaitTime"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Axis jerk of the movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="TuneAxis.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="TuneAxis.CommandState"/>
		END_VAR;
				//! <Function Comment="Checks whether the axis is in the position window." Name="InPosition"/>
	FUNCTION VIRTUAL GLOBAL InPosition
		VAR_INPUT
			Mode 	: _LMCAXIS_QUERY_POSITION_MODE;			//! <Variable Comment="Position window unit&#13;&#10;0 --&gt; Position window in application units&#13;&#10;1 --&gt; Position window in internal units&#13;&#10;-1 --&gt; no Position window is used (Result = 1 if Flag InPosition and Flag FiltRdy is TRUE)" Name="InPosition.Mode"/>
			PositionWindow 	: DINT;			//! <Variable Comment="value of the position window" Name="InPosition.PositionWindow"/>
		END_VAR
		VAR_OUTPUT
			Result 	: DINT;			//! <Variable Comment="0 --&gt; Axis not in position&#13;&#10;1 --&gt; Axis in position" Name="InPosition.Result"/>
		END_VAR;
				//! <Function Comment="Absolute gear coupling" Name="CoupleGearAbsolute"/>
	FUNCTION VIRTUAL GLOBAL CoupleGearAbsolute
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleGearAbsolute.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleGearAbsolute.MaxAcc"/>
			DeltaPos 	: DINT;			//! <Variable Comment="Position difference between the master axis and the slave axis [internal units]" Name="CoupleGearAbsolute.DeltaPos"/>
			pMaster 	: ^MasterStruct;			//! <Variable Comment="pointer to the master axis information. use method ReadMasterInfo()" Name="CoupleGearAbsolute.pMaster"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleGearAbsolute.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CoupleGearAbsolute.GearDiv"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleGearAbsolute.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleGearAbsolute.CommandState"/>
		END_VAR;
				//! <Function Comment="Relative gear coupling" Name="CoupleGearRelative"/>
	FUNCTION VIRTUAL GLOBAL CoupleGearRelative
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleGearRelative.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleGearRelative.MaxAcc"/>
			pMaster 	: ^MasterStruct;			//! <Variable Comment="pointer to the master axis information. use method ReadMasterInfo()" Name="CoupleGearRelative.pMaster"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleGearRelative.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CoupleGearRelative.GearDiv"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleGearRelative.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleGearRelative.CommandState"/>
		END_VAR;
				//! <Function Comment="Speed coupling" Name="CoupleGearVelocity"/>
	FUNCTION VIRTUAL GLOBAL CoupleGearVelocity
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleGearVelocity.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleGearVelocity.MaxAcc"/>
			pMaster 	: ^MasterStruct;			//! <Variable Comment="pointer to the master axis information. use method ReadMasterInfo()" Name="CoupleGearVelocity.pMaster"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleGearVelocity.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CoupleGearVelocity.GearDiv"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleGearVelocity.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleGearVelocity.CommandState"/>
		END_VAR;
				//! <Function Comment="Electronic CAM coupling (new version)" Name="CoupleCAM"/>
	FUNCTION VIRTUAL GLOBAL CoupleCAM
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleCAM.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleCAM.MaxAcc"/>
			DeltaPosMaster 	: DINT;			//! <Variable Comment="Position offset in the master axis of the cam definition [CAM Master units].&#13;&#10;Added to the master axis position before searching the table." Name="CoupleCAM.DeltaPosMaster"/>
			pMaster 	: ^MasterStruct;			//! <Variable Comment="Pointer to the master axis information (MasterStruct). Use method ReadMasterInfo()." Name="CoupleCAM.pMaster"/>
			GearMulMaster 	: DINT;			//! <Variable Comment="Numerator of the master axis scale factor.&#13;&#10;The scale factor is used on the master axis before searching the table." Name="CoupleCAM.GearMulMaster"/>
			GearDivMaster 	: DINT;			//! <Variable Comment="Denominator of the master axis scale factor.&#13;&#10;The scale factor is used on the master axis before searching the table." Name="CoupleCAM.GearDivMaster"/>
			Modulo 	: DINT;			//! <Variable Comment="Modulo value of the master.&#13;&#10;If the master is no modulo axis, then set Modulo=0." Name="CoupleCAM.Modulo"/>
			GearMulSlave 	: DINT;			//! <Variable Comment="Numerator of the slave axis scale factor.&#13;&#10;The scale factor is used on the slave value of the cam table." Name="CoupleCAM.GearMulSlave"/>
			GearDivSlave 	: DINT;			//! <Variable Comment="Denominator of the slave axis scale factor.&#13;&#10;The scale factor is used on the slave value of the cam table." Name="CoupleCAM.GearDivSlave"/>
			OffsetSlave 	: DINT;			//! <Variable Comment="Position offset in the slave axis of the cam definition [Internal units].&#13;&#10;Added to the slave value of the cam table." Name="CoupleCAM.OffsetSlave"/>
			Mode 	: _LMCAXIS_CURVETABMODE;			//! <Variable Comment="Slave axis operating mode" Name="CoupleCAM.Mode"/>
			pCurveTable 	: DINT;			//! <Variable Comment="Pointer to the cam table casted to DINT.&#13;&#10;Use the ClassSvr.Read()-method of the class, which has been generated by the Lasal CAM Designer or cast the result of _LMCCAM.calcCAMData().&#13;&#10;It is important that the memory range of the given CAM Table is not changed since the class uses the given table and does not create a local copy." Name="CoupleCAM.pCurveTable"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleCAM.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleCAM.CommandState"/>
		END_VAR;
				//! <Function Comment="Electronic CAM coupling" Name="CoupleCurveTab"/>
	FUNCTION VIRTUAL GLOBAL CoupleCurveTab
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleCurveTab.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleCurveTab.MaxAcc"/>
			DeltaPos 	: DINT;			//! <Variable Comment="Position offset in the master axis of the cam definition [CAM Master units].&#13;&#10;Added to the master axis position before searching the table." Name="CoupleCurveTab.DeltaPos"/>
			pMaster 	: ^MasterStruct;			//! <Variable Comment="Pointer to the master axis information (MasterStruct). Use method ReadMasterInfo()." Name="CoupleCurveTab.pMaster"/>
			GearMul 	: DINT;			//! <Variable Comment="Numerator of the master axis scale factor.&#13;&#10;The scale factor is used on the master axis before searching the table." Name="CoupleCurveTab.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Denominator of the master axis scale factor.&#13;&#10;The scale factor is used on the master axis before searching the table." Name="CoupleCurveTab.GearDiv"/>
			Mode 	: _LMCAXIS_CURVETABMODE;			//! <Variable Comment="Slave axis operating mode" Name="CoupleCurveTab.Mode"/>
			pCurveData 	: ^_LMCAXIS_CURVE;			//! <Variable Comment="Pointer to the curve data" Name="CoupleCurveTab.pCurveData"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleCurveTab.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleCurveTab.CommandState"/>
		END_VAR;
				//! <Function Comment="Method CoupleGearPolynom couples a slave axis to a master axis using a higher order polynomial or splines without jerks.&#13;&#10;  The master starts with velocity zero or unequal zero. The slave starts with velocity zero or unequal zero, acceleration zero or&#13;&#10;  unequal zero  and should achieve a target velocity of vM*Multiplier/Divisor travelling sSlave units while the master travels&#13;&#10;  sMaster units with velocity vM. (Posmode=_StartPolynomPositioning). Target acceleration and jerk of the slave is zero.&#13;&#10;  After the master is catched, the slave is locked (not permitted to go backwards) (PosMode=_SyncPolynomPositioning)." Name="CoupleGearPolynom"/>
	FUNCTION VIRTUAL GLOBAL CoupleGearPolynom
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleGearPolynom.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleGearPolynom.MaxAcc"/>
			pMaster 	: ^MasterStruct;			//! <Variable Comment="Pointer to the master axis information (MasterStruct). Use method ReadMasterInfo()." Name="CoupleGearPolynom.pMaster"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleGearPolynom.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CoupleGearPolynom.GearDiv"/>
			sMaster 	: DINT;			//! <Variable Comment="Distance travelled by the master axis during coupling [Application units]" Name="CoupleGearPolynom.sMaster"/>
			sSlave 	: DINT;			//! <Variable Comment="Distance travelled by the slave axis during coupling [Application units]" Name="CoupleGearPolynom.sSlave"/>
			TargetMaster 	: BOOL := TRUE;			//! <Variable Comment="Select whether the slave axis is coupled or decoupled.&#13;&#10;TRUE  ... (default) vOut = velocity of the master * GearMul / GearDiv&#13;&#10;FALSE ... vOut = 0" Name="CoupleGearPolynom.TargetMaster"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleGearPolynom.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleGearPolynom.CommandState"/>
		END_VAR;
				//! <Function Comment="This function is called from the class _LMCProfile for profile coupling" Name="CoupleProfilePos"/>
	FUNCTION VIRTUAL GLOBAL CoupleProfilePos
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed [Application units / s]" Name="CoupleProfilePos.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum acceleration [application units / sē]" Name="CoupleProfilePos.MaxAcc"/>
			pMasterPos 	: ^DINT;			//! <Variable Comment="Pointer to the master position" Name="CoupleProfilePos.pMasterPos"/>
			DeltaPos 	: DINT;			//! <Variable Comment="Position difference between the master axis and the slave axis [internal units]" Name="CoupleProfilePos.DeltaPos"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleProfilePos.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CoupleProfilePos.GearDiv"/>
			Mode 	: _LMCAXIS_COUPLE_GEAR_MODE;			//! <Variable Comment="Mode = COUPLE_PROFILE_GEAR    -&gt; with gear ratio&#13;&#10;Mode = COUPLE_PROFILE_NO_GEAR -&gt; without gear ratio" Name="CoupleProfilePos.Mode"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleProfilePos.CommandState"/>
		END_VAR;
				//! <Function Comment="This function is called from the class _LMCProfile for profile coupling (for MoveType=_JERK_PROFILE only)" Name="CoupleProfilePosExtended"/>
	FUNCTION VIRTUAL GLOBAL CoupleProfilePosExtended
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleProfilePosExtended.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleProfilePosExtended.MaxAcc"/>
			DeltaPos 	: DINT;			//! <Variable Comment="Position difference between the master axis and the slave axis [internal units]" Name="CoupleProfilePosExtended.DeltaPos"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleProfilePosExtended.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CoupleProfilePosExtended.GearDiv"/>
			Mode 	: _LMCAXIS_COUPLE_GEAR_MODE;			//! <Variable Comment="Mode = COUPLE_PROFILE_GEAR    -&gt; with gear ratio&#13;&#10;Mode = COUPLE_PROFILE_NO_GEAR -&gt; without gear ratio" Name="CoupleProfilePosExtended.Mode"/>
			pMasterPos 	: ^LREAL;			//! <Variable Comment="Pointer to the master position" Name="CoupleProfilePosExtended.pMasterPos"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;
		END_VAR;
				//! <Function Comment="add an additional positiondifference&#13;&#10;every cycle, when&#13;&#10;PosMode = _ProfileSyncPositioning" Name="CoupleAdditivePosDiff"/>
	FUNCTION VIRTUAL GLOBAL CoupleAdditivePosDiff
		VAR_INPUT
			pPosDiff 	: ^DINT;			//! <Variable Comment="pointer to the positiondifference [internal units]" Name="CoupleAdditivePosDiff.pPosDiff"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleAdditivePosDiff.CommandState"/>
		END_VAR;
				//! <Function Comment="Coupling to a user position" Name="CoupleUserPos"/>
	FUNCTION VIRTUAL GLOBAL CoupleUserPos
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleUserPos.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleUserPos.MaxAcc"/>
			pMasterPos 	: ^DINT;			//! <Variable Comment="pointer to the setvalue of the master [internal units]" Name="CoupleUserPos.pMasterPos"/>
			DeltaPos 	: DINT;			//! <Variable Comment="Position difference between the master position and the slave axis [internal units]" Name="CoupleUserPos.DeltaPos"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleUserPos.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CoupleUserPos.GearDiv"/>
			Mode 	: _LMCAXIS_COUPLE_GEAR_MODE;			//! <Variable Comment="Mode = COUPLE_PROFILE_GEAR    --&gt; with gear&#13;&#10;Mode = COUPLE_PROFILE_NO_GEAR --&gt; without gear" Name="CoupleUserPos.Mode"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleUserPos.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleUserPos.CommandState"/>
		END_VAR;
				//! <Function Comment="Coupling to a LREAL user position (for MoveType=_JERK_PROFILE only)" Name="CoupleUserPosExtended"/>
	FUNCTION VIRTUAL GLOBAL CoupleUserPosExtended
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleUserPosExtended.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleUserPosExtended.MaxAcc"/>
			pMasterPos 	: ^LREAL;			//! <Variable Comment="pointer to the set value (LREAL) of the master [internal units]" Name="CoupleUserPosExtended.pMasterPos"/>
			DeltaPos 	: DINT;			//! <Variable Comment="Position difference between the master position and the slave axis [internal units]" Name="CoupleUserPosExtended.DeltaPos"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CoupleUserPosExtended.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="divisor for the gear ratio" Name="CoupleUserPosExtended.GearDiv"/>
			Mode 	: _LMCAXIS_COUPLE_GEAR_MODE;			//! <Variable Comment="Mode = COUPLE_PROFILE_GEAR    --&gt; with gear&#13;&#10;Mode = COUPLE_PROFILE_NO_GEAR --&gt; without gear" Name="CoupleUserPosExtended.Mode"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleUserPosExtended.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleUserPosExtended.CommandState"/>
		END_VAR;
				//! <Function Comment="Offset position coupling" Name="CoupleDeltaPos"/>
	FUNCTION VIRTUAL GLOBAL CoupleDeltaPos
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleDeltaPos.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleDeltaPos.MaxAcc"/>
			DeltaPos 	: ^DINT;			//! <Variable Comment="Pointer to the position difference value of the master axis [internal units]" Name="CoupleDeltaPos.DeltaPos"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleDeltaPos.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleDeltaPos.CommandState"/>
		END_VAR;
				//! <Function Comment="Offset position coupling with a LREAL value (for MoveType=_JERK_PROFILE only)&#13;&#10;" Name="CoupleDeltaPosExtended"/>
	FUNCTION VIRTUAL GLOBAL CoupleDeltaPosExtended
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="CoupleDeltaPosExtended.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="CoupleDeltaPosExtended.MaxAcc"/>
			DeltaPos 	: ^LREAL;			//! <Variable Comment="Pointer to the position difference value of the master axis (LREAL) [internal units]" Name="CoupleDeltaPosExtended.DeltaPos"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CoupleDeltaPosExtended.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="CoupleDeltaPosExtended.CommandState"/>
		END_VAR;
				//! <Function Comment="Change coupling parameters" Name="ChangeCoupleSettings"/>
	FUNCTION VIRTUAL GLOBAL ChangeCoupleSettings
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed of the axis for this movement [Application units / s]" Name="ChangeCoupleSettings.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum axis acceleration / deceleration [Application units / sē ]" Name="ChangeCoupleSettings.MaxAcc"/>
			DeltaPos 	: DINT;			//! <Variable Comment="Position difference between the master axis and the slave axis [internal units]" Name="ChangeCoupleSettings.DeltaPos"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="ChangeCoupleSettings.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="ChangeCoupleSettings.GearDiv"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximum jerk of the axis for this movement [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="ChangeCoupleSettings.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="ChangeCoupleSettings.CommandState"/>
		END_VAR;
				//! <Function Comment="This method is used to set internal or external position" Name="SetPosition"/>
	FUNCTION VIRTUAL GLOBAL SetPosition
		VAR_INPUT
			Mode 	: _LMCAXIS_SETPOSITION;			//! <Variable Comment="Type of the position value" Name="SetPosition.Mode"/>
			Position 	: DINT;			//! <Variable Comment="Position value, depending on the parameter mode the units are either application units or internal units." Name="SetPosition.Position"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="SetPosition.CommandState"/>
		END_VAR;
				//! <Function Comment="Sets the software parameters" Name="SetParameter"/>
	FUNCTION VIRTUAL GLOBAL SetParameter
		VAR_INPUT
			ParNr 	: _LMCAXIS_SETPARAMETER;			//! <Variable Comment="Parameter number" Name="SetParameter.ParNr"/>
			Value 	: DINT;			//! <Variable Comment="New value" Name="SetParameter.Value"/>
			mode 	: DINT;			//! <Variable Comment="For further information about the mode see the documentation of the class _LMCAxis" Name="SetParameter.mode"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="SetParameter.CommandState"/>
		END_VAR;
				//! <Function Comment="Set software end position." Name="SetSWEndPos"/>
	FUNCTION VIRTUAL GLOBAL SetSWEndPos
		VAR_INPUT
			Mode 	: _LMCAXIS_SETSWENDPOS;			//! <Variable Comment="Type of the end position value" Name="SetSWEndPos.Mode"/>
			Position 	: DINT;			//! <Variable Comment="Value for the corresponding SW end position. Depending on the parameter mode the units are either application units or internal units." Name="SetSWEndPos.Position"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="SetSWEndPos.CommandState"/>
		END_VAR;
				//! <Function Comment="Sets server values" Name="SetAdjustment"/>
	FUNCTION VIRTUAL GLOBAL SetAdjustment
		VAR_INPUT
			No 	: _LMCAXIS_SETSERVER;			//! <Variable Comment="Server-ID" Name="SetAdjustment.No"/>
			Value 	: DINT;			//! <Variable Comment="desired server value" Name="SetAdjustment.Value"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="0 --&gt; Value was not accepted&#13;&#10;Possible Causes: - Value does not exist&#13;&#10;                 - Controller is enabled&#13;&#10;1 --&gt; Value has been accepted" Name="SetAdjustment.CommandState"/>
		END_VAR;
				//! <Function Comment="Returns axis position depending on the selected mode" Name="ReadPosition"/>
	FUNCTION VIRTUAL GLOBAL ReadPosition
		VAR_INPUT
			Mode 	: _LMCAXIS_READPOS;			//! <Variable Comment="Type of the position that should be read" Name="ReadPosition.Mode"/>
		END_VAR
		VAR_OUTPUT
			Position 	: DINT;			//! <Variable Comment="Internal position of the axis depending on the selected mode" Name="ReadPosition.Position"/>
		END_VAR;
				//! <Function Comment="Reads the axis velocity" Name="ReadVelocity"/>
	FUNCTION VIRTUAL GLOBAL ReadVelocity
		VAR_INPUT
			Mode 	: _LMCAXIS_READVELOCITY;			//! <Variable Comment="Type of the axis velocity that should be read" Name="ReadVelocity.Mode"/>
		END_VAR
		VAR_OUTPUT
			Result 	: DINT;			//! <Variable Comment="Axis velocity depending on the selected mode" Name="ReadVelocity.Result"/>
		END_VAR;
				//! <Function Comment="Reads the software parameters." Name="ReadParameter"/>
	FUNCTION VIRTUAL GLOBAL ReadParameter
		VAR_INPUT
			ParNr 	: _LMCAXIS_READPARAMETER;			//! <Variable Comment="Parameter number" Name="ReadParameter.ParNr"/>
			mode 	: DINT;			//! <Variable Comment="Valid for paramters LMCAXIS_PAR_RD_V_MAX, LMCAXIS_PAR_RD_A_MAX, LMCAXIS_PAR_RD_REFPOS&#13;&#10;0 --&gt; Value is returned in [Application units]&#13;&#10;1 --&gt; Value is returned in [Internal units]" Name="ReadParameter.mode"/>
		END_VAR
		VAR_OUTPUT
			Result 	: DINT;			//! <Variable Comment="Software parameter" Name="ReadParameter.Result"/>
		END_VAR;
				//! <Function Comment="Reads software parameters with floating point result." Name="ReadParameterLREAL"/>
	FUNCTION VIRTUAL GLOBAL ReadParameterLREAL
		VAR_INPUT
			ParNo 	: _LMCAXIS_READPARAMETER_LREAL;			//! <Variable Comment="parameter number" Name="ReadParameterLREAL.ParNo"/>
			mode 	: DINT;			//! <Variable Comment="sub parameter number" Name="ReadParameterLREAL.mode"/>
		END_VAR
		VAR_OUTPUT
			Result 	: LREAL;			//! <Variable Comment="software parameter" Name="ReadParameterLREAL.Result"/>
		END_VAR;
				//! <Function Comment="This method reads the software end position" Name="ReadSWEndPos"/>
	FUNCTION VIRTUAL GLOBAL ReadSWEndPos
		VAR_INPUT
			Mode 	: _LMCAXIS_READSWENDPOS;			//! <Variable Comment="0 --&gt; Maximum SW end position with cResolution_Fact [Application units]&#13;&#10;1 --&gt; Minimum SW end position with cResolution_Fact [Application units]&#13;&#10;2 --&gt; Maximum SW software end position without cResolution_Fact [Internal units]&#13;&#10;3 --&gt; Minimum SW software end position without cResolution_Fact [Internal units]" Name="ReadSWEndPos.Mode"/>
		END_VAR
		VAR_OUTPUT
			Position 	: DINT;			//! <Variable Comment="Software end position Depending on the mode, either application units or internal units" Name="ReadSWEndPos.Position"/>
		END_VAR;
				//! <Function Comment="Provides the actual profile status." Name="ReadAxisError"/>
	FUNCTION VIRTUAL GLOBAL ReadAxisError
		VAR_OUTPUT
			AxisErrorInfo 	: _LMCAXIS_ERROR;			//! <Variable Comment="Profile status of the axis" Name="ReadAxisError.AxisErrorInfo"/>
		END_VAR;
				//! <Function Comment="Provides the actual axis status." Name="ReadAxisStatus"/>
	FUNCTION VIRTUAL GLOBAL ReadAxisStatus
		VAR_OUTPUT
			Status 	: _LMCAXIS_STATUS;			//! <Variable Comment="Status flags of the axis" Name="ReadAxisStatus.Status"/>
		END_VAR;
				//! <Function Comment="Purveys a pointer to the master structure" Name="ReadMasterInfo"/>
	FUNCTION VIRTUAL GLOBAL ReadMasterInfo
		VAR_INPUT
			usDelay 	: USINT := 0;			//! <Variable Comment="delay of the Master" Name="ReadMasterInfo.usDelay"/>
		END_VAR
		VAR_OUTPUT
			MasterPtr 	: ^MasterStruct;			//! <Variable Comment="Pointer to the master structure" Name="ReadMasterInfo.MasterPtr"/>
		END_VAR;
				//! <Function Comment="For internal use only." Name="ReadUserData"/>
	FUNCTION VIRTUAL GLOBAL ReadUserData
		VAR_INPUT
			index 	: DINT;
		END_VAR
		VAR_OUTPUT
			Result 	: DINT;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL SetUserData
		VAR_INPUT
			index 	: DINT;
			value 	: DINT;
			mode 	: DINT;
		END_VAR
		VAR_OUTPUT
			Result 	: DINT;
		END_VAR;
				//! <Function Comment="Calculate the duration of a movement" Name="CalcMovingTime"/>
	FUNCTION VIRTUAL GLOBAL CalcMovingTime
		VAR_INPUT
			StartPos 	: DINT;			//! <Variable Comment="Start-position [Application units]" Name="CalcMovingTime.StartPos"/>
			EndPos 	: DINT;			//! <Variable Comment="End-position [Application units]" Name="CalcMovingTime.EndPos"/>
			Vstart 	: DINT;			//! <Variable Comment="Start-velocity [Application units / s]" Name="CalcMovingTime.Vstart"/>
			Vende 	: DINT;			//! <Variable Comment="End-velocity [Application units / s]" Name="CalcMovingTime.Vende"/>
			Accel 	: DINT;			//! <Variable Comment="Maximal allowed acceleration [Application units / sē]" Name="CalcMovingTime.Accel"/>
			Decel 	: DINT;			//! <Variable Comment="Maximal allowed deceleration [Application units / sē]" Name="CalcMovingTime.Decel"/>
			Vmax 	: DINT;			//! <Variable Comment="Maximal allowed velocity [Application units / s]" Name="CalcMovingTime.Vmax"/>
			pMovingTime 	: ^UDINT;			//! <Variable Comment="Pointer to the calculated result [Milliseconds]." Name="CalcMovingTime.pMovingTime"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="Maximal allowed jerk [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CalcMovingTime.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CalcState 	: _LMCAXIS_MOVINGTIMEERROR;			//! <Variable Comment="State of the calculation.&#13;&#10;0 -&gt; no error occured&#13;&#10;1 ... 19 -&gt; errorcodes" Name="CalcMovingTime.CalcState"/>
		END_VAR;
				//! <Function Comment="Activate or deactivate the modus &quot;FOLLOW_LMCAXIS&quot;&#13;&#10;See description of the server &quot;Control&quot;" Name="SetFollowMode"/>
	FUNCTION VIRTUAL GLOBAL SetFollowMode
		VAR_INPUT
			Mode 	: _LMCAXIS_FOLLOW_MODE;			//! <Variable Comment="Mode = DEACTIVATE_FOLLOW_MODE -&gt; deactive the status &quot;FOLLOW_LMCAXIS&quot;&#13;&#10;Mode = ACTIVATE_FOLLOW_MODE   -&gt;   active the status &quot;FOLLOW_LMCAXIS&quot;" Name="SetFollowMode.Mode"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis" Name="SetFollowMode.CommandState"/>
		END_VAR;
				//! <Function Comment="Reset all axis errors" Name="QuitError"/>
	FUNCTION VIRTUAL GLOBAL QuitError;
				//! <Function Comment="Calculates the maximal possible slavepath for coupling by the function: &quot;CoupleGearPolynom&quot;" Name="CalcMaxSlavePath"/>
	FUNCTION VIRTUAL GLOBAL CalcMaxSlavePath
		VAR_INPUT
			MaxVel 	: DINT;			//! <Variable Comment="Maximum speed [Application units / s]" Name="CalcMaxSlavePath.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="Maximum acceleration [application units / sē]" Name="CalcMaxSlavePath.MaxAcc"/>
			pMaster 	: ^MasterStruct;			//! <Variable Comment="pointer to the master axis information. use method ReadMasterInfo()" Name="CalcMaxSlavePath.pMaster"/>
			GearMul 	: DINT;			//! <Variable Comment="Multiplier for the gear ratio" Name="CalcMaxSlavePath.GearMul"/>
			GearDiv 	: DINT;			//! <Variable Comment="Divisor for the gear ratio" Name="CalcMaxSlavePath.GearDiv"/>
			sMaster 	: DINT;			//! <Variable Comment="Distance coupled by the master" Name="CalcMaxSlavePath.sMaster"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximal allowed jerk [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CalcMaxSlavePath.MaxJerk"/>
		END_VAR
		VAR_OUTPUT
			MaxSlavePath 	: DINT;			//! <Variable Comment="Maximal possible slave path for successful coupling by the function &quot;CoupleGearPolynom&quot;" Name="CalcMaxSlavePath.MaxSlavePath"/>
		END_VAR;
				//! <Function Comment="Calculates the internal position in application units&#13;&#10;of the input parameter" Name="CalcExtToAppliPos"/>
	FUNCTION VIRTUAL GLOBAL CalcExtToAppliPos
		VAR_INPUT
			Param 	: DINT;			//! <Variable Comment="position to be converted" Name="CalcExtToAppliPos.Param"/>
		END_VAR
		VAR_OUTPUT
			OutParam 	: DINT;			//! <Variable Comment="internal position in application units" Name="CalcExtToAppliPos.OutParam"/>
		END_VAR;
				//! <Function Comment="Is used to stop the axis." Name="User_Kill"/>
	FUNCTION VIRTUAL User_Kill
		VAR_OUTPUT
			ret_code 	: iprStates;
		END_VAR;
				//! <Function Comment="Computes the distance, which will be covered until a new target velocity is reached." Name="CalcSpeedChangePath"/>
	FUNCTION VIRTUAL GLOBAL CalcSpeedChangePath
		VAR_INPUT
			NewVel 	: DINT;			//! <Variable Comment="new target velocity [application units / sec]" Name="CalcSpeedChangePath.NewVel"/>
			MaxAccel 	: DINT := 0;			//! <Variable Comment="maximal acceleration [application units / sec^2]" Name="CalcSpeedChangePath.MaxAccel"/>
			MaxDecel 	: DINT := 0;			//! <Variable Comment="maximal deceleration [application units / sec^2]&#13;&#10;In the case of _RAMP_Profile, 1,25 times the deceleration is used for calculation. " Name="CalcSpeedChangePath.MaxDecel"/>
			MaxJerk 	: DINT := 0;			//! <Variable Comment="Maximal jerk [Application units / sec^3 / 1000] (for MoveType=_JERK_PROFILE only)" Name="CalcSpeedChangePath.MaxJerk"/>
			NextTick 	: USINT := 0;			//! <Variable Comment="If this parameter is 0, the speed change path is calculation from the actual tick.&#13;&#10;If this parameter is not 0, the speed change path is calculated from the subsequent tick (1 tick in the future).&#13;&#10;This parameter is only available for MoveType = _JERK_PROFILE." Name="CalcSpeedChangePath.NextTick"/>
		END_VAR
		VAR_OUTPUT
			DeltaPos 	: DINT;			//! <Variable Comment="distance, which is covered until we reach the new velocity. [application units]" Name="CalcSpeedChangePath.DeltaPos"/>
		END_VAR;
				//! <Function Comment="This method allows the user to change the move settings (limits) of an active move command.&#13;&#10;The change in settings can also be activated for a specified distance, after the distance has been travelled, the previous settings are restored." Name="ChangeMoveSettings"/>
	FUNCTION VIRTUAL GLOBAL ChangeMoveSettings
		VAR_INPUT
			MaxVel 	: UDINT;			//! <Variable Comment="This input variable is used to set the Velocity Limit of the active Move Command:&#13;&#10;&#13;&#10;Possible Values:&#13;&#10;Mode = 0&#13;&#10;Percentage reduction of the actual speed limit.&#13;&#10;(1000 = 100.0%)&#13;&#10;&#13;&#10;Mode = 1&#13;&#10;Velocity Limit in Application Units / Sec." Name="ChangeMoveSettings.MaxVel"/>
			MaxAcc 	: DINT;			//! <Variable Comment="This input variable is used to set the Acceleration Limit of the active Move Command in Application Units / sē.&#13;&#10;&#13;&#10;Possible Values:&#13;&#10;MaxAcc &gt; 0 - The new limit is activated.&#13;&#10;MaxAcc = 0 - The actual value is taken as the new Limit.&#13;&#10;MaxAcc &lt; 0 - The acceleration limit is not changed." Name="ChangeMoveSettings.MaxAcc"/>
			MaxDec 	: DINT;			//! <Variable Comment="This input variable is used to set the Deceleration Limit of the active Move Command in Application Units / sē.&#13;&#10;&#13;&#10;Possible Values:&#13;&#10;MaxDec &gt; 0 - The new limit is activated.&#13;&#10;MaxDec = 0 - The actual value is taken as the new Limit.&#13;&#10;MaxDec &lt; 0 - The Deceleration limit is not changed." Name="ChangeMoveSettings.MaxDec"/>
			Dist 	: DINT;			//! <Variable Comment="This input variable can be used to supply a distance over which the new limits must be effective, after the axis has travelled this distance, the old limits are effective.&#13;&#10;&#13;&#10;Possible Values:&#13;&#10;Dist &gt; 0 - The distance is limit is observed.&#13;&#10;Dist = 0 - The distance is limit is ignored." Name="ChangeMoveSettings.Dist"/>
			Modus 	: DINT := 0;			//! <Variable Comment="This input variable allows the user to specify the velocity limit in either Per Mill or Application Units / s.&#13;&#10;See the description of MaxVel for further information.&#13;&#10;&#13;&#10;Possible Values:&#13;&#10;Modus=0 - MaxVel is specified as per mill of the active maximal velocity (1000 = 100.0%)&#13;&#10;Modus=1 - MaxVel is specified as velocity [application units / sec]" Name="ChangeMoveSettings.Modus"/>
			Jerk 	: DINT := 0;			//! <Variable Comment="This input variable is used to set the Jerk of the active Move Command in Application Units / s^3.&#13;&#10;&#13;&#10;Possible Values:&#13;&#10;Jerk &gt; 0 - The new Jerk setting is activated.&#13;&#10;Jerk &lt;= 0 - The Jerk setting is not changed." Name="ChangeMoveSettings.Jerk"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="The retcode specifies the status of the command.&#13;&#10;&#13;&#10;Possible values are:&#13;&#10;&lt;&gt; 0 - An Error Occurred. (See flags for further details)&#13;&#10;= 0 - No Error Occurred." Name="ChangeMoveSettings.CommandState"/>
		END_VAR;
				//! <Function Comment="This method delivers 0 until a special point is reached defined by used mode and value.&#13;&#10;Can be used to trigger external actions previous depending on the movement to cancel out delays or similar things." Name="GetPosInfoBeforeRampDown"/>
	FUNCTION VIRTUAL GLOBAL GetPosInfoBeforeRampDown
		VAR_INPUT
			Mode 	: _LMCAXIS_POSINFOMODE;			//! <Variable Comment=" 0 ... time&#13;&#10; 1 ... distance" Name="GetPosInfoBeforeRampDown.Mode"/>
			Value 	: DINT;			//! <Variable Comment="Value of time [Milliseconds], or distance [Application units]" Name="GetPosInfoBeforeRampDown.Value"/>
		END_VAR
		VAR_OUTPUT
			RetValue 	: DINT;			//! <Variable Comment=" 0 ... point not reached&#13;&#10; 1 ... point reached" Name="GetPosInfoBeforeRampDown.RetValue"/>
		END_VAR;
				//! <Function Comment="Method to receive safety settings from the hardware axis. The method allows to directly read data, which are safety specific from the hardware." Name="GetSafetyState"/>
	FUNCTION VIRTUAL GLOBAL GetSafetyState
		VAR_INPUT
			Parameter 	: t_e_LMCAXIS_GETSAFETYPARAMETER;			//! <Variable Comment="The parameter defines which safety data should be read from the hardware. See the description of the ENUM values of the connected type." Name="GetSafetyState.Parameter"/>
			pPara1 	: ^DINT;			//! <Variable Comment="First return value of the read safety data from the drive. See the comment or description of the used ENUM entry to see the details which value is returned." Name="GetSafetyState.pPara1"/>
			pPara2 	: ^DINT;			//! <Variable Comment="Second return value of the read safety data from the drive. See the comment or description of the used ENUM entry to see the details which value is returned." Name="GetSafetyState.pPara2"/>
			pPara3 	: ^DINT;			//! <Variable Comment="Third return value of the read safety data from the drive. See the comment or description of the used ENUM entry to see the details which value is returned." Name="GetSafetyState.pPara3"/>
			pPara4 	: ^DINT;			//! <Variable Comment="Fourth return value of the read safety data from the drive. See the comment or description of the used ENUM entry to see the details which value is returned." Name="GetSafetyState.pPara4"/>
			Mode 	: DINT;			//! <Variable Comment="Additional input parameter to define the specific request for the given input parameter. See the description of the ENUM entry which modes are available for the choosen parameter." Name="GetSafetyState.Mode"/>
		END_VAR
		VAR_OUTPUT
			QueryState 	: iprStates;			//! <Variable Comment="Return value of the command. The query state marks if the returned values are already valid or reading of the value is still ongoing or failed.&#13;&#10;READY ... the returned values are valid and the read request is finished. It is possible to trigger a new read command afterwards.&#13;&#10;ERROR ... reading the requested data failed. The values on the return parameters are not valid.&#13;&#10;BUSY ... reading the requested data is still ongoing. Keep calling the method to read the desired data." Name="GetSafetyState.QueryState"/>
		END_VAR;
				//! <Function Comment="Calculates the correct start position of a slave axis for cam coupling from the master position and the cam. [application units]" Name="ReadSlavePosCam"/>
	FUNCTION VIRTUAL GLOBAL ReadSlavePosCam
		VAR_INPUT
			MasterPos 	: DINT;			//! <Variable Comment="Position of the master axis in internal units of the master axis." Name="ReadSlavePosCam.MasterPos"/>
			DeltaPosMaster 	: DINT;			//! <Variable Comment="Position offset in the master axis of the cam definition [CAM Master units].&#13;&#10;Added to the master axis position before searching the table." Name="ReadSlavePosCam.DeltaPosMaster"/>
			GearMulMaster 	: DINT;			//! <Variable Comment="Numerator of the master axis scale factor." Name="ReadSlavePosCam.GearMulMaster"/>
			GearDivMaster 	: DINT;			//! <Variable Comment="Denominator of the master axis scale factor." Name="ReadSlavePosCam.GearDivMaster"/>
			Modulo 	: DINT;			//! <Variable Comment="Modulo value of the master.&#13;&#10;If the master is no modulo axis, then set Modulo=0." Name="ReadSlavePosCam.Modulo"/>
			GearMulSlave 	: DINT;			//! <Variable Comment="Numerator of the slave axis scale factor.&#13;&#10;The scale factor is used on the slave value of the cam table." Name="ReadSlavePosCam.GearMulSlave"/>
			GearDivSlave 	: DINT;			//! <Variable Comment="Denominator of the slave axis scale factor.&#13;&#10;The scale factor is used on the slave value of the cam table." Name="ReadSlavePosCam.GearDivSlave"/>
			OffsetSlave 	: DINT;			//! <Variable Comment="Position offset in the slave axis of the cam definition [Internal units].&#13;&#10;Added to the slave value of the cam table." Name="ReadSlavePosCam.OffsetSlave"/>
			pCurveTable 	: DINT;			//! <Variable Comment="Pointer to the cam table casted to DINT.&#13;&#10;Use the ClassSvr.Read()-method of the class, which has been generated by the Lasal CAM Designer." Name="ReadSlavePosCam.pCurveTable"/>
		END_VAR
		VAR_OUTPUT
			SlavePos 	: DINT;			//! <Variable Comment="Position of the slave axis from the cam table [application units]" Name="ReadSlavePosCam.SlavePos"/>
		END_VAR;
				//! <Function Comment="Set or delete a dynamic software end position for this axis" Name="SetDynSwEndPos"/>
	FUNCTION VIRTUAL GLOBAL SetDynSwEndPos
		VAR_INPUT
			pSWEndPos 	: ^DINT;			//! <Variable Comment="Pointer to the dynamic SW end position.&#13;&#10;To delete a dynamic SW end position set this pointer to NIL." Name="SetDynSwEndPos.pSWEndPos"/>
			Mode 	: _LMC_DYN_SWLIMITS;			//! <Variable Comment="Choose maximum or minimum dynamic position" Name="SetDynSwEndPos.Mode"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Status flags of the axis." Name="SetDynSwEndPos.CommandState"/>
		END_VAR;
				//! <Function Comment="Method to send safety settings to the hardware axis. The method allows to directly send commands, which are safety specific to the hardware." Name="SetSafetyState"/>
	FUNCTION VIRTUAL GLOBAL SetSafetyState
		VAR_INPUT
			Parameter 	: t_e_LMCAXIS_SETSAFETYPARAMETER;			//! <Variable Comment="The parameter defines which safety command should be sent to the hardware. See the description of the ENUM values of the connected type." Name="SetSafetyState.Parameter"/>
			Mode 	: DINT;			//! <Variable Comment="Additional parameter to alter the command defined by the parameter. See the documentation and type description of the parameter to see options offered by &quot;Mode&quot;." Name="SetSafetyState.Mode"/>
		END_VAR
		VAR_OUTPUT
			CommandState 	: _LMCAXIS_CMDERROR;			//! <Variable Comment="Returns if the request was successul:&#13;&#10;CommandState = 0 ... No error, command successful&#13;&#10;CommandState.GlobalError = 1 ... Command failed (CommandState &lt;&gt; 0)." Name="SetSafetyState.CommandState"/>
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL Control::GetState
		VAR_INPUT
			pPara 	: ^CmdStruct;
			pResult 	: ^results;
		END_VAR
		VAR_OUTPUT
			ret_code 	: iprStates;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL Control::Kill
		VAR_OUTPUT
			ret_code (EAX) 	: iprStates;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL Control::NewInst
		VAR_INPUT
			pPara 	: ^CmdStruct;
			pResult 	: ^results;
		END_VAR
		VAR_OUTPUT
			ret_code 	: iprStates;
		END_VAR;
  //Tables:
	FUNCTION @STD
		VAR_OUTPUT
			ret_code	: CONFSTATES;
		END_VAR;
	FUNCTION GLOBAL TAB @CT_;
END_CLASS;

//}}LSL_DECLARATION


FUNCTION GLOBAL TAB _AxisBase::@CT_
0$UINT,
2#0100000000000000$UINT, //TY__AXISBASE
1$UINT, 58$UINT, (SIZEOF(::_AxisBase))$UINT, 
2$UINT, 0$UINT, 0$UINT, 
TO_UDINT(1047453148), "_AxisBase", //Class
TO_UDINT(0), 0, 0$UINT, 0$UINT, //Baseclass
//Servers:
(::_AxisBase.Control.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(3533623889), "Control", 
(::_AxisBase.AxisStatus.pMeth)$UINT, _CH_SVR$UINT, 2#0000000000000000$UINT, TO_UDINT(1169018451), "AxisStatus", 
//Clients:
END_FUNCTION


#define USER_CNT__AxisBase 54

TYPE
	_LSL_STD_VMETH	: STRUCT
			CmdTable	: CMDMETH;
			UserFcts	: ARRAY[0..USER_CNT__AxisBase] OF ^Void;
	END_STRUCT;
END_TYPE

FUNCTION _AxisBase::@STD
	VAR_OUTPUT
		ret_code	: CONFSTATES;
	END_VAR
	VAR
		vmt	: _LSL_STD_VMETH;
	END_VAR

	//Command Methods
	InitCmdTable (nCmd := nSTDCMD + USER_CNT__AxisBase, pCmd := #vmt.CmdTable);
	vmt.CmdTable.GetState		:= #GetState();
	vmt.CmdTable.Kill		:= #Kill();
	vmt.CmdTable.NewInstr		:= #NewInst();
	vmt.CmdTable.Init		:= #Init();
	vmt.CmdTable.RtWork		:= #RtWork();
#pragma warning (disable : 74)
	vmt.UserFcts[0]		:= #Background();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[1]		:= #PowerOn();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[2]		:= #PowerOff();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[3]		:= #MoveHand();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[4]		:= #MoveEndless();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[5]		:= #MoveAbsolute();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[6]		:= #MoveShortestWay();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[7]		:= #MoveReference();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[8]		:= #MoveRelative();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[9]		:= #StopMove();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[10]		:= #QuickStop();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[11]		:= #TuneAxis();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[12]		:= #InPosition();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[13]		:= #CoupleGearAbsolute();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[14]		:= #CoupleGearRelative();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[15]		:= #CoupleGearVelocity();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[16]		:= #CoupleCAM();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[17]		:= #CoupleCurveTab();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[18]		:= #CoupleGearPolynom();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[19]		:= #CoupleProfilePos();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[20]		:= #CoupleProfilePosExtended();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[21]		:= #CoupleAdditivePosDiff();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[22]		:= #CoupleUserPos();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[23]		:= #CoupleUserPosExtended();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[24]		:= #CoupleDeltaPos();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[25]		:= #CoupleDeltaPosExtended();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[26]		:= #ChangeCoupleSettings();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[27]		:= #SetPosition();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[28]		:= #SetParameter();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[29]		:= #SetSWEndPos();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[30]		:= #SetAdjustment();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[31]		:= #ReadPosition();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[32]		:= #ReadVelocity();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[33]		:= #ReadParameter();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[34]		:= #ReadParameterLREAL();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[35]		:= #ReadSWEndPos();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[36]		:= #ReadAxisError();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[37]		:= #ReadAxisStatus();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[38]		:= #ReadMasterInfo();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[39]		:= #ReadUserData();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[40]		:= #SetUserData();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[41]		:= #CalcMovingTime();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[42]		:= #SetFollowMode();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[43]		:= #QuitError();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[44]		:= #CalcMaxSlavePath();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[45]		:= #CalcExtToAppliPos();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[46]		:= #User_Kill();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[47]		:= #CalcSpeedChangePath();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[48]		:= #ChangeMoveSettings();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[49]		:= #GetPosInfoBeforeRampDown();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[50]		:= #GetSafetyState();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[51]		:= #ReadSlavePosCam();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[52]		:= #SetDynSwEndPos();

#pragma warning (default : 74)
#pragma warning (disable : 74)
	vmt.UserFcts[53]		:= #SetSafetyState();

#pragma warning (default : 74)
	Control.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF Control.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;

END_FUNCTION

//{{LSL_IMPLEMENTATION
//{{LSL_ENCRYPTION 16#800
[encoded data, 80160 characters]