//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"
//Define part of class SdiasBase
//Address to access the Dataobject list via SPI SDO Read
#define SDIAS_SPI_DATA_OBJECT_LIST_PAGE_ADDRESS               16#FFFF
#define SDIAS_SPI_DATA_OBJECT_LIST_PAGE_OFFSET                16#00
#define SDIAS_SPI_DATA_OBJECT_LIST_IDENTIFIER                 16#12345678

//Defines the number of optional list elements in the SPI List

#define SDIAS_SPI_NUMBER_OF_OPTIONAL_ELEMENTS                 16   

#define SDIAS_SPI_HEADER_BEFORE_OPTIONAL_ELEMENTS             16#18
#define SDIAS_SPI_HARDWARE_VERSION_OFFSET                     16#C
#define SDIAS_SPI_VENDOR_ID_OFFSET                            16#0

#define SDIAS_SPI_MASTER_ADRESS_TRANSMIT_BUFFER0              16#0000
#define SDIAS_SPI_MASTER_ADRESS_TRANSMIT_BUFFER1              16#0080
#define SDIAS_SPI_MASTER_ADRESS_RECEIVE_BUFFER0               16#0000
#define SDIAS_SPI_MASTER_ADRESS_RECEIVE_BUFFER1               16#0080
#define SDIAS_SPI_MASTER_ADRESS_PAGE_ADRESS                   16#0100
#define SDIAS_SPI_MASTER_ADRESS_PREDEFINED_COMMAND_REGISTER   16#0102
#define SDIAS_SPI_MASTER_ADRESS_SINGLE_COMMAND_REGISTER       16#0103
#define SDIAS_SPI_MASTER_ADRESS_STATUS_REGISTER               16#0104
#define SDIAS_SPI_MASTER_ADRESS_REQUEST_REGISTER              16#0105
#define SDIAS_SPI_MASTER_ADRESS_GRANT_REGISTER                16#0106
#define SDIAS_SPI_MASTER_ADRESS_CLEAR_REQUEST_REGISTER        16#0107
#define SDIAS_SPI_MASTER_ADRESS_FEATURE_REGISTER              16#0108

#define SDIAS_SPI_MASTER_SOFTWARE_REQUEST                     1

#define SDIAS_SPI_MASTER_COMMAND_PAGE_READ                    16#01
#define SDIAS_SPI_MASTER_COMMAND_PAGE_PROGRAM                 16#02
#define SDIAS_SPI_MASTER_COMMAND_SECTOR_ERASE                 16#03
#define SDIAS_SPI_MASTER_COMMAND_REBOOT_FPGA                  16#F0

#define SDIAS_SPI_MASTER_STATE_BUSY                           16#00
#define SDIAS_SPI_MASTER_STATE_READY                          16#01

#define SDIAS_SPI_SECTOR_SIZE                                 65536 // 256*256
#define SDIAS_SPI_PAGE_SIZE                                   256

#define SDIAS_SPI_WRITE_MAX_RETRIES                           2
#define SDIAS_SPI_TIMEOUT                                     500  //timeout for spi accesses
#define SDIAS_SPI_LOCK_TIMEOUT                                6   //this value is multiplied with the buscycletime [µs] (6*1000=6.000 msec timeout)


//SPI List IDs
#define SDIAS_SPI_IDENTIFICATION_LIST_ID  1
#define SDIAS_SPI_FLASH_CONFIGURATION_ID  2
#define SDIAS_SPI_VENDOR_NAME_ID          3
#define SDIAS_SPI_DEVICE_NAME_ID          4
#define SDIAS_SPI_SERIAL_NUMBER_ID        5
#define SDIAS_SPI_ORDERING_NUMBER_ID      6
#define SDIAS_SPI_DOCUMENTATION_PDF_ID    7
#define SDIAS_SPI_CALIB_DATA_ID           10
#define SDIAS_SPI_PDO_INFORMATION_ID      128

//SPI Access
#define SDIAS_SPI_ACCESS_ID_HW_TREE          1
#define SDIAS_SPI_ACCESS_ID_HWK_INTERNAL     2
#include "..\..\Class\SdiasManager\SdiasManager.h"
#include "..\..\Class\SdiasBase\SdiasBase.h"
#include "..\..\Class\HwControl\HwControl.h"
#include "..\..\Source\interfaces\lsl_st_hardwaretree.h"
#include "..\..\Source\interfaces\lsl_st_mt.h"
//Define part of class AI043
#define DEVICE_ID_AI043 1045

#define AI043_ADDR_CYC_WRITE        16#000
#define AI043_ADDR_CYC_READ         16#080
#define AI043_ADDR_CFG_FIRMWARE     16#100
#define AI043_ADDR_STATE_FIRMWARE   16#180

#define AI043_SDO_RESPONSE_TIMEOUT  SDIAS_SDO_TIMEOUT * 2

#define AI043_KTY84_RAW_VALUES_FW_VER_AVAILABLE  16#110
#define AI043_AMOUNT_OF_VALID_CFG   25
#define AI043_AMOUNT_OF_VALID_CFGS_BEFORE_KTY84_ADDED 23

#define AI043_NUMBER_OF_ANALOG_IN   4
#define AI043_INVALID_VALUE         16#80000010$DINT
#define AI043_CABLE_BREAK_MASK      16#0F  //4 BITS

#define AI043_FIRMWARE_MIN          0
#define AI043_FIRMWARE_MAX_CFG12    2500
#define AI043_FIRMWARE_MAX_CFG13    5000
#define AI043_FIRMWARE_MAX_CFG14    10000
#define AI043_FIRMWARE_MAX_CFG15    25000
#define AI043_FIRMWARE_MAX_CFG16    50000
//Define part of class Varan_Base
#ifndef _T_VARANBASE_H
#define _T_VARANBASE_H

#define	VARAN_PLL_OFFSET		16#0140
#define VARAN_MULTIPLE_OFFSET	16#01AC

// version of serial number validation (16#10 = 1.0)
#define SERNO_VALIDATION_VERSION 16#10

#define IsTransparent_IS_AVAILABLE

// Defines for Mutex Generation
#define VARAN_STR_MUTEX_NAME_SEPERATOR ".."
#define VARAN_MUTEX_NAME_END_LENGTH 5
#define VARAN_MUTEX_NAME_MAX_LENGTH 32


#define VARAN_SPI_IDENT_LICENCENO_OFFSET    16#14
#define VARAN_SPI_IDENT_HARDWAREVER_OFFSET  16#18


#endif // _T_VARANBASE_H
//Define part of class BusInterfaceVARAN
#define BUSIF_VARAN_MAX_NR_DO     100
#define BUSIF_VARAN_MAX_NR_MOVEDO 100

#define BUSIF_VARAN_MAX_SDO 1

#define BUSIF_VARAN_BUS_READY_VER 16#1109
#include "..\..\Source\BusInterface.h"
#include "..\..\Source\interfaces\lsl_st_pci.h"
#include "..\..\Class\MDD2000MngBase\MDD2000MngBase.h"
#include "..\..\Source\BusIFVVDrive.h"
//Define part of class BusInterfaceSdias
#define BUS_IF_SDIAS_MAX_NR_DO 100
//Define part of class BusInterfaceSDIASInternal
#define BUSIF_INTERNAL_MAX_NR_DO 100

// Defines for Mutex Generation
#define INTERNAL_STR_MUTEX_NAME_SEPERATOR ".."
#define INTERNAL_MUTEX_NAME_END_LENGTH 5
#define INTERNAL_MUTEX_NAME_MAX_LENGTH 32
//Define part of class DM161
#define DEVICE_ID_DM161 1029
#include "..\..\Class\HwControl\watchdog.h"
#include "..\..\Source\interfaces\lsl_st_sysinfo.h"
#include "..\..\Source\interfaces\lsl_st_systrace.h"
#include "..\..\Class\HwControl\_HWKScope.h"
//Define part of class MDD2000_AxisBase
#define MDD2000_AXISBASE_AXISSTATE_ERRORMASK       0x0F //Which bits of the axisstate server are "errors"  (NoHW,NoParameter,NotOnline,NotInitialized)

#define MDD2000_AXISBASE_SPEED_SFFLIMITATION_USERINFO_0   32767
#define MDD2000_AXISBASE_SPEED_SFFLIMITATION_USERINFO_1    1000
#define MDD2000_AXISBASE_TORQUE_LIMITATION_VALUE           1000
 
//*****************************************************************************
// Define for reading the encoder memory

#define MDD2000_AXISBASE_DRIVEENCMEM_ASYCALLID  0xEC12 // Identifer for asy commndos used for reading the encoder memory 

#define MDD2000_AXISBASE_DRIVEENCMEM_PARAVAL_RD_ENCMEMSIZE   28 // Select encoder mem size to be read.

#define MDD2000_AXISBASE_DRIVEENCMEM_K_FBRW_LOCK     98
#define MDD2000_AXISBASE_DRIVEENCMEM_K_FBRW_UNLOCK   99

#define MDD2000_AXISBASE_DRIVEENCMEM_ASYCOMERR_RETRY         6 // This error is returned if DRIVEENCMEM_KASTART_LOCK_SCOPE failes because someone else has got the lock.
                                              // See _DriveASyncPara for the errocoeds; 6 =    object cannot be changed in this mode, 

#define MDD2000_AXISBASE_DRIVEENCMEM_DELAY_RETRYLOCK       500
#define MDD2000_AXISBASE_DRIVEENCMEM_DELAY_FILECREATE      200 // Minimum known time it takes to create the file. Depends on the encoder

#define MDD2000_AXISBASE_DRIVEENCMEM_MEMBLOCK_SIZE         128 
#define MDD2000_AXISBASE_DRIVEENCMEM_MEMBLOCK_ID_OFFSET    100 // Memory blocks 0 - 63 have the id 100-163

#define MDD2000_AXISBASE_DRIVEENCMEM_FILENPATH         "C:\A%d"               // Filepath/name for the encoder is "C:\A<x>\feedback.dat" ; x = axisno
#define MDD2000_AXISBASE_DRIVEENCMEM_FILENAME          "feedback.dat"

#define MDD2000_AXISBASE_DRIVEENCMEM_K_FBRW_OK         0
#define MDD2000_AXISBASE_DRIVEENCMEM_K_FBRW_BUSY     100 // DRIVEENCMEM_MEMBLOCK_ID_OFFSET was written, not yet reset by FW

#define MDD2000_AXISBASE_DRIVEENCMEM_P_S_INDEX_VALOFFSET 600 // Offset used by FW do distinguish access from scope accesses
#include "..\..\class\_drivemngbase\drivemngbase.h"
#include "..\..\Class\_DriveEncoderMemory\_DriveEncoderMemory.h"
//Define part of class MDD2000MngBase
#DEFINE MDD2000MNG_MAXENTRIES   3        // maximale Anzahl an Achsen
#DEFINE MDD2000MNG_MAXAXISNO    3        // maximale Anzahl an Achsen pro Steckplatz 

// Asy Commands to drive scope
#define MDD2000MNG_DRIVESCOPE_S_CH     246
#define MDD2000MNG_DRIVESCOPE_S_TRIGL  247
#define MDD2000MNG_DRIVESCOPE_S_TRIGB  248
#define MDD2000MNG_DRIVESCOPE_S_INDEX  249
#define MDD2000MNG_DRIVESCOPE_S_WORK   250
#define MDD2000MNG_DRIVESCOPE_S_GET1   251
#define MDD2000MNG_DRIVESCOPE_S_GET2   252
#define MDD2000MNG_DRIVESCOPE_S_GET3   253
#define MDD2000MNG_DRIVESCOPE_S_STAT   254

#define MDD2000MNG_DEFAULT_CPU_LOGFILENAME_PATH           "C:\sysmsg\DriveLog"
#define MDD2000MNG_DEFAULT_CPU_DEBUGLOGFILENAME_PATH      "C:\sysmsg\DriveDebugLog"
#define MDD2000MNG_DEFAULT_CPU_LOGFILENAME_EXTENSION      ".txt"

#define MDD2000MNG_DEFAULT_DRIVE_LOGFILENAME_PATH         "C:\"
#define MDD2000MNG_DEFAULT_DRIVE_LOGFILENAME_NAME         "DriveLog.txt"
#define MDD2000MNG_DEFAULT_DRIVE_DEBUGLOGFILENAME_NAME    "DriveDebugLog.txt"

#define MDD2000MNG_FILE_HANDLING_RETCODE_NOERROR                    0
#define MDD2000MNG_FILE_HANDLING_RETCODE_FILEHANDLING_BUSY         -2   // = DRIVEVVBASE_VANDAL_FILEHANDLING_ERROR_BUSY -2
#define MDD2000MNG_FILE_HANDLING_RETCODE_CMDVERSION_NOTSUPPORTED  -92
#define MDD2000MNG_FILE_HANDLING_RETCODE_WRITEPARA_FAILED         -93
#define MDD2000MNG_FILE_HANDLING_RETCODE_WRITEPARA_TIMEOUT        -94
#define MDD2000MNG_FILE_HANDLING_RETCODE_READBACKPARA_FAILED      -95
#define MDD2000MNG_FILE_HANDLING_RETCODE_READBACKPARA_TIMEOUT     -96
#define MDD2000MNG_FILE_HANDLING_RETCODE_AXIS_ENABLED             -97
#define MDD2000MNG_FILE_HANDLING_RETCODE_NOT_ONLINE               -98
#define MDD2000MNG_FILE_HANDLING_RETCODE_NOT_SUPPORTED            -99

#define MDD2000MNG_FILE_HANDLING_TIMEOUT_LOG_PARAM          10000

#define MDD2000MNG_FILESELECT_LOGFILE       0
#define MDD2000MNG_FILESELECT_DEBUGLOGFILE  1

#define MDD2000MNG_FILE_RESERVE_IDFREE         0
#define MDD2000MNG_FILE_RESERVE_IDDEFAULT     10
#define MDD2000MNG_FILE_RESERVE_IDGETLOGFILE  20

#define MDD2000MNG_DELAYSETSERVICEMODE_TIMEOUT 10000
#include "..\..\Class\MDD2000MngBase\MDD2000ComL2.h"
//Define part of class MDD2000VVBase
#define MDD2000VVBASE_OFFSET_TYPELABEL        0x1100

#define MDD2000VVBASE_PARALIST_INDEX_SET      0x2210
#define MDD2000VVBASE_PARALIST_INDEX_INFO     0x2211
#define MDD2000VVBASE_PARALIST_INDEX_SETNR    174

#define MDD2000VVBASE_MAX_SERVICEBOX          8
#define MDD2000VVBASE_SDO_RESPONSE_TIMEOUT    (5000)  
#define MDD2000VVBASE_SDO_RESPONSE_TIMEOUT_FILEHANDLING    (10000)  // don't reduce this timeout, the firmware of the WA013 uses this time to erase the flash (it only emulates a file system)
#define MDD2000VVBASE_SDO_TYPELABEL_TIMEOUT   (10000*2)  //20 sec timeout to read typelabel because drive need time for bootup


#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_STANDARD_MIN    0x2200
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_STANDARD_MAX    0x23FF
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_STANDARD_OFFSET 0x200
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_SAFETY_MIN      0x4200
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_SAFETY_MAX      0x43FF
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_SAFETY_OFFSET   0x200
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_DS402_MIN       0x6000
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_DS402_MAX       0x67FF
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_DS402_OFFSET    0x800
#define MDD2000VVBASE_SDO_SERVICE_APP_CANOPEN_MAX_AXIS        8

#define MDD2000VVBASE_SERVICE_APP_INVALID    0xFF

#define MDD2000VVBASE_FULL_PARADATA_SIZE     12
#define MDD2000VVBASE_CANOPEN_FOOTER_SIZE    4
#define MDD2000VVBASE_LASAL_PARADATA_SIZE    4

#define MDD2000VVBASE_VANDAL_MAILBOX_COMMAND_FILE_READ                      25
#define MDD2000VVBASE_VANDAL_MAILBOX_COMMAND_FILE_WRITE                     26
#define MDD2000VVBASE_VANDAL_MAILBOX_COMMAND_FILE_DELETE                    27
#define MDD2000VVBASE_VANDAL_MAILBOX_COMMAND_FILE_SET_WORKING_DIRECTORY     30
#define MDD2000VVBASE_VANDAL_MAILBOX_COMMAND_FILE_GET_DIRECTORY_LIST        31
#define MDD2000VVBASE_VANDAL_FILEHANDLING_MAX_FILES       255

// *** The actual limits might be smaller depending on the drive ***
// limit to size of command MDD2000VVBASE_VANDAL_MAILBOX_COMMAND_FILE_GET_DIRECTORY_LIST struct t_s_VandalGetDirectoryEntry
// Use 94 instead of 95 because array[0..CONSTANT] is CONSTANT+1 char´s and then there is space for a closing zero.
#define MDD2000VVBASE_VANDAL_FILEHANDLING_MAX_FILENAME    94
// limited by the size of the mailbox data[0..123] + footer
#define MDD2000VVBASE_VANDAL_FILEHANDLING_MAX_DIRECTORYNAME    123


#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_NO_ERROR                   0
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_MAILBOX_NOT_AVAILABLE     -1
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_BUSY                      -2
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_INVALID_POINTER           -3
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_FILENAME_DRIVE_TOO_LONG   -4
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_FILEPATH_DRIVE_TOO_LONG   -5
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_FILEDPNE_TOO_LONG         -6
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_VANDAL_COMMUNICATION      -7
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_VANDAL_TIMEOUT            -8
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_DRIVE_FILE_NOT_FOUND      -9
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_OPEN_LOCAL_FILE           -10
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_WRITE_LOCAL_FILE          -11
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_INVALID_LENGTH            -12
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_BUFFER_TOO_SMALL          -13
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_FILE_TOO_SMALL            -14
#define MDD2000VVBASE_VANDAL_FILEHANDLING_ERROR_CREATETHREAD_FAILED       -15


#define MDD2000VVBASE_VANDAL_MAILBOX_MSG_CNT_MASK 2#111


#define MDD2000VVBASE_PDO_GENERAL_DATA            4 //4 byte read and write general PDO data
#define MDD2000VVBASE_PDO_AXIS_OFFSET         16#14 //4*5 = 20 Byte
#define MDD2000VVBASE_PDO_AXIS_SIZE              20 //4*5 = 20 Byte
#define MDD2000VVBASE_PDO_AXIS_OFFSET2        16#08 //4*2 = 8 Byte
#define MDD2000VVBASE_PDO_AXIS_SIZE2              8 //4*2 = 8 Byte

#define MDD2000VVBASE_TYPELBL_EXTPDOSUPPORT       2 // Extended PDO are suported with Type Label Major Version 2 or higher
#define MDD2000VVBASE_MAX_AXIS_IDX                6 // 0 .. 6 = 7 entries
// #define MDD2000VVBASE_PDO_AXIS_OFFSET_EXTEND  ((MDD2000VVBASE_MAX_AXIS_IDX + 1) * 4) //4*7 = 28 Byte
#define MDD2000VVBASE_PDO_AXIS_SIZE_EXTEND    ((MDD2000VVBASE_MAX_AXIS_IDX + 1) * 4) //4*7 = 28 Byte


#define MDD2000VVBASE_SDO_MAILBOX_OFFSET    16#10

#define MDD2000VVBASE_ONE_DO_SIZE            128

#define MDD2000VVBASE_MDD2000_MAX            3 //3 axis

#define MDD2000VVBASE_MAX_AXIS              MDD2000VVBASE_MDD2000_MAX
#define MDD2000VVBASE_SDO_TIMOUT            1000
#define MDD2000VVBASE_WRITE_PLCTIME         (1000*60*30)    //cyclic time to write PLC time stamp to drive


// time to wait (in ms) until other tasks in the same or lower priority than post init have done their stuff
#define MDD2000VVBASE_WAIT_TIME_IN_POST_INIT    1
#include "..\..\Class\SafetyManager\SafetyManager.h"
//Define part of class MDD2000VVSafetyBase
// always allocate blocks for 5 more SDOs
#define MDD2000VVSB_SDO_BUFFER_ALLOC_BLOCK 5

// time between the CRC-Checks (CRC-Check to find out if configuration has changed)
#define MDD2000VVSB_CRC_CHECK_TIME  5000

// time between the system time of plc is written to scp firmware
#define MDD2000VVSB_SYSTIME_SET_TIME  (5 SEC)  //(24 hours)

// time between we read out the retrycounter from the module.
#define MDD2000VVSB_RETRY_COUNTER_WAIT_TIME 10000

// time between the check of the flex con state
#define MDD2000VVSB_FLEX_CON_STATE_CHECK_TIME 2000

#define MDD2000VVSB_TDO_BUFFER_SIZE 50

// time for SDO transfer
#define MDD2000VVSB_SDO_TRANSFERTIME 30 // maximum measured time at mover was 22ms + 3ms reserve

// timeout for optional modules to be synchron
#define MDD2000VVSB_OPTIONAL_MODULE_SYNC_TIMEOUT  5000

// maximum number of tries to execute an asynchronous command (5 = if 5 consecutive tries to make an asynchronous communication fail, the class goes into error _AsyncComError)
#define MDD2000VVSB_SDO_MAX_TRIES 5

#define MDD2000VVSB_RETRY_COUNTER_AVAILABLE_MAJOR_REV 1000
#define MDD2000VVSB_RETRY_COUNTER_AVAILABLE_MINOR_REV 338

#define MDD2000VVSB_MAX_BUS_USAGE         128
#define MDD2000VVSB_BUS_USAGE_PER_PDO_DO  127


#define MDD2000VVSB_SDO_RESPONSE_TIMEOUT                500
#define MDD2000VVSB_SDO_MAX_RETRIES                     5
#define MDD2000VVSB_SDO_MAX_DATA_PER_PAKET              56

// if defined, the DO traffic is monitored
//#define DO_DEBUG
#ifdef DO_DEBUG
#pragma message("DO_DEBUG for Safety-Modules activated! Needs more CPU ressources!")
#endif
#include "..\..\Class\SafetyBaseFSoE\SafetyBaseFSoE.h"
#include "..\..\Source\interfaces\lsl_st_safety.h"
#include <.\lsl_st_mt.h>
//Define part of class SafetyBaseFSoE
// always allocate blocks for 5 more SDOs
#define SBF_SDO_BUFFER_ALLOC_BLOCK 5

// time between the CRC-Checks (CRC-Check to find out if configuration has changed)
#define SBF_CRC_CHECK_TIME  5000

// time between the system time of plc is written to scp firmware
#define SBF_SYSTIME_SET_TIME  (5 SEC)  //(24 hours) 

// time between we read out the retrycounter from the module.
#define SBF_RETRY_COUNTER_WAIT_TIME 10000

// time between the check of the flex con state
#define SBF_FLEX_CON_STATE_CHECK_TIME 2000

#define SBF_TDO_BUFFER_SIZE 50

// time for SDO transfer
#define SBF_SDO_TRANSFERTIME 30 // maximum measured time at mover was 22ms + 3ms reserve

// timeout for optional modules to be synchron
#define SBF_OPTIONAL_MODULE_SYNC_TIMEOUT  5000

// maximum number of tries to execute an asynchronous command (5 = if 5 consecutive tries to make an asynchronous communication fail, the class goes into error _AsyncComError)
#define SBF_SDO_MAX_TRIES 5

#define SBF_RETRY_COUNTER_AVAILABLE_MAJOR_REV 1000
#define SBF_RETRY_COUNTER_AVAILABLE_MINOR_REV 338

#define SBF_MAX_BUS_USAGE         128
#define SBF_BUS_USAGE_PER_PDO_DO  127

// defines to lock readout of the config against using the config in the realtime method (necessary for the fast unsafe variables)
#define SBF_LOCKCFG_NOT_USED  0
#define SBF_LOCKCFG_VALID     1
#define SBF_LOCKCFG_WAIT4RT   2


// if defined, the DO traffic is monitored
//#define DO_DEBUG
#ifdef DO_DEBUG
#pragma message("DO_DEBUG for Safety-Modules activated! Needs more CPU ressources!")
#endif
//Define part of class SafetyUDP
#define SAFETY_UDP_MAX_SOCKETS                6     // Max number of socket

#define SAFETY_UDP_CLT_SEND_OK                0    // Send ok
#define SAFETY_UDP_CLT_INVALID_HANDLE        -1    // Invalid handle
#define SAFETY_UDP_CLT_NOT_OPEN              -2    // Socket is not open
#define SAFETY_UDP_CLT_SEND_FAILED           -3    // Send failed
#define SAFETY_UDP_CLT_SEND_BUFFER_FULL      -4    // Send buffer is full
#define SAFETY_UDP_CLT_DATA_TO_BIG           -5    // Data to big

#define SAFETY_UDP_MAXIMUM_SEGMENT_SIZE    1452    // Maximum of user data

#define SAFETY_UDP_TIMEOUT_OPENSOCKET    (1000)    //timeout for opening socket

#define SAFETY_UDP_RECEIVE_TIMEOUT          800

#define SAFETY_UDP_TX_BUFFER_SIZE          1024
//Define part of class SafetyManager
#define SM_LogBufferSize 1000
#define SM_MaxObjNameLen  256
#include "..\..\Source\interfaces\lsl_st_safetydll.h"
//Define part of class SCP111
#define SCP111_DEVICE_ID 1049
//Define part of class SdiasManager
#define SDIAS_SDO_MAX_LENGTH              128
#define SDIAS_SDO_RINGBUFFER_NO            64
#define SDIAS_SDO_CHANNEL_NO                3   // fixed in the VI hardware to be 3

// watchdog trigger interval (after 130ms of no trigger the SDIAS HW goes into reset again and takes at least another 10ms to be ready again)
#define SDIAS_WATCHDOG_TRIGGER_TIME        40

// time needed by sdias modules to start up after the watchdog is triggered the first time in ms
#define SDIAS_HARDWARE_STARTUP_TIME        15

// sdias manager needs 2 ticks to handle event for read task (measure sync time)
#define SDIAS_SYNC_MEASURE_TICKS            2

// after activating the PLL SyncOut it takes 3 cycles until the SDIAS sync can be injected
#define SDIAS_CYCLES_WAIT_AFTER_SYNC_ENABLE 3

// wait 1 bus cycle at start to get valid numbers in the task info
#define SDIAS_TASKINFO_READY_TICKS          1

// time to wait (in ms) until other tasks in the same or lower priority than post init have done their stuff
#define SDIAS_WAIT_TIME_IN_POST_INIT        1

#define SIZE_PER_SDIAS_CLIENT               16#0400

// for far memory accesses: 1 module can hold maximum 256 1K blocks (0-255)
#define SDIAS_1K_BLOCK_NO                       256

// far memory accesses maximum length in bytes
#define SDIAS_MAX_SIZE_FAR_MEM_ACCESS           127


#define SDIAS_OFFSET_HW_CONFIG              16#FF00
#define SDIAS_OFFSET_TASK_EVENT_IDS         16#FF10
#define SDIAS_OFFSET_FEATURE_INFO           16#FF18
#define SDIAS_OFFSET_APPLI_LED_STATES       16#FF20
#define SDIAS_OFFSET_SYNC_INJECTION_CFG     16#FF3D
#define SDIAS_OFFSET_TRIGGER_UNIT_SETUP_0   16#FF41
#define SDIAS_OFFSET_TRIGGER_UNIT_SETUP_1   16#FF45
#define SDIAS_OFFSET_TASK_START_CFG_0       16#FF60
#define SDIAS_OFFSET_TASK_CONFIG_0          16#FF86
#define SDIAS_OFFSET_TASK_CONFIG_1          16#FF96
#define SDIAS_OFFSET_TASK_INFO_1            16#FF94
#define SDIAS_OFFSET_TASK_HANDSHAKE_1       16#FF9B
#define SDIAS_OFFSET_TASK_DURATION_TIME_1   16#FF9C
#define SDIAS_OFFSET_TASK_DURATION_TIME_2   16#FFAC
#define SDIAS_OFFSET_TASK_CONFIG_2          16#FFA6

#define SDIAS_RETRIES_ALLOWED         2

// mask to get global error flag out of message counter byte of SDO responses
#define SDIAS_MASK_GLOBAL_ERROR_FLAG        16#80

// mask to get message counter out of message counter byte of SDO responses
#define SDIAS_MASK_MESSAGE_COUNTER          16#3F


#define SDIAS_EVENT_MASK_ID_SYNC_OUT0       16#10
#define SDIAS_EVENT_MASK_ID_SYNC_OUT1       16#11
#define SDIAS_EVENT_MASK_ID_SYNC_OUT2       16#12
#define SDIAS_EVENT_MASK_ID_SYNC_OUT3       16#13

#define SDIAS_MANAGER_SYNC_SYNCOUT_ID       16#85
#define SDIAS_TASK_START_EVENT_SYNCOUT_ID   16#86


#define SDIAS_PLACE_NO_MODULE_ADDED_SO_FAR  16#80000000

#define SDIAS_TRIGGER_UNIT_BYTE_SIZE        2

#define SDIAS_WAIT_TIME_FIRMWARE_HANDSHAKE  5 * 1000

// if the firmware version is below this, there might be problems with SCP111 and other modules => print warning at startup
#define SDIAS_FW_VERSION_SDO_ERROR_FIXED    16#120

// if the protocol version ist below this, Control Read/Broadcast Write Command is not supported by sdiasmanager
#define SDIAS_PROTOCOLVERSION_BROADCAST     16#120

// if the cil version ist below this, Control Read/Broadcast Write Command is not supported by OS for local SDIAS.
#define SDIAS_CILVERSION_BROADCAST         16#5001 

// timeout for blocking the init during initialisation (in ms)
#define SDIAS_INIT_BLOCK_TIMEOUT            20 * 1000

#define SDIAS_MUTEX_NAME_END_LENGTH 3
#define SDIAS_MUTEX_NAME_MAX_LENGTH 32
#define SDIAS_MUTEX_STR_SEPERATOR   ".."

//#define SDIAS_RT_TIME_MEASUREMENT
#ifdef SDIAS_RT_TIME_MEASUREMENT
  #pragma message("ATTENTION: SDIAS real time measurement is active and needs additional ressources in the realtime task")
#endif

(* SDIAS data object commands  *)
#define	 SDIAS_CMD_END							  0x00			(* End command										          *)
#define	 SDIAS_CMD_ACC_MEMORY				  0x01			(* Access dpram memory								      *)
#define	 SDIAS_CMD_ACC_CONTROL				0x02			(* Access dpram control memory						  *)
#define	 SDIAS_CMD_GLOBAL						  0x03			(* SDIAS global command								      *)
#define	 SDIAS_CMD_COPY_LOCAL					0x04			(* DPRAM copy command in local dpram				*)
#define	 SDIAS_CMD_JMP_LOCAL					0x05			(* DPRAM jump command in local dpram 				*)
#define  SDIAS_CMD_ACC_MEMORY_FAR     0x07      (* SDIAS Far Memory Access                  *)

(* SDIAS defines for data object handling *)
// Write data oject list
#define	 SDIAS_DOL_WRITE_USAGE_DOL_EMPTY	  0x20			(* Usage of empty write dol list (wachtdog trigger + end command)   *)
#define	 SDIAS_DOL_WRITE_USAGE_DTA_EMPTY	  0x03			(* Usage of empty write dol data (DO ctrl of 2x copy command for task information + DO ctrl of watchdog trigger      *)
#define	 SDIAS_DOL_WRITE_OFFSET_END_CMD			0x10			(* One data object in list - offset = 1 DO size = 0x10						  *)
#define	 SDIAS_DOL_WRITE_OFFSET_FIRST_DTA		0x02			(* Offset of first data byte of second copy command = 2 (DO ctrl)   *)
#define	 SDIAS_DOL_WRITE_OFFSET_LAST_DTA		0x02			(* Offset of last data byte of second copy command = 2 (DO ctrl )   *)

// Read data oject list
#define	 SDIAS_DOL_READ_USAGE_DOL_EMPTY	    0x30			(* Usage of empty read dol list (2x task info copy command + end command)   *)
#define	 SDIAS_DOL_READ_USAGE_DTA_EMPTY	    0x0D			(* Usage of empty write dol data (DO ctrl of 2x copy command for task information + DO ctrl of watchdog trigger      *)
#define	 SDIAS_DOL_READ_OFFSET_END_CMD			0x20			(* One data object in list - offset = 1 DO size = 0x10						          *)
#define	 SDIAS_DOL_READ_OFFSET_FIRST_DTA		0x07			(* Offset of first data byte of second copy command = 7 = DO state          *)
#define	 SDIAS_DOL_READ_OFFSET_LAST_DTA		  0x0C			(* Offset of last data byte of second copy command = 12 (last byte of task information)       *)

//Versionsnumber where SDIAS SPI Read Accesses are available
#define  SDIAS_SDO_SPI_FIRMWARE_VERSION_AVAILABLE 16#0120

//error info mask
#define  SDIAS_ERROR_INFO_MASK    2#1000011000011111

// Broadcast DO Info
#define SDIAS_OFFSET_CLIENT_CTRLTIMESTAMP   16#0190
#define SDIAS_NR_TIMEBROADCAST_DOS 2
#define SDIAS_TIMEBROADCAST_SUBCMD 16#B0
#include "..\..\source\interfaces\lsl_st_pll.h"
//Define part of class SdiasPLC
#define SDIASM_OBJECT_PATH            16#88000002   // Object Path for VSDIASmanager Length = 2 (First 2byte), Domain = 0 (3rd byte), Escape Sequence SDIAS (4th byte)
#include "..\..\Class\SdiasSafetyManager\SdiasSafetyManager.h"
#include "..\..\Class\SafetyBase\SafetyBase.h"
//Define part of class VaranManager
#define SIZE_PAYLOAD_FRAME_HEADER_DO      16#38  // Const because datasize is in the Payload DOs
#define SIZE_PAYLOAD_IRQ_FRAME_HEADER_DO  16#40  // Const because datasize is in the Payload DOs

#define VM_MAX_POST_INIT_MODULES  1000

#define VM_OBJECT_PATH            16#81000002   // Object Path for Varanmanager Length = 2 (First 2byte), Domain = 0 (3rd byte), Escape Sequence Varan (4th byte)
#include "..\..\Class\VaranManager\VaranManager.h"
#include "..\..\Source\interfaces\lsl_st_kernel.h"


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

49$UDINT,
TO_UDINT(529317953), "_CanLib", 1$UINT, 10$UINT, 2$UINT,
TO_UDINT(1914213293), "_DriveSafetyIFParaBase", 1$UINT, 0$UINT, 0$UINT,
TO_UDINT(4078275645), "_SerLib", 1$UINT, 35$UINT, 3$UINT,
TO_UDINT(1698489890), "AI043", 1$UINT, 20$UINT, 1$UINT,
TO_UDINT(2897291062), "ASCII_BIN", 1$UINT, 21$UINT, 1$UINT,
TO_UDINT(423404954), "BusIFVVMDD2000", 1$UINT, 1$UINT, 1$UINT,
TO_UDINT(2368828999), "BusInterfaceSdias", 1$UINT, 26$UINT, 0$UINT,
TO_UDINT(3882880897), "BusInterfaceSDIASInternal", 2$UINT, 1$UINT, 0$UINT,
TO_UDINT(24783181), "BusInterfaceVARAN", 1$UINT, 75$UINT, 0$UINT,
TO_UDINT(658879389), "CP112_IOs", 1$UINT, 1$UINT, 1$UINT,
TO_UDINT(794617671), "CriticalSection", 0$UINT, 4$UINT, 2$UINT,
TO_UDINT(4282685340), "DM161", 1$UINT, 14$UINT, 1$UINT,
TO_UDINT(3760282393), "Drive_AsyncParaDS402", 1$UINT, 1$UINT, 0$UINT,
TO_UDINT(3238133653), "Hub_Base", 1$UINT, 21$UINT, 1$UINT,
TO_UDINT(1770276445), "Hub_Base_Root", 2$UINT, 11$UINT, 1$UINT,
TO_UDINT(3078259981), "HwcLogging", 1$UINT, 0$UINT, 1$UINT,
TO_UDINT(2471641665), "HwControl", 5$UINT, 24$UINT, 1$UINT,
TO_UDINT(1193052171), "HwControlBase", 1$UINT, 10$UINT, 0$UINT,
TO_UDINT(4260294091), "HWRtPostScan", 1$UINT, 0$UINT, 1$UINT,
TO_UDINT(626477144), "MDD2000_Axis", 1$UINT, 2$UINT, 3$UINT,
TO_UDINT(955250484), "MDD2000_AxisBase", 1$UINT, 1$UINT, 0$UINT,
TO_UDINT(3318409587), "MDD2000_Mng", 1$UINT, 2$UINT, 1$UINT,
TO_UDINT(3685268210), "MDD2000AxisSet", 1$UINT, 0$UINT, 3$UINT,
TO_UDINT(927349505), "MDD2000GeneralParaDS402", 1$UINT, 1$UINT, 3$UINT,
TO_UDINT(4153957792), "MDD2000MngBase", 1$UINT, 2$UINT, 0$UINT,
TO_UDINT(1968777221), "MDD2000VVBase", 1$UINT, 1$UINT, 1$UINT,
TO_UDINT(2110734413), "MDD2000VVSafetyBase", 1$UINT, 1$UINT, 1$UINT,
TO_UDINT(2225119864), "MerkerEx", 1$UINT, 22$UINT, 14$UINT,
TO_UDINT(933570811), "RAMex", 1$UINT, 17$UINT, 3$UINT,
TO_UDINT(3591333481), "RamFile", 1$UINT, 9$UINT, 1$UINT,
TO_UDINT(3466252013), "SafetyBaseFSoE", 1$UINT, 38$UINT, 0$UINT,
TO_UDINT(1799751072), "SafetyManager", 2$UINT, 28$UINT, 1$UINT,
TO_UDINT(3727715967), "SafetyUDP", 1$UINT, 4$UINT, 0$UINT,
TO_UDINT(1571585774), "SCP111", 1$UINT, 49$UINT, 1$UINT,
TO_UDINT(3175101883), "SdiasBase", 1$UINT, 60$UINT, 0$UINT,
TO_UDINT(4173303375), "SdiasHubBase", 1$UINT, 10$UINT, 1$UINT,
TO_UDINT(2118381352), "SdiasManager", 1$UINT, 97$UINT, 1$UINT,
TO_UDINT(1159122596), "SdiasPLC", 2$UINT, 6$UINT, 1$UINT,
TO_UDINT(2010300054), "SdiasSafetyBase", 1$UINT, 10$UINT, 0$UINT,
TO_UDINT(1131165733), "SdiasSafetyManagerFSoE", 1$UINT, 40$UINT, 1$UINT,
TO_UDINT(2650799298), "SDM081", 1$UINT, 12$UINT, 1$UINT,
TO_UDINT(1850111279), "String", 1$UINT, 11$UINT, 11$UINT,
TO_UDINT(2898603620), "StringInternal", 1$UINT, 85$UINT, 0$UINT,
TO_UDINT(862125188), "Varan_Base", 2$UINT, 21$UINT, 0$UINT,
TO_UDINT(2940693151), "VaranManager", 3$UINT, 8$UINT, 0$UINT,
TO_UDINT(1989862026), "VaranManager_1", 2$UINT, 8$UINT, 1$UINT,
TO_UDINT(4035182347), "VaranManager_Base", 1$UINT, 26$UINT, 0$UINT,
TO_UDINT(3232495061), "VirtualBaseInit", 1$UINT, 3$UINT, 0$UINT,
TO_UDINT(819479645), "XXXBase_IOs", 1$UINT, 1$UINT, 0$UINT,

1$UINT, TO_UDINT(3194356815), "CP112_IOS1\_BASE\_CANLIB1", 
1$UINT, TO_UDINT(661607925), "CP112_IOS1\_BASE\_CANLIB2", 


1$UINT, TO_UDINT(3879313428), "CP112_IOS1\_BASE\_SERLIB1", 
1$UINT, TO_UDINT(2117136814), "CP112_IOS1\_BASE\_SERLIB2", 
1$UINT, TO_UDINT(154648888), "CP112_IOS1\_BASE\_SERLIB3", 

_NO_ATTR, TO_UDINT(1457099445), "AI0431", 

1$UINT, TO_UDINT(3603645853), "VARANMANAGER_11\_BASE\ASCII_BIN1", 

1$UINT, TO_UDINT(1996446606), "MDD2000_MNG1\BUSIFVVMDD20001", 




_NO_ATTR, TO_UDINT(222643709), "CP112_IOS1", 

1$UINT, TO_UDINT(2972590922), "HWCONTROL1\SAFETYMANAGER\UDPRECEIVEDATA", 
1$UINT, TO_UDINT(1868223583), "HWCONTROL1\SAFETYMANAGER\UDPSENDDATA", 

_NO_ATTR, TO_UDINT(2056942671), "DM1611", 


1$UINT, TO_UDINT(4004208045), "MDD2000_MNG1\HUB_BASE2", 

1$UINT, TO_UDINT(1776428101), "VARANMANAGER_11\HUB_BASE_ROOT0", 

1$UINT, TO_UDINT(3105254819), "HWCONTROL1\HWCLOGGING", 

_NO_ATTR, TO_UDINT(2190789875), "HWCONTROL1", 


1$UINT, TO_UDINT(1673205898), "HWCONTROL1\HWRTPOSTSCAN", 

_NO_ATTR, TO_UDINT(3863568697), "MDD2000_AXIS1", 
_NO_ATTR, TO_UDINT(2134913155), "MDD2000_AXIS2", 
_NO_ATTR, TO_UDINT(138870805), "MDD2000_AXIS3", 


_NO_ATTR, TO_UDINT(1242891736), "MDD2000_MNG1", 

1$UINT, TO_UDINT(1932898894), "MDD2000_AXIS1\SDDAXSET1", 
1$UINT, TO_UDINT(3940013135), "MDD2000_AXIS2\SDDAXSET1", 
1$UINT, TO_UDINT(727255951), "MDD2000_AXIS3\SDDAXSET1", 

1$UINT, TO_UDINT(1395992836), "MDD2000_AXIS1\MDD2000GENERALPARADS4021", 
1$UINT, TO_UDINT(2707604732), "MDD2000_AXIS2\MDD2000GENERALPARADS4021", 
1$UINT, TO_UDINT(1182753387), "MDD2000_AXIS3\MDD2000GENERALPARADS4021", 


1$UINT, TO_UDINT(60409322), "MDD2000_MNG1\BUSIFVVMDD20001\MDD2000VVBASE1", 

1$UINT, TO_UDINT(1260194180), "MDD2000_MNG1\MDD2000VVSAFETYBASE1", 

1$UINT, TO_UDINT(3111676623), "AI0431\_BASE\SERIALNOSTR\MERKEREX0", 
1$UINT, TO_UDINT(1089285877), "DM1611\_BASE\SERIALNOSTR\MERKEREX0", 
1$UINT, TO_UDINT(1803062081), "MDD2000_AXIS1\MERKEREX2", 
1$UINT, TO_UDINT(4070239552), "MDD2000_AXIS2\MERKEREX2", 
1$UINT, TO_UDINT(856961664), "MDD2000_AXIS3\MERKEREX2", 
1$UINT, TO_UDINT(1171471657), "MDD2000_MNG1\BUSIFVVMDD20001\_BASE\_BASE\SERIALNOSTR\MERKEREX0", 
1$UINT, TO_UDINT(3805219380), "MDD2000_MNG1\_BASE\DRIVETYPESTR\MERKEREX0", 
1$UINT, TO_UDINT(165235742), "MDD2000_MNG1\_BASE\FWNUMSTRING\MERKEREX0", 
1$UINT, TO_UDINT(717095641), "MDD2000_MNG1\_BASE\FWSAFENUMSTRING\MERKEREX0", 
1$UINT, TO_UDINT(3658891438), "MDD2000_MNG1\_BASE\HWNUMSTRING\MERKEREX0", 
1$UINT, TO_UDINT(3145632967), "SCP1111\SDIASSAFETYMANAGERFSOE1\PROJECTNAMESTR\MERKEREX0", 
1$UINT, TO_UDINT(201476176), "SCP1111\SDIASSAFETYMANAGERFSOE1\PROJECTREVISIONSTR\MERKEREX0", 
1$UINT, TO_UDINT(3278027276), "SCP1111\_BASE\_BASE\SERIALNOSTR\MERKEREX0", 
1$UINT, TO_UDINT(2288011539), "SDM0811\_BASE\SERIALNOSTR\MERKEREX0", 

1$UINT, TO_UDINT(2700268813), "MDD2000_AXIS1\RAMEX2", 
1$UINT, TO_UDINT(779997934), "MDD2000_AXIS2\RAMEX2", 
1$UINT, TO_UDINT(3805794928), "MDD2000_AXIS3\RAMEX2", 

1$UINT, TO_UDINT(1743341426), "MDD2000_MNG1\BUSIFVVMDD20001\_BASE\_BASE\SERNOBACKUP", 


1$UINT, TO_UDINT(1778590035), "HWCONTROL1\SAFETYMANAGER", 


_NO_ATTR, TO_UDINT(3291712694), "SCP1111", 


1$UINT, TO_UDINT(1007630054), "SDIASPLC1\SDIASHUBBASE1", 

1$UINT, TO_UDINT(4015996540), "SDIASPLC1\SDIASMANAGER1", 

_NO_ATTR, TO_UDINT(1378000520), "SDIASPLC1", 


1$UINT, TO_UDINT(1085655366), "SCP1111\SDIASSAFETYMANAGERFSOE1", 

_NO_ATTR, TO_UDINT(4130059223), "SDM0811", 

1$UINT, TO_UDINT(2796855937), "AI0431\_BASE\SERIALNOSTR", 
1$UINT, TO_UDINT(2011818843), "DM1611\_BASE\SERIALNOSTR", 
1$UINT, TO_UDINT(717217418), "MDD2000_MNG1\BUSIFVVMDD20001\_BASE\_BASE\SERIALNOSTR", 
1$UINT, TO_UDINT(2599238723), "MDD2000_MNG1\_BASE\DRIVETYPESTR", 
1$UINT, TO_UDINT(133511961), "MDD2000_MNG1\_BASE\FWNUMSTRING", 
1$UINT, TO_UDINT(3775002051), "MDD2000_MNG1\_BASE\FWSAFENUMSTRING", 
1$UINT, TO_UDINT(1434652703), "MDD2000_MNG1\_BASE\HWNUMSTRING", 
1$UINT, TO_UDINT(2374057754), "SCP1111\SDIASSAFETYMANAGERFSOE1\PROJECTNAMESTR", 
1$UINT, TO_UDINT(1036056145), "SCP1111\SDIASSAFETYMANAGERFSOE1\PROJECTREVISIONSTR", 
1$UINT, TO_UDINT(1786784291), "SCP1111\_BASE\_BASE\SERIALNOSTR", 
1$UINT, TO_UDINT(802639168), "SDM0811\_BASE\SERIALNOSTR", 




_NO_ATTR, TO_UDINT(2395414379), "VARANMANAGER_11", 




//Internal connections
0$UDINT,
54$UDINT,
TO_UDINT(5), "SerialNoStr", TO_UDINT(54),
TO_UDINT(7), "SerialNoStr", TO_UDINT(56),
TO_UDINT(7), "SerNoBackup", TO_UDINT(46),
TO_UDINT(7), "MDD2000VVBase1", TO_UDINT(27),
TO_UDINT(8), "_SerLib1", TO_UDINT(2),
TO_UDINT(8), "_SerLib2", TO_UDINT(3),
TO_UDINT(8), "_CanLib1", TO_UDINT(0),
TO_UDINT(8), "_CanLib2", TO_UDINT(1),
TO_UDINT(8), "_SerLib3", TO_UDINT(4),
TO_UDINT(11), "SerialNoStr", TO_UDINT(55),
TO_UDINT(15), "SafetyManager", TO_UDINT(47),
TO_UDINT(15), "HWRtPostScan", TO_UDINT(16),
TO_UDINT(15), "HwcLogging", TO_UDINT(14),
TO_UDINT(17), "MerkerEx2", TO_UDINT(31),
TO_UDINT(17), "RAMex2", TO_UDINT(43),
TO_UDINT(17), "SDDAxSet1", TO_UDINT(21),
TO_UDINT(17), "MDD2000GeneralParaDS4021", TO_UDINT(24),
TO_UDINT(18), "MerkerEx2", TO_UDINT(32),
TO_UDINT(18), "RAMex2", TO_UDINT(44),
TO_UDINT(18), "SDDAxSet1", TO_UDINT(22),
TO_UDINT(18), "MDD2000GeneralParaDS4021", TO_UDINT(25),
TO_UDINT(19), "MerkerEx2", TO_UDINT(33),
TO_UDINT(19), "RAMex2", TO_UDINT(45),
TO_UDINT(19), "SDDAxSet1", TO_UDINT(23),
TO_UDINT(19), "MDD2000GeneralParaDS4021", TO_UDINT(26),
TO_UDINT(20), "DriveTypeStr", TO_UDINT(57),
TO_UDINT(20), "FwNumString", TO_UDINT(58),
TO_UDINT(20), "FwSafeNumString", TO_UDINT(59),
TO_UDINT(20), "HWNumString", TO_UDINT(60),
TO_UDINT(20), "BusIFVVMDD20001", TO_UDINT(7),
TO_UDINT(20), "Hub_Base2", TO_UDINT(12),
TO_UDINT(20), "MDD2000VVSafetyBase1", TO_UDINT(28),
TO_UDINT(47), "UdpSendData", TO_UDINT(10),
TO_UDINT(47), "UdpReceiveData", TO_UDINT(9),
TO_UDINT(48), "SerialNoStr", TO_UDINT(63),
TO_UDINT(48), "SdiasSafetyManagerFSoE1", TO_UDINT(52),
TO_UDINT(51), "SdiasManager1", TO_UDINT(50),
TO_UDINT(51), "SdiasHubBase1", TO_UDINT(49),
TO_UDINT(52), "ProjectNameStr", TO_UDINT(61),
TO_UDINT(52), "ProjectRevisionStr", TO_UDINT(62),
TO_UDINT(53), "SerialNoStr", TO_UDINT(64),
TO_UDINT(54), "MerkerEx0", TO_UDINT(29),
TO_UDINT(55), "MerkerEx0", TO_UDINT(30),
TO_UDINT(56), "MerkerEx0", TO_UDINT(34),
TO_UDINT(57), "MerkerEx0", TO_UDINT(35),
TO_UDINT(58), "MerkerEx0", TO_UDINT(36),
TO_UDINT(59), "MerkerEx0", TO_UDINT(37),
TO_UDINT(60), "MerkerEx0", TO_UDINT(38),
TO_UDINT(61), "MerkerEx0", TO_UDINT(39),
TO_UDINT(62), "MerkerEx0", TO_UDINT(40),
TO_UDINT(63), "MerkerEx0", TO_UDINT(41),
TO_UDINT(64), "MerkerEx0", TO_UDINT(42),
TO_UDINT(65), "ASCII_BIN1", TO_UDINT(6),
TO_UDINT(65), "Hub_Base_Root0", TO_UDINT(13),
0$UDINT,
49$UDINT,
TO_UDINT(5), "SdiasIn", TO_UDINT(49), "ClassSvr",
TO_UDINT(8), "To_HwControl", TO_UDINT(15), "Control",
TO_UDINT(11), "SdiasIn", TO_UDINT(49), "ClassSvr",
TO_UDINT(12), "VaranIn", TO_UDINT(7), "State",
TO_UDINT(13), "VaranConnect", TO_UDINT(65), "Control",
TO_UDINT(16), "toHwControlBase", TO_UDINT(15), "Control",
TO_UDINT(17), "DriveMng", TO_UDINT(20), "CmdState",
TO_UDINT(17), "DriveAxisSet", TO_UDINT(21), "Server0",
TO_UDINT(17), "MDD2000GeneralPara", TO_UDINT(24), "State",
TO_UDINT(18), "DriveMng", TO_UDINT(20), "CmdState",
TO_UDINT(18), "DriveAxisSet", TO_UDINT(22), "Server0",
TO_UDINT(18), "MDD2000GeneralPara", TO_UDINT(25), "State",
TO_UDINT(19), "DriveMng", TO_UDINT(20), "CmdState",
TO_UDINT(19), "DriveAxisSet", TO_UDINT(23), "Server0",
TO_UDINT(19), "MDD2000GeneralPara", TO_UDINT(26), "State",
TO_UDINT(20), "cOnline", TO_UDINT(7), "Online",
TO_UDINT(20), "ToBusIF", TO_UDINT(27), "DriveBusIF",
TO_UDINT(20), "toSafetyRunState", TO_UDINT(27), "SafetyRunState",
TO_UDINT(20), "VaranIn", TO_UDINT(13), "Control",
TO_UDINT(21), "coMerkerEx", TO_UDINT(31), "m_udLength",
TO_UDINT(21), "coRamEx", TO_UDINT(43), "m_udLength",
TO_UDINT(22), "coMerkerEx", TO_UDINT(32), "m_udLength",
TO_UDINT(22), "coRamEx", TO_UDINT(44), "m_udLength",
TO_UDINT(23), "coMerkerEx", TO_UDINT(33), "m_udLength",
TO_UDINT(23), "coRamEx", TO_UDINT(45), "m_udLength",
TO_UDINT(24), "DriveIF", TO_UDINT(17), "CmdState",
TO_UDINT(25), "DriveIF", TO_UDINT(18), "CmdState",
TO_UDINT(26), "DriveIF", TO_UDINT(19), "CmdState",
TO_UDINT(27), "ToBusInterface", TO_UDINT(7), "CallCommand",
TO_UDINT(28), "ToBusInterface", TO_UDINT(27), "CallCommandFSoE",
TO_UDINT(47), "To_HwControl", TO_UDINT(15), "Control",
TO_UDINT(48), "SdiasIn", TO_UDINT(49), "ClassSvr",
TO_UDINT(49), "ToNextSDIAS", TO_UDINT(50), "ClassState",
TO_UDINT(50), "ToBusInterface", TO_UDINT(51), "CallCommand",
TO_UDINT(51), "ToHwControl", TO_UDINT(15), "Control",
TO_UDINT(52), "ToBusInterface", TO_UDINT(48), "CallCommand",
TO_UDINT(53), "SdiasSafetyIn", TO_UDINT(52), "SdiasSafetyOut",
TO_UDINT(54), "DataBuffer", TO_UDINT(29), "m_udLength",
TO_UDINT(55), "DataBuffer", TO_UDINT(30), "m_udLength",
TO_UDINT(56), "DataBuffer", TO_UDINT(34), "m_udLength",
TO_UDINT(57), "DataBuffer", TO_UDINT(35), "m_udLength",
TO_UDINT(58), "DataBuffer", TO_UDINT(36), "m_udLength",
TO_UDINT(59), "DataBuffer", TO_UDINT(37), "m_udLength",
TO_UDINT(60), "DataBuffer", TO_UDINT(38), "m_udLength",
TO_UDINT(61), "DataBuffer", TO_UDINT(39), "m_udLength",
TO_UDINT(62), "DataBuffer", TO_UDINT(40), "m_udLength",
TO_UDINT(63), "DataBuffer", TO_UDINT(41), "m_udLength",
TO_UDINT(64), "DataBuffer", TO_UDINT(42), "m_udLength",
TO_UDINT(65), "To_HwControl", TO_UDINT(15), "Control",

//Initialization values
0$UDINT,
107$UDINT,
TO_UDINT(0), "CanBus", TO_UDINT(1),//|HW_Network._base\CP112_IOs1\_CanLib1.CanBus;
TO_UDINT(1), "CanBus", TO_UDINT(2),//|HW_Network._base\CP112_IOs1\_CanLib2.CanBus;
TO_UDINT(2), "Com", TO_UDINT(1),//|HW_Network._base\CP112_IOs1\_SerLib1.Com;
TO_UDINT(3), "Com", TO_UDINT(2),//|HW_Network._base\CP112_IOs1\_SerLib2.Com;
TO_UDINT(4), "Com", TO_UDINT(3),//|HW_Network._base\CP112_IOs1\_SerLib3.Com;
TO_UDINT(5), "LEDControl", TO_UDINT(0),//|HW_Network.AI0431.LEDControl;
TO_UDINT(5), "Place", TO_UDINT(1),//|HW_Network.AI0431.Place;
TO_UDINT(5), "Required", TO_UDINT(1),//|HW_Network.AI0431.Required;
TO_UDINT(5), "AI1_Active", TO_UDINT(1),//|HW_Network.AI0431.AI1_Active;
TO_UDINT(5), "AI2_Active", TO_UDINT(1),//|HW_Network.AI0431.AI2_Active;
TO_UDINT(5), "AI3_Active", TO_UDINT(1),//|HW_Network.AI0431.AI3_Active;
TO_UDINT(5), "AI4_Active", TO_UDINT(1),//|HW_Network.AI0431.AI4_Active;
TO_UDINT(7), "Required", TO_UDINT(1),//|HW_Network.MDD2000_Mng1\BusIFVVMDD20001.Required;
TO_UDINT(7), "Transparent", TO_UDINT(0),//|HW_Network.MDD2000_Mng1\BusIFVVMDD20001.Transparent;
TO_UDINT(7), "TimeBase", TO_UDINT(0),//|HW_Network.MDD2000_Mng1\BusIFVVMDD20001.TimeBase;
TO_UDINT(7), "TimeBaseOffset", TO_UDINT(0),//|HW_Network.MDD2000_Mng1\BusIFVVMDD20001.TimeBaseOffset;
TO_UDINT(7), "DriveDeviceID", TO_UDINT(DRIVEMNG_BUSDEVICEID_MDD2000),//|HW_Network.MDD2000_Mng1\BusIFVVMDD20001.DriveDeviceID;
TO_UDINT(7), "TimeMultiplier", TO_UDINT(1),//|HW_Network.MDD2000_Mng1\BusIFVVMDD20001.TimeMultiplier;
TO_UDINT(11), "LEDControl", TO_UDINT(0),//|HW_Network.DM1611.LEDControl;
TO_UDINT(11), "Place", TO_UDINT(0),//|HW_Network.DM1611.Place;
TO_UDINT(11), "Required", TO_UDINT(1),//|HW_Network.DM1611.Required;
TO_UDINT(12), "Splitter_Place", TO_UDINT(0),//|HW_Network.MDD2000_Mng1\Hub_Base2.Splitter_Place;
TO_UDINT(13), "Splitter_Place", TO_UDINT(0),//|HW_Network.VaranManager_11\Hub_Base_Root0.Splitter_Place;
TO_UDINT(15), "UdpSafetyPort", TO_UDINT(10823),//|HW_Network.HwControl1.UdpSafetyPort;
TO_UDINT(15), "InterfaceNo", TO_UDINT(1),//|HW_Network.HwControl1.InterfaceNo;
TO_UDINT(15), "RtTaskSync", TO_UDINT(0),//|HW_Network.HwControl1.RtTaskSync;
TO_UDINT(17), "AxisNo", TO_UDINT(1),//|HW_Network.MDD2000_Axis1.AxisNo;
TO_UDINT(17), "EncoderBufferSize", TO_UDINT(0),//|HW_Network.MDD2000_Axis1.EncoderBufferSize;
TO_UDINT(17), "ParaSaveType", TO_UDINT(1),//|HW_Network.MDD2000_Axis1.ParaSaveType;
TO_UDINT(17), "OverwriteMotorPara", TO_UDINT(1),//|HW_Network.MDD2000_Axis1.OverwriteMotorPara;
TO_UDINT(18), "AxisNo", TO_UDINT(2),//|HW_Network.MDD2000_Axis2.AxisNo;
TO_UDINT(18), "EncoderBufferSize", TO_UDINT(0),//|HW_Network.MDD2000_Axis2.EncoderBufferSize;
TO_UDINT(18), "ParaSaveType", TO_UDINT(1),//|HW_Network.MDD2000_Axis2.ParaSaveType;
TO_UDINT(18), "OverwriteMotorPara", TO_UDINT(0),//|HW_Network.MDD2000_Axis2.OverwriteMotorPara;
TO_UDINT(19), "AxisNo", TO_UDINT(3),//|HW_Network.MDD2000_Axis3.AxisNo;
TO_UDINT(19), "EncoderBufferSize", TO_UDINT(0),//|HW_Network.MDD2000_Axis3.EncoderBufferSize;
TO_UDINT(19), "ParaSaveType", TO_UDINT(1),//|HW_Network.MDD2000_Axis3.ParaSaveType;
TO_UDINT(19), "OverwriteMotorPara", TO_UDINT(0),//|HW_Network.MDD2000_Axis3.OverwriteMotorPara;
TO_UDINT(20), "Required", TO_UDINT(1),//|HW_Network.MDD2000_Mng1.Required;
TO_UDINT(20), "Transparent", TO_UDINT(0),//|HW_Network.MDD2000_Mng1.Transparent;
TO_UDINT(20), "TimeMultiplier", TO_UDINT(1),//|HW_Network.MDD2000_Mng1.TimeMultiplier;
TO_UDINT(21), "ParaSaveType", TO_UDINT(1),//|HW_Network.MDD2000_Axis1\SDDAxSet1.ParaSaveType;
TO_UDINT(21), "OverwriteMotorPara", TO_UDINT(1),//|HW_Network.MDD2000_Axis1\SDDAxSet1.OverwriteMotorPara;
TO_UDINT(22), "ParaSaveType", TO_UDINT(1),//|HW_Network.MDD2000_Axis2\SDDAxSet1.ParaSaveType;
TO_UDINT(22), "OverwriteMotorPara", TO_UDINT(0),//|HW_Network.MDD2000_Axis2\SDDAxSet1.OverwriteMotorPara;
TO_UDINT(23), "ParaSaveType", TO_UDINT(1),//|HW_Network.MDD2000_Axis3\SDDAxSet1.ParaSaveType;
TO_UDINT(23), "OverwriteMotorPara", TO_UDINT(0),//|HW_Network.MDD2000_Axis3\SDDAxSet1.OverwriteMotorPara;
TO_UDINT(24), "UpdateCyTime", TO_UDINT(0),//|HW_Network.MDD2000_Axis1\MDD2000GeneralParaDS4021.UpdateCyTime;
TO_UDINT(25), "UpdateCyTime", TO_UDINT(0),//|HW_Network.MDD2000_Axis2\MDD2000GeneralParaDS4021.UpdateCyTime;
TO_UDINT(26), "UpdateCyTime", TO_UDINT(0),//|HW_Network.MDD2000_Axis3\MDD2000GeneralParaDS4021.UpdateCyTime;
TO_UDINT(27), "DeviceID", TO_UDINT(DRIVEMNG_BUSDEVICEID_MDD2000),//|HW_Network.BusIFVVMDD20001\MDD2000_Mng1\MDD2000VVBase1.DeviceID;
TO_UDINT(27), "TimeMultiplier", TO_UDINT(1),//|HW_Network.BusIFVVMDD20001\MDD2000_Mng1\MDD2000VVBase1.TimeMultiplier;
TO_UDINT(29), "ThreadSafe", TO_UDINT(0),//|HW_Network.SerialNoStr\_base\AI0431\MerkerEx0.ThreadSafe;
TO_UDINT(30), "ThreadSafe", TO_UDINT(0),//|HW_Network.SerialNoStr\_base\DM1611\MerkerEx0.ThreadSafe;
TO_UDINT(31), "ThreadSafe", TO_UDINT(0),//|HW_Network.MDD2000_Axis1\MerkerEx2.ThreadSafe;
TO_UDINT(32), "ThreadSafe", TO_UDINT(0),//|HW_Network.MDD2000_Axis2\MerkerEx2.ThreadSafe;
TO_UDINT(33), "ThreadSafe", TO_UDINT(0),//|HW_Network.MDD2000_Axis3\MerkerEx2.ThreadSafe;
TO_UDINT(34), "ThreadSafe", TO_UDINT(0),//|HW_Network.SerialNoStr\_base\_base\BusIFVVMDD20001\MDD2000_Mng1\MerkerEx0.ThreadSafe;
TO_UDINT(35), "ThreadSafe", TO_UDINT(0),//|HW_Network.DriveTypeStr\_base\MDD2000_Mng1\MerkerEx0.ThreadSafe;
TO_UDINT(36), "ThreadSafe", TO_UDINT(0),//|HW_Network.FwNumString\_base\MDD2000_Mng1\MerkerEx0.ThreadSafe;
TO_UDINT(37), "ThreadSafe", TO_UDINT(0),//|HW_Network.FwSafeNumString\_base\MDD2000_Mng1\MerkerEx0.ThreadSafe;
TO_UDINT(38), "ThreadSafe", TO_UDINT(0),//|HW_Network.HWNumString\_base\MDD2000_Mng1\MerkerEx0.ThreadSafe;
TO_UDINT(39), "ThreadSafe", TO_UDINT(0),//|HW_Network.ProjectNameStr\SdiasSafetyManagerFSoE1\SCP1111\MerkerEx0.ThreadSafe;
TO_UDINT(40), "ThreadSafe", TO_UDINT(0),//|HW_Network.ProjectRevisionStr\SdiasSafetyManagerFSoE1\SCP1111\MerkerEx0.ThreadSafe;
TO_UDINT(41), "ThreadSafe", TO_UDINT(0),//|HW_Network.SerialNoStr\_base\_base\SCP1111\MerkerEx0.ThreadSafe;
TO_UDINT(42), "ThreadSafe", TO_UDINT(0),//|HW_Network.SerialNoStr\_base\SDM0811\MerkerEx0.ThreadSafe;
TO_UDINT(43), "ThreadSafe", TO_UDINT(0),//|HW_Network.MDD2000_Axis1\RAMex2.ThreadSafe;
TO_UDINT(44), "ThreadSafe", TO_UDINT(0),//|HW_Network.MDD2000_Axis2\RAMex2.ThreadSafe;
TO_UDINT(45), "ThreadSafe", TO_UDINT(0),//|HW_Network.MDD2000_Axis3\RAMex2.ThreadSafe;
TO_UDINT(46), "Setup", TO_UDINT(2#1101),//|HW_Network._base\_base\BusIFVVMDD20001\MDD2000_Mng1\SerNoBackup.Setup;
TO_UDINT(47), "UdpSafetyPort", TO_UDINT(10823),//|HW_Network.HwControl1\SafetyManager.UdpSafetyPort;
TO_UDINT(47), "InterfaceNo", TO_UDINT(1),//|HW_Network.HwControl1\SafetyManager.InterfaceNo;
TO_UDINT(47), "UdpSafetyRequestCycle", TO_UDINT(UDP_MIN_REQUEST_TIME),//|HW_Network.HwControl1\SafetyManager.UdpSafetyRequestCycle;
TO_UDINT(47), "UdpSafetyResponseTimeout", TO_UDINT(UDP_MIN_RESPONSE_TIMEOUT),//|HW_Network.HwControl1\SafetyManager.UdpSafetyResponseTimeout;
TO_UDINT(48), "LEDControl", TO_UDINT(0),//|HW_Network.SCP1111.LEDControl;
TO_UDINT(48), "Place", TO_UDINT(2),//|HW_Network.SCP1111.Place;
TO_UDINT(48), "Required", TO_UDINT(1),//|HW_Network.SCP1111.Required;
TO_UDINT(48), "ServerUpdateTime", TO_UDINT(50),//|HW_Network.SCP1111.ServerUpdateTime;
TO_UDINT(49), "SplitterPlace", TO_UDINT(0),//|HW_Network.SdiasPLC1\SdiasHubBase1.SplitterPlace;
TO_UDINT(50), "DeviceID", TO_UDINT(0),//|HW_Network.SdiasPLC1\SdiasManager1.DeviceID;
TO_UDINT(50), "AutoFarMem", TO_UDINT(0),//|HW_Network.SdiasPLC1\SdiasManager1.AutoFarMem;
TO_UDINT(51), "CycleTime", TO_UDINT(1000),//|HW_Network.SdiasPLC1.CycleTime;
TO_UDINT(51), "IsoStartPoint", TO_UDINT(50),//|HW_Network.SdiasPLC1.IsoStartPoint;
TO_UDINT(51), "AutoFarMem", TO_UDINT(0),//|HW_Network.SdiasPLC1.AutoFarMem;
TO_UDINT(52), "ServerUpdateTime", TO_UDINT(50),//|HW_Network.SCP1111\SdiasSafetyManagerFSoE1.ServerUpdateTime;
TO_UDINT(52), "DeviceID", TO_UDINT(SCP111_DEVICE_ID),//|HW_Network.SCP1111\SdiasSafetyManagerFSoE1.DeviceID;
TO_UDINT(53), "Place", TO_UDINT(0),//|HW_Network.SDM0811.Place;
TO_UDINT(53), "Required", TO_UDINT(1),//|HW_Network.SDM0811.Required;
TO_UDINT(53), "SetDeviceID", TO_UDINT(2#101001),//|HW_Network.SDM0811.SetDeviceID;
TO_UDINT(53), "InputsNeeded", TO_UDINT(6),//|HW_Network.SDM0811.InputsNeeded;
TO_UDINT(53), "OutputsNeeded", TO_UDINT(2),//|HW_Network.SDM0811.OutputsNeeded;
TO_UDINT(54), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\AI0431\SerialNoStr.SingleRealloc;
TO_UDINT(55), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\DM1611\SerialNoStr.SingleRealloc;
TO_UDINT(56), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\_base\BusIFVVMDD20001\MDD2000_Mng1\SerialNoStr.SingleRealloc;
TO_UDINT(57), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\MDD2000_Mng1\DriveTypeStr.SingleRealloc;
TO_UDINT(58), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\MDD2000_Mng1\FwNumString.SingleRealloc;
TO_UDINT(59), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\MDD2000_Mng1\FwSafeNumString.SingleRealloc;
TO_UDINT(60), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\MDD2000_Mng1\HWNumString.SingleRealloc;
TO_UDINT(61), "SingleRealloc", TO_UDINT(1),//|HW_Network.SdiasSafetyManagerFSoE1\SCP1111\ProjectNameStr.SingleRealloc;
TO_UDINT(62), "SingleRealloc", TO_UDINT(1),//|HW_Network.SdiasSafetyManagerFSoE1\SCP1111\ProjectRevisionStr.SingleRealloc;
TO_UDINT(63), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\_base\SCP1111\SerialNoStr.SingleRealloc;
TO_UDINT(64), "SingleRealloc", TO_UDINT(1),//|HW_Network._base\SDM0811\SerialNoStr.SingleRealloc;
TO_UDINT(65), "VaranManagerTime", TO_UDINT(1000000),//|HW_Network.VaranManager_11.VaranManagerTime;
TO_UDINT(65), "VaranManagerNr", TO_UDINT(0),//|HW_Network.VaranManager_11.VaranManagerNr;
TO_UDINT(65), "PayloadFrame", TO_UDINT(0),//|HW_Network.VaranManager_11.PayloadFrame;
TO_UDINT(65), "CoreSelect", TO_UDINT(0),//|HW_Network.VaranManager_11.CoreSelect;
TO_UDINT(65), "InterframeGap", TO_UDINT(0),//|HW_Network.VaranManager_11.InterframeGap;

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

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

//Configuration of tasks (RealTime, Cyclic, Background)
0$UDINT,
1$UDINT,
TO_UDINT(16), (1)$UDINT, 4194304$DINT, 	//HWCONTROL1\HWRTPOSTSCAN

0$UDINT,
1$UDINT,
TO_UDINT(20), (10)$UDINT, 4194303$DINT, 	//MDD2000_MNG1

0$UDINT,
1$UDINT,
TO_UDINT(52), (100)$UDINT, 4194303$DINT, 	//SCP1111\SDIASSAFETYMANAGERFSOE1

//External connections
0$UDINT,
0$UDINT,

//Magic internal connections
0$UDINT,
29$UDINT,
TO_UDINT(7), "VaranIn", TO_UDINT(20), "VaranIn",
TO_UDINT(7), "Required", TO_UDINT(20), "Required",
TO_UDINT(7), "UserAction", TO_UDINT(20), "UserAction",
TO_UDINT(7), "SerNoValidation", TO_UDINT(20), "SerNoValidation",
TO_UDINT(7), "Transparent", TO_UDINT(20), "Transparent",
TO_UDINT(7), "TimeMultiplier", TO_UDINT(20), "TimeMultiplier",
TO_UDINT(21), "ParaSaveType", TO_UDINT(17), "ParaSaveType",
TO_UDINT(21), "OverwriteMotorPara", TO_UDINT(17), "OverwriteMotorPara",
TO_UDINT(21), "ParaTab", TO_UDINT(17), "ParaTab",
TO_UDINT(21), "FileHandle", TO_UDINT(17), "FileHandle",
TO_UDINT(21), "TableIndex", TO_UDINT(17), "TableIndex",
TO_UDINT(22), "ParaSaveType", TO_UDINT(18), "ParaSaveType",
TO_UDINT(22), "OverwriteMotorPara", TO_UDINT(18), "OverwriteMotorPara",
TO_UDINT(22), "ParaTab", TO_UDINT(18), "ParaTab",
TO_UDINT(22), "FileHandle", TO_UDINT(18), "FileHandle",
TO_UDINT(22), "TableIndex", TO_UDINT(18), "TableIndex",
TO_UDINT(23), "ParaSaveType", TO_UDINT(19), "ParaSaveType",
TO_UDINT(23), "OverwriteMotorPara", TO_UDINT(19), "OverwriteMotorPara",
TO_UDINT(23), "ParaTab", TO_UDINT(19), "ParaTab",
TO_UDINT(23), "FileHandle", TO_UDINT(19), "FileHandle",
TO_UDINT(23), "TableIndex", TO_UDINT(19), "TableIndex",
TO_UDINT(27), "toVaranIn", TO_UDINT(7), "VaranIn",
TO_UDINT(27), "DeviceID", TO_UDINT(7), "DriveDeviceID",
TO_UDINT(27), "TimeMultiplier", TO_UDINT(7), "TimeMultiplier",
TO_UDINT(47), "UdpSafetyPort", TO_UDINT(15), "UdpSafetyPort",
TO_UDINT(47), "InterfaceNo", TO_UDINT(15), "InterfaceNo",
TO_UDINT(47), "SafetyDomainTimeout", TO_UDINT(15), "SafetyDomainTimeout",
TO_UDINT(50), "AutoFarMem", TO_UDINT(51), "AutoFarMem",
TO_UDINT(52), "ServerUpdateTime", TO_UDINT(48), "ServerUpdateTime",

//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,
1$UDINT,
(0)$UDINT, 	//HWCONTROL1\HWRTPOSTSCAN

0$UDINT,
1$UDINT,
(0)$UDINT, 	//MDD2000_MNG1

0$UDINT,
1$UDINT,
(0)$UDINT, 	//SCP1111\SDIASSAFETYMANAGERFSOE1

#endif //__LSLLDR_TASKID__

END_FUNCTION