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

//Define part of class _DriveSafetyIFParaBase
#define MDD2000_DRIVE_PARA_BASE_NUMBER_APPLI_PARA       31
#define MDD2000_DRIVE_PARA_BASE_NUMBER_CURRENT_PARA     10
#define MDD2000_DRIVE_PARA_BASE_NUMBER_DEVICE_PARA      16
#define MDD2000_DRIVE_PARA_BASE_NUMBER_FEEDBACK_PARA    5
#define MDD2000_DRIVE_PARA_BASE_NUMBER_MOTOR_PARA       30
#define MDD2000_DRIVE_PARA_BASE_NUMBER_POSITION_PARA    7
#define MDD2000_DRIVE_PARA_BASE_NUMBER_VELOCITY_PARA    9
#define MDD2000_DRIVE_PARA_BASE_NUMBER_OPTIONAL_PARA    8
#define MDD2000_DRIVE_PARA_BASE_NUMBER_ERRORHANDLING    4
#include "..\..\Source\DriveSafetyIF.h"
#include "..\..\Class\MDD2000MngBase\MDD2000MngBase.h"
//Define part of class MDD2000_DriveAxisDiag
#define _DRIVEAXISDIAG_READPARAMETER            0
#define _DRIVEAXISDIAG_WRITEPARAMETER           1

#define _DRIVEAXISDIAG_ANGLE_MODE               6
#define _DRIVEAXISDIAG_CURRENT_SERVICEMODE      (-1)
#define _DRIVEAXISDIAG_ANGLE_SERVICEMODE        (-6)

#define _DRIVEAXISDIAG_ANGLE_STEPS_DEGREE       12    // value for move of one step as °
#define _DRIVEAXISDIAG_MAX_ANGLE_DEGREE         360   // degrees for on electrical turn
#define _DRIVEAXISDIAG_MAX_ANGLE_DEC            65535 // one electrical turn as decimal value 360° = 65535
#define _DRIVEAXISDIAG_ANGLE_STEPS_AMOUNT       (_DRIVEAXISDIAG_MAX_ANGLE_DEGREE/_DRIVEAXISDIAG_ANGLE_STEPS_DEGREE)   //amount of steps for one electrical turn 360°
#define _DRIVEAXISDIAG_ANGLE_ONESTEPS_DEC       (_DRIVEAXISDIAG_MAX_ANGLE_DEC/_DRIVEAXISDIAG_MAX_ANGLE_DEGREE)        // movement of 1° angle as decimal value (0...65535) 
#define _DRIVEAXISDIAG_ANGLE_STEPS_DEC          (_DRIVEAXISDIAG_MAX_ANGLE_DEC/_DRIVEAXISDIAG_ANGLE_STEPS_AMOUNT)      // movement of one angle step as decimal value (0...65535)

#define _DRIVEAXISDIAG_CURRENT_MAX_PERCENT      100  //Current steps from x% to 100%
#define _DRIVEAXISDIAG_CURRENTSTEP_PERCENT      10   //Current steps from x% to _DRIVEAXISDIAG_CURRENT_MAX_PERCENT%

#define _DRIVEAXISDIAG_MAX_MOTOR_POLES          256  //amount of maximal possible motor poles
#define _DRIVEAXISDIAG_MIN_MOTOR_POLES          2    //amount of minimal possible motor poles
#define _DRIVEAXISDIAG_FEEDBACK_MEASURE_POINTS  2    //amount of measure points for feedback offset. That two measuring points are sufficient was agreed with the Drive department
#define _DRIVEAXISDIAG_AXIS_MOTIONRUNS          1    //the axis is moved for feedback measure -> this value is how often the axis is turned to next position

#define _DRIVEAXISDIAG_ONE_TURN_HARDWARE        4294967295 //2^32
#define _DRIVEAXISDIAG_ONE_DEGREE_MECH          (_DRIVEAXISDIAG_ONE_TURN_HARDWARE/_DRIVEAXISDIAG_MAX_ANGLE_DEGREE)  // movement of 1° mechanical angle as decimal value (0...4294967296) 
#define _DRIVEAXISDIAG_STEP_DEGREE_MECH         (_DRIVEAXISDIAG_ONE_TURN_HARDWARE/_DRIVEAXISDIAG_ANGLE_STEPS_AMOUNT) // movement of axis mechanical divided by steps
#define _DRIVEAXISDIAG_WRONG_POSITION_RETRYS    2      //amount of allowed wrong positions before an error is set  

#define _DRIVEAXISDIAG_WAITTIME_GETIFPOS_START   1000  //waittime until first I-FPOS is read out from drive
#define _DRIVEAXISDIAG_WAITTIME_GETIFPOS_END       80  //waittime until I-FPOS is read out from drive
#define _DRIVEAXISDIAG_WAITTIME_SETANGLE           20  //waittime for set angle at drive
#define _DRIVEAXISDIAG_WAITTIME_COMMAND            10  //waittime for read or write command
#define _DRIVEAXISDIAG_WAITTIME_RAMPCURRENT        20  //waittime for increase current ramp
#define _DRIVEAXISDIAG_WAITTIME_AXENABLE          200  //waittime for axis enable

// Firmwareversions which support feedback determinination variant 1 (I-FBOFF) or variant 2 (G-Mode -6) or both
#define _DRIVEAXISDIAG_SDDXXX_SUPPORT_VARIANT_1_2     190   //version as decimal number 190 = v 1.90
#define _DRIVEAXISDIAG_SDDXXX_SUPPORT_VARIANT_2       189
#define _DRIVEAXISDIAG_MDDXXX_SUPPORT_VARIANT_1_2     186
#define _DRIVEAXISDIAG_DC06X_SUPPORT_VARIANT_1_2      350
#define _DRIVEAXISDIAG_WA012_SUPPORT_VARIANT_1_2      370

#define _DRIVEAXISDIAG_SR01X_SUPPORT_VARIANT_1_2      000   //not supported
#define _DRIVEAXISDIAG_SDD1X00_SUPPORT_VARIANT_1_2    000   //not supported
#include <.\lsl_st_mt.h>


FUNCTION GLOBAL TAB ONE_MDD2000Net
-1$UINT, 0$UINT, 
0$UINT, 0$UINT,

9$UDINT,
TO_UDINT(1914213293), "_DriveSafetyIFParaBase", 1$UINT, 0$UINT, 0$UINT,
TO_UDINT(540025696), "MDD2000_AxisSafeInfo", 1$UINT, 0$UINT, 2$UINT,
TO_UDINT(701686548), "MDD2000_DriveAxisDiag", 1$UINT, 0$UINT, 2$UINT,
TO_UDINT(4173214021), "MDD2000_MngInfo", 1$UINT, 0$UINT, 1$UINT,
TO_UDINT(3116930091), "MDD2000_SafetyErrorInfo", 1$UINT, 0$UINT, 1$UINT,
TO_UDINT(2225119864), "MerkerEx", 1$UINT, 22$UINT, 8$UINT,
TO_UDINT(1850111279), "String", 1$UINT, 11$UINT, 8$UINT,
TO_UDINT(2898603620), "StringInternal", 1$UINT, 85$UINT, 0$UINT,
TO_UDINT(3232495061), "VirtualBaseInit", 1$UINT, 3$UINT, 0$UINT,


_NO_ATTR, TO_UDINT(3461267148), "MDD2000_AXISSAFEINFO1", 
_NO_ATTR, TO_UDINT(1464332150), "MDD2000_AXISSAFEINFO2", 

_NO_ATTR, TO_UDINT(2570053929), "MDD2000_DRIVEAXISDIAG1", 
_NO_ATTR, TO_UDINT(2537619), "MDD2000_DRIVEAXISDIAG2", 

_NO_ATTR, TO_UDINT(2240996505), "MDD2000_MNGINFO1", 

_NO_ATTR, TO_UDINT(802807395), "MDD2000_SAFETYERRORINFO1", 

1$UINT, TO_UDINT(869464674), "MDD2000_MNGINFO1\STRFWBUILDDATE\MERKEREX0", 
1$UINT, TO_UDINT(4055741479), "MDD2000_MNGINFO1\STRFWVERSION\MERKEREX0", 
1$UINT, TO_UDINT(2053752552), "MDD2000_MNGINFO1\STRSAFETYCONFIGNAME\MERKEREX0", 
1$UINT, TO_UDINT(2665224289), "MDD2000_MNGINFO1\STRSAFETYCONFIGREVISION\MERKEREX0", 
1$UINT, TO_UDINT(2218479691), "MDD2000_MNGINFO1\STRSAFETYFWBUILDDATE\MERKEREX0", 
1$UINT, TO_UDINT(3656967121), "MDD2000_MNGINFO1\STRSAFETYFWVERSION\MERKEREX0", 
1$UINT, TO_UDINT(3203441846), "MDD2000_SAFETYERRORINFO1\FWDATETR\MERKEREX0", 
1$UINT, TO_UDINT(683514014), "MDD2000_SAFETYERRORINFO1\FWNUMSTRING\MERKEREX0", 

1$UINT, TO_UDINT(2311330150), "MDD2000_MNGINFO1\STRFWBUILDDATE", 
1$UINT, TO_UDINT(340128176), "MDD2000_MNGINFO1\STRFWVERSION", 
1$UINT, TO_UDINT(116811639), "MDD2000_MNGINFO1\STRSAFETYCONFIGNAME", 
1$UINT, TO_UDINT(41766882), "MDD2000_MNGINFO1\STRSAFETYCONFIGREVISION", 
1$UINT, TO_UDINT(110568140), "MDD2000_MNGINFO1\STRSAFETYFWBUILDDATE", 
1$UINT, TO_UDINT(2992298778), "MDD2000_MNGINFO1\STRSAFETYFWVERSION", 
1$UINT, TO_UDINT(1575081072), "MDD2000_SAFETYERRORINFO1\FWDATETR", 
1$UINT, TO_UDINT(720826057), "MDD2000_SAFETYERRORINFO1\FWNUMSTRING", 



//Internal connections
0$UDINT,
16$UDINT,
TO_UDINT(4), "strSafetyFWVersion", TO_UDINT(19),
TO_UDINT(4), "strFWBuildDate", TO_UDINT(14),
TO_UDINT(4), "strFWVersion", TO_UDINT(15),
TO_UDINT(4), "strSafetyFWBuildDate", TO_UDINT(18),
TO_UDINT(4), "strSafetyConfigName", TO_UDINT(16),
TO_UDINT(4), "strSafetyConfigRevision", TO_UDINT(17),
TO_UDINT(5), "FwNumString", TO_UDINT(21),
TO_UDINT(5), "FwDatetr", TO_UDINT(20),
TO_UDINT(14), "MerkerEx0", TO_UDINT(6),
TO_UDINT(15), "MerkerEx0", TO_UDINT(7),
TO_UDINT(16), "MerkerEx0", TO_UDINT(8),
TO_UDINT(17), "MerkerEx0", TO_UDINT(9),
TO_UDINT(18), "MerkerEx0", TO_UDINT(10),
TO_UDINT(19), "MerkerEx0", TO_UDINT(11),
TO_UDINT(20), "MerkerEx0", TO_UDINT(12),
TO_UDINT(21), "MerkerEx0", TO_UDINT(13),
0$UDINT,
8$UDINT,
TO_UDINT(14), "DataBuffer", TO_UDINT(6), "m_udLength",
TO_UDINT(15), "DataBuffer", TO_UDINT(7), "m_udLength",
TO_UDINT(16), "DataBuffer", TO_UDINT(8), "m_udLength",
TO_UDINT(17), "DataBuffer", TO_UDINT(9), "m_udLength",
TO_UDINT(18), "DataBuffer", TO_UDINT(10), "m_udLength",
TO_UDINT(19), "DataBuffer", TO_UDINT(11), "m_udLength",
TO_UDINT(20), "DataBuffer", TO_UDINT(12), "m_udLength",
TO_UDINT(21), "DataBuffer", TO_UDINT(13), "m_udLength",

//Initialization values
0$UDINT,
26$UDINT,
TO_UDINT(0), "UpdateCyTime", TO_UDINT(100),//|MDD2000Net.MDD2000_AxisSafeInfo1.UpdateCyTime;
TO_UDINT(1), "UpdateCyTime", TO_UDINT(100),//|MDD2000Net.MDD2000_AxisSafeInfo2.UpdateCyTime;
TO_UDINT(2), "CurrentReduction", TO_UDINT(100),//|MDD2000Net.MDD2000_DriveAxisDiag1.CurrentReduction;
TO_UDINT(2), "FeedbackMaxDeviation", TO_UDINT(5),//|MDD2000Net.MDD2000_DriveAxisDiag1.FeedbackMaxDeviation;
TO_UDINT(2), "UpdateCyTime", TO_UDINT(0),//|MDD2000Net.MDD2000_DriveAxisDiag1.UpdateCyTime;
TO_UDINT(3), "CurrentReduction", TO_UDINT(100),//|MDD2000Net.MDD2000_DriveAxisDiag2.CurrentReduction;
TO_UDINT(3), "FeedbackMaxDeviation", TO_UDINT(5),//|MDD2000Net.MDD2000_DriveAxisDiag2.FeedbackMaxDeviation;
TO_UDINT(3), "UpdateCyTime", TO_UDINT(0),//|MDD2000Net.MDD2000_DriveAxisDiag2.UpdateCyTime;
TO_UDINT(4), "UpdateCyTime", TO_UDINT(100),//|MDD2000Net.MDD2000_MngInfo1.UpdateCyTime;
TO_UDINT(5), "UpdateCyTime", TO_UDINT(0),//|MDD2000Net.MDD2000_SafetyErrorInfo1.UpdateCyTime;
TO_UDINT(6), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.strFWBuildDate\MDD2000_MngInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(7), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.strFWVersion\MDD2000_MngInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(8), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.strSafetyConfigName\MDD2000_MngInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(9), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.strSafetyConfigRevision\MDD2000_MngInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(10), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.strSafetyFWBuildDate\MDD2000_MngInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(11), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.strSafetyFWVersion\MDD2000_MngInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(12), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.FwDatetr\MDD2000_SafetyErrorInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(13), "ThreadSafe", TO_UDINT(0),//|MDD2000Net.FwNumString\MDD2000_SafetyErrorInfo1\MerkerEx0.ThreadSafe;
TO_UDINT(14), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_MngInfo1\strFWBuildDate.SingleRealloc;
TO_UDINT(15), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_MngInfo1\strFWVersion.SingleRealloc;
TO_UDINT(16), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_MngInfo1\strSafetyConfigName.SingleRealloc;
TO_UDINT(17), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_MngInfo1\strSafetyConfigRevision.SingleRealloc;
TO_UDINT(18), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_MngInfo1\strSafetyFWBuildDate.SingleRealloc;
TO_UDINT(19), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_MngInfo1\strSafetyFWVersion.SingleRealloc;
TO_UDINT(20), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_SafetyErrorInfo1\FwDatetr.SingleRealloc;
TO_UDINT(21), "SingleRealloc", TO_UDINT(1),//|MDD2000Net.MDD2000_SafetyErrorInfo1\FwNumString.SingleRealloc;

//Symbolic initialization values
0$UDINT,
0$UDINT,

//Initialization of string values
0$UDINT,
0$UDINT,

//Configuration of tasks (RealTime, Cyclic, Background)
0$UDINT,
0$UDINT,

0$UDINT,
2$UDINT,
TO_UDINT(2), (10)$UDINT, 4194303$DINT, 	//MDD2000_DRIVEAXISDIAG1
TO_UDINT(3), (10)$UDINT, 4194303$DINT, 	//MDD2000_DRIVEAXISDIAG2

0$UDINT,
0$UDINT,

//External connections
0$UDINT,
6$UDINT,
TO_UDINT(0), "DriveIF", C_TRY, TO_UDINT(3863568697), "MDD2000_Axis1","CmdState",
TO_UDINT(1), "DriveIF", C_TRY, TO_UDINT(2134913155), "MDD2000_Axis2","CmdState",
TO_UDINT(2), "DriveIF", C_TRY, TO_UDINT(3863568697), "MDD2000_Axis1","CmdState",
TO_UDINT(3), "DriveIF", C_TRY, TO_UDINT(2134913155), "MDD2000_Axis2","CmdState",
TO_UDINT(4), "DriveIF", C_TRY, TO_UDINT(1242891736), "MDD2000_Mng1","CmdState",
TO_UDINT(5), "DriveIF", C_TRY, TO_UDINT(1242891736), "MDD2000_Mng1","CmdState",

//Magic internal connections
0$UDINT,
0$UDINT,

//Configuration of timeslots of tasks (RealTime, Cyclic)
#ifdef __LSLLDR_TIMESLOTS__
0$UDINT,
0$UDINT,

0$UDINT,
0$UDINT,

#endif //__LSLLDR_TIMESLOTS__

//MultiMaster connections
#ifdef __LSLLDR_MULTIMASTER__
0$UDINT,
0$UDINT,
#endif //__LSLLDR_MULTIMASTER__

//Configuration for task ID (RealTime, CyclicTime)
#ifdef __LSLLDR_TASKID__
"\\\\TASKS2  "
0$UDINT,
0$UDINT,

0$UDINT,
2$UDINT,
(0)$UDINT, 	//MDD2000_DRIVEAXISDIAG1
(0)$UDINT, 	//MDD2000_DRIVEAXISDIAG2

0$UDINT,
0$UDINT,

#endif //__LSLLDR_TASKID__

END_FUNCTION