//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               = "_LMCAxis"
	Revision           = "1.119"
	GUID               = "{BBF26E8B-9881-449D-9540-93990A63ECAD}"
	RealtimeTask       = "true"
	DefRealtime        = "1 ms"
	CyclicTask         = "false"
	DefCyclictime      = "10 ms"
	BackgroundTask     = "true"
	DefBackground      = "100 ms"
	Sigmatek           = "true"
	OSInterface        = "false"
	HighPriority       = "false"
	Automatic          = "false"
	UpdateMode         = "Prescan"
	IconPath           = ".\Class\_LMCAxis\LMCAxis.ico"
	SharedCommandTable = "true"
	Objectsize         = "(650,120)"
	Comment            = "The _LMCAxis 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 _LMCAxis class also contains all the functions/interfaces needed to drive an axis.&#13;&#10;&#13;&#10;The _LMCAxis class also provides the standard referencing functions for the axis. The&#13;&#10;most common referencing variations can be preformed.&#13;&#10;&#13;&#10;The _LMCAxis class also monitors the hardware limit switches.&#13;&#10;&#13;&#10;The _LMCAxis class can manage absolute value encoders.">
	<Channels>
		<Server Name="AbsEncoder" GUID="{67A9C60B-7109-4A29-B034-0B874C9F507E}" Visualized="true" Initialize="true" WriteProtected="false" Retentive="false" Comment="With this server absolute&#13;&#10;encoder-values can be read in"/>
		<Client Name="_LMCABSEncoder1" Required="true" Internal="true"/>
		<Client Name="_LMCAxisRef1" Required="true" Internal="true"/>
		<Client Name="_LMCAxisVis1" Required="true" Internal="true"/>
		<Client Name="_LMCMathFunctions1" Required="true" Internal="true"/>
		<Client Name="_LMCPublisher1" Required="true" Internal="true"/>
		<Client Name="_LMCSafety1" Required="true" Internal="true"/>
		<Client Name="Config" Required="false" Internal="false" Comment="define with this client the&#13;&#10;configuration for the Publisher"/>
		<Client Name="Emergency" Required="false" Internal="false" Comment="With this client a general error condition can be checked and it is possible to configure what in the case of an error should happen."/>
		<Client Name="HWError" Required="false" Internal="false" Comment="Digital-Input to read in wheter a hardware error has occured"/>
		<Client Name="HWMax" Required="false" Internal="false" Comment="Digital-Input for the hardware switch maximum-position&#13;&#10;0 .. hardwareswitch is inactive&#13;&#10;1 .. hardwareswitch is active"/>
		<Client Name="HWMin" Required="false" Internal="false" Comment="Digital-Input for the hardware switch of minimum-position.&#13;&#10;0 .. hardwareswitch is inactive&#13;&#10;1 .. hardwareswitch is active"/>
		<Client Name="HWReady" Required="false" Internal="false" Comment="With this Digital-Input, it can read in whether the hardware is initialized completely"/>
		<Client Name="ID" Required="false" Internal="false" Comment="set a unique ID for the Publisher"/>
		<Client Name="LatchPos" Required="false" Internal="false" Comment="External position [incr] used in mode &quot;RefLatchPos&quot;"/>
		<Client Name="Provider" Required="false" Internal="false" Comment="connect this client to a provider&#13;&#10;who handles the given data"/>
		<Client Name="RefSwitch" Required="false" Internal="false" Comment="Reference switch input"/>
		<Client Name="ZImpulse" Required="false" Internal="false" Comment="This input is used to determine the switching status of the Z pulse"/>
	</Channels>
	<Dependencies>
		<Files>
			<File Path=".\Class\_LMCAxis\_LMCAxis.vov"/>
		</Files>
	</Dependencies>
	<RevDoku>
		<Owner Company="Sigmatek"/>
		<Dokumentation Revision="1.119" Date="2025-03-11" Author="HatTim&#13;&#10;StePhi" Company="Sigmatek" Description="1. Improvement: Added support for torque limited drive. Torque limited drive is a feature to allow following a torque limited axes to avoid acceleration jumps, when torque limitation is changed. Feature works together with class _LMCTorqueHandling.&#13;&#10;2. Improvement: Raised default background time of object _LMCAxisVOVMonitoring in _LMCAxisVis from 10 ms to 100ms to reduce CPU load."/>
		<Dokumentation Revision="1.118" Date="2025-02-18" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: Reducing the dependency to hw class lib by using no defines from DriveSafetyIF.h"/>
		<Dokumentation Revision="1.117" Date="2024-12-03" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: When ExtUnits or IntUnits are changed and MaxSpeed calculation of ST152StepperControl is active, the calculation is not triggered automatically at ST152StepperControl.&#13;&#10;2. Bugfix: HWMin/HWMax-Error can not be quit, when the error is already active and the axis is not referenced. HWMin/HWMax-Error can now be quit, when axis is not referenced any more when corresponding input signal is not still active.&#13;&#10;3. Improvement: When PowerOn via _LMCAxis VOV POWER-Button fails the button shows that the command was denied with red color.&#13;&#10;4. Bugfix: When using objects of the type _LMCModuleBase, the standard calls are only executed if they are numbered consecutively. It should also be possible to omit indices. Skipping indices of connected objects of _LMCModuleBase type is now supported."/>
		<Dokumentation Revision="1.116" Date="2024-11-21" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: Fixed iteration limits of default calls of _LMCModuleBase methods. Skipping indices of connected objects of _LMCModuleBase type is now supported.&#13;&#10;2. Improvement: Changes to support new controller ST152StepperControl communication.&#13;&#10;3. Improvement: Added support for ST152StepperControl to _LMCAxis VOV."/>
		<Dokumentation Revision="1.115" Date="2024-11-20" Author="VelGer" Company="Sigmatek" Description="1. Bugfix: The _LMCAxis could not be powered on in Simulation mode when a DrivePosControlSafety instance was connected, this has been corrected."/>
		<Dokumentation Revision="1.114" Date="2024-04-16" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: A coupled axis does not stop at a dynamic sw limit, when MoveType = _RAMP_PROFILE or MoveType = _SCURVE_PROFILE is used.&#13;&#10;2. Improvement: Added support for using LREAL positions and speed in case the connected controller supports this. The controller class and class revision defines if the controller can operate with LREAL values. LREAL speed and position is only available with _JERK_PROFILE."/>
		<Dokumentation Revision="1.113" Date="2024-01-25" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: The ReadyToPowerOn flag in the AxisStatus is set if the simulation mode has been activated by initializing the &quot;SimulateMode&quot; server."/>
		<Dokumentation Revision="1.112" Date="2023-12-11" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: Acceleration must be limited to the maximum allowed acceleration for CoupleCAM mode with internal LREAL calculation to avoid exceeding the axis acceleration limit.&#13;&#10;2. Bugfix: Error information of 64-bit multiplication to calculate the actual position was not used. DINT overflow or underflow not detected.&#13;&#10;3. Improvement: Error information of 64-bit multiplication is evaluated on user commands for coupling and parameter set.&#13;&#10;4. Improvement: The PowerOn() command of the _LMCAxis class is rejected if the axis is not approved to be enabled by the safety of the drive."/>
		<Dokumentation Revision="1.111" Date="2023-10-28" Author="StePhi" Company="Sigmatek" Description="1. Improvement: Added support for safety axis features. Safe verification, safe reference, automatic SBT at PowerOn() and automatic SS2 handling is now supported."/>
		<Dokumentation Revision="1.110" Date="2023-06-01" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: The slave does not move when negative direction limit is used, when the axis is coupled via CoupleGearVelocity or CoupleDeltaPos.&#13;&#10;2. Bugfix: When a slave is coupled with CoupleGearPolynom() and the movement direction is limited by LMCAXIS_MOVE_POS_DIR, the slave velocity jumps between 0 and an higher speed while polynom trajectory is performed.&#13;&#10;3. Improvement: The setting of velocity jump can now be read using ReadParameter() with parameter LMCAXIS_PAR_RD_VJUMP.&#13;&#10;4. Improvement: The resolution of the master and slave axis can be considered for coupling commands now. The parameter LMCAXIS_PAR_SET_COUPLE_USERESOLUTION was added to activate the new mode. The new mode is available for CoupleGearAbsolute(), CoupleGearRelative(), CoupleGearPolynom(), CoupleGearVelocity(), CoupleCAM() and CoupleCurveTab().&#13;&#10;5. Improvement: New parameter LMCAXIS_PAR_RD_AXISBRAKINGJERK added to method ReadParameter(). This parameter returns if a coupled axis is currently braking to its master&apos;s trajectory or is braking in case of a normal movement."/>
		<Dokumentation Revision="1.109" Date="2023-03-28" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: Condition to check if a jerk error occurs was triggered wrongly, when the temporary speed exceeded the maximum speed by a margin smaller a mathematical epsilon.&#13;&#10;2. Improvement: The actual destination can be read from the axis which is limited by the active sw limits (static and dynamic sw limits). The new parameter LMCAXIS_DESTPOS_INTUNIT_SWLIMITED was added for the method ReadPosition()."/>
		<Dokumentation Revision="1.108" Date="2022-09-22" Author="SakEmi&#13;&#10;StePhi" Company="Sigmatek" Description="1. Info: SW limit comments improved (SWMinPos and SWMaxPos). Detailed description is in the class documentation.&#13;&#10;2. Bugfix: Renamed the enum entries of private ENUM _MoveDirectionIntern to avoid naming collisions with defines in CncConstant.h, when CNC class and _LMCAxis class is used in one project.&#13;&#10;3. Bugfix: In some cases the pointers of backlash measurement and backlash compensation were not checked to valid before using them.&#13;&#10;4. Improvement: The move hand buttons of LMCAxis VOV must now actively be pressed to be active. When no new command for a time of 1 second is sent the axis receives a stop command automatically, e.g. in case of connection break or a huge connection delay.&#13;&#10;5. Improvement: Improved method comment that parameter NextTick of method CalcSpeedChangePath() is only in effect when _JERK_PROFILE is used.&#13;&#10;6. Bugfix: It can be specified if the brake distance of Ramp/Scurve profile will be calculated using the deceleration factor of 100% or 125%.&#13;&#10;7. Improvement: When the master and slave axis is jerk-limited (MoveType = _JERK_PROFILE) it is now supported to directly calculate the coupling internally by using the LREAL variables. This allows a tighter coupling to follow more precisely the CAM table and avoids rounding errors at low master speed. This feature must be activated by using the new parameter LMCAXIS_PAR_SET_CAMCOUPLE_USELREAL.&#13;&#10;8. Bugfix: The internal speed vOverride is not updated, when an override greater than 100% is used and the resulting speed exceeds the maximum axis speed when _RAMP_PROFILE is used. Now the maximum axis speed is used as it is done with _JERK_PROFILE."/>
		<Dokumentation Revision="1.107" Date="2022-09-07" Author="VelGer&#13;&#10;StePhi&#13;&#10;" Company="Sigmatek" Description="1. BugFix: If the Axis is moved with a relatively low Jerk value and ChangeMoveSettings() is executed whilst braking, it can occur that the velocity jumps to 0.&#13;&#10;2. Bugfix: Internal checks of maximum speeds in case of _JERK_PROFILE axis fail, which would be inside of the defined limits of the axis."/>
		<Dokumentation Revision="1.106" Date="2022-07-28" Author="VelGer" Company="Sigmatek" Description="1. Bugfix: In the NCControl Mode, if the axis is moved to position 0 using MoveEndless(), powered off, powered on, and the movement to position 0 is continued, the axis position jumps to the target position. This has been corrected."/>
		<Dokumentation Revision="1.105" Date="2022-04-22" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: If CoupleCurveTab() was started at a modulo axis and executed until the MaxModulo overflow of the slave axis occured and then uncoupled and recoupled with CoupleCurveTab, an unwanted movement could occur within a slave modulo. This was fixed by resetting MaxModuloCAMOffset in the course of CoupleCurveTab().&#13;&#10;2. Bugfix: The master GearMul and GearDiv factor was not applied, when master and slave is a modulo axis for CoupleCAM() and CoupleCurveTab().&#13;&#10;3. Improvement: It should be possible to read all hardlock states by using the ReadParameter parameter LMCAXIS_PAR_RD_HARDLOCK. The return values for NO_HARDLOCK and VEL_JUMP are unchanged."/>
		<Dokumentation Revision="1.104" Date="2022-04-11" Author="MarTho" Company="Sigmatek" Description="1. Bugfix: If CoupleCAM was started at a modulo axis and executed until the MaxModulo overflow of the slave axis occured and then uncoupled and recoupled with CoupleCAM, an unwanted movement could occur within a slave modulo. This was fixed by resetting MaxModuloCAMOffset in the course of CoupleCAM()."/>
		<Dokumentation Revision="1.103" Date="2022-02-07" Author="SakEmi" Company="Sigmatek" Description="1. BugFix: SW limit in MoveRelative() shall only be checked if specified in Server ErrorConfig.&#13;&#10;2. BugFix: Slave axis can&apos;t move in negative direction if it is limited to positive direction only (MOVE_POS_DIR), even if master is moving with very low speed.&#13;&#10;3. Improvement: New ReadParameter LMCAXIS_PAR_RD_REFPOSOFF. It gives the position change created by referencing.&#13;&#10;4. BugFix: Offset position in AbsEncoder is updated also if position is set after the RAM has been cleared"/>
		<Dokumentation Revision="1.102" Date="2022-01-24" Author="StePhi&#13;&#10;SakEmi" Company="Sigmatek" Description="Bugfix: A CAM coupling to a lead axis in _JERK_PROFILE was not working properly when the speed of the lead axis is very small."/>
		<Dokumentation Revision="1.101" Date="2022-01-20" Author="StePhi" Company="Sigmatek" Description="1. Bugfix: When a modulo axis was already moving and a MoveAbsolute() was used it could happen, that the brake action started to late unter following conditions. The axis was powered in LMCAXIS_MOVE_POS_DIR mode or in LMCAXIS_MOVE_NEG_DIR mode and the braking distance was greater or equal than a full modulo of the axis."/>
		<Dokumentation Revision="1.100" Date="2021-11-11" Author="MarTho&#13;&#10;RauAnd" Company="Sigmatek" Description="1. Bugfix: _LMCAxis::QuitError() does not reset the error flags immediately any more but sets a flag that indicates that an error quit is requested. The error quit procedure where the error flags are reset is now performed in the realtime task. This mus be done because otherwise there is an undefined error state between QuitError() and the next realtime task execution."/>
		<Dokumentation Revision="1.99" Date="2021-08-17" Author="StePhi&#13;&#10;MarTho" Company="Sigmatek" Description="1. Improvement: A set parameter LMCAXIS_PAR_SET_CHANGECONTROLLERTYPE was added to read the controller type of the connected controller after init and reinitialize the controller. This parameter can only be used when the axis is not powered.&#13;&#10;2. Improvement: A set parameter LMCAXIS_PAR_SET_COUPLE_SLAVEOFFSET was added to change the offset of a CAM coupled slave while staying coupled to the master.&#13;&#10;3. Bugfix: The LockDelta in the case of CoupleGearAbsolute is now considered in the calculations for the move shortest way functionality."/>
		<Dokumentation Revision="1.98" Date="2021-02-01" Author="BauEli&#13;&#10;MarTho&#13;&#10;StePhi" Company="Sigmatek" Description="1. Improvement: In the general settings of the VOV the internal units are now displayed once originally and once divided by the unit multiplier.&#13;&#10;2. Improvement: The movement parameters of MoveEndless() can now be changed during active MoveEndless() in the VOV of _LMCAxis and the movement can be continued with the new parameters without stopping.&#13;&#10;3. Improvement: Added handling of Backlash measurement and compensation with BacklashMeasurement and BacklashCompensation class to the class.&#13;&#10;4. Bugfix: An AxisError is now set when a slave axis is coupled to a master axis and SwLimitMonitoring coupling option is active and a sw limit would have been violated without stopping the axis.&#13;&#10;5. Bugfix: The slave axis does not start spinning backwards after multiple recouplings when the recouple mode for a slave modulo and master modulo axis is used."/>
		<Dokumentation Revision="1.97" Date="2020-11-16" Author="StePhi" Company="Sigmatek" Description="1. Improvement: A new mode for coupling of a master modulo axis and a slave modulo axis was added. The new mode implements a recoupling (first coupling must be performed as before) to a new CAM Table or to the same CAM Table after decoupling."/>
		<Dokumentation Revision="1.96" Date="2020-09-03" Author="SakEmi" Company="Sigmatek" Description="1. BugFix: CoupleDeltaPos-coupling does not cause JerkProfile-axis to go to the 0 position at first."/>
		<Dokumentation Revision="1.95" Date="2020-08-14" Author="MarTho&#13;&#10;StePhi" Company="Sigmatek" Description="1. Bugfix: If _LMCAxis is in error mode &quot;ActPosError&quot;, the error bit &quot;ActPosError&quot; is now set to TRUE and returned by SetPosition() for all modes in which &quot;ActPos&quot; is set.&#13;&#10;2. Bugfix: Added mode=1 to LMCAXIS_PAR_RD_ABS_ENCODER of ReadParameter(). With this mode _LMCGantry can check if an axis with absolute encoder is already referenced during init().&#13;&#10;3. Bugfix: The activation of the PDO-communication between DriveAxis andDrivePosControl (see _LMCAxis v1.94) has been deactivated because a downwards compatibility issue regarding older DrivePosControl versions arose.&#13;&#10;4. Improvement: Changes in _LMCAxisVis and _LMCAxisVisInt have been made for the integration of the classes StepperControl and VFDControl into the VOV of _LMCAxis. "/>
		<Dokumentation Revision="1.94" Date="2020-04-02" Author="KllDio&#13;&#10;MarTho" Company="Sigmatek" Description="1. Improvement: The ReadParameter(LMCAXIS_PAR_RD_MODULO) method delivered the current Modulo without considering the Resolution Factor, a new mode (mode=1) has been added to allow the reading of the current Modulo value whilst considering the Resolution Factor.&#13;&#10;2. Improvement: Class now supports PDO usage to access drive parameters.&#13;&#10;3. Bugfix: The overflow error in the case of a MaxModulo overflow during _StartPolynomPositioning of CoupleGearPolynom_v0 was fixed."/>
		<Dokumentation Revision="1.93" Date="2020-03-24" Author="MarTho&#13;&#10;VelGer" Company="Sigmatek" Description="1. Bugfix: CoupleCAM() - When an axis was coupled to another using CAM Coupling, the Slave/Master Axis internal position reached the MaxModulo value of the slave axis and the overflow did not happen on a Modulo interval of the slave axis, a jump in the slave position used to occur. This has now been corrected."/>
		<Dokumentation Revision="1.92" Date="2020-03-05" Author="VelGer&#13;&#10;MarTho" Company="Sigmatek" Description="1. Bugfix: CoupleCAM() - MoveShortestWay Functionality is now implemented for the case where the slave axis is a moduloaxis and the master axis is not a modulo axis.&#13;&#10;2. BugFix: If a QuickStopMove is interrupted by PowerOff() or another error, the Axis was not able to power on again. The axis can now be turned on afterwards.&#13;&#10;3. BugFix: After a PowerOffError occurred, it was not possible to repower the axis, this has now been corrected.&#13;&#10;4. Bugfix: CoupleCAM() - If the slave axis is a modulo axis, the master axis is not a modulo axis and the slave axis had a negative position value, the slave axis used to rotate one modulo turn in the positive direction when coupling to the master. This has now been corrected."/>
		<Dokumentation Revision="1.91" Date="2019-08-23" Author="HasHan&#13;&#10;VelGer" Company="Sigmatek" Description="1. Improvement: the Power-Button is now blinking when the state is WAITIDLE_LMCAXIS or WAITPASSIVE_LMCAXIS&#13;&#10;2. Improvement: ChangeMoveSettings() has been updated so that the change in settings is only accepted if the imput parameters differ from the actual limits.&#13;&#10;3. Bugfix: When using JERK_PROFILE the axis can now switch from PHASE_IDLE to PHASE_V_BRAKE_TO_MASTER without having to pass through PHASE_I_INC_ACC. In applications where ChangeMoveSettings() is called every tick, this could cause an unwanted overrun of the target.&#13;&#10;4. BugFix: When using JERK_PROFILE, if the target and current position was very close to each other (a few internal units) and a comparatively large Jerk and Acceleration was set, it could occur that the axis overshoots the target and then slowly approaches the target again, this has been fixed.&#13;&#10;5. Improvement: ReadParameter(LMCAXIS_PAR_RD_MASTERLOCK_12) with mode = 1 now delivers 1 if the polynom of CoupleGearPolynom() is finished&#13;&#10;6. Bugfix: AxisStatus.PowerOn is now 1 during WAITPASSIV_LMCAXIS"/>
		<Dokumentation Revision="1.90" Date="2019-05-24" Author="VelGer" Company="Sigmatek" Description="1. Improvement: If the move direction is changed using SetParameter() with mode=1, the move direction is locked and will not change on following PowerOn() calls, until SetParameter() is used to change the value with mode=0.&#13;&#10;2. Bugfix: In Open Loop Control Mode (with NCController) the LMCAxis now recovers correctly after an unexpected PowerOff() or HWError."/>
		<Dokumentation Revision="1.89" Date="2019-05-23" Author="VelGer" Company="Sigmatek" Description="Improvement: New Compiler warning (W0172) fixed."/>
		<Dokumentation Revision="1.88" Date="2019-02-11" Author="HasHan" Company="Sigmatek" Description="1. Bugfix: if a QuickStop() was active, commands can now be inserted in the first IDLE_LMCAXIS&#13;&#10;2. Bugfix: possible DINT overflow with CoupleGearPolynom() is now fixed"/>
		<Dokumentation Revision="1.87" Date="2019-01-29" Author="SatChr" Company="Sigmatek" Description="1. Improvement: Method CalcSpeedChangePath provides a new input parameter NextTick.&#13;&#10;2. Bugfix: Method ReadSwEndPos works in Init now."/>
		<Dokumentation Revision="1.86" Date="2018-10-09" Author="PalHar" Company="Sigmatek" Description="Bugfix: CalcMovingTime() with MoveType=_JERK_PROFILE works with realtime cycle times &lt;&gt; 1 ms."/>
		<Dokumentation Revision="1.85" Date="2018-09-04" Author="SatChr" Company="Sigmatek" Description="1. Improvement: Additional parameters in SetAdjustement and Read/SetParameter added.&#13;&#10;2. Bugfix: CalcMovingTime has returned wrong values, if MoveType=_JERK_PROFILE and if the programmed, maximum velocity may have not been reached.&#13;&#10;3. Bugfix: Method ReadUserData returns an initialized value 0 in case of an invalid input parameter index."/>
		<Dokumentation Revision="1.84" Date="2018-08-13" Author="SatChr" Company="Sigmatek" Description="1. Bugfix: Avoid access exception, if coupling to a master axis immediately after an error occured at the master. (Bug occured, only if ErroConfig.CoupleMonitoring=1)&#13;&#10;2. Bugfix: Avoid division error in StopMove, if the neccessary deceleration value to stop before a software limit does not fit into a DINT variable. (MoveType=_RAMP_PROFILE or _SCURVE_PROFILE)"/>
		<Dokumentation Revision="1.83&#13;&#10;" Date="2018-06-14" Author="RodMar&#13;&#10;SatChr" Company="Sigmatek" Description="1. Bugfix: Correction of stopping point computation for coupled axis with software limits.&#13;&#10;2. Bugfix: Faster coupling movement to a stillstanding master (MoveType RAMP &amp; SCURVE)&#13;&#10;3. Bugfix: cam coupling with a non-modulo slave: Correction of the maxmodulo overflow handling in negative direction.&#13;&#10;4. Improvement: New method QuickStop added.&#13;&#10;5. PowerOff() Function will not enter WAITPASSIVE_AXIS if the controller is already powered off"/>
		<Dokumentation Revision="1.82" Date="2018-03-23" Author="HasHan&#13;&#10;SatChr" Company="Sigmatek" Description="1. Bugfix: CoupleGearPolynom: Cleaner, smoother movement, if the master axis is accelerating or braking."/>
		<Dokumentation Revision="1.81" Date="2017-10-12" Author="HasHan" Company="Sigmatek" Description="1. Bugfix: the varialbe ObjInfo is renamed back to Obj&#13;&#10;2. Improvement: CoupleGearPolynom() works better with a non constant jerk-master"/>
		<Dokumentation Revision="1.80" Date="2017-09-28" Author="Roskri" Company="Sigmatek" Description="Bugfix: Axis will now not, for one cycle, uncouple during certain movements when coupled to a _LMCProfile."/>
		<Dokumentation Revision="1.79" Date="2017-09-14" Author="HasHan&#13;&#10;PalHar&#13;&#10;SatChr" Company="Sigmatek" Description="1. Bugfix: the position-drift is now corrected, if the master is not constant during PosMode = _StartPolynomPositioning&#13;&#10;2. Bugfix: MoveType=_JERK_PROFILE: Improvement of couple algorithm, such that the axis may not loose synchronisity (MasterLock), if not really necessary.&#13;&#10;3. Bugfix: Calculating an exact ramp for StopMove makes correct end position."/>
		<Dokumentation Revision="1.78" Date="2017-07-06" Author="HasHan" Company="Sigmatek" Description="Bugfix: set the acceration to 0 in FollowMode to avoid wrong brakedistance-calculations"/>
		<Dokumentation Revision="1.77" Date="2017-06-21" Author="Roskri" Company="Sigmatek" Description="Improvement: CreateMutex() is now virtual"/>
		<Dokumentation Revision="1.76" Date="2017-04-03" Author="HasHan&#13;&#10;PalHar" Company="Sigmatek" Description="1. Improvement: add the server InitDone that the VoV works without error in offline-mode&#13;&#10;2. Improvement: an axis coupled by CoupleGearVelocity() will now reach the SWLimits like expected&#13;&#10;3. Bugfix: correct last move-step if an unlocked axis is stopped&#13;&#10;4. Bugfix: CalcSpeedChangePath() delivers also in coupled-mode the correct distance&#13;&#10;5. Improvement: the PowerOn-Timeout can be changed with SetParameter(LMCAXIS_PAR_SET_POWERON_TIMEOUT) default (90sec)"/>
		<Dokumentation Revision="1.75" Date="2017-03-17" Author="FucHer&#13;&#10;SatChr" Company="Sigmatek" Description="1. Bugfix: CalcBrakePosition(), _JERK_PROFILE: limit the master speed and acceleration before calculating the brake distance.&#13;&#10;   _RAMP_PROFILE, _SCURVE_PROFILE: limit the master speed before calculating the brake distance.&#13;&#10;2. Bugfix: Improvement of the coupling process, if the slave axis has been waiting for the master axis at its software limit position and the master axis is approaching the valid range."/>
		<Dokumentation Revision="1.74" Date="2017-02-14" Author="Roskri" Company="Sigmatek" Description="Improvement: SetParameter(): new mode for parameter LMCAXIS_PAR_SET_MASTERVEL_OLD for setting old master velocity."/>
		<Dokumentation Revision="1.73" Date="2017-01-27" Author="Roskri&#13;&#10;SatChr" Company="Sigmatek" Description="1. Bugfix: When SetParameter(LMCAXIS_PAR_SET_SHAPE_SPLINE) with mode = 6 is set, the slave is decoupled when it reaches its synchronized state with Master by coupling with CoupleGearPolynom.&#13;&#10;2. Bugfix: Move_Type = _JERK_PROFILE: the set position makes a jump when a brake correction is made but axis is already braking with maximum deceleration.&#13;&#10;3. Improvement: New mode for bit AxisStatus.DelayedMasterLock (SetParameter(LMCAXIS_PAR_SET_DELAYEDMASTERLOCK_WINDOW). DelayedMasterLock bit is set, if the position and velocity is in a window.&#13;&#10;4. Improvement: new mode WAITPASIVE_LMCAXIS if DrivePosControl is connected&#13;&#10;5. Improvement: AxisStatus.ReadyForPowerOn is 1 if HWReady and _DriveAxis.StateWord.SwitchedOn = 1"/>
		<Dokumentation Revision="1.72" Date="2016-11-18" Author="SatChr" Company="Sigmatek" Description="Bugfix: Prevent setting the bit AxisStatus.StandStill, if inverse of direction"/>
		<Dokumentation Revision="1.71" Date="2016-10-27" Author="SatChr" Company="Sigmatek" Description="Bugfix: If MoveType=_JERK_PROFILE and ChangeMoveSettings is called during braking to the destination, the new values will be used now."/>
		<Dokumentation Revision="1.70" Date="2016-10-14" Author="SatChr" Company="Sigmatek" Description="1. Bugfix: Method QuitError does not reset AxisError flags, which will be set in the next realtime cycle again.&#13;&#10;2. Bugfix: A small discrepancy between the internal, ramped position and the s-curve-filtered position can occur for an endless axis with MoveType=_SCURVE_PROFILE, if a lot of MaxModulo overflows happens.&#13;&#10;3. Bugfix: AxisError.PowerOnError is not set any longer, if the axis was shut of by a contouring error.&#13;&#10;4. Bugfix: GetPosInfoBeforeRampDown returns 1, if the movement is already finished. Minus 1, if the axis is in wrong state (PASSIVE, ERROR. LOCKED).&#13;&#10;5. Improvement: New ReadPosition mode LMCAXIS_XW_TO_DESTPOS_INTUNIT.&#13;&#10;6. Improvement: New ReadVelocity mode LMCAXIS_CMDVEL_APPUNIT.&#13;&#10;7. Bugfix: Very small velocities work with EDGE2 technology and MoveType=_RAMP_PROFILE or _SCURVE_PROFILE.&#13;&#10;8. Bugfix: With MoveType=_RAMP_PROFILE or _SCURVE_PROFILE and EDGE2-CPUs: Move commands with a programmed velocity less than 1 internal unit per tick did not work."/>
		<Dokumentation Revision="1.69" Date="2016-08-26" Author="SatChr" Company="Sigmatek" Description="Bugfix: MoveType=_JERK_PROFILE: In very rare cases, it may have happend, that a slave axis did not get synchron with its stillstanding master axis, but just swing very small around the target."/>
		<Dokumentation Revision="1.68" Date="2016-06-08" Author="SatChr" Company="Sigmatek" Description="changes in base class"/>
		<Dokumentation Revision="1.67" Date="2016-05-18" Author="SatChr" Company="Sigmatek" Description="changes in base class"/>
		<Dokumentation Revision="1.66" Date="2016-05-03" Author="SatChr" Company="Sigmatek" Description="changes in base class"/>
		<Dokumentation Revision="1.65" Date="2016-04-06" Author="SatChr&#13;&#10;PalHar&#13;&#10;HasHan&#13;&#10;Roskri" Company="Sigmatek" Description="1. changes in base class&#13;&#10;2. Improvement: New input parameter Jerk for all move commands added.&#13;&#10;3. Improvement: new method ReadParameterLREAL added."/>
		<Dokumentation Revision="1.63" Date="2016-03-14" Author="SatChr&#13;&#10;HasHan" Company="Sigmatek" Description="1. Improvement: New method ReadSlavePosCam added.&#13;&#10;2. changes in base class and _LMCSafety"/>
		<Dokumentation Revision="1.62" Date="2016-03-01" Author="HasHan" Company="Sigmatek" Description="change in base class"/>
		<Dokumentation Revision="1.61" Date="2016-02-12" Author="SatChr" Company="Sigmatek" Description="Bugfix: Couple commands work with EDGE2 processors again. (bug in version 2.51)"/>
		<Dokumentation Revision="1.60" Date="2016-01-26" Author="SatChr" Company="Sigmatek" Description="changes in base class"/>
		<Dokumentation Revision="1.59" Date="2015-10-01" Author="SatChr" Company="Sigmatek" Description="1. changes in base class&#13;&#10;2. Improvement: New method CalcSpeedChangePath added."/>
		<Dokumentation Revision="1.58" Date="2015-09-30" Author="SatChr" Company="Sigmatek" Description="Improvement: update of the VOV"/>
		<Dokumentation Revision="1.57" Date="2015-09-25" Author="FucHer&#13;&#10;SatChr" Company="Sigmatek" Description="1. changes in base class"/>
		<Dokumentation Revision="1.56" Date="2015-06-24" Author="FucHer&#13;&#10;PalHar&#13;&#10;SatChr" Company="Sigmatek" Description="changes in base class"/>
		<Dokumentation Revision="1.55" Date="2015-04-17" Author="FucHer&#13;&#10;SatChr" Company="Sigmatek" Description="changes in BaseClass"/>
		<Dokumentation Revision="1.54" Date="2015-01-19" Author="SatChr" Company="Sigmatek" Description="changes in BaseClass"/>
		<Dokumentation Revision="1.53" Date="2014-12-15" Author="HasHan&#13;&#10;FucHer&#13;&#10;SatChr" Company="Sigmatek" Description="1. Improvement: methods  ChangeMoveSettings(), GetPosInfoBeforeRampDown(), CoupleUserPosExtended(), CoupleProfilePosExtended(), and CoupleDeltaPosExtended() added.&#13;&#10;2. new jerk limitation (server MoveType:=_JERK_PROFILE) and other changes in base class."/>
		<Dokumentation Revision="1.51" Date="2014-07-10" Author="HasHan" Company="Sigmatek" Description="changes in BaseClass"/>
		<Dokumentation Revision="1.50" 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.40" Date="2014-04-11" Author="SatChr" Company="Sigmatek" Description="Improvement: New methode MoveShortestWay() added."/>
		<Dokumentation Revision="1.30" Date="2014-01-27" Author="FucHer&#13;&#10;SatChr&#13;&#10;SliMic" Company="Sigmatek" Description="1. Improvement: Update _LMCAxis-VOV with new SetParameter options&#13;&#10;2. Improvement: PowerOn(): init value for mode changed to LMCAXIS_MOVE_ANY_WAY.&#13;&#10;3. Improvement: implementation of the dynamic software limit"/>
		<Dokumentation Revision="1.20" Date="2013-07-18" Author="HasHan&#13;&#10;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;ObeChr" Company="Sigmatek" Description="1. Improvement: new Client =&gt; Emergency&#13;&#10;2. Bugfix: add ReadUserData() for fetching UserData via NewInst Command (for LMCProfile VOV)&#13;&#10;3. Extended NewInst for reading PowerOff Mode&#13;&#10;4. Removed Visualized Flag of Object _LMCAxisVis1&#13;&#10;5. Changed NewInst to get VOV Informations"/>
		<Dokumentation Revision="1.0" Date="2012-09-27" Company="Sigmatek" Description="creation"/>
	</RevDoku>
	<Network Name="_LMCAxis">
		<!-- List of Components in this network -->
		<Components>
			<Object
				Name       = "_base"
				GUID       = "{C43A02B1-A319-4132-B2FA-36A920C832E8}"
				Class      = "_LMCAxisBase"
				Position   = "(1298,120)"
				Visualized = "true"
				RealTime   = "1 ms"
				CyclicTime = "100 ms">
				<Channels>
					<Server Name="ActPos"/>
					<Server Name="ActVelocity"/>
					<Server Name="AEmergency"/>
					<Server Name="AMax"/>
					<Server Name="AxisError"/>
					<Server Name="AxisStatus"/>
					<Server Name="Control"/>
					<Server Name="Destination"/>
					<Server Name="ErrorConfig"/>
					<Server Name="ExUnits"/>
					<Server Name="IntUnits"/>
					<Server Name="JMax"/>
					<Server Name="Modulo"/>
					<Server Name="MoveType"/>
					<Server Name="Override"/>
					<Server Name="PosMode"/>
					<Server Name="Resolution"/>
					<Server Name="SafeAxisState"/>
					<Server Name="SetPos"/>
					<Server Name="SetVelocity"/>
					<Server Name="SimulateMode" Value="0"/>
					<Server Name="SWMaxPos"/>
					<Server Name="SWMinPos"/>
					<Server Name="Tjerk"/>
					<Server Name="VMax"/>
					<Client Name="ActPosition"/>
					<Client Name="LMCAbsEncoder"/>
					<Client Name="LMCController"/>
					<Client Name="LMCMath"/>
					<Client Name="LMCPostRtWorkTrigger"/>
					<Client Name="LMCPreRtWorkTrigger"/>
					<Client Name="LMCPublisher"/>
					<Client Name="LMCReference"/>
					<Client Name="LMCSafety"/>
					<Client Name="TaskObjectControl"/>
				</Channels>
			</Object>
			<Object
				Name       = "_LMCABSEncoder1"
				GUID       = "{4997BF67-81DA-49B7-8B08-D58CDF069D7E}"
				Class      = "_LMCABSEncoder"
				Position   = "(1440,1890)"
				Visualized = "true">
				<Channels>
					<Server Name="AbsEncoder"/>
					<Server Name="ClassSvr"/>
					<Server Name="PosCRC32"/>
					<Server Name="PosOffset"/>
					<Server Name="PosOffsetOk"/>
					<Client Name="_Linker"/>
				</Channels>
			</Object>
			<Object
				Name       = "_LMCAxisRef1"
				GUID       = "{8527575C-8C8D-4427-B640-713377E99444}"
				Class      = "_LMCAxisRef"
				Position   = "(690,1740)"
				Visualized = "true">
				<Channels>
					<Server Name="RefInput"/>
					<Server Name="ZPulseDist"/>
					<Client Name="HWMax"/>
					<Client Name="HWMin"/>
					<Client Name="LatchPos"/>
					<Client Name="RefSwitch"/>
					<Client Name="ZImpulse"/>
				</Channels>
			</Object>
			<Object
				Name       = "_LMCAxisVis1"
				GUID       = "{3701FC36-2E16-4B1A-8232-F571CF23D782}"
				Class      = "_LMCAxisVis"
				Position   = "(2190,90)"
				Visualized = "true">
				<Channels>
					<Server Name="ClassSvr"/>
					<Client Name="LMCAxisBase"/>
				</Channels>
			</Object>
			<Object
				Name       = "_LMCMathFunctions1"
				GUID       = "{0B90E254-A9E3-4704-B5A1-614F7986265F}"
				Class      = "_LMCMathFunctions"
				Position   = "(240,420)"
				Visualized = "false">
				<Channels>
					<Server Name="ClassSvr"/>
				</Channels>
			</Object>
			<Object
				Name       = "_LMCPublisher1"
				GUID       = "{B0919C80-CE58-4E90-990E-AB221AFF5CEA}"
				Class      = "_LMCPublisher"
				Position   = "(510,2160)"
				Visualized = "false">
				<Channels>
					<Server Name="ClassSvr"/>
					<Client Name="Config" Value="0"/>
					<Client Name="ID" Value="0"/>
					<Client Name="Provider"/>
				</Channels>
			</Object>
			<Object
				Name       = "_LMCSafety1"
				GUID       = "{7AEC0395-7659-45AE-A8A2-B6A282D5095D}"
				Class      = "_LMCSafety"
				Position   = "(240,1380)"
				Visualized = "false">
				<Channels>
					<Server Name="ClassSvr"/>
					<Client Name="Emergency"/>
					<Client Name="HWError"/>
					<Client Name="HWMax"/>
					<Client Name="HWMin"/>
					<Client Name="HWReady"/>
					<Client Name="LMCController"/>
				</Channels>
			</Object>
		</Components>
		<Comments>
		</Comments>
		<!-- List of Connections in this network -->
		<Connections>
			<Connection Source="this.Control" Destination="_base.Control" Vertices="(2794,210),(2094,210),"/>
			<Connection Source="this._LMCSafety1" Destination="_LMCSafety1.ClassSvr"/>
			<Connection Source="_base.LMCSafety" Destination="_LMCSafety1.ClassSvr" Vertices="(1298,510),(840,510),(840,1470),(640,1470),"/>
			<Connection Source="_LMCAxisRef1.HWMin" Destination="this.HWMin" Vertices="(690,1830),(38,1830),"/>
			<Connection Source="this.ErrorConfig" Destination="_base.ErrorConfig" Vertices="(2794,1470),(2094,1470),"/>
			<Connection Source="_LMCAxisRef1.HWMax" Destination="this.HWMax" Vertices="(690,1890),(38,1890),"/>
			<Connection Source="_LMCSafety1.HWReady" Destination="this.HWReady" Vertices="(240,1470),(38,1710),"/>
			<Connection Source="_LMCSafety1.HWError" Destination="this.HWError" Vertices="(240,1530),(38,1770),"/>
			<Connection Source="_base.LMCPreRtWorkTrigger" Destination="this.LMCPreRtWorkTrigger" Vertices="(1298,330),(38,330),"/>
			<Connection Source="this.PosMode" Destination="_base.PosMode" Vertices="(2794,330),(2094,330),"/>
			<Connection Source="_LMCAxisVis1.LMCAxisBase" Destination="_base.Control" Vertices="(2190,180),(2094,210),"/>
			<Connection Source="this.AxisError" Destination="_base.AxisError" Vertices="(2794,390),(2094,390),"/>
			<Connection Source="this.ActPos" Destination="_base.ActPos" Vertices="(2794,450),(2094,450),"/>
			<Connection Source="_base.LMCPostRtWorkTrigger" Destination="this.LMCPostRtWorkTrigger" Vertices="(1298,390),(38,390),"/>
			<Connection Source="this.SetPos" Destination="_base.SetPos" Vertices="(2794,510),(2094,510),"/>
			<Connection Source="_base.ActPosition" Destination="this.ActPosition" Vertices="(1298,210),(38,210),"/>
			<Connection Source="this.ExUnits" Destination="_base.ExUnits" Vertices="(2794,870),(2094,870),"/>
			<Connection Source="this.IntUnits" Destination="_base.IntUnits" Vertices="(2794,930),(2094,930),"/>
			<Connection Source="this.VMax" Destination="_base.VMax" Vertices="(2794,990),(2094,990),"/>
			<Connection Source="this.AMax" Destination="_base.AMax" Vertices="(2794,1050),(2094,1050),"/>
			<Connection Source="this.Tjerk" Destination="_base.Tjerk" Vertices="(2794,1110),(2094,1110),"/>
			<Connection Source="_LMCSafety1.HWMin" Destination="this.HWMin" Vertices="(240,1590),(38,1830),"/>
			<Connection Source="_LMCSafety1.HWMax" Destination="this.HWMax" Vertices="(240,1650),(38,1890),"/>
			<Connection Source="this._LMCMathFunctions1" Destination="_LMCMathFunctions1.ClassSvr"/>
			<Connection Source="this.MoveType" Destination="_base.MoveType" Vertices="(2794,1170),(2094,1170),"/>
			<Connection Source="this.Resolution" Destination="_base.Resolution" Vertices="(2794,1230),(2094,1230),"/>
			<Connection Source="_base.LMCMath" Destination="_LMCMathFunctions1.ClassSvr" Vertices="(1298,450),(810,450),(810,510),(706,510),"/>
			<Connection Source="this.AxisStatus" Destination="_base.AxisStatus" Vertices="(2794,270),(2094,270),"/>
			<Connection Source="this.Destination" Destination="_base.Destination" Vertices="(2794,570),(2094,570),"/>
			<Connection Source="this.Override" Destination="_base.Override" Vertices="(2794,630),(2094,630),"/>
			<Connection Source="this.ActVelocity" Destination="_base.ActVelocity" Vertices="(2794,690),(2094,690),"/>
			<Connection Source="this.SetVelocity" Destination="_base.SetVelocity" Vertices="(2794,750),(2094,750),"/>
			<Connection Source="this.SimulateMode" Destination="_base.SimulateMode" Vertices="(2794,810),(2094,810),"/>
			<Connection Source="_base.LMCController" Destination="this.LMCController" Vertices="(1298,270),(38,270),"/>
			<Connection Source="this._LMCAxisRef1" Destination="_LMCAxisRef1.RefInput"/>
			<Connection Source="this._LMCAxisVis1" Destination="_LMCAxisVis1.ClassSvr"/>
			<Connection Source="this._LMCABSEncoder1" Destination="_LMCABSEncoder1.ClassSvr"/>
			<Connection Source="_base.LMCAbsEncoder" Destination="_LMCABSEncoder1.ClassSvr" Vertices="(1298,630),(1140,630),(1140,1830),(1920,1830),(1920,1980),(1842,1980),"/>
			<Connection Source="this.Modulo" Destination="_base.Modulo" Vertices="(2794,1290),(2094,1290),"/>
			<Connection Source="_base.LMCReference" Destination="_LMCAxisRef1.RefInput" Vertices="(1298,570),(1020,570),(1020,1530),(1110,1530),(1110,1830),(1064,1830),"/>
			<Connection Source="_LMCAxisRef1.RefSwitch" Destination="this.RefSwitch" Vertices="(690,2010),(38,2010),"/>
			<Connection Source="_LMCAxisRef1.ZImpulse" Destination="this.ZImpulse" Vertices="(690,1950),(38,1950),"/>
			<Connection Source="_LMCAxisRef1.LatchPos" Destination="this.LatchPos" Vertices="(690,2070),(38,2070),"/>
			<Connection Source="this.AbsEncoder" Destination="_LMCABSEncoder1.AbsEncoder" Vertices="(2794,1710),(2370,1710),(2340,1740),(2340,2190),(2310,2220),(1842,2220),"/>
			<Connection Source="this.SWMinPos" Destination="_base.SWMinPos" Vertices="(2794,1350),(2094,1350),"/>
			<Connection Source="this.SWMaxPos" Destination="_base.SWMaxPos" Vertices="(2794,1410),(2094,1410),"/>
			<Connection Source="_LMCSafety1.Emergency" Destination="this.Emergency" Vertices="(240,1710),(38,2130),"/>
			<Connection Source="this.AEmergency" Destination="_base.AEmergency" Vertices="(2794,1530),(2094,1530),"/>
			<Connection Source="this._LMCPublisher1" Destination="_LMCPublisher1.ClassSvr"/>
			<Connection Source="_LMCPublisher1.Provider" Destination="this.Provider" Vertices="(510,2250),(480,2250),(420,2190),(38,2190),"/>
			<Connection Source="_LMCPublisher1.Config" Destination="this.Config" Vertices="(510,2310),(420,2310),(360,2250),(38,2250),"/>
			<Connection Source="_LMCPublisher1.ID" Destination="this.ID" Vertices="(510,2370),(360,2370),(300,2310),(38,2310),"/>
			<Connection Source="_base.LMCPublisher" Destination="_LMCPublisher1.ClassSvr" Vertices="(1298,750),(1200,750),(1200,2250),(1066,2250),"/>
			<Connection Source="_LMCSafety1.LMCController" Destination="this.LMCController" Vertices="(240,1770),(180,1770),(180,270),(38,270),"/>
			<Connection Source="this.JMax" Destination="_base.JMax" Vertices="(2794,1590),(2094,1590),"/>
			<Connection Source="this.SafeAxisState" Destination="_base.SafeAxisState" Vertices="(2794,1650),(2094,1650),"/>
		</Connections>
		<!-- Headerfiles -->
		<Options>
		</Options>
	</Network>
</Class>
*)
#pragma using _LMCAxisBase

_LMCAxis : CLASS
: _LMCAxisBase
  //Servers:
	AbsEncoder 	: SvrCh_DINT;
  //Clients:
	HWReady 	: CltCh_DINT;
	HWError 	: CltCh_DINT;
	HWMin 	: CltCh_DINT;
	HWMax 	: CltCh_DINT;
	_LMCMathFunctions1 	: CltChCmd__LMCMathFunctions;
	_LMCABSEncoder1 	: CltChCmd__LMCABSEncoder;
	ZImpulse 	: CltCh_DINT;
	RefSwitch 	: CltCh_DINT;
	LatchPos 	: CltCh_DINT;
	_LMCAxisVis1 	: CltChCmd__LMCAxisVis;
	_LMCAxisRef1 	: CltChCmd__LMCAxisRef;
	_LMCSafety1 	: CltChCmd__LMCSafety;
	Emergency 	: CltCh_DINT;
	_LMCPublisher1 	: CltChCmd__LMCPublisher;
	Provider 	: CltChCmd_ProfileCommandStatus;
	Config 	: CltCh__Config__PTofCls__LMCPublisher;
	ID 	: CltCh_DINT;
  //Variables:
  //Functions:
				//! <Function Comment="This method activates the position controller.&#13;&#10;If a SetParameter() call has locked the possibility to change the Move Direction, the move direction (mode) is ignored.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." Name="PowerOn"/>
	FUNCTION VIRTUAL GLOBAL PowerOn
		VAR_INPUT
			Mode 	: _LMCAXIS_MOVEDIRECTION := LMCAXIS_MOVE_ANY_WAY;			//! <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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread.&#13;&#10;&#13;&#10;" 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&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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&#13;&#10;The difference between CoupleSpeed and CoupleSpeed2 is that in CoupleSpeed&#13;&#10;the couple is made over the difference of the positions, and in the CoupleSpeed2,&#13;&#10;it couple with the speed&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 [old version]&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 CoupleGearPosCatch couples a slave axis to a master axis using a polynomial of higher order without jerks.&#13;&#10;  The slave starts with zero velocity and should achieve a target velocity Multiplier*Divisor*vM 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 CoupleGearPosCatch does the calculations which mus be claculated only once, the main calculation is done in method PolyLock.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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="add an additional positiondifference&#13;&#10;every cycle, when&#13;&#10;PosMode = _ProfileSyncPositioning&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 an user position.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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)&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread.&#13;&#10;&#13;&#10;&#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&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 parameter.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 client values&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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="Internal profile position " 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 speed" 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="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 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="SetFollowMode(LMCAXIS_DEACTIVATE_FOLLOW_MODE) deacitvates the _LMCAXIS_OPMODE: FOLLOW_LMCAXIS&#13;&#10;SetFollowMode(LMCAXIS_ACTIVATE_FOLLOW_MODE) acitvates the _LMCAXIS_OPMODE: FOLLOW_LMCAXIS -&gt;&#13;&#10;-&gt; Axis follows the actual position (defaulted by a controller) passively&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 and, if the client &quot;LMCController&quot; is connected&#13;&#10;the function: QuitHWError is called to reset all harware-errors too&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." Name="QuitError"/>
	FUNCTION VIRTUAL GLOBAL QuitError;
				//! <Function Comment="Maximal possible slave path for successful 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="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;			//! <Variable Comment="maximal acceleration [application units / sec^2]" Name="CalcSpeedChangePath.MaxAccel"/>
			MaxDecel 	: DINT;			//! <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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 methode delivers 0 until a special&#13;&#10;point is reached" 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 get safety data information from the hardware axis. The method allows to read safety specific values from the hardware.&#13;&#10;Using the parameter Mode to define if the value is read from the hardware classes or a new request is sent to the hw. Reading the safety error code and safety function error word is always done by reading it from the hw." 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.&#13;&#10;&#13;&#10;This method is only allowed to be called from a thread running on the same core as the realtime thread for the _LMCAxis instance which has an equal or lower priority than the realtime thread." 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 Comment="to get the LogFile from the axis" Name="GetLogFile"/>
	FUNCTION VIRTUAL GLOBAL GetLogFile
		VAR_OUTPUT
			ptrLogFile 	: ^_LogFile;			//! <Variable Comment="pointer to the Logfile variable" Name="GetLogFile.ptrLogFile"/>
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL AbsEncoder::Read
		VAR_OUTPUT
			output (EAX) 	: DINT;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL AbsEncoder::Write
		VAR_INPUT
			input (EAX) 	: DINT;
		END_VAR
		VAR_OUTPUT
			result (EAX) 	: DINT;
		END_VAR;
  //Tables:
	FUNCTION @STD
		VAR_OUTPUT
			ret_code	: CONFSTATES;
		END_VAR;
	FUNCTION GLOBAL TAB @CT_;
END_CLASS;

#pragma using _LMCABSEncoder
#pragma using _LMCAxisRef
#pragma using _LMCAxisVis
#pragma using _LMCMathFunctions
#pragma using _LMCPublisher
#pragma using _LMCSafety


//}}LSL_DECLARATION


FUNCTION GLOBAL TAB _LMCAxis::@CT_
0$UINT,
2#0100000000000000$UINT, //TY__LMCAXIS
1$UINT, 119$UINT, (SIZEOF(::_LMCAxis))$UINT, 
1$UINT, 17$UINT, 0$UINT, 
TO_UDINT(1422175863), "_LMCAxis", //Class
TO_UDINT(280984637), "_LMCAxisBase", 2$UINT, 110$UINT, //Baseclass
//Servers:
(::_LMCAxis.AbsEncoder.pMeth)$UINT, _CH_SVR$UINT, 2#0000000000000000$UINT, TO_UDINT(964833016), "AbsEncoder", 
//Clients:
(::_LMCAxis.HWReady.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(3806358573), "HWReady", 
(::_LMCAxis.HWError.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(2544391667), "HWError", 
(::_LMCAxis.HWMin.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(820401606), "HWMin", 
(::_LMCAxis.HWMax.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(216754847), "HWMax", 
(::_LMCAxis._LMCMathFunctions1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(2908414770), "_LMCMathFunctions1", TO_UDINT(838927485), "_LMCMathFunctions", 1$UINT, 75$UINT, 
(::_LMCAxis._LMCABSEncoder1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(2161537050), "_LMCABSEncoder1", TO_UDINT(3162349954), "_LMCABSEncoder", 1$UINT, 0$UINT, 
(::_LMCAxis.ZImpulse.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(3924944392), "ZImpulse", 
(::_LMCAxis.RefSwitch.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(3537427625), "RefSwitch", 
(::_LMCAxis.LatchPos.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(3334411160), "LatchPos", 
(::_LMCAxis._LMCAxisVis1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(2529122408), "_LMCAxisVis1", TO_UDINT(3113915997), "_LMCAxisVis", 1$UINT, 42$UINT, 
(::_LMCAxis._LMCAxisRef1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(661835855), "_LMCAxisRef1", TO_UDINT(2147194214), "_LMCAxisRef", 1$UINT, 32$UINT, 
(::_LMCAxis._LMCSafety1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(1893339440), "_LMCSafety1", TO_UDINT(3213872914), "_LMCSafety", 1$UINT, 21$UINT, 
(::_LMCAxis.Emergency.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(1646202866), "Emergency", 
(::_LMCAxis._LMCPublisher1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(2851164490), "_LMCPublisher1", TO_UDINT(1117088251), "_LMCPublisher", 1$UINT, 0$UINT, 
(::_LMCAxis.Provider.pCh)$UINT, _CH_CLT_CMD$UINT, 2#0000000000000100$UINT, TO_UDINT(1425534928), "Provider", 
(::_LMCAxis.Config.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(611510522), "Config", 
(::_LMCAxis.ID.pCh)$UINT, _CH_CLT_DATA$UINT, 2#0000000000000100$UINT, TO_UDINT(299066170), "ID", 
END_FUNCTION


#define USER_CNT__LMCAxis 64

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

FUNCTION _LMCAxis::@STD
	VAR_OUTPUT
		ret_code	: CONFSTATES;
	END_VAR
	VAR
		vmt	: _LSL_STD_VMETH;
		nCmdSize	: UINT;
	END_VAR

	ret_code	:= _LMCAxisBase::@STD();
	IF ret_code <> C_OK THEN
		RETURN;
	END_IF;
	nCmdSize		:= _AxisBase::Control.pMeth^.nCmds$UINT*SIZEOF(pVoid) + CMDMETH.Init;

	_memcpy((#vmt.CmdTable)$^USINT, _AxisBase::Control.pMeth, nCmdSize);
	vmt.CmdTable.nCmds		:= nSTDCMD + USER_CNT__LMCAxis;
#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[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[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[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)
#pragma warning (disable : 74)
	vmt.UserFcts[55]		:= #GetLogFile();

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

	IF _AxisBase::Control.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	AbsEncoder.pMeth			:= StoreMethod( #AbsEncoder::Read(), #AbsEncoder::Write() );
	IF AbsEncoder.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, 35360 characters]