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

//{{LSL_DEFINES
#define MaxDragDelayCycles 20

// define of NewInst index to read hardware diagnosis data from HWK
#define LMCCONTROLLER_GET_HARDWARE_DIAGNOSIS      16#83B1

// defines to mark maximum values of DINT as floating number
#ifndef LMCCONTROLLER_DINT_MIN_LREAL
  #define LMCCONTROLLER_DINT_MIN_LREAL -2147483648.0
#endif

#ifndef LMCCONTROLLER_DINT_MAX_LREAL
  #define LMCCONTROLLER_DINT_MAX_LREAL 2147483647.0
#endif
//}}LSL_DEFINES

//{{LSL_DECLARATION

(*!
<Class
	Name               = "Controller"
	Revision           = "1.46"
	GUID               = "{2EE15EB7-1F89-11D5-90C4-006063018AE8}"
	RealtimeTask       = "false"
	CyclicTask         = "false"
	BackgroundTask     = "false"
	Sigmatek           = "true"
	OSInterface        = "false"
	HighPriority       = "false"
	Automatic          = "false"
	UpdateMode         = "Prescan"
	SharedCommandTable = "true"
	Objectsize         = "(284,120)"
	Comment            = "Base class for the different types of the controller">
	<Channels>
		<Server Name="Signal_Input" GUID="{2EE15EB8-1F89-11D5-90C4-006063018AE8}" Visualized="true" Initialize="false" WriteProtected="false" Retentive="false" Comment="This server shows the actual internal control variable and is &#13;&#10;connected to the _LMCAxis or CNC class."/>
	</Channels>
	<RevDoku>
		<Owner Company="Sigmatek"/>
		<Dokumentation Revision="1.46" Date="2023-06-28" Author="StePhi" Company="Sigmatek" Description="Improvement: Added interface SendSafetyData() and ReceiveSafetyData() to provide safety communication interface for connected axis class."/>
		<Dokumentation Revision="1.45" Date="2023-06-14" Author="StePhi" Company="Sigmatek" Description="Improvement: New parameter _LMCCONTROLLER_PAR_SET_QUICKSTOP_ERRRORREACTION added to _LMCCONTROLLER_SETPARAMETER type."/>
		<Dokumentation Revision="1.44" Date="2022-04-25" Author="MarTho" Company="Sigmatek" Description="Improvement: A SetParameter() method was added."/>
		<Dokumentation Revision="1.43" Date="2020-09-30" Author="MarTho&#13;&#10;StePhi" Company="Sigmatek" Description="Improvement: Added method declaration of ReadHWDiagnosisDriveAxis to read HW Diagnisos Data from a connected DriveAxis object.&#13;&#10;Bugfix: The definition &quot;MaxDragDelayCycles&quot; caused an identical redefinition warning when compiling. Therefore the definition was moved into the base class &quot;Controller&quot;."/>
		<Dokumentation Revision="1.42" Date="2018-06-26" Author="SatChr" Company="Sigmatek" Description="Bugfix: All virtual methods, which should be overridden, do not return an uninitialzed return value."/>
		<Dokumentation Revision="1.41" Date="2015-03-06" Author="SatChr" Company="Sigmatek" Description="Improvement: New methodes: ControlLongReal, CheckHwReady, ReadActPosition, ReadPDO, IsReadyToSwitchOn (for future use)"/>
		<Dokumentation Revision="1.40" Date="2013-07-18" Author="SliMic" Company="Sigmatek" Description="1. Add some comments to the methodes and variables"/>
		<Dokumentation Revision="1.30" Date="2012-09-27" Author="RauAnd" Company="Sigmatek" Description="Modified for use with the _LMCAxis class."/>
		<Dokumentation Revision="1.20" Date="2011-05-02" Author="FuchsH" Company="Sigmatek" Description="Comments newly formatted."/>
		<Dokumentation Revision="1.10" Date="08.04.2010" Author="RauAnd" Company="Sigmatek" Description="Updating of the clients, server and methods documentation"/>
		<Dokumentation Revision="1.2" Date="22.01.2010" Author="RauAnd" Company="Sigmatek" Description="Updating of the clients, server and methods documentation"/>
		<Dokumentation Revision="1.1" Date="05.05.2008" Author="Rauand" Company="Sigmatek" Description="Improvement to use the position control in the drive"/>
		<Dokumentation Revision="1.0" Company="Sigmatek" Description="Creation"/>
	</RevDoku>
</Class>
*)
Controller : CLASS
	TYPE
	  _AXISCLASS :
	  (
	    _AXIS_CNC,
	    _AXIS_LMCAXIS,
	    _AXIS_CNC_NO_HW,
	    _AXIS_LMCAXIS_NO_HW,
	    _AXIS_CNC_OPT_HWCLASS_v1,
	    _AXIS_LMCAXIS_OPT_HWCLASS_v1
	  )$UDINT;
	  _LMCCONTROLLER_SETPARAMETER :  //! <Type Public="true" Comment="Parameter-ID" Name="_LMCCONTROLLER_SETPARAMETER"/>
	  (
	    _LMCCONTROLLER_PAR_SET_CYCLIC_DRIVE_ENABLED_CHECK,  //! <Type Comment="Parameter to deactivate/activate the cyclic read check of client &quot;DriveEnabled&quot;.&#13;&#10;Value = &#13;&#10;0 ... deactivate the cyclic check&#13;&#10;1 ... activate the cyclic check (default)" Name="_LMCCONTROLLER_SETPARAMETER._LMCCONTROLLER_PAR_SET_CYCLIC_DRIVE_ENABLED_CHECK"/>
	    _LMCCONTROLLER_PAR_SET_QUICKSTOP_ERRORREACTION  //! <Type Comment="Parameter to set the error reaction for VFDControl. When this option is set the controller will trigger a quick stop instead of the default ramp in case of an error.&#13;&#10;Value = 0 ... default brake ramp in case of an error&#13;&#10;Value = 1 ... quickstop ramp in case of an error" Name="_LMCCONTROLLER_SETPARAMETER._LMCCONTROLLER_PAR_SET_QUICKSTOP_ERRORREACTION"/>
	  )$UDINT;
	  t_e_LMCCONTROLLER_SAFETY_PARAM :  //! <Type Public="true" Comment="Public type defining the interface parameter for SendSafetyRequest() und ReceiveSafetyRequest().&#13;&#10;Interface between _LMCAxis and Controller class to pass safety information between them.&#13;&#10;Not every parameter is bidirectional. Check the comment of the single parameter to see how it is used." Name="t_e_LMCCONTROLLER_SAFETY_PARAM"/>
	  (
	    _LMCCONTROLLER_SAFETY_GETVERIFYSTATE,  //! <Type Comment="Returns the verify state of the axis. The command triggers the command, wait until the result is valid and returns the result.&#13;&#10;Only ReceiveSafetyRequest().&#13;&#10;para1 = Verify command state&#13;&#10;para2 = Verify command value&#13;&#10;para3 = Verify execution state&#13;&#10;para4 = Verify execution value" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETVERIFYSTATE"/>
	    _LMCCONTROLLER_SAFETY_GETREFERENCESTATE,  //! <Type Comment="Returns the reference state of the axis. The command triggers the command, wait until the result is valid and returns the result.&#13;&#10;Only ReceiveSafetyRequest().&#13;&#10;para1 = Reference command state&#13;&#10;para2 = Reference command value&#13;&#10;para3 = Reference execution state&#13;&#10;para4 = Reference execution value" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETREFERENCESTATE"/>
	    _LMCCONTROLLER_SAFETY_GETSAFETYRUNSTATE,  //! <Type Comment="Returns the actual safety state of the axis. No active request to the drive - only the value on the HWK.&#13;&#10;Only ReceiveSafetyRequest())" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSAFETYRUNSTATE"/>
	    _LMCCONTROLLER_SAFETY_GETSBTSTATE,  //! <Type Comment="Returns the state of the safe brake test feature.&#13;&#10;Only ReceiveSafetyRequest()&#13;&#10;para1 = SafeBrakeTestStatus&#13;&#10;para2 = BrakeTestStatus&#13;&#10;para3 = BrakeTestErrorInfo&#13;&#10;para4 = TimeTillNextTest" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSBTSTATE"/>
	    _LMCCONTROLLER_SAFETY_GETSBTTESTTIME,  //! <Type Comment="Interface to read the test duration of a SBT test for a single application of the test torque." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSBTTESTTIME"/>
	    _LMCCONTROLLER_SAFETY_GETSBTMINTORQUE,  //! <Type Comment="Interface to read the minimal torque which is applied when a SBT test is active." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSBTMINTORQUE"/>
	    _LMCCONTROLLER_SAFETY_GETSBTTESTINTERVAL,  //! <Type Comment="Interface to read the configured test interval for SBT tests. Every test interval time a SBT test must be performed." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSBTTESTINTERVAL"/>
	    _LMCCONTROLLER_SAFETY_GETSAFETYERROR,  //! <Type Comment="Parameter to read the safety error from the hardware class.&#13;&#10;It can be decided by the mode if the error information of the first or second controller is received&#13;&#10;Mode := 0 ... Error information from the first safety controller&#13;&#10;Mode := 1 ... Error information from the second safety controller&#13;&#10;The para values are written in following form&#13;&#10;pPara1 = SafetyErrorCode_SCx&#13;&#10;pPara2 = SafetyErrorInformation1_SCx&#13;&#10;pPara3 = SafetyErrorInformation2_SCx&#13;&#10;pPara4 = SafetyErrorInformation3_SCx&#13;&#10;" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSAFETYERROR"/>
	    _LMCCONTROLLER_SAFETY_GETSAFETYFUNCERROR,  //! <Type Comment="Parameter to read the safety function error info &#13;&#10;para1 = SafeErrorWord&#13;&#10;para2 = SafeFunctionErrorID&#13;&#10;para3 = SafeFunctionInErrID&#13;&#10;para4 = SafeFunctionErrSubID" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSAFETYFUNCERROR"/>
	    _LMCCONTROLLER_SAFETY_READAXISSTATE:=101,  //! <Type Comment="Read value of AxisState server of hardware class. Only ReceiveSafetyRequest()." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_READAXISSTATE"/>
	    _LMCCONTROLLER_SAFETY_GETSAFECNTRLSTATEWORD,  //! <Type Comment="Parameter to read the safety function error info &#13;&#10;para1 = SafeControlWord&#13;&#10;para2 = SafeStateWord&#13;&#10;para3 = ActiveSafeFunctions&#13;&#10;para4 = Valid" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_GETSAFECNTRLSTATEWORD"/>
	    _LMCCONTROLLER_SAFETY_DOSAFETYAXERRORQUIT:=201,  //! <Type Comment="Parameter can be used to send a safety quit error to the connected axis.&#13;&#10;Following modes are supported&#13;&#10;1 ... Restart Acknowledge of safety function error word for safety functions like STO, SS1, ...&#13;&#10;2 ... Error Acknowledge of safety function error word for safety functions like SLS, SLA, SMS, SMP, ...&#13;&#10;4 ... Quit Error for safety fw errors " Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_DOSAFETYAXERRORQUIT"/>
	    _LMCCONTROLLER_SAFETY_SETVERIFYAXIS,  //! <Type Comment="Set VerifyAxis for axis. Can be triggered via _LMCAxis VOV or SetSafetyState(). Only SendSafetyRequest()." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_SETVERIFYAXIS"/>
	    _LMCCONTROLLER_SAFETY_SETREFERENCEAXIS,  //! <Type Comment="Set safety reference for axis. Triggers the procedure for a safety reference of the axis on drive.&#13;&#10;Only SendSafetyRequest()." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_SETREFERENCEAXIS"/>
	    _LMCCONTROLLER_SAFETY_SETACKZEROPOSITION,  //! <Type Comment="Set acknowledge of the position of the axis after returning to the safety reference position.&#13;&#10;Only SendSafetyRequest()." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_SETACKZEROPOSITION"/>
	    _LMCCONTROLLER_SAFETY_SETSBTSTATE,  //! <Type Comment="Start and trigger SBT Test.&#13;&#10;Only SendSafetyRequest()." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_SETSBTSTATE"/>
	    _LMCCONTROLLER_SAFETY_SBTACTIVE,  //! <Type Comment="Internal handling between _LMCAxis and controller. Controller receives the actual state of the SBT.&#13;&#10;Only SendSafetyRequest()." Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_SBTACTIVE"/>
	    _LMCCONTROLLER_SAFETY_CHANGESERVICEMODE,  //! <Type Comment="Parameter to send a command to change the service mode of the connected drive.&#13;&#10;ParamValue := 1 ... Set Service Mode&#13;&#10;ParamValue := 2 ... Leave Service Mode" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_CHANGESERVICEMODE"/>
	    _LMCCONTROLLER_SAFETY_LOGINAXIS:=301  //! <Type Comment="Special command to allow login of _LMCAxis object at DriveMngBase to receive safety updates via callback" Name="t_e_LMCCONTROLLER_SAFETY_PARAM._LMCCONTROLLER_SAFETY_LOGINAXIS"/>
	  )$UDINT;
	END_TYPE
  //Servers:
	Signal_Input 	: SvrChCmd_DINT;
  //Clients:
  //Variables:
		AxisType 	: _AXISCLASS;
  //Functions:
				//! <Function Comment="Receives as input from the CNC/_LMCAxis, the Actual Position and the Internal Position." Name="control"/>
	FUNCTION VIRTUAL GLOBAL control
		VAR_INPUT
			ActPos 	: DINT;
			IntPos 	: DINT;
		END_VAR
		VAR_OUTPUT
			Result 	: DINT;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL ControlLongReal
		VAR_INPUT
			ActPos 	: LREAL;
			IntPos 	: LREAL;
			IntSpeed 	: LREAL;
		END_VAR;
				//! <Function Comment="Updates the CNC StateFlags and the CNC ControlFlags" Name="StatePtr"/>
	FUNCTION VIRTUAL GLOBAL StatePtr
		VAR_INPUT
			StatePtr 	: ^CncFlags;
			CncstatePtr 	: ^CntrFlgs;
		END_VAR
		VAR_OUTPUT
			Result 	: DINT;
		END_VAR;
				//! <Function Comment="Adopts the addresses of the Servers: AxisStatus, AxisError and the Bitfield:AxisControl&#13;&#10;around this for reading and updating" Name="SetAxisFlgs"/>
	FUNCTION VIRTUAL GLOBAL SetAxisFlgs
		VAR_INPUT
			pAxisStatus 	: ^_LMCAXIS_STATUS;
			pAxisError 	: ^_LMCAXIS_ERROR;
			pAxisControl 	: ^_LMCAXIS_CONTROLBITS;
		END_VAR
		VAR_OUTPUT
			Result 	: _LMCCONTROLLERTYPE;
		END_VAR;
				//! <Function Comment="Function to test if we have a controller connected to the CNC/_LMCAxis" Name="WriteConstant"/>
	FUNCTION VIRTUAL GLOBAL WriteConstant
		VAR_INPUT
			Resolution 	: DINT;
			Timebase 	: DINT;
			Accel 	: DINT;
			ptrCNCIntStruct 	: ^CNCInternalStruct;
		END_VAR
		VAR_OUTPUT
			StartSpeed 	: DINT;
		END_VAR;
				//! <Function Comment="Function used for transmitting the Speed value from the CNC/_LMCAxis to the controller" Name="Speed"/>
	FUNCTION VIRTUAL GLOBAL Speed
		VAR_INPUT
			ActSpeed 	: DINT;
		END_VAR;
				//! <Function Comment="set Client values" Name="SetClients"/>
	FUNCTION VIRTUAL GLOBAL SetClients
		VAR_INPUT
			No 	: DINT;			//! <Variable Comment="The parameter number of the client that should be changed." Name="SetClients.No"/>
			Value 	: DINT;			//! <Variable Comment="The value to which the client should be changed." Name="SetClients.Value"/>
		END_VAR
		VAR_OUTPUT
			State 	: DINT;			//! <Variable Comment="0 =&gt; Error : The number entered was invalid or controller is active&#13;&#10;1 =&gt; Ok" Name="SetClients.State"/>
		END_VAR;
				//! <Function Comment="checks if the drive is enabled or not" Name="PowerIsOn"/>
	FUNCTION VIRTUAL GLOBAL PowerIsOn
		VAR_OUTPUT
			RetCode 	: BOOL;			//! <Variable Comment="true ... Drive is enabled" Name="PowerIsOn.RetCode"/>
		END_VAR;
				//! <Function Comment="checks if a Hardware Error is activ" Name="CheckHWError"/>
	FUNCTION VIRTUAL GLOBAL CheckHWError
		VAR_OUTPUT
			Retcode 	: BOOL;
		END_VAR;
				//! <Function Comment="Check wether the hardware is ready for communication." Name="CheckHwReady"/>
	FUNCTION VIRTUAL GLOBAL CheckHwReady
		VAR_OUTPUT
			IsReady 	: BOOL;
		END_VAR;
				//! <Function Comment="Controller parameters can be set with this method. " Name="SetParameter"/>
	FUNCTION VIRTUAL GLOBAL SetParameter
		VAR_INPUT
			ParNr 	: _LMCCONTROLLER_SETPARAMETER;			//! <Variable Comment="Parameter number" Name="SetParameter.ParNr"/>
			Value 	: DINT;			//! <Variable Comment="New value" Name="SetParameter.Value"/>
		END_VAR
		VAR_OUTPUT
			RetCode 	: DINT;			//! <Variable Comment="Return code of the method call.&#13;&#10;In the case of a value smaller than 0, the set parameter call failed." Name="SetParameter.RetCode"/>
		END_VAR;
				//! <Function Comment="Read Controller specific parameters" Name="ReadParameter"/>
	FUNCTION VIRTUAL GLOBAL ReadParameter
		VAR_INPUT
			No 	: DINT;			//! <Variable Comment="Parameter number" Name="ReadParameter.No"/>
		END_VAR
		VAR_OUTPUT
			Value 	: DINT;
		END_VAR;
				//! <Function Comment="Read the actual encoder position from the drive&#13;&#10;for DrivePosControl and _LMCSigControl only." Name="ReadActPosition"/>
	FUNCTION VIRTUAL GLOBAL ReadActPosition
		VAR_OUTPUT
			BinPos 	: DINT;			//! <Variable Comment="actual position in external units" Name="ReadActPosition.BinPos"/>
		END_VAR;
				//! <Function Comment="This methode is called at the beginig of each realtime cycle by the _LMCAxis object. DrivePosControl and _LMCSigControl use this interface to get all information from the hardware class _DriveAxis" Name="ReadPDO"/>
	FUNCTION VIRTUAL GLOBAL ReadPDO;
				//! <Function Comment="function to quit a hardware error" Name="QuitHWError"/>
	FUNCTION VIRTUAL GLOBAL QuitHWError;
				//! <Function Comment="Check whether the hardware is ready for switch on." Name="IsReadyToSwitchOn"/>
	FUNCTION VIRTUAL GLOBAL IsReadyToSwitchOn
		VAR_OUTPUT
			IsReady 	: DINT;
		END_VAR;
				//! <Function Comment="Method declaration to read the HW Diagnosis data of a connected DriveAxis object. &#13;&#10;Must be overwritten." Name="ReadHWDiagnosisDriveAxis"/>
	FUNCTION VIRTUAL GLOBAL ReadHWDiagnosisDriveAxis
		VAR_OUTPUT
			pHWDiagnosis 	: ^DINT;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL ReceiveSafetyRequest
		VAR_INPUT
			SafetyParam 	: t_e_LMCCONTROLLER_SAFETY_PARAM;
			pPara1 	: ^DINT;
			pPara2 	: ^DINT;
			pPara3 	: ^DINT;
			pPara4 	: ^DINT;
			Mode 	: DINT;
		END_VAR
		VAR_OUTPUT
			RSRRetState 	: DINT;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL SendSafetyRequest
		VAR_INPUT
			SafetyParam 	: t_e_LMCCONTROLLER_SAFETY_PARAM;
			ParamValue 	: DINT;
			ParamMode 	: DINT;
		END_VAR
		VAR_OUTPUT
			SSRRetState 	: DINT;
		END_VAR;
  //Tables:
	FUNCTION @STD
		VAR_OUTPUT
			ret_code	: CONFSTATES;
		END_VAR;
	FUNCTION GLOBAL TAB @CT_;
END_CLASS;

//}}LSL_DECLARATION


FUNCTION GLOBAL TAB Controller::@CT_
0$UINT,
2#0100000000000000$UINT, //TY_CONTROLLER
1$UINT, 46$UINT, (SIZEOF(::Controller))$UINT, 
1$UINT, 0$UINT, 0$UINT, 
TO_UDINT(1198357413), "Controller", //Class
TO_UDINT(0), 0, 0$UINT, 0$UINT, //Baseclass
//Servers:
(::Controller.Signal_Input.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(2233060755), "Signal_Input", 
//Clients:
END_FUNCTION


#define USER_CNT_Controller 19

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

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

	//Command Methods
	InitCmdTable (nCmd := nSTDCMD + USER_CNT_Controller, pCmd := #vmt.CmdTable);
	vmt.CmdTable.Write		:= #M_WR_DIRECT();
#pragma warning (disable : 74)
	vmt.UserFcts[0]		:= #control();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	IF Signal_Input.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, 8192 characters]