CoDeSys+ @@2.3.10.0@?@N +@G}CƖ@ uC:\TWINCAT\PLC\LIB\TcTestAndSet.lib@ TESTANDSET TestAndSetFlag  Flag to check if TRUE or FALSE NpC:\TWINCAT\PLC\LIB\TcDrive.lib@F_CONVWORDTOSTAX5000C1D stAX5000C1D  ST_AX5000_C1D wClass1DiagF_ConvWordToSTAX5000C1D  ST_AX5000_C1DN F_CONVWORDTOSTAX5000DRIVESTATUS stDriveStatus ST_AX5000DriveStatus iOpModeSelect wDriveStatusF_ConvWordToSTAX5000DriveStatus ST_AX5000DriveStatusN F_CONVWORDTOSTINDRADRIVECSC1DstIndraDriveCsC1D ST_IndraDriveCs_C1D wClass1DiagF_ConvWordToSTIndraDriveCsC1D ST_IndraDriveCs_C1DN %F_CONVWORDTOSTINDRADRIVECSDRIVESTATUS stDriveStatus ST_IndraDriveCsDriveStatus iOpModeSelect wDriveStatus%F_ConvWordToSTIndraDriveCsDriveStatus ST_IndraDriveCsDriveStatusN F_GETVERSIONTCDRIVEnVersionElementF_GetVersionTcDriveN %FB_SOEAX5000FIRMWAREUPDATE_BYDRIVEREF:iState`" bExecute_I`#iErrId`$I`%iNextUpdateIdx`& iCurUpdateIdx`'bUpdateViaOtherChn`(sConfiguredType`*( type of slave, e.g. "AX5206-0000-0009" sScannedType`+( type of slave, e.g. "AX5206-0000-0010" sConfiguredFirmwareFile`,i configured firmware file, e.g. "AX5yxx_xxxx_0010_v1_05_b0003.efw" or "AX5021_xxxx_0009_v1_04_b0002.efw" sScannedFirmwareFile`-f scanned firmware file, e.g. "AX5yxx_xxxx_0010_v1_05_b0003.efw" or "AX5021_xxxx_0009_v1_04_b0002.efw" fbEcGetSlaveIdentity FB_EcGetSlaveIdentity`0 stIdentity ST_EcSlaveIdentity`1+Slave identity of the EtherCAT slave devie.fbEcGetSlaveCount FB_EcGetSlaveCount`4 nTotalSlaves`5 3. fbAdsRead ADSREAD`8 nSlavesRead`9 nBlockIndex`:nSlaves`; 4. fbCoERead FB_EcCoESdoReadEx`> nSlaveArr `? iSlaveIndex`@iSlaveBlockIndex`AbPositionFound`B 6. fbAdsWrite ADSWRITE`E stScanStatus ST_EcScannedSlaveStatus`FnIdxOffs`G nScanCommand`H stLocalInfo ST_EcSlaveScannedData`I 9. fbEcGetSlaveState FB_EcGetSlaveState`L iSlaveState`M 10. fbGetSwSoE FB_SoERead_ByDriveRef`P stSoEValue  ST_SoE_String`QsScannedFirmwareVersionQQ`R` scanned firmware version, e.g. "Firmware: v1.05 (Build 0009) / Bootloader: v1.02 (Build 0001)" sScannedVBString`S; extracted from scanned firmware version, e.g. v1_05_b0009 sTemp`TiStrPosV`U iStrPosDot`V iStrPosBuild`W 11. fbFindFiles FB_EnumFindFileEntry`Z stFindFile ST_FindFileEntry`[ Find file entry eCmd  eEnumCmd_First E_EnumCmdType`\ Enumerator navigation command bNoMoreFiles`]sFoundFirmwareFile`^> found firmware file, e.g. "AX5yxx_xxxx_0010_v1_05_b0003.efw" iFilesFound`_bUseLatestBuild`` 13. DelayTimer  (PT := T#3s) TON`c 14. fbEcFoeLoad # FB_EcFoeLoad`fsFoEInfoQQ`g iFindStrPos`h iByteArr4 `i 16. fbEcReqSlaveState FB_EcReqSlaveState`l iNoReplyCnt`mnSDO_IDX_SBP_SLAVEINFODATASTART`pnSDO_IDX_SBP_SCANCOMMANDSTART`qnSDO_IDX_SBP_SCANNEDSLAVES@`r!nADSIOFFS_ECAT_COE_COMPLETEACCESS`snSDO_IDX_SBP_CONFIGUREDSLAVES `t stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. sFirmwareVersion version string vx_yy_bnnnn, "v1.05_b0009" for specific build: v1.05 Build 0009, "v1.05_b00??" for specific version v1.05 latest release build, "v1.??_b00??" for latest v1.xx version latest release build "v?.??_b00??", "" for latest version latest release build "v1.05_b10??" - "v1_05_b89??" for specific version v1.05 latest customer specific build, "v1.05_b90??" for specific version v1.05 latest debug build, sFirmwarePath  T_MaxString? drive:\path, e.g. "C:\TwinCAT\Io\TcDriveManager\FirmwarePool" sNetIdIPC  T_AmsNetId iReqEcStatebBusybError iAdsErrId iSercosErrId iDiagNumbereFwUpdateState E_FwUpdateState iLoadProgresssSelectedFirmwareFile> found firmware file, e.g. "AX5yxx_xxxx_0010_v1_05_b0009.efw" N )FB_SOEAX5000READACTMAINVOLTAGE_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId`iActualMainVoltage`uiActualMainVoltage`dwData `cbBufLen`3 Contains the max. number of bytes to be received. nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId dwAttribute fActualMainVoltage N 'FB_SOEAX5000SETMOTORCTRLWORD_BYDRIVEREF fbEcSoEWrite  FB_EcSoEWrite`iState` bExecute_I`iMotorCtrlWord`iErrId` stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bForceLock bForceUnlockbBusy bError iAdsErrId iSercosErrId N FB_SOEEXECUTECOMMAND_BYDRIVEREF fbEcSoEWrite  FB_EcSoEWrite`iErrId`iState` bExecute_I` eExecuteCmd  eSoE_CmdControl_SetAndEnableE_SoE_CmdControl` eCancelCmd  eSoE_CmdControl_CancelE_SoE_CmdControl` stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC nIdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError iAdsErrId iSercosErrId N )FB_SOEREADAMPLIFIERTEMPERATURE_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId`iAmplifierTemperature`uiAmplifierTemperature`dwData `nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId dwAttribute fAmplifierTemperature N FB_SOEREADCLASSXDIAG_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId`dwData ` iSParamNum`nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input. iDiagClassD 1: C1D (S-0-0011) is default, 2: C2D (S-0-0012), 3: C3D (S-0-0013) tTimeout3 States the time before the function is cancelled. bBusy bError iAdsErrId iSercosErrId dwAttribute wClassXDiagN !FB_SOEREADCOMMANDSTATE_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId`dwData ` stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC nIdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError eCmdState E_SoE_CmdState iAdsErrId iSercosErrIdN !FB_SOEREADDCBUSCURRENT_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId` iDcBusCurrent`uiDcBusCurrent`dwData `nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId dwAttribute fDcBusCurrent N !FB_SOEREADDCBUSVOLTAGE_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId` iDcBusVoltage`uiDcBusVoltage`dwData `nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId dwAttribute fDcBusVoltage N FB_SOEREADDIAGMESSAGE_BYDRIVEREF fbEcSoERead  FB_EcSoERead`sDiagMessageEx ST_SoE_StringEx`iState` bExecute_I`iErrId`dwData `nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId dwAttribute sDiagMessage  ST_SoE_String N FB_SOEREADDIAGNUMBER_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId`dwData `nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId dwAttribute iDiagNumber N #FB_SOEREADDIAGNUMBERLIST_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`I`iErrId` stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. piDiagNumber ST_SoE_DiagNumListiSizebBusy bError iAdsErrId iSercosErrId dwAttributeN %FB_SOEREADMOTORTEMPERATURE_BYDRIVEREF fbEcSoERead  FB_EcSoERead`iState` bExecute_I`iErrId`dwData `iMotorTemperature`uiMotorTemperature`nFactor` bits 0..15 eLength E_SoE_AttribLen` bits 16..18 eType  E_SoE_Type` bits 20..22 nComma` bits 24..27  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId dwAttribute fMotorTemperature N FB_SOERESET_BYDRIVEREFfbEcExecuteCmd FB_SoEExecuteCommand_ByDriveRef`iState` bExecute_I`iReset` stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout'? States the time before the function is cancelled. (up to 10s) bBusybError iAdsErrId iSercosErrId N $FB_SOEWRITECOMMANDCONTROL_BYDRIVEREF fbEcSoEWrite  FB_EcSoEWrite`iErrId`iState` bExecute_I` stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC nIdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023 eCmdControl E_SoE_CmdControlJ eSoE_CmdControl_Cancel, eSoE_CmdControl_Set, eSoE_CmdControl_SetAndEnablebExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError iAdsErrId iSercosErrIdN FB_SOEWRITEPASSWORD_BYDRIVEREF fbEcSoEWrite  FB_EcSoEWrite`iState` bExecute_I`iErrId` stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. sPassword  ST_SoE_StringbBusy bError iAdsErrId iSercosErrId N sC:\TWINCAT\PLC\LIB\TcMc2Drive.lib@F_GETVERSIONTCMC2DRIVEnVersionElementF_GetVersionTcMc2DriveN FB_SOEAX5000FIRMWAREUPDATE fbSoEFirmwareUpdate I%FB_SoEAX5000FirmwareUpdate_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef` h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@`# Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`$sNetId  '' T_AmsNetId netID of PC with NC bExecuteF Function block execution is triggered by a rising edge at this input.sFirmwareVersionD version string vx_yy_bnnnn, e.g. "v1.05_b0009" for v1.05 Build 0009 sFirmwarePath  T_MaxString? drive:\path, e.g. "C:\TwinCAT\Io\TcDriveManager\FirmwarePool" iReqEcStatetTimeout3 States the time before the function is cancelled. bBusybError iAdsErrId iSercosErrId iDiagNumbereFwUpdateState E_FwUpdateState iLoadProgresssSelectedFirmwareFile> found firmware file, e.g. "AX5yxx_xxxx_0010_v1_05_b0009.efw" Axis AXIS_REF  Axis reference N FB_SOEAX5000READACTMAINVOLTAGE fbEcSoEReadActMainVolt )FB_SoEAX5000ReadActMainVoltage_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrId AttributeActualMainVoltageAxis AXIS_REF Axis reference N FB_SOEAX5000SETMOTORCTRLWORD fbEcSoESetMotorCtrlWord 'FB_SoEAX5000SetMotorCtrlWord_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. ForceLock ForceUnlockBusy ErrorAdsErrId SercosErrIdAxis AXIS_REF  Axis reference N FB_SOEEXECUTECOMMAND fbEcSoECommand FB_SoEExecuteCommand_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC IdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrIdAxis AXIS_REF  Axis reference N FB_SOEREAD fbEcSoEReadEx FB_SoERead_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@`! Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`"NetId  '' T_AmsNetId netID of PC with NC IdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023Element SoE element.pDstBuf; Contains the address of the buffer for the received data. BufLen3 Contains the max. number of bytes to be received. ExecuteF Function block execution is triggered by a rising edge at this input.Timeout 3 States the time before the function is cancelled. BusyErrorAdsErrId SercosErrId AttributeAxis AXIS_REF  Axis reference N FB_SOEREADAMPLIFIERTEMPERATURE fbEcSoEReadAmplifierTemp )FB_SoEReadAmplifierTemperature_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrIdAmplifierTemperature AttributeAxis AXIS_REF Axis reference N FB_SOEREADCLASSXDIAG fbSoEReadCXD FB_SoEReadClassXDiag_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1` NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input. DiagClassD 1: C1D (S-0-0011) is default, 2: C2D (S-0-0012), 3: C3D (S-0-0013) Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrId ClassXDiag AttributeAxis AXIS_REF  Axis reference N FB_SOEREADCOMMANDSTATE fbEcSoECmdState !FB_SoEReadCommandState_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC IdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error CmdState E_SoE_CmdStateAdsErrId SercosErrIdAxis AXIS_REF  Axis reference N FB_SOEREADDCBUSCURRENT fbEcSoEReadDcBusCurr !FB_SoEReadDcBusCurrent_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrId DcBusCurrent AttributeAxis AXIS_REF Axis reference N FB_SOEREADDCBUSVOLTAGE fbEcSoEReadDcBusVolt !FB_SoEReadDcBusVoltage_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrId DcBusVoltage AttributeAxis AXIS_REF Axis reference N FB_SOEREADDIAGMESSAGE fbEcSoEReadDiag  FB_SoEReadDiagMessage_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrId DiagMessage  ST_SoE_String AttributeAxis AXIS_REF Axis reference N FB_SOEREADDIAGNUMBER fbEcSoEReadDiag FB_SoEReadDiagNumber_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrId DiagNumber AttributeAxis AXIS_REF Axis reference N FB_SOEREADDIAGNUMBERLIST fbEcSoEReadDiag #FB_SoEReadDiagNumberList_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1` NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. pDiagNumber ST_SoE_DiagNumListSizeBusy ErrorAdsErrId SercosErrId AttributeAxis AXIS_REF  Axis reference N FB_SOEREADMOTORTEMPERATURE fbEcSoEReadMotorTemp %FB_SoEReadMotorTemperature_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy Error AdsErrId SercosErrIdMotorTemperature AttributeAxis AXIS_REF Axis reference N FB_SOERESET fbEcSoEReset FB_SoEReset_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout'? States the time before the function is cancelled. (up to 10s) Busy Error AdsErrId SercosErrIdAxis AXIS_REF Axis reference N FB_SOEWRITE fbEcSoEWriteEx FB_SoEWrite_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@`! Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`"NetId  '' T_AmsNetId netID of PC with NC IdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023Element SoE element.pSrcBufD Contains the address of the buffer containing the data to be send. BufLen3 Contains the max. number of bytes to be received. ExecuteF Function block execution is triggered by a rising edge at this input.Timeout 3 States the time before the function is cancelled. Password  ST_SoE_String BusyErrorAdsErrId SercosErrIdAxis AXIS_REF  Axis reference N FB_SOEWRITECOMMANDCONTROL fbEcSoECommand $FB_SoEWriteCommandControl_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC IdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023 CmdControl E_SoE_CmdControlJ eSoE_CmdControl_Cancel, eSoE_CmdControl_Set, eSoE_CmdControl_SetAndEnableExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Busy ErrorAdsErrId SercosErrIdAxis AXIS_REF  Axis reference N FB_SOEWRITEPASSWORD fbEcSoEWritePW FB_SoEWritePassword_ByDriveRef`iState` bExecute_I` nAxisId_I` fbAdsRead ADSREAD` readBuffer  `nIds  T_AmsNetIdArr` Ams net id as array of bytes stDriveRef  ST_DriveRef`h contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC NCIDXG_AXPARMS@` Axis with ID: Parameter NCIDXO_AXP_HWAMSADDR1`NetId  '' T_AmsNetId netID of PC with NC ExecuteF Function block execution is triggered by a rising edge at this input.Timeout3 States the time before the function is cancelled. Password  ST_SoE_StringBusy Error AdsErrId SercosErrIdAxis AXIS_REF  Axis reference N nC:\TWINCAT\PLC\LIB\TcMC2.lib@N _F_AXISSTATE _F_AxisState  MC_AxisStatesNcToPlc NCTOPLC_AXIS_REF`PlcToNc PLCTONC_AXIS_REF`N _F_GETINDEXGROUP IndexGroup` IndexOffset` nType _E_ParameterType` lrValue`  ParaNumber`Mode` read/write _F_GetIndexGroup _ST_ParaStructN _F_READSTATUS GetTaskIndex GETCURTASKINDEX` _F_ReadStatus 0 ST_AxisStatusNcToPlc NCTOPLC_AXIS_REF`PlcToNc PLCTONC_AXIS_REF`N _F_TCMC_DWORD_TO_HEXSTRstr1`pstr` i` digit` in`_F_TcMC_DWORD_TO_HEXSTRN _F_TCMC_ROUNDn`value`digits` _F_TcMC_RoundN _FB_MOVEUNIVERSALGENERICiState  STATE_INITIALIZATION_E_TcMC_STATES sStartRequest !_ST_TcNC_UnversalAxisStartRequest sStartResponse "_ST_TcNC_UnversalAxisStartResponse!fbAdsReadWrite  ADSRDWRTEX" ContinousMode# InVelocity$EmptyStartResponse "_ST_TcNC_UnversalAxisStartResponse`(COUNT_R`)CounterCmdNoZero`*CounterCmdNotStarted`+NcCycleCounter`,LastNcCycleCounter`-NcMappingCounter`.NcCycleCounterAvailable`/NcCycleCounterNotAvailable`0NcCyclicFeedbackExpected`1 PlcDebugCode`2a additional information for debugging purposes will be added to debug messages (ActErrorMessage) AxisIsSlave`3 fbTimeOut TON`4 fbOnTrigger R_TRIG`5sTempMsg`6OpMode _ST_TcNc_OperationModes`9 Execute StartTypePosition Velocity Acceleration Deceleration Jerk 6 Direction : MC_Direction := MC_Positive_Direction; BufferMode  MC_BufferModeOptions ST_MoveOptionsReset for internal use only GotoRunState for internal use only Done: Same meaning as InVelocity for continous motion commands BusyActiveCommandAbortedErrorErrorIDCmdNoADSbusyAxis AXIS_REFLastExecutionResult _ST_FunctionBlockResultsN _FB_READWRITEPARAMETER iState  STATE_INITIALIZATION_E_TcMC_STATES` fbAdsRead ADSREAD` fbAdsWrite ADSWRITE`dwValue`lrValue  ` NcBoolValue`bStarted`! stParaStruct _ST_ParaStruct`"n`#i`$ ParaLREAL`( ParaBOOL : INT := 3;Enable`ParameterNumber MC_AxisParameter`Mode` read/write ParameterType`  bool/ not bool Done` Busy`Error`ErrorID`ADSbusy`Axis AXIS_REF` ValueLreal ` ValueDword ` ValueBool `N _FBAXIS_REFNcCycleCounter`PlcToNc PLCTONC_AXIS_REF  NcToPlc NCTOPLC_AXIS_REFADS  ST_AdsAddressStatus 0 ST_AxisStatusN _TCMCGLOBALAxis _ST_NCADS_Axis A IDXGRP and IDXOFFS constants of axis parameter/status/functions Table _ST_NCADS_TableB IDXGRP and IDXOFFS constants of table parameter/status/functions NCPORT_TCNCCAMMING_TABLEFUNCTION timeout tTargetPosTimeOutpT 20050128 KSt - changed from 5 sec to 6 sec to be later than a NC PEH error (5 sec) tADSTimeOutNCTOPLC_FEEDBACK_MAXWAITCYCLES \ maximum number of PLC cycles to wait for a cyclic feedback in NcToPlc after an ADS command  NCPORT_TCMCNCPORT_TCMC_COUPLING6 used with all axis coupling commands - 12.7.2006 KSt NCNETID_TCMC  '' T_AmsNetIdNCPORT_TCMC_CAMNCNETID_TCMC_CAM  '' T_AmsNetIdN F_AXISCAMDATAQUEUED StateDWord F_AxisCamDataQueuedN F_AXISCAMSCALINGPENDING StateDWord F_AxisCamScalingPendingN F_AXISCAMTABLEQUEUED StateDWord F_AxisCamTableQueuedN F_AXISCONTROLLOOPCLOSED StateDWordF_AxisControlLoopClosedN F_AXISEXTERNALLATCHVALID StateDWordF_AxisExternalLatchValidN F_AXISGOTNEWTARGETPOSITION StateDWord F_AxisGotNewTargetPositionN F_AXISHASBEENSTOPPED StateDWordF_AxisHasBeenStoppedN F_AXISHASEXTSETPOINTGEN StateDWordF_AxisHasExtSetPointGenN F_AXISHASJOB StateDWord F_AxisHasJobN F_AXISINERRORSTATE StateDWordF_AxisInErrorStateN F_AXISINPOSITIONWINDOW StateDWordF_AxisInPositionWindowN F_AXISINPROTECTEDMODE StateDWordF_AxisInProtectedModeN F_AXISINPTPMODE StateDWord F_AxisInPTPmodeN F_AXISIODATAISINVALID StateDWordF_AxisIoDataIsInvalidN F_AXISISATTARGETPOSITION StateDWordF_AxisIsAtTargetPositionN F_AXISISCALIBRATED StateDWordF_AxisIsCalibratedN F_AXISISCALIBRATING StateDWordF_AxisIsCalibratingN F_AXISISCOMPENSATING StateDWordF_AxisIsCompensatingN F_AXISISCOUPLED nCoupleStateF_AxisIsCoupledN F_AXISISMOVING StateDWordF_AxisIsMovingN F_AXISISMOVINGBACKWARDS StateDWordF_AxisIsMovingBackwardsN F_AXISISMOVINGENDLESS StateDWordF_AxisIsMovingEndlessN F_AXISISMOVINGFORWARD StateDWordF_AxisIsMovingForwardN F_AXISISNOTMOVING StateDWordF_AxisIsNotMovingN F_AXISISREADY StateDWord F_AxisIsReadyN F_AXISJOBPENDING StateDWord F_AxisJobPendingN F_AXISMOTIONCOMMANDSLOCKED StateDWordF_AxisMotionCommandsLockedN F_AXISREACHEDCONSTANTVELOCITY StateDWordF_AxisReachedConstantVelocityN F_GETVERSION_TCMC2nVersionElementF_GetVersion_TcMC2N MC_ABORTSUPERPOSITIONLastExecutionResult _ST_FunctionBlockResultsADSbusy fbOnTrigger R_TRIG fbADSwrite ADSWRITEiState  STATE_INITIALIZATION_E_TcMC_STATESExecute Starts touch probe recording Done move completed Busy" function block is currently Busy Error6 Signals that error has occured within Function Block ErrorID  Error identification Axis AXIS_REF f Identifies the axis of which the position should be recorded at a defined event at the trigger input N MC_ABORTTRIGGERADSbusy fbADSwrite ADSWRITEOLDADSINTERFACE`A temporary flag to test old and new NC ADS touch probe interface LatchID` fbOnTrigger R_TRIG`Execute  B Done  B Busy E Error B ErrorID E Axis AXIS_REF B TriggerInput  TRIGGER_REF E N MC_EXTSETPOINTGENDISABLEADSbusyDisable ADSWRITERunOnceExecuteDone Busy Error ErrorID Enabled Axis AXIS_REFN MC_EXTSETPOINTGENENABLEADSbusyEnable ADSWRITEsExtSetPointGen _ST_TcNC_SetPosExecutePosition PositionType E_PositionTypeDone Busy Error ErrorIDEnabledAxis AXIS_REFN MC_EXTSETPOINTGENFEED GetTaskIndex GETCURTASKINDEX PositionVelocity Acceleration Direction MC_ExtSetPointGenFeedAxis AXIS_REFN MC_GEARINLastExecutionResult _ST_FunctionBlockResultsADSbusyiState  STATE_INITIALIZATION_E_TcMC_STATES fbAdsWrite ADSWRITEsCouple _ST_TcNC_CoupleSlavefbOptGearInDyn  MC_GearInDyn fbOnTrigger R_TRIG`#TimerStateFeedback TON`$Execute B RatioNumerator?1? % changed from INT (PLCopen) to LREAL RatioDenominator Acceleration  E Deceleration  E Jerk  E BufferMode  MC_BufferMode E Options ST_GearInOptions V InGear B Busy E Active E CommandAborted E Error B ErrorID E Master AXIS_REF B Slave AXIS_REF B N MC_GEARINDYN LastExecutionResult _ST_FunctionBlockResultsADSbusy iState  STATE_INITIALIZATION_E_TcMC_STATES! iSubState" fbAdsWrite ADSWRITE# fbAdsRead ADSREAD$sCouple _ST_TcNC_CoupleSlave%v_max&pa_limit' WasInGear( iAcceleration`,TimerStateFeedback TON`-Enable GearRatio?1.0? Acceleration Deceleration not used Jerk not used BufferMode  MC_BufferMode E Options ST_GearInDynOptions V InGearBusyActiveCommandAbortedErrorErrorIDMaster AXIS_REF Slave AXIS_REF N MC_GEARINMULTIMASTERADSbusy%iState  STATE_INITIALIZATION_E_TcMC_STATES& fbAdsWrite ADSWRITE'sCouple _ST_TcNC_CoupleSlaveMultiMaster( iAcceleration) WasInGear*LastExecutionResult _ST_FunctionBlockResults+TimerStateFeedback TON`/ Enable GearRatio1?1.0? GearRatio2?1.0? GearRatio3?1.0? GearRatio4?1.0? Acceleration Deceleration not used Jerk not used BufferMode  MC_BufferMode E Options ST_GearInMultiMasterOptions V InGearBusyActiveCommandAborted Error!ErrorID"Master1 AXIS_REF Master2 AXIS_REF Master3 AXIS_REF Master4 AXIS_REF Slave AXIS_REFN MC_GEAROUTLastExecutionResult _ST_FunctionBlockResultsADSbusyiState  STATE_INITIALIZATION_E_TcMC_STATES fbAdsWrite ADSWRITE fbOnTrigger R_TRIG`Execute  B Options ST_GearOutOptions  V Done B Busy E Error B ErrorID E Slave AXIS_REF  B N MC_HALTLastExecutionResult _ST_FunctionBlockResults$ADSbusy% MoveGeneric +_FB_MoveUniversalGeneric&CmdNo'Execute B Deceleration E Jerk E BufferMode  MC_BufferMode E Options ST_MoveOptions optional parameters Done B Busy E Active E CommandAborted E Error  B ErrorID! E Axis AXIS_REF B N MC_HOME LastExecutionResult _ST_FunctionBlockResultsADSbusyiState  STATE_INITIALIZATION_E_TcMC_STATES iSubState! fbAdsWriteCmd ADSWRITE"fbAdsWriteRefPos ADSWRITE#fbAdsReadRefPos ADSREAD$ReferenceFlagValue% fbSetPosition MC_SetPosition&NcHomePosition' fbTrigger R_TRIG`+ fbTimeOut TON`,Execute B Position3t<{1.0E3073t<{ HomingMode  MC_HomingMode E BufferMode  MC_BufferMode E Options ST_HomingOptions V bCalibrationCam V Done B Busy E Active E CommandAborted E Error B ErrorID E Axis AXIS_REF  B N MC_JOGstateLastExecutionResult _ST_FunctionBlockResults StateDWordExecuteMoveVelocity` MoveVelocity MC_MoveVelocity`!MoveVelocityOut  ST_McOutputs`" Direction  MC_Direction`# ExecuteHalt`%Halt MC_Halt`&HaltOut  ST_McOutputs`'ExecuteMoveAbsolute`) MoveAbsolute MC_MoveAbsolute`*MoveAbsoluteOut  ST_McOutputs`+ExecuteMoveRelative`- MoveRelative MC_MoveRelative`.MoveRelativeOut  ST_McOutputs`/JogMove +_FB_MoveUniversalGeneric`1LastJogMoveResult _ST_FunctionBlockResults`2ExecuteJogMove`3 StartType _E_TCNC_StartPosType`4 JogMoveOut  ST_McOutputs`5JogEnd`7TargetPosition`8modulo`9 JogForward JogBackwardsMode  E_JogMode Position Velocity Acceleration Deceleration Jerk BufferMode : MC_BufferMode;DoneBusyActiveCommandAbortedErrorErrorIDAxis AXIS_REFN MC_MOVEABSOLUTELastExecutionResult _ST_FunctionBlockResultsADSbusy MoveGeneric +_FB_MoveUniversalGenericCmdNoExecute B Position B Velocity  E Acceleration  E Deceleration  E Jerk  E BufferMode  MC_BufferMode E Options ST_MoveOptions V Done B Busy E Active E CommandAborted E Error B ErrorID E Axis AXIS_REF B N MC_MOVEADDITIVELastExecutionResult _ST_FunctionBlockResults$ADSbusy% MoveGeneric +_FB_MoveUniversalGeneric&CmdNo'Execute B Distance B Velocity E Acceleration E Deceleration E Jerk E BufferMode  MC_BufferMode E Options ST_MoveOptions V Done B Busy E Active E CommandAborted E Error  B ErrorID! E Axis AXIS_REF B N MC_MOVECONTINUOUSABSOLUTELastExecutionResult _ST_FunctionBlockResults'ADSbusy( MoveGeneric +_FB_MoveUniversalGeneric)CmdNo* Execute B Position B Velocity B EndVelocity B Acceleration E Deceleration E Jerk E BufferMode  MC_BufferMode E Options ST_MoveOptions InEndVelocity B Busy  E Active! E CommandAborted" E Error# B ErrorID$ E Axis AXIS_REF B N MC_MOVECONTINUOUSRELATIVELastExecutionResult _ST_FunctionBlockResults'ADSbusy( MoveGeneric +_FB_MoveUniversalGeneric)CmdNo* Execute B Distance B Velocity B EndVelocity B Acceleration E Deceleration E Jerk E BufferMode  MC_BufferMode E Options ST_MoveOptions InEndVelocity B Busy  E Active! E CommandAborted" E Error# B ErrorID$ E Axis AXIS_REF B N MC_MOVEMODULOLastExecutionResult _ST_FunctionBlockResultsADSbusy MoveGeneric +_FB_MoveUniversalGeneric StartTypeCmdNo ExecutePositionVelocity Acceleration Deceleration Jerk Direction  MC_Direction  E BufferMode  MC_BufferMode E Options ST_MoveOptionsDone B Busy E Active E CommandAborted E Error B ErrorID E Axis AXIS_REFN MC_MOVERELATIVELastExecutionResult _ST_FunctionBlockResultsADSbusy MoveGeneric +_FB_MoveUniversalGenericCmdNoExecute  B Distance  B Velocity  E Acceleration  E Deceleration  E Jerk E BufferMode  MC_BufferMode E Options ST_MoveOptions V Done B Busy E Active E CommandAborted E Error B ErrorID E Axis AXIS_REF B N MC_MOVESUPERIMPOSED LastExecutionResult _ST_FunctionBlockResults+ADSbusy,CompensationStarted-AxisHasJobAtStartOfCompensation., HasJob flag when starting the compensation !AxisIsMovingAtStartOfCompensation/, Moving flag when starting the compensation iState  STATE_INITIALIZATION_E_TcMC_STATES0fbAdsReadWrite  ADSRDWRTEX1sNcCompensation _ST_TcNC_Compensation22 fbTrigger R_TRIG`6 fbTimeOut TON`7 Execute B Mode E_SuperpositionMode V Distance B VelocityDiff E Acceleration E Deceleration E Jerk E VelocityProcess V Length V Options ST_SuperpositionOptions V Done B Busy E Active E CommandAborted E Error  B ErrorID! E Warning" V WarningId# V ActualVelocityDiff$ V ActualDistance% V ActualLength& V ActualAcceleration' V ActualDeceleration( V Axis AXIS_REF  B N MC_MOVEVELOCITYLastExecutionResult _ST_FunctionBlockResultsADSbusy MoveGeneric +_FB_MoveUniversalGenericCmdNoExecute B Velocity E Acceleration  E Deceleration  E Jerk  E Direction  MC_Positive_Direction MC_Direction  E BufferMode  MC_BufferMode  E Options ST_MoveOptions V  InVelocity B Busy E Active E CommandAborted E Error B ErrorID E Axis AXIS_REF B N MC_OVERRIDEFILTER bFirstCyclebThresholdActiveInternalOverrideValueRawLastOverrideValueRaw OverrideRangefbTimer TON`OverrideValueRaw parameter LowerOverrideThreshold 0...32767 digits UpperOverrideThreshold 0...32767 digits OverrideSteps 200 steps => 0.5 percent OverrideRecoveryTime  150 ms OverrideValueFiltered  0...1000000 counts OverridePercentFiltered 0...100 % ErrorErrorIDN MC_POWER EnableTimeout TON`EnableOffOnDelay TP` iOverride`Enable  B Enable_Positive  E Enable_Negative  E OverrideY@100.0Y@) in percent - Beckhoff proprietary input BufferMode  MC_BufferMode E Status B Busy E Active E Error B ErrorID E Axis AXIS_REF B N MC_POWERSTEPPER$fbPower MC_Power ErrorCodefbWriteErrCode ADSWRITE nRefState fbWriteNonRef ADSWRITE fbReadParams ADSREADfbWriteInstOvr ADSWRITE bAdsInitDone bOverTemp rtOverTemp R_TRIG bUnderVoltage!rtUnderVoltage R_TRIG" bOpenLoopA# rtOpenLoopA R_TRIG$ bOpenLoopB% rtOpenLoopB R_TRIG& bOverCurrentA'rtOverCurrentA R_TRIG( bOverCurrentB)rtOverCurrentB R_TRIG* rtStallError R_TRIG+ bOldState,bLagFilterInit. tonLagFilter TON/tonNoLagFilter TON0wState22nAngle3 nOldAngle4 AngleDiff5 bInErrorState6 nParamIdx8 bParamEnabled9 fLagLimit: fLagFilter;nTries<tTimeOut TON=EnableEnable_PositiveEnable_NegativeOverrideY@100.0Y@ in percent DestallParams ST_PowerStepperStruct KL_Status KL_Status2 StatusErrorErrorIDStalled StallErrorAxis AXIS_REFN MC_READACTUALPOSITIONEnable B Valid  B Busy  E Error  B ErrorID  E Position B Axis AXIS_REF B N MC_READACTUALVELOCITYEnable  B Valid B Busy E Error B ErrorID E ActualVelocity B Axis AXIS_REF B N MC_READAXISCOMPONENTSTriggerExecute R_TRIGstate  STATE_INITIALIZATION_E_TcMC_STATES fbAdsRead ADSREADExecuteDone Busy Error ErrorID AxisComponents ST_AxisComponentsAxis AXIS_REFN MC_READAXISERROREnable B Valid  B Busy  E Error  B ErrorID  B AxisErrorID B Axis AXIS_REF B N MC_READBOOLPARAMETERADSbusyfbReadWriteParameter _FB_ReadWriteParameter nParatype _E_ParameterType`dwValue`lrValue`bStarted` fbTrigger R_TRIG`Enable B ParameterNumber B ReadMode  ReadMode_Once E_ReadMode  Beckhoff proprietary input Valid  B Busy  E Error B ErrorID E Value B Axis AXIS_REF B N MC_READDRIVEADDRESSstate  STATE_INITIALIZATION_E_TcMC_STATESTriggerExecute R_TRIG fbAdsRead ADSREAD readBuffer  iExecuteDone Busy Error ErrorID DriveAddress ST_DriveAddressAxis AXIS_REF B N MC_READPARAMETERADSbusyfbReadWriteParameter _FB_ReadWriteParameter nParatype _E_ParameterType`dwValue`bValue`bStarted` fbTrigger R_TRIG`Enable B ParameterNumber B ReadMode  ReadMode_Once E_ReadMode  Beckhoff proprietary input Valid  B Busy  E Error B ErrorID E Value B Axis AXIS_REF B N MC_READPARAMETERSETTriggerExecute R_TRIGstate  STATE_INITIALIZATION_E_TcMC_STATES fbAdsRead ADSREADExecuteDone Busy Error ErrorID Parameter <ST_AxisParameterSetAxis AXIS_REFN MC_READSTATUSEnable B Valid  B Busy  E Error  B ErrorID  E ErrorStop B Disabled B Stopping B StandStill B DiscreteMotion B ContinuousMotion B SynchronizedMotion E Homing E ConstantVelocity E Accelerating E Decelerating E Status 0 ST_AxisStatus V Axis AXIS_REF B N MC_RESETADSbusyiState  STATE_INITIALIZATION_E_TcMC_STATESLastExecutionResult _ST_FunctionBlockResults fbAdsWrite ADSWRITE` fbOnTrigger R_TRIG`Execute  B Done B Busy E Error B ErrorID B Axis AXIS_REF  B N MC_SETENCODERSCALINGFACTORADSbusystSetEncoderSaclingFactor  _ST_TcNC_SetEncoderSaclingFactor iState  STATE_INITIALIZATION_E_TcMC_STATES! fbAdsWrite ADSWRITE" fbOnTrigger R_TRIG`&Execute  B ScalingFactor  B Mode E_SetScalingFactorMode  E Options ST_SetEncoderScalingOptions  V Done B Busy E Error B ErrorID E Axis AXIS_REF B N MC_SETOVERRIDEEnable  B VelFactor?1.0? 1.0 = 100% AccFactor?1.0? 1.0 = 100% JerkFactor?1.0? 1.0 = 100% Enabled B Busy E Error B ErrorID E Axis AXIS_REF N MC_SETPOSITIONADSbusy$stSetPos _ST_TcNC_SetPosOnTheFly%iState  STATE_INITIALIZATION_E_TcMC_STATES& fbAdsWrite ADSWRITE' fbOnTrigger R_TRIG`+Execute B Position B Mode E Options ST_SetPositionOptions V Done B Busy E Error B ErrorID E Axis AXIS_REF  B N MC_STOP LastExecutionResult _ST_FunctionBlockResultsADSbusy MoveGeneric +_FB_MoveUniversalGeneric ReleaseLock ADSWRITE CmdNo!AxisMotionCommandsLocked"iState  STATE_INITIALIZATION_E_TcMC_STATES# fbOnTrigger R_TRIG`'CounterMotionCommandsLocked`(Execute B Deceleration E Jerk E Options ST_MoveOptions optional parameters Done B Busy E Active E CommandAborted E Error B ErrorID E Axis AXIS_REF  B N MC_TOUCHPROBEADSbusyiState  STATE_INITIALIZATION_E_TcMC_STATESTouchProbeValid  valid state of probes 1..4 TouchProbeActive ! activation state of probes 1..4 TouchProbeValue $ last recorded value of probes 1..4 TouchProbeModuloValue + last recorded modulo value of probes 1..4 TouchProbeInactiveCounter O number of cycles where the probes 1..4 where inactive (activation monitoring) OLDADSINTERFACE` A temporary flag to test old and new NC ADS touch probe interface fbADSwrite ADSWRITE`#fbAdsReadValid ADSREAD`$fbAdsReadValue ADSREAD`%fbAdsReadState ADSREAD`&fbAdsReadModulo ADSREAD`'TimerAdsReadState TON`( RtrigPlcEvent R_TRIG`) FtrigPlcEvent F_TRIG`* fbOnTrigger R_TRIG`+LatchID`,Restart`-H restart probe sequence when the trigger was outside the defined window InWindow`.* probe value is inside the defined window ModuloFactor`/& axis' modulo factor read from the NC InitDone`0% initialization on start-up finished IndexOffset`1i`2Execute B WindowOnly  E FirstPosition  E LastPosition  E Done B Busy E CommandAborted E Error B ErrorID E RecordedPosition B Axis AXIS_REF B TriggerInput  TRIGGER_REF B N MC_WRITEBOOLPARAMETERADSbusyfbReadWriteParameter _FB_ReadWriteParameter nParatype _E_ParameterType`dwValue`lrValue` fbTrigger R_TRIG`Execute B ParameterNumber B Value  B Done  B Busy  E Error B ErrorID E Axis AXIS_REF B N MC_WRITEPARAMETERADSbusyfbReadWriteParameter _FB_ReadWriteParameter nParatype _E_ParameterType`dwValue`bValue` fbTrigger R_TRIG`Execute B ParameterNumber B Value  B Done  B Busy  E Error B ErrorID E Axis AXIS_REF B N tC:\TWINCAT\PLC\LIB\TcUtilities.lib@ARG_TO_CSVFIELDpSrc` Pointer to the source buffer pDest`# Pointer to the destination buffer cbMax` Max. number of input bytes cbScan` Input stream data byte number cbReturn` Number of result data bytes in T_ArgT Input data in PLC format (any data type, string, integer, floating point value...) bQM h TRUE => Enclose result data in quotation marks, FALSE => Don't enclose result data in quotation marks. pOutput / Address of output buffer (destination buffer) cbOutput ! Max. byte size of output buffer ARG_TO_CSVFIELDN BCD_TO_DEC RisingEdge R_TRIG`STARTBINBUSYERRERRID DOUT Error codes: 0x00 : No Errors 0x0F : Parameter value NOT correct. Wrong BCD input value in Low Nibble. 0xF0 : Parameter value NOT correct. Wrong BCD input value in High Nibble. N BE128_TO_HOSTin T_UHUGE_INTEGER BE128_TO_HOST T_UHUGE_INTEGERN BE16_TO_HOSTin BE16_TO_HOSTN BE32_TO_HOSTparr `in BE32_TO_HOSTN BE64_TO_HOSTin T_ULARGE_INTEGER BE64_TO_HOST T_ULARGE_INTEGERN BYTEARR_TO_MAXSTRINGin BYTEARR_TO_MAXSTRING  T_MaxStringN CSVFIELD_TO_ARGpSrc` Pointer to the source buffer pDest`$ Pointer to the destination buffer cbMax` Max. number of output bytes cbScan` Input stream data byte number cbReturn` Number of result data bytes bQMPrior`c TRUE => Previous character was quotation mark. FALSE => Previous character was not quotation mark pInputG Address of input buffer with data in CSV field format (source buffer )cbInput  Byte size of input data bQM \ TRUE => Remove enclosing quotation marks. FALSE => Don't remove enclosing quotation marks. out T_Arg U Output data in PLC format (any data type, string, integer, floating point value...) CSVFIELD_TO_ARGN CSVFIELD_TO_STRINGcbField` in  T_MaxString" Input string in CSV field format bQM \ TRUE => Remove enclosing quotation marks. FALSE => Don't remove enclosing quotation marks. CSVFIELD_TO_STRING  T_MaxStringN DATA_TO_HEXSTRiCase` pCells ` idx`pData Pointer to data buffer cbDataU Byte size of data buffer bLoCase9 Default: use "ABCDEF", if TRUE use "abcdef" characters. DATA_TO_HEXSTR  T_MaxStringN DCF77_TIME"DataBits <BitNodtCurrdtNexttziCurr  E_TimeZoneID6 Time zone information extracted from latest telegram tziPrev  E_TimeZoneID8 Time zone information extracted from previous telegram tDiff Two telegram time difference bCheckStep`! StartEdge R_TRIG`" RisingPulse R_TRIG`$ FallingPulse F_TRIG`% LongPulse TON`& ShortPulse TON`' DetectSync TOF`( NoDCFSignal TON`) DCFCycleLen TON`* bIsRising`, bIsFalling`-bIsLong`.bIsShort`/Working`0 DataValid`2 ParitySum1`3 ParitySum2`4 ParitySum3`5i`7 DummyByte`8 DummyStringQQ`9Hour`;Minute`<Year`=Month`>Day`? DCF_PULSE DCF77 pulse: 101010101... RUN* Enable/disable function block execution. BUSY TRUE = Decoding in progress ERR , Error flag: TRUE = Error, FALSE = No error ERRID Error code ERRCNT  Error counter READY 1 TRUE => CDT is valid, FALSE => CDT is not valid CDT  date and time information N DCF77_TIME_EX#DataBits < Decoded data bits BitNo Decoded bit number dtCurr% Time extracted from latest telegram dtNext  Supposed next time tziCurr  E_TimeZoneID!6 Time zone information extracted from latest telegram tziPrev  E_TimeZoneID"8 Time zone information extracted from previous telegram tDiff#) Time difference of two latest telegrams bCheck$H TRUE = Plausibility check over two telegrams enabled, FALSE = disabled Step`& StartEdge R_TRIG`' RisingPulse R_TRIG`) FallingPulse F_TRIG`* LongPulse TON`+ ShortPulse TON`, DetectSync TOF`- NoDCFSignal TON`. DCFCycleLen TON`/ bIsRising`1 bIsFalling`2bIsLong`3bIsShort`4Working`5 DataValid`7 ParitySum1`8 ParitySum2`9 ParitySum3`:i`< DummyByte`= DummyStringQQ`>Hour`@Minute`AYear`BMonth`CDay`D DayOfWeek`E DCF_PULSE DCF77 pulse: 101010101... RUN* Enable/disable function block execution. TLP Short/long pulse split point BUSY  TRUE = Decoding in progress ERR , Error flag: TRUE = Error, FALSE = No error ERRID Error code ERRCNT  Error counter READY 1 TRUE => CDT is valid, FALSE => CDT is not valid CDT date and time information DOW0 ISO 8601 day of week: 1 = Monday.. 7 = Sunday TZI  E_TimeZoneID time zone information ADVTZI1 MEZ->MESZ or MESZ->MEZ time change notification LEAPSEC TRUE = Leap second RAWDT < Raw decoded data bits N DEC_TO_BCD RisingEdge R_TRIG`STARTDINBUSYERRERRID BOUT h Error codes: 0x00 : No errors 0xFF : Parameter value NOT correct. Wrong DECIMAL input value. N DEG_TO_RADANGLE DEG_TO_RADN DINT_TO_DECSTRin iPrecision DINT_TO_DECSTR  T_MaxStringN DT_TO_FILETIMEui64 T_ULARGE_INTEGER`DTINDT_TO_FILETIME  T_FILETIMEN DT_TO_SYSTEMTIMEsDT`nDay`b  24(16#30)0`TS  TIMESTRUCT` Index7001DTINDT_TO_SYSTEMTIME  TIMESTRUCTN DWORD_TO_BINSTRbit  ` 6 array of ASCII characters (inclusive null delimiter) iSig`  number of significant bits iPad` number of padding zeros i` Index7001in iPrecisionDWORD_TO_BINSTR  T_MaxStringN DWORD_TO_DECSTRdec  ` 6 array of ASCII characters (inclusive null delimiter) iSig`  number of significant nibbles iPad` number of padding zeros i`dividerʚ;`number` Index7001in iPrecisionDWORD_TO_DECSTR  T_MaxStringN DWORD_TO_HEXSTRhex ` 6 array of ASCII characters (inclusive null delimiter) iSig` number of significant nibbles iPad` number of padding zeros i` Index7001in iPrecisionbLoCase 8Default: use "ABCDEF", if TRUE use "abcdef" characters. DWORD_TO_HEXSTR  T_MaxStringN DWORD_TO_OCTSTRoct  ` 6 array of ASCII characters (inclusive null delimiter) iSig`  number of significant nibbles iPad` number of padding zeros i` Index7001in iPrecisionDWORD_TO_OCTSTR  T_MaxStringN F_ARGCMPtypeSafe arg1 T_Arg arg2 T_Arg F_ARGCMPN F_ARGCPYtypeSafeF_ARGCPYdest T_Arg src T_Arg N F_ARGISZEROarg T_Arg F_ARGIsZeroN F_BIGTYPEpData Address pointer of data buffer cbLen Byte length of data buffer  F_BIGTYPE T_ArgN F_BOOLF_BOOL T_Argin N F_BYTEF_BYTE T_Argin N F_BYTE_TO_CRC16_CCITTvalue Data value crc > Initial value (16#FFFF or 16#0000) or previous CRC-16 result F_BYTE_TO_CRC16_CCITTN F_CHECKSUM16 wChkSum_I` % internal ChkSum dataWord` % current data byte iIdx` % current data buffer index ptrData` % pointer to current data byte  dwSrcAddr% address of data buffer cbLen% length of data buffer wChkSum% init value (16#0000) or last ChkSum  F_CheckSum16N F_CRC16_CCITTwCRC_I` $ internal CRC dataWord` $ current data byte iIdx` $ current data buffer index ptrData` $ pointer to current data byte  dwSrcAddr$ address of data buffer cbLen$ length of data buffer wLastCRC$ init value (16#FFFF) or last CRC16  F_CRC16_CCITTN F_CREATEHASHTABLEHNDp T_HashTableEntry` i` pEntries T_HashTableEntryC Pointer to the first entry of hash table database (element array) cbEntries; Byte size (length) of hash table database (element array) F_CreateHashTableHndhTable  T_HHASHTABLE Hash table handle N F_CREATELINKEDLISTHNDp T_LinkedListEntry`  Temp. previous node n T_LinkedListEntry`  Temp. next node i` loop iterator pEntries T_LinkedListEntry@ Pointer to the first linked list node database (element array) cbEntries< Byte size (length) of linked list database (element array) F_CreateLinkedListHndhList  T_HLINKEDLIST Linked list handle N F_DATA_TO_CRC16_CCITTi`pData  Pointer to data cbData  Length of data crc > Initial value (16#FFFF or 16#0000) or previous CRC-16 result F_DATA_TO_CRC16_CCITTN F_DINTF_DINT T_Argin N F_DWORDF_DWORD T_Argin N F_FORMATARGTOSTR pOut`longword`double`single`short`small`longint` iPaddingLen`iCurrLen` bSign Sign prefix flag bBlank Blank prefix flag bNull Null prefix flag bHash Hash prefix flag bLAlign4 FALSE => Right align (default), TRUE => Left align bWidthC FALSE => no width padding, TRUE => blank or zeros padding enabled iWidth  Width length parameter iPrecision  Precision length parameter eFmtType E_TypeFieldParam  Format type field parameter arg T_Arg  Format argument F_FormatArgToStrsOut  T_MaxStringN F_GETDAYOFWEEKsysTime  TIMESTRUCT` inF_GetDayOfWeekN F_GETDOYOFYEARMONTHDAYbLY` wYear Year: 0..2xxx wMonth Month 1..12 wDay Day: 1..31 F_GetDOYOfYearMonthDayN F_GETFLOATREC ptrDouble fValue fBegin nBegin fDiv nDignDigit fMaxPrecisioni nLastDecDigitfVal iPrecisionbRound F_GetFloatRec  T_FloatRecN F_GETMAXMONTHDAYSwYear wMonth F_GetMaxMonthDaysN F_GETMONTHOFDOYbLY` wMonth` wYear Year: 0..2xxx wDOY Year's day number: 1..366 F_GetMonthOfDOYN F_GETVERSIONTCUTILITIESnVersionElementd Possible nVersionElement parameter: 1 : major number 2 : minor number 3 : revision number F_GetVersionTcUtilitiesN F_GETWEEKOFTHEYEARdate_sec` date seconds dow` day of week year` KWStart` firstyG` ff` inF_GetWeekOfTheYearN F_HUGEF_HUGE T_Argin T_HUGE_INTEGERN F_INTF_INT T_Argin N F_LARGEF_LARGE T_Argin T_LARGE_INTEGERN F_LREALF_LREAL T_Argin N F_LTRIMpChar`pStr  T_MaxString` in  T_MaxStringF_LTrim  T_MaxStringN F_REALF_REAL T_Argin N F_RTRIMn`pChar` in  T_MaxStringF_RTrim  T_MaxStringN F_SINTF_SINT T_Argin N F_STRINGF_STRING T_Argin  T_MaxStringN F_SWAPREALpReal pResult fVal F_SwapRealN F_SWAPREALEXpIN `wSave`  F_SwapRealExfVal N F_TOLCASEpDest`idxMIN_SBCS_TABLEMAX_SBCS_TABLE` in  T_MaxString F_ToLCase  T_MaxStringN F_TOUCASEpDest`idxMIN_SBCS_TABLEMAX_SBCS_TABLE` in  T_MaxString F_ToUCase  T_MaxStringN F_UDINTF_UDINT T_Argin N F_UHUGEF_UHUGE T_Argin T_UHUGE_INTEGERN F_UINTF_UINT T_Argin N F_ULARGEF_ULARGE T_Argin T_ULARGE_INTEGERN F_USINTF_USINT T_Argin N F_WORDF_WORD T_Argin N F_YEARISLEAPYEARwYearF_YearIsLeapYearN FB_ADDROUTEENTRY fbAdsWrite ADSWRITE`fbRTrig R_TRIG`nStep` dataEntry ST_AmsRouteSystemEntry`sNetID  T_AmsNetID& TwinCAT network address (ams net id) stRoute ST_AmsRouteEntry! Structure with route parameters bExecute- Rising edge starts function block execution tTimeoutbBusy bError nErrID N FB_AMSLOGGER RisingEdge R_TRIG` fbAdsWrite ADSWRITE`stReq ST_AmsLoggerReq`nLen`sNetId  '' T_AmsNetIdeMode  AMSLOGGER_RUNE_AmsLoggerMode sCfgFilePath  '' T_MaxStringbExecutetTimeoutbBusy bError nErrId N FB_BASICPID nERR_NOERROR no error nERR_INVALIDPARAM invalid parameter nERR_INVALIDCYCLETIME invalid cycle time fE0.0  error input fE_10.0! error input z^(-1) fY0.0" control output fY_10.0# control output z^(-1) fYP0.0$ P-part fYI0.0% I-part fYI_10.0& I-part z^(-1) fYD0.0' D-T1-part fYD_10.0( D-T1-part z^(-1) bInit*% initialization flag for first cycle bIsIPart+ I-part active ? bIsDPart, D-part active ? fDi0.0. internal I param fDd0.0/ internal D param fCd0.00 internal D param fCtrlCycleTimeOld0.02fKpOld0.03fTnOld0.04fTvOld0.05fTdOld0.06fSetpointValue setpoint value fActualValue actual value bReset controller values fCtrlCycleTime ( controller cycle time in seconds [s] fKp proportional gain Kp (P) fTn integral gain Tn (I) [s] fTv" derivative gain Tv (D-T1) [s] fTd( derivative damping time Td (D-T1) [s]  fCtrlOutput controller output command nErrorStatus1 controller error output (0: no error; >0:error) N FB_BUFFEREDTEXTFILEWRITERfbFile FB_TextFileRingBuffer` closeTimer TON` auto close timer bRemove`nStep`sNetId  '' T_AmsNetId` ams net id sPathName  'c:\Temp\data.dat' T_MaxString` 6 file buffer path name (max. length = 255 characters) ePath  PATH_GENERIC E_OpenPath`  default: Open generic file bAppend` ) TRUE = append lines, FALSE = not append tAutoClose` tTimeout` bBusy`bError`nErrID`fbBuffer FB_StringRingBuffer` string ring buffer N FB_CONNECTSCOPESERVER stRecordDesc d (nRunMode:=0, nSopMode:=0, bStoreOnDisk:=FALSE, bUseLocalServer:=FALSE, bStartServerFromFile:=TRUE)#ST_ScopeServerRecordModeDescriptionnState nErrorState fbAdsWrite ADSWRITEfbQueryRegistry FB_RegQueryValuesScopeServerDirsScopeServerPath fbStartServer NT_StartProcessfbWait TON bTriggerServerStart!nDwellTimeCounter"nPort  27110 T_AmsPort%Connect_IdxGrpu&0x7500sNetId  '' T_AmsNetId bExecute sConfigFileQQtTimeoutbBusybDonebErrornErrorIdN FB_CSVMEMBUFFERREADER state`getBufferIndex`scanPtr`scanSize`bField`cbCopied` bFirstChar`bDQField` bDQBefore`pField`U If successfull then this variable returns the address of the first/next field value cbField`W If successfull then this variable returns the byte size of the first/next field value bEOF` TRUE => End of field found bBreak`eCmd  eEnumCmd_First E_EnumCmdType) Command type: read first or next field ?pBuffer# Address ( pointer) of data buffer cbBuffer Max. byte size of data buffer bOk & TRUE => Successfull, FALSE => Failed getValue  '' T_MaxString N If successfull then this output returns the first/next field value as string pValue s Pointer to the first value byte (HINT: String values are not null terminated. Empty string returns Null pointer ) cbValue  Field value byte size bCRLF . TRUE => End of record separator found (CRLF) cbRead) Number of successfully parse data bytes N FB_CSVMEMBUFFERWRITERfbReader FB_CSVMemBufferReader`temp ,` Temp buffer cbTemp`% Number of data bytes in temp buffer cbCopied`9 Number of data bytes copied to the external data buffer bNewLine` TRUE => start with new line eCmd  eEnumCmd_First E_EnumCmdType* Command type: write first or next field ?putValue  '' T_MaxString& New first/next field value as string pValueC OPTIONAL: Pointer to external buffer containing field value data. cbValueF OPTIONAL: Byte size of external buffer containing field value data. bCRLF0 TRUE = > Append end of record separator (CRLF) pBuffer # Address ( pointer) of data buffer cbBuffer  Max. byte size of data buffer bOk & TRUE => Successfull, FALSE => Failed cbSize Number fo used data bytes cbFree Number of free data bytes nFields Number of fields nRecords Number of records cbWrite+ Number of successfully written data bytes N FB_DBGOUTPUTCTRLfbFormat FB_FormatString`fbBuffer FB_StringRingBuffer`fbFile + (ePath := PATH_BOOTPATH, bAppend := TRUE )  PATH_GENERIC E_OpenPathFB_BufferedTextFileWriter`buffer '`state`nItems`k` bInit`! Hex logging i`$cells  `%pCells  T_MaxString`&cbL1`'cbL2`'idx`'pSrc1`(pSrc2`( dwCtrl`& Debug message target: DBG_OUTPUT_LOG sFormat  '' T_MaxString` Debug message format string arg1 T_Arg` Format string argument arg2 T_Arg`arg3 T_Arg` arg4 T_Arg` arg5 T_Arg` arg6 T_Arg` arg7 T_Arg` arg8 T_Arg`arg9 T_Arg`arg10 T_Arg`sFilter  '' T_MaxString`bError`nError` nOverflow`N FB_DISCONNECTSCOPESERVER fbAdsWrite ADSWRITEnStatesNetId  T_AmsNetIdbExecutetTimeoutbBusybDone bError nErrorId N FB_ENUMFINDFILEENTRYfbRTrig R_TRIG`nStep` fbAdsRdWrt B ( PORT := AMSPORT_R3_SYSSERV, IDXGRP := SYSTEMSERVICE_FFILEFIND )  T_AmsPortADSRDWRT` fbAdsWrite D ( PORT := AMSPORT_R3_SYSSERV, IDXGRP := SYSTEMSERVICE_CLOSEHANDLE )   T_AmsPortoADSWRITE` dataEntry ST_FindFileSystemEntry`eFindCmd  E_EnumCmdType`sNetId  T_AmsNetId sPathName  T_MaxString% dir/path/file name, wildcards [*|?] eCmd  eEnumCmd_First E_EnumCmdType Enumerator navigation command bExecutetTimeoutbBusy bError nErrID bEOE End of enumeration stFindFile ST_FindFileEntry Find file entry N FB_ENUMFINDFILELISTfbRTrig R_TRIG`nStep`fbEnum FB_EnumFindFileEntry`cbEntry`nEntries`pEntry ST_FindFileEntry`sNetId  T_AmsNetId sPathName  T_MaxString% dir/path/file name, wildcards [*|?] eCmd  eEnumCmd_First E_EnumCmdType Enumerator navigation command pFindList& POINTER TO ARRAY OF ST_FindFileEntry cbFindList( Byte size of ARRAY OF ST_FindFileEntry bExecute tTimeout bBusy bErrornErrIDbEOE End of enumeration nFindFiles Number of find files N FB_ENUMROUTEENTRY fbAdsRead ADSREAD`fbRTrig R_TRIG`nStep`index` dataEntry ST_AmsRouteSystemEntry`sNetID  T_AmsNetID' TwinCAT network address (ams net id ) eCmd  eEnumCmd_First E_EnumCmdType Enumerator navigation command bExecute- Rising edge starts function block execution tTimeoutbBusy bError nErrID bEOE l End of enumeration. This value is TRUE after the first read that attempts to read next non existing entry. stRoute ST_AmsRouteEntry! Structure with route parameters N FB_ENUMSTRINGNUMBERSpSrc`pDest`pNext`char`state`bEat`sSearch  T_MaxString Source string eCmd  eEnumCmd_First E_EnumCmdType Enumerator navigation command eType  eNumGroup_FloatE_NumGroupTypes String number format type sNumber  T_MaxString Found string number nPos ) <> 0 => Next scan/search start position bEOS  TRUE = End of string N FB_FILERINGBUFFERfbOpen  FB_FileOpen`fbClose  FB_FileClose`fbWrite  FB_FileWrite`fbRead  FB_FileRead` fbSeek  FB_FileSeek`!nStep`"X 0=idle, 1=init, 10,11=open, 20,21=seek, 30,31=read, 40,41=write, 50,51=close, 100=exit bInit`#5 TRUE=reading length chunk, FALSE=reading data chunk bExit`$O FALSE=repeat reading/writing, TRUE=abort reading/writing, go to the exit step bReopen`%t Open mode: TRUE=try to open existing file, FALSE=create new file, if open fails => try to create and open new file bOpen`&% TRUE=file opened, FALSE=file closed bGet`'$ TRUE=get entry, FALSE=remove entry bOW`(b TRUE=removing oldest entry (bOverwrite=TRUE), FALSE=don't remove oldest entry (bOverwrite=FALSE) cbOW`)/ Temp length of ovwerwritten length/data chunk cbMoved`*= Number of successfully read/written length/data chunk bytes ptrSaved`+M Seek pointer previous position (used by A_GetHead or read buffer underflow) ptrMax`,D Seek pointer max. position = SIZEOF(ring buffer header) + cbBuffer eCmd  eFileRBuffer_NoneE_FileRBufferCmd`-eOldCmd  eFileRBuffer_NoneE_FileRBufferCmd`. sNetId  '' T_AmsNetId ams net id sPathName  'c:\Temp\data.dat' T_MaxString6 file buffer path name (max. length = 255 characters) ePath  PATH_GENERIC E_OpenPath default: Open generic file nID user defined version ID cbBuffer max. file buffer byte size bOverwrite : FALSE = don't overwrite, TRUE = overwrite oldest entries pWriteBuff " pointer to external write buffer cbWriteLen $ byte size of external write buffer pReadBuff ! pointer to external read buffer cbReadLen # byte size of external read buffer tTimeoutbBusybErrornErrID ADS or function specific error codes: 16#8000 = (File) buffer empty or overflow 16#8001 = (Application) buffer underflow (cbReadLen to small), 16#8002 = Buffer is not opened 16#8003 = Invalid input parameter value cbReturn! number of recend read data bytesstHeader ST_FileRBufferHead buffer status N FB_FORMATSTRING pFormat` pointer to the format string pOut` pointer to the result string nRemOutLen`$ Max remaining length of sOut bufferbValid`8 if set, the string character is valid format parameter stFmt ST_FormatParameters` nArrayElem` nArgument`parArgs   T_Arg`sArgStr  T_MaxString` sFormat  T_MaxStringarg1 T_Argarg2 T_Argarg3 T_Argarg4 T_Argarg5 T_Argarg6 T_Arg arg7 T_Arg arg8 T_Arg arg9 T_Arg arg10 T_Arg bErrornErrIdsOut  T_MaxStringN FB_GETADAPTERSINFO fbAdsRead ADSREAD` fbRegQuery FB_RegQueryValue` fbTrigger R_TRIG`nState`cbInfo`idx`info  ST_IP_ADAPTER_INFO` buffer for 12 entries pInfo ST_IP_ADAPTER_INFO` nRealCount` sDefaultA  T_MaxString`sNetID  T_AmsNetIdbExecutetTimeoutbBusy bError nErrID arrAdapters  ST_IpAdapterInfo nCount  Max. number of found adapters nGet% Number of read adapter info entries N FB_GETDEVICEIDENTIFICATION iDataSize@` byTagStart<` '<' byTagEnd>` '>' byTagSlash/` '/' fbAdsRead ADSREAD` bExecutePrev`iState`iData ` strActPath` iLoopEndIdx` iStructSize`strHardwareCPU `strTags  ))` iTagsSize  `iCurrTag (` iCurrTagData P`! iPathSize`"iTagIdx`$ iCurrTagIdx`%iDataIdx`&iCurrTagDataIdx`'k`( iMinCurrData`) iFirstIdx`*iLastIdx`+ bTagStart`-bTagEnd`. bTagSlash`/bTagOpen`0bExecutetTimeoutsNetId  T_AmsNetId ams net id of target system bBusybError nErrorID stDevIdent ST_DeviceIdentification 5 structure with available device identification data N FB_GETDEVICEIDENTIFICATIONEX iDataSize@` byTagStart<` '<' byTagEnd>` '>' byTagSlash/` '/' fbAdsRead ADSREAD` bExecutePrev`iState`iData ` strActPath` iLoopEndIdx` iStructSize`strHardwareCPU `strTags  ))` iTagsSize  `iCurrTag (` iCurrTagData P`! iPathSize`"iTagIdx`$ iCurrTagIdx`%iDataIdx`&iCurrTagDataIdx`'k`( iMinCurrData`) iFirstIdx`*iLastIdx`+ bTagStart`-bTagEnd`. bTagSlash`/bTagOpen`0bExecutetTimeoutsNetId  T_AmsNetId ams net id of target system bBusybError nErrorID stDevIdent ST_DeviceIdentificationEx 5 structure with available device identification data N FB_GETHOSTADDRBYNAMEfbAdsRW  ADSRDWRTEX` fbTrigger R_TRIG`nState`sNetID  T_AmsNetId sHostName  '' T_MaxString1 String containing host name. E.g. 'DataServer1' bExecutetTimeoutȯbBusy bError nErrID sAddr  '' T_IPv4Addr S String containing an (Ipv4) Internet Protocol dotted address. E.g. '172.16.7.199' arrAddr  0, 0, 0, 0 T_IPv4AddrArrC Byte array containing an (Ipv4) Internet Protocol dotted address. N FB_GETHOSTNAME fbAdsRead ADSREAD` fbTrigger R_TRIG`nState`sNetID  T_AmsNetIdbExecutetTimeoutbBusy bError nErrID sHostName  T_MaxString  The local host name N FB_GETLOCALAMSNETID RisingEdge R_TRIG` FallingEdge F_TRIG`fbRegQueryValue FB_RegQueryValue`tmpBytes  T_AmsNetIdArr`bExecutetTimeOutbBusybErrornErrId AddrString  '0.0.0.0.0.0' T_AmsNetId AddrBytes  0,0,0,0,0,0 T_AmsNetIdArr N FB_GETROUTERSTATUSINFO risingEdge R_TRIG`state`adsRes ` fbAdsRead ADSREAD`sNetId  '' T_AmsNetIDbExecutetTimeoutbBusybError nErrID info ST_TcRouterStatusInfo N FB_GETTIMEZONEINFORMATION fbAdsRead ADSREAD`bOldTrig`state`res ST_AmsGetTimeZoneInformation`sNetID  '' T_AmsNetIDbExecutetTimeoutbBusybError nErrID tzID  E_TimeZoneID tzInfo ST_TimeZoneInformation N FB_HASHTABLECTRLp T_HashTableEntry`n T_HashTableEntry`nHash`keyd Entry key: used by A_Lookup, A_Remove method, the key.lookup variable is also used by A_Add method putValue Entry value putPosPtr T_HashTableEntry bOk  TRUE = success, FALSE = error getValue getPosPtr T_HashTableEntryR returned by A_GetFirstEntry, A_GetNextEntry, A_Add, A_Lookup and A_Remove method hTable  T_HHASHTABLE Hash table handle variable N FB_LINKEDLISTCTRLp T_LinkedListEntry` Temp. previous node n T_LinkedListEntry` Temp. next node putValue Linked list node value putPosPtr T_LinkedListEntry Linked list node pointer bOk  TRUE = success, FALSE = error getValue  Linked list node value getPosPtr T_LinkedListEntry  Linked list node pointer hList  T_HLINKEDLIST Linked list table handle N FB_LOCALSYSTEMTIME rtrig R_TRIG`state`fbNT  NT_GetTime`fbTZ FB_GetTimeZoneInformation`fbSET NT_SetTimeToRTCTime`fbRTC RTC_EX2`timer TON`nSync`bNotSup`sNetID  '' T_AmsNetID+ The target TwinCAT system network address bEnable` Enable/start cyclic time synchronisation (output is synchronized to Local Windows System Time) dwCycleQ& Time synchronisation cycle (seconds) dwOptR Additional option flags: If bit 0 is set => Synchronize Windows Time to RTC time tTimeoutJ Max. ADS function block execution time (internal communication timeout). bValid \ TRUE => The systemTime and tzID output is valid, FALSE => systemTime and tzID is not valid systemTime  TIMESTRUCT " Local Windows System Time struct tzID  eTimeZoneID_Invalid E_TimeZoneID ) Daylight/standard time zone information N FB_MEMBUFFERMERGEpDest`cbDest`eCmd  eEnumCmd_First E_EnumCmdTypepBuffer Pointer to destination buffer cbBuffer& Max. byte size of destination buffer pSegment. Pointer to data segment (optional, may be 0) cbSegment- Number of data segments (optional, may be 0)bOk M TRUE => Successfull, FALSE => End of enumeration or invalid input parameter cbSize  Data buffer fill state N FB_MEMBUFFERSPLITpSrc`cbSrc`eCmd  eEnumCmd_First E_EnumCmdTypepBuffer Pointer to source data buffer cbBuffer! Byte size of source data buffer cbSize Max. segment byte size bOk N TRUE => Successfull, FALSE => End of segmentation or invalid input parameter pSegment  Pointer to data segment cbSegment  Byte size of data segment bEOS 7 TRUE = End/last segment, FALSE = Next segment follows N FB_MEMRINGBUFFERidxLast` byte index of last buffer byte idxFirst`" byte buffer of first buffer byte idxGet`pTmp`cbTmp`cbCopied`pWrite pointer to write data cbWrite byte size of write data pRead  pointer to read data buffer cbRead  byte size of read data buffer pBuffer # pointer to ring buffer data bytes cbBuffer  max. ring buffer byte size bOkT TRUE = new entry added or removed succesfully, FALSE = fifo overflow or fifo empty nCount number of fifo entries cbSize" current byte length of fifo data cbReturn If bOk == TRUE => Number of recend realy returned (removed or get) data bytes If bOk == FALSE and cbReturn <> 0 => Number of required read buffer data bytes (cbRead underflow) N FB_MEMRINGBUFFEREXidxLast`* byte index of last (newest) buffer entry idxFirst`+ byte index of first (oldest) buffer entry idxGet` temporary index idxEnd`" index of unused/free end segment cbEnd`& byte size of unused/free end segment cbAdd`!pWrite  pointer to write data cbWrite  byte size of write data pBuffer# pointer to ring buffer data bytes cbBuffer max. ring buffer byte size bOkW TRUE = new entry added or get, freed succesfully, FALSE = fifo overflow or fifo empty pRead( A_GetHead returns pointer to read data cbRead* A_GetHead returns byte size of read data nCount number of fifo entries cbSize" current byte length of fifo data cbFree biggest available free segment N FB_REGQUERYVALUE fbAdsRdWrtEx  ADSRDWRTEX`bExecOld`bBusyOld`s1Len`s2Len`ptr`cbBuff`tmpBuff ST_HKeySrvRead`sNetId  T_AmsNetId ams net id sSubKey  T_MaxString sub key name sValName  T_MaxString value name cbData number of data bytes to read pData$ points to registry key data buffer bExecute control input tTimeOut bBusy bError nErrIdcbRead' number of succesfully read data bytes N FB_REGSETVALUE fbAdsWrite ADSWRITE`bExecOld`bBusyOld`s1Len`s2Len`s3Len`ptr`nType`cbBuff` cbRealWrite`tmpBuff ST_HKeySrvWrite`sNetId  T_AmsNetId ams net id sSubKey  T_MaxStringsValName  T_MaxString value name eValType E_RegValueTypecbData size of value data in bytes pData pointer to value data bufferbExecute  control input tTimeOut bBusy bErrornErrIdcbWriteN FB_REMOVEROUTEENTRY fbAdsWrite ADSWRITE`sNetID  T_AmsNetID' TwinCAT network address (ams net id ) sName  Route name as string bExecute- Rising edge starts function block execution tTimeoutbBusy bError nErrID N FB_RESETSCOPESERVERCONTROL fbAdsWrite ADSWRITEnStatesNetId  T_AmsNetIdbExecutetTimeoutbBusybDone bError nErrorId N FB_SAVESCOPESERVERDATAnState fbAdsWrite ADSWRITEsNetId  T_AmsNetIdbExecute sSaveFileQQtTimeoutbBusy bDone bError nErrorId N FB_SCOPESERVERCONTROL eCurrentState  SCOPE_SERVER_IDLEE_ScopeServerState fbConnect FB_ConnectScopeServerfbStart FB_StartScopeServerfbStop FB_StopScopeServerfbSave FB_SaveScopeServerData fbDisconnect FB_DisconnectScopeServerfbReset FB_ResetScopeServerControl sNetId  T_AmsNetId eReqState E_ScopeServerState sConfigFileQQ sSaveFileQQtTimeoutbBusybDonebErrornErrorIdN FB_SETTIMEZONEINFORMATION fbAdsWrite ADSWRITE`bOldTrig`state`req ST_AmsGetTimeZoneInformation`sNetID  '' T_AmsNetIDtzInfo ] ( (*West Euoropa Standard Time *) bias:=-60, standardName:='W. Europe Standard Time', standardDate:=(wYear:=0, wMonth:=10, wDayOfWeek:=0, wDay:=5, wHour:=3), standardBias:=0, daylightName:='W. Europe Daylight Time', daylightDate:=(wYear:=0, wMonth:=3, wDayOfWeek:=0, wDay:=5, wHour:=2), daylightBias:=-60 ) W. Europe Standard Time  TIMESTRUCT  W. Europe Daylight Time  TIMESTRUCTST_TimeZoneInformationbExecutetTimeoutbBusybErrornErrIDN FB_STARTSCOPESERVERnState fbAdsWrite ADSWRITEnDummy  0,0sNetId  T_AmsNetIdbExecutetTimeoutbBusybDone bError nErrorId N FB_STOPSCOPESERVERnState fbAdsWrite ADSWRITEnDummy  0,0sNetId  T_AmsNetIdbExecutetTimeoutbBusybDone bError nErrorId N FB_STRINGRINGBUFFERfbBuffer FB_MemRingBuffer`4 Internal (low level) buffer control function block  bOverwrite8 TRUE = overwrite oldest entry, FALSE = don't overwrite putValue  '' T_MaxString% String to add (write) to the buffer pBuffer # Pointer to ring buffer data bytes cbBuffer  Max. ring buffer byte size bOk T TRUE = new entry added or removed succesfully, FALSE = fifo overflow or fifo empty getValue  '' T_MaxString# String removed (read) from buffer nCount Number of fifo entries cbSize" Current byte length of fifo data N FB_TEXTFILERINGBUFFERfbOpen  FB_FileOpen`fbClose  FB_FileClose`fbPuts  FB_FilePuts`nStep`@ 0=idle, 1=init, 10,11=open, 40,41=write, 50,51=close, 100=exit eCmd  eFileRBuffer_NoneE_FileRBufferCmd`sNetId  '' T_AmsNetId` ams net id sPathName  'c:\Temp\data.dat' T_MaxString`6 file buffer path name (max. length = 255 characters) ePath  PATH_GENERIC E_OpenPath` default: Open generic file bAppend`# TRUE = append, FALSE = not append putLine  '' T_MaxString` cbBuffer` 5 max. file buffer byte size(RESERVED for future use) tTimeout` bBusy`bError`nErrID`bOpened`) TRUE = file opened, FALSE = file closed getLine  '' T_MaxString`N FB_WRITEPERSISTENTDATA ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdPORTSTARTTMOUTMODE E_PersistentModeD =SPDM_2PASS: optimized boost; =SPDM_VAR_BOOST: boost per variable; BUSY ERR ERRID N FILETIME_TO_DTui64 T_ULARGE_INTEGER` fileTime  T_FILETIME Windows file time. FILETIME_TO_DTN FILETIME_TO_SYSTEMTIME D`M`Y` uiPastDays T_ULARGE_INTEGER` uiPastYears T_ULARGE_INTEGER` uiRemainder T_ULARGE_INTEGER` dwPastDays` dwPastYears` dwYearDays`fileTime  T_FILETIMEFILETIME_TO_SYSTEMTIME  TIMESTRUCTN FIX16_TO_LREALin T_FIX16FIX16_TO_LREALN FIX16_TO_WORDin T_FIX16 16 bit fixed point number  FIX16_TO_WORDN FIX16ADDaugend T_FIX16addend T_FIX16FIX16Add T_FIX16N FIX16ALIGNin T_FIX16# 16 bit signed fixed point number. n, Number of fractional bits (decimal places)  FIX16Align T_FIX16N FIX16DIVtmpA` dividend T_FIX16divisor T_FIX16FIX16Div T_FIX16N FIX16MULtmp` multiA T_FIX16multiB T_FIX16FIX16Mul T_FIX16N FIX16SUBminuend T_FIX16 subtrahend T_FIX16FIX16Sub T_FIX16N GETREMOTEPCINFOADSREAD1 ADSREAD` RisingEdge R_TRIG` FallingEdge F_TRIG` RouterInfo c ROUTERINFOSTRUCT`iIndex`tmpNetId  T_AmsNetId`idx`NETID  T_AmsNetIdD Target NetID, usually left as empty string for reading local infos START Rising edge starts the FBTMOUT1 Set Timeout according to local or remote access BUSY Ads busy ERR Ads error ERRID Ads Error RemotePCInfo REMOTEPCINFOSTRUCT N field with all NetIDs and PC names found in router, ordered as router gives N HEXSTR_TO_DATApSrc` pDest` ascii` nibble` bAdd`bLN` hi/lo nibble sHex  T_MaxString Hex string to convert pData Pointer to destination buffer cbData! Byte size of destination buffer HEXSTR_TO_DATAN HOST_TO_BE128in T_UHUGE_INTEGER HOST_TO_BE128 T_UHUGE_INTEGERN HOST_TO_BE16in HOST_TO_BE16N HOST_TO_BE32parr `in HOST_TO_BE32N HOST_TO_BE64in T_ULARGE_INTEGER HOST_TO_BE64 T_ULARGE_INTEGERN INT64_TO_LREALin T_LARGE_INTEGERINT64_TO_LREALN INT64ADD64bOV` i64a T_LARGE_INTEGERi64b T_LARGE_INTEGER Int64Add64 T_LARGE_INTEGERN INT64ADD64EXaugend T_LARGE_INTEGERaddend T_LARGE_INTEGER Int64Add64Ex T_LARGE_INTEGERbOV 3 TRUE => arithmetic overflow, FALSE => no overflow N INT64CMP64i64a T_LARGE_INTEGERi64b T_LARGE_INTEGER  Int64Cmp64N INT64DIV64EX bIsNegative` sRemainder T_ULARGE_INTEGER` dividend T_LARGE_INTEGERdivisor T_LARGE_INTEGER Int64Div64Ex T_LARGE_INTEGER remainder T_LARGE_INTEGERN INT64ISZEROi64 T_LARGE_INTEGER Int64IsZeroN INT64NEGATEi64 T_LARGE_INTEGER Int64Negate T_LARGE_INTEGERN INT64NOTi64 T_LARGE_INTEGERInt64Not T_LARGE_INTEGERN INT64SUB64i64a T_LARGE_INTEGER minuend i64b T_LARGE_INTEGER substrahend  Int64Sub64 T_LARGE_INTEGERN ISFINITE ptrDouble ` ptrSingle` x T_ARGIsFiniteN LARGE_INTEGER dwHighPart dwLowPart LARGE_INTEGER T_LARGE_INTEGERN LARGE_TO_ULARGEin T_LARGE_INTEGERLARGE_TO_ULARGE T_ULARGE_INTEGERN LREAL_TO_FIX16in LREAL number to convert n, Number of fractional bits (decimal places) LREAL_TO_FIX16 T_FIX16N LREAL_TO_FMTSTRrec  T_FloatRec`pOut`iStart`iEnd`i`in iPrecision bRound LREAL_TO_FMTSTRN LREAL_TO_INT64inLREAL_TO_INT64 T_LARGE_INTEGERN LREAL_TO_UINT64tmp`inLREAL_TO_UINT64 T_ULARGE_INTEGERN MAXSTRING_TO_BYTEARRcbCopy` Index7001in  T_MaxStringMAXSTRING_TO_BYTEARR N NT_ABORTSHUTDOWN ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdSTARTTMOUTBUSYERR ERRID N NT_GETTIMEADSREAD1 ADSREAD` RisingEdge R_TRIG`NETID  T_AmsNetIdSTARTTMOUTBUSYERR ERRID TIMESTR  TIMESTRUCT N NT_REBOOT ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdDELAYSTARTTMOUTBUSY ERR ERRID N NT_SETLOCALTIME fbAdsWrite ADSWRITE` RisingEdge R_TRIG`NETID  T_AmsNetIdTIMESTR  TIMESTRUCT new local system time START4 rising edge activates the function block execution TMOUTBUSY ERR ERRID N NT_SETTIMETORTCTIME fbAdsWrite ADSWRITE` fbRegQuery FB_RegQueryValue` RisingEdge R_TRIG`bTmp`state`bInit` numOfCPUs`NETID  T_AmsNetIdSET3 rising edge on this input starts the fb execution TMOUTBUSYERR ERRID N NT_SHUTDOWN ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdDELAYSTARTTMOUTBUSY ERR ERRID N NT_STARTPROCESS ADSWRITE1 ADSWRITE` RisingEdge R_TRIG` FallingEdge F_TRIG`LenPath`LenDir` LenComLine`pData STARTPROC_BUFFER` data buffer NETID  T_AmsNetIdPATHSTR  T_MaxStringDIRNAME  T_MaxString COMNDLINE  T_MaxStringSTARTTMOUTBUSY ERR ERRID N OTSTRUCT_TO_TIMEtmpMilli`OTIN OTSTRUCTOTSTRUCT_TO_TIMEN PBOOL_TO_BOOLin PBOOL_TO_BOOLN PBYTE_TO_BYTEin PBYTE_TO_BYTEN PDATE_TO_DATEin PDATE_TO_DATEN PDINT_TO_DINTin PDINT_TO_DINTN PDT_TO_DTin PDT_TO_DTN PDWORD_TO_DWORDinPDWORD_TO_DWORDN PHUGE_TO_HUGEin T_HUGE_INTEGER PHUGE_TO_HUGE T_HUGE_INTEGERN PINT_TO_INTin PINT_TO_INTN PLARGE_TO_LARGEin T_LARGE_INTEGERPLARGE_TO_LARGE T_LARGE_INTEGERN PLC_READSYMINFOADSREAD1 ADSREAD` RisingEdge R_TRIG` SymInfoStruct `NETID  T_AmsNetIdPORTSTARTTMOUTBUSY ERR ERRID SYMCOUNT SYMSIZE N PLC_READSYMINFOBYNAMEfbReadEx PLC_ReadSymInfoByNameEx`NETID  T_AmsNetIdPORTSYMNAME  T_MaxStringSTARTTMOUT BUSY ERR ERRIDSYMINFO  SYMINFOSTRUCTN PLC_READSYMINFOBYNAMEEX ADSRDWRT1 ADSRDWRT` RisingEdge R_TRIG`state` symInfoBuffer SYMINFO_BUFFER` nameLength` typeLength` commentLength` nameAdrOffset` typeAdrOffset`commentAdrOffset` nameCpyLength` typeCpyLength` commentCpyLength`!endOfBufAdrOffset`"NETID  T_AmsNetIdPORTSYMNAME  T_MaxStringSTARTTMOUT BUSY ERR ERRIDSYMINFO  SYMINFOSTRUCTOVTYPE@ TRUE => Type name string length overflow, FALSE => no overflow OVCOMMENT> TRUE => Comment string length overflow, FALSE => no overflow N PLC_RESET ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdPORTRESETTMOUTBUSY ERR ERRID N PLC_START ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdPORTSTARTTMOUTBUSY ERR ERRID N PLC_STOP ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdPORTSTOPTMOUTBUSY ERR ERRID N PLREAL_TO_LREALinPLREAL_TO_LREALN PMAXSTRING_TO_MAXSTRINGin  T_MaxStringPMAXSTRING_TO_MAXSTRING  T_MaxStringN PREAL_TO_REALin PREAL_TO_REALN PROFILER MAX_DATABUFF_SIZEd@ RisingEdgeStart R_TRIG`RisingEdgeReset R_TRIG`FallingEdgeStart F_TRIG`GETCPUACCOUNT1  GETCPUACCOUNT` OldCpuCntDW` MeasureData d`TimeSum`MaxData`idx`START0rising edge starts measurement and falling stopsRESETBUSYDATA PROFILERSTRUCTN PSINT_TO_SINTin PSINT_TO_SINTN PSTRING_TO_STRINGinQQPSTRING_TO_STRINGQQN PTIME_TO_TIMEin PTIME_TO_TIMEN PTOD_TO_TODin PTOD_TO_TODN PUDINT_TO_UDINTinPUDINT_TO_UDINTN PUHUGE_TO_UHUGEin T_UHUGE_INTEGERPUHUGE_TO_UHUGE T_UHUGE_INTEGERN PUINT64_TO_UINT64in T_ULARGE_INTEGERPUINT64_TO_UINT64 T_ULARGE_INTEGERN PUINT_TO_UINTin PUINT_TO_UINTN PULARGE_TO_ULARGEin T_ULARGE_INTEGERPULARGE_TO_ULARGE T_ULARGE_INTEGERN PUSINT_TO_USINTinPUSINT_TO_USINTN PWORD_TO_WORDin PWORD_TO_WORDN RAD_TO_DEGANGLE RAD_TO_DEGN ROUTETRANSPORT_TO_STRINGeType E_RouteTransportTypeROUTETRANSPORT_TO_STRINGQQN RTCfbGetCpuCounter  GETCPUCOUNTER` risingEdge R_TRIG`oldTick`currTick`nanoDiff`nanoRest`secDiff`init`ENPDTQCDT N RTC_EXfbGetCpuCounter  GETCPUCOUNTER` risingEdge R_TRIG`oldTick`currTick`nanoDiff`nanoRest`secDiff`init`ENPDTPMSEKQ CDT CMSEK N RTC_EX2 fbGetCpuCounter  GETCPUCOUNTER` risingEdge R_TRIG`oldTick`currTick`nanoDiff`nanoRest`secDiff`dateTime`init`ENPDT  TIMESTRUCTPMICROQ CDT ; ( wYear := 1970, wMonth := 1, wDay := 1, wDayOfWeek := 4 ) TIMESTRUCT CMICRO N SCOPEASCIIEXPORT fbAdsWrite ADSWRITE bExecute sFilePath  T_MaxStringtTimeoutbBusybError iErrorId N SCOPEEXIT fbAdsWrite ADSWRITE RisingEdge R_TRIG stepfbDelay TONbExecute- Rising edge starts function block execution tTimeOut> Maximum time allowed for the execution of the function block bBusybErroriErrorId N SCOPEGETRECORDLEN fbAdsRead ADSREAD bExecutebBusybErroriErrorId fRecordLen N SCOPEGETSTATE fbAdsRead ADSREAD State bExecutebBusybErroriErrorIdbOnline N SCOPELOADFILE fbAdsWrite ADSWRITE bExecute sFilePath  T_MaxStringtTimeoutbBusybError iErrorId N SCOPEMANUALTRIGGER fbAdsWrite ADSWRITE bExecutebBusybErroriErrorIdN SCOPESAVEAS RisingEdge R_TRIG fbAdsWrite ADSWRITEstepbExecute- Rising edge starts function block execution sFilePath  T_MaxString e.g. c:\Axis1.scptTimeout> Maximum time allowed for the execution of the function block bBusybError iErrorId N SCOPESETOFFLINE fbAdsWrite ADSWRITE bExecutebBusybErroriErrorIdN SCOPESETONLINE fbAdsWrite ADSWRITE bExecutebBusybErroriErrorIdN SCOPESETRECORDLEN fbAdsWrite ADSWRITE bExecute fRecordLenbBusybErroriErrorId N SCOPEVIEWEXPORT fbAdsWrite ADSWRITE bExecute sFilePath  T_MaxStringtTimeoutbBusybError iErrorId N STRING_TO_CSVFIELDcbField` in  T_MaxString! Input data in PLC string format bQM l TRUE => Enclose result string in quotation marks, FALSE => Don't enclose result string in quotation marks. STRING_TO_CSVFIELD  T_MaxStringN STRING_TO_SYSTEMTIMEb  16#31, 16#36, 16#30, 16#31, (* year 1601 *) 16#2D(*-*), 16#30, 16#31(*01*), (* month *) 16#2D(*-*), 16#30, 16#31(*01*), (* day *) 16#2D(*-*), 16#30, 16#30(*00*), (* hour *) 16#3A(*:*), 16#30, 16#30(*00*), (* minute *) 16#3A(*:*), 16#30, 16#30(*00*), (* second *) 16#2E(*.*), 16#30, 16#30, 16#30(*000*), (* milliseconds *) 16#001601-01-01-00:00:00.000` null delimiter ts * ( wYear := 1601, wMonth := 1, wDay := 1 )A TIMESTRUCT`n`bFmt`dwYears`dwDays` Index7001in1 Input string, format: '2007-03-05-17:35:09.223' STRING_TO_SYSTEMTIME  TIMESTRUCTN STRING_TO_UINT64ptr`constTen & ( dwHighPart := 0, dwLowPart := 10 ) T_ULARGE_INTEGER` inSTRING_TO_UINT64 T_ULARGE_INTEGERN SYSTEMTIME_TO_DTb  16#44, 16#54, 16#23(*DT#*), 16#31, 16#39, 16#37, 16#30(*1970*), 16#2D(*-*), 16#30, 16#31(*01*), 16#2D(*-*), 16#30, 16#31(*01*), 16#2D(*-*), 16#30, 16#30(*00*), 16#3A(*:*), 16#30, 16#30(*00*), 16#3A(*:*), 16#30, 16#30(*00*), 16#00DT#1970-01-01-00:00:00`str` nSeconds` Index7001TIMESTR  TIMESTRUCTSYSTEMTIME_TO_DTN SYSTEMTIME_TO_FILETIMEtmp1 T_ULARGE_INTEGER` tmp2 T_ULARGE_INTEGER` pastDays` i`  systemTime  TIMESTRUCTSYSTEMTIME_TO_FILETIME  T_FILETIMEN SYSTEMTIME_TO_STRINGb  16#31, 16#36, 16#30, 16#31(*1601*), (* year *) 16#2D(*-*), 16#30, 16#31(*01*), (* month *) 16#2D(*-*), 16#30, 16#31(*01*), (* day *) 16#2D(*-*), 16#30, 16#30(*00*), (* hour *) 16#3A(*:*), 16#30, 16#30(*00*), (* minute *) 16#3A(*:*), 16#30, 16#30(*00*), (* second *) 16#2E(*.*), 16#30, 16#30, 16#30(*000*), (* milliseconds *) 16#001601-01-01-00:00:00.000` Index7001in  TIMESTRUCT SYSTEMTIME_TO_STRINGN TC_CONFIG ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdSETTMOUTBUSYERR ERRID N TC_CPUUSAGEADSREAD1 ADSREAD` RisingEdge R_TRIG`NETID  T_AmsNetIdSTARTTMOUTBUSYERR ERRID USAGE in %N TC_RESTART ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdRESTARTTMOUTBUSYERR ERRID N TC_STOP ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdSTOPTMOUTBUSYERR ERRID N TC_SYSLATENCYADSREAD1 ADSREAD` RisingEdge R_TRIG` FallingEdge F_TRIG`tmpData `NETID  T_AmsNetId Ams net id START6 Rising edge on this input activates the fb execution TMOUT Max fb execution time BUSY ERR ERRID ACTUAL  Actual latency in s MAXIMUM  Maximum latency in s N TIME_TO_OTSTRUCTtmpMilli`TINTIME_TO_OTSTRUCT OTSTRUCTN UINT32X32TO64Tmp1` Tmp2` Tmp3` Tmp4` DW1` DW2`DW3`DW4`ui32aui32b UInt32x32To64 T_ULARGE_INTEGERN UINT64_TO_LREALin T_ULARGE_INTEGERUINT64_TO_LREALN UINT64_TO_STRING remainder T_ULARGE_INTEGER`constTen & ( dwHighPart := 0, dwLowPart := 10 ) T_ULARGE_INTEGER` in T_ULARGE_INTEGERUINT64_TO_STRINGN UINT64ADD64bOV` ui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGER UInt64Add64 T_ULARGE_INTEGERN UINT64ADD64EXaugend T_ULARGE_INTEGERaddend T_ULARGE_INTEGER UInt64Add64Ex T_ULARGE_INTEGERbOV 3 TRUE => arithmetic overflow, FALSE => no overflow N UINT64ANDui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGER UInt64And T_ULARGE_INTEGERN UINT64CMP64ui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGER  UInt64Cmp64N UINT64DIV16EX pDividend ` pResult ` rest` dividend T_ULARGE_INTEGERdivisor UInt64Div16Ex T_ULARGE_INTEGER remainder T_ULARGE_INTEGERN UINT64DIV64 remainder T_ULARGE_INTEGER` dividend T_ULARGE_INTEGERdivisor T_ULARGE_INTEGER UInt64Div64 T_ULARGE_INTEGERN UINT64DIV64EXmsBit / ( dwHighPart := 16#80000000, dwLowPart := 0 )T_ULARGE_INTEGER` bitShift` cmp`in  T_ULARGE_INTEGER`out  T_ULARGE_INTEGER` cbReturned` Index7001dividend T_ULARGE_INTEGERdivisor T_ULARGE_INTEGER UInt64Div64Ex T_ULARGE_INTEGER remainder T_ULARGE_INTEGERN UINT64ISZEROui64 T_ULARGE_INTEGER UInt64isZeroN UINT64LIMITui64min T_ULARGE_INTEGERui64in T_ULARGE_INTEGERui64max T_ULARGE_INTEGER UInt64Limit T_ULARGE_INTEGERN UINT64MAXui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGER UInt64Max T_ULARGE_INTEGERN UINT64MINui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGER UInt64Min T_ULARGE_INTEGERN UINT64MOD64dividend T_ULARGE_INTEGERdivisor T_ULARGE_INTEGER UInt64Mod64 T_ULARGE_INTEGERN UINT64MUL64bOV`  multiplicand T_ULARGE_INTEGER multiplier T_ULARGE_INTEGER UInt64Mul64 T_ULARGE_INTEGERN UINT64MUL64EXbCarry` bSumCarry` n`m` multiplicand T_ULARGE_INTEGER multiplier T_ULARGE_INTEGER UInt64Mul64Ex T_ULARGE_INTEGERbOV 3 TRUE => Arithmetic overflow, FALSE => no overflow N UINT64NOTui64 T_ULARGE_INTEGER UInt64Not T_ULARGE_INTEGERN UINT64ORui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGERUInt64Or T_ULARGE_INTEGERN UINT64ROLbMSB` ui64 T_ULARGE_INTEGERn UInt64Rol T_ULARGE_INTEGERN UINT64RORbLSB` ui64 T_ULARGE_INTEGERn UInt64Ror T_ULARGE_INTEGERN UINT64SHLui64 T_ULARGE_INTEGERn UInt64Shl T_ULARGE_INTEGERN UINT64SHRui64 T_ULARGE_INTEGERn UInt64Shr T_ULARGE_INTEGERN UINT64SUB64ui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGER UInt64Sub64 T_ULARGE_INTEGERN UINT64XORui64a T_ULARGE_INTEGERui64b T_ULARGE_INTEGER UInt64Xor T_ULARGE_INTEGERN ULARGE_INTEGER dwHighPart dwLowPartULARGE_INTEGER T_ULARGE_INTEGERN ULARGE_TO_LARGEin T_ULARGE_INTEGERULARGE_TO_LARGE T_LARGE_INTEGERN WORD_TO_FIX16in 16 bit fixed point number n number of fractional bits  WORD_TO_FIX16 T_FIX16N WRITEPERSISTENTDATA ADSWRTCTL1  ADSWRTCTL` RisingEdge R_TRIG`NETID  T_AmsNetIdPORTSTARTTMOUTBUSY ERR ERRID N sC:\TWINCAT\PLC\LIB\TcEtherCAT.lib@ACONVERTDCTIMETOPOSfbCall FW_CallGenericFb` in `$ 12 byte = nAxisId, nSubIdx, dcTime nAxisIdnSubIdxdcTime  T_DCTIME32 32 bit distributed clock time  fPositioniErr N CONVERTPOSTODCTIMEfbCall FW_CallGenericFb` in `' 16 byte = nAxisId, nSubIdx, fPosition nAxisIdnSubIdx fPositiondcTime  T_DCTIME32 32 bit distributed clock time iErr N DCTIME_TO_DCTIMESTRUCT D`M`Y` uiPastDays T_ULARGE_INTEGER` uiPastYears T_ULARGE_INTEGER` uiNsRest T_ULARGE_INTEGER` uiMsOfLastDay T_ULARGE_INTEGER` dwPastDays` dwPastYears` dwYearDays`in T_DCTIMEDCTIME_TO_DCTIMESTRUCT  DCTIMESTRUCTN DCTIME_TO_FILETIMEdc T_ULARGE_INTEGER` remainder T_ULARGE_INTEGER` in T_DCTIME- Number of nanoseconds since January 1, 2000 DCTIME_TO_FILETIME  T_FILETIMEN DCTIME_TO_STRINGresult T_ULARGE_INTEGER` remainder T_ULARGE_INTEGER`ft  T_FILETIME`ts  TIMESTRUCT`in T_DCTIME  Distributed clock time DCTIME_TO_STRINGN DCTIME_TO_SYSTEMTIMEdct  DCTIMESTRUCT`in T_DCTIME Distributed clock time DCTIME_TO_SYSTEMTIME  TIMESTRUCTN DCTIMESTRUCT_TO_DCTIMEtmp1 T_ULARGE_INTEGER` tmp2 T_ULARGE_INTEGER` pastDays` i` in  DCTIMESTRUCTDCTIMESTRUCT_TO_DCTIME T_DCTIMEN F_CHECKVENDORID nVendorId`nMask_lower_3_byte` stSlaveIdentity ST_EcSlaveIdentityF_CheckVendorIdN F_CONVBK1120COUPLERSTATETOSTRING sLocalStringQQ`nState F_ConvBK1120CouplerStateToStringQQN F_CONVEXTTIMETODCTIMEDcTime T_DCTIME`ExtTime T_DCTIMEDcToExtTimeOffset T_LARGE_INTEGERF_ConvExtTimeToDcTime T_DCTIMEN F_CONVMASTERDEVSTATETOSTRING sLocalStringQQ`nStateF_ConvMasterDevStateToStringQQN F_CONVPRODUCTCODETOSTRING sLocalStringQQ`nTy`nC1` stLocXXDDD ST_TPCTYPE_CODE_XXDDD` stLocXXDDXD ST_TPCTYPE_CODE_XXDDXD` stLocXXDXDD ST_TPCTYPE_CODE_XXDXDD` stLocXXDXDXD ST_TPCTYPE_CODE_XXDXDXD` nPC_CHAR_START` nMask_ty` nMask_1_to_6?` nMask_7_to_16` nMask_5_to_10`nMask_11_to_16` nMask_1_to_16`nMask_17_to_32`nMask_17_to_22?`nMask_22_to_32`stSlaveIdentity ST_EcSlaveIdentityF_ConvProductCodeToStringQQN F_CONVSLAVESTATETOBITSstEcSlaveStateBits ST_EcSlaveStateBitsstEcSlaveState ST_EcSlaveStateF_ConvSlaveStateToBits ST_EcSlaveStateBitsN F_CONVSLAVESTATETOSTRINGstate ST_EcSlaveStateF_ConvSlaveStateToStringQQN F_CONVSTATETOSTRING sLocalStringQQ`nStateF_ConvStateToStringQQN F_CONVTCTIMETODCTIMEDcTime T_DCTIME`TcTime T_DCTIMEDcToTcTimeOffset T_LARGE_INTEGERF_ConvTcTimeToDcTime T_DCTIMEN F_CONVTCTIMETOEXTTIMEExtTime T_DCTIME` TcTime T_DCTIMEDcToTcTimeOffset T_LARGE_INTEGERDcToExtTimeOffset T_LARGE_INTEGERF_ConvTcTimeToExtTime T_DCTIMEN F_GETACTUALDCTIME cbReturned`F_GetActualDcTime T_DCTIMEN F_GETCURDCTASKTIME cbReturned`F_GetCurDcTaskTime T_DCTIMEN F_GETCURDCTICKTIMEfbGetSystemTime  GETSYSTEMTIME`ft T_ULARGE_INTEGER`bOV` cbReturned` F_GetCurDcTickTime T_DCTIMEN F_GETCUREXTTIMETcTime T_DCTIME`ExtTime T_DCTIME` DcToExtTimeOffset T_LARGE_INTEGERDcToTcTimeOffset T_LARGE_INTEGERF_GetCurExtTime T_DCTIMEN F_GETVERSIONTCETHERCATnVersionElementF_GetVersionTcEtherCATN FB_ECCOESDOREADnOffset` fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device. nSubIndex CANopen Sdo subindex.nIndex CANopen Sdo index.pDstBuf; Contains the address of the buffer for the received data. cbBufLen 3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusybErrornErrIdN FB_ECCOESDOREADEXnOffset` fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG` sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device. nSubIndex CANopen Sdo subindex.nIndex CANopen Sdo index.pDstBuf; Contains the address of the buffer for the received data. cbBufLen 3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bCompleteAccess  access complete objectbBusybErrornErrIdN FB_ECCOESDOWRITEnOffset` fbAdsWrite ADSWRITE` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device. nSubIndex CANopen Sdo subindex.nIndex CANopen Sdo index.pSrcBufD Contains the address of the buffer containing the data to be send. cbBufLen 3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusybErrornErrIdN FB_ECCOESDOWRITEEXnOffset` fbAdsWrite ADSWRITE` RisingEdge R_TRIG` sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device. nSubIndex CANopen Sdo subindex.nIndex CANopen Sdo index.pSrcBufD Contains the address of the buffer containing the data to be send. cbBufLen 3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bCompleteAccess  access complete objectbBusybErrornErrIdN FB_ECDCTICKTIMEBASECALC uiPastDays T_ULARGE_INTEGER` uiPastYears T_ULARGE_INTEGER` dwPastDays` dwPastYears` dwYearDays`in_old T_DCTIME`in T_DCTIME`bDate`J TRUE => perform date calculation, FALSE => perform only time calculation uiNsRest T_ULARGE_INTEGER` uiMsOfLastDay T_ULARGE_INTEGER` D`  Day, Month, Year, Day of week M`  Day, Month, Year, Day of week Y`  Day, Month, Year, Day of week DOW`  Day, Month, Year, Day of week N FB_ECDCTIMECTRLfbCalc FB_EcDcTickTimeBaseCalc`put Input parameter bError ! TRUE => Error, FALSE => No errorget  Output parameter in T_DCTIME. Distributed Clock System Time input variable N FB_ECEXTSYNCCALCTIMEDIFFDcTime T_DCTIME`TmpTime T_DCTIME` ExtTimePrev T_DCTIME`TestCalcExtTime T_DCTIME` nTimeDiff : with difference greater than 32bit timeDiff = 0xffffffff nOffsetFromSyncMaster W less than 32 bit int Offset = 0x80000000, greater than 32 bit int Offset = 0x7FFFFFFFDcToTcTimeOffset T_LARGE_INTEGERDcToExtTimeOffset T_LARGE_INTEGERExtTime T_DCTIMEIntTime T_DCTIMEN FB_ECEXTSYNCCHECKfbCalcTimeDiff FB_EcExtSyncCalcTimeDiff` nCntSyncCyc`nSyncThreshold` nSyncWindow bNotConnected bSynchronized nTimeDiffnOffsetFromSyncMasterDcToTcTimeOffset T_LARGE_INTEGERDcToExtTimeOffset T_LARGE_INTEGERExtTime T_DCTIME IntTime T_DCTIME N FB_ECFOEACCESSfbAdsRW  ADSRDWRTEX` RisingEdge R_TRIG`sErrText  '' T_MaxString`hFoe T_HFoe File over EtherCAT handle pBuffer Buffer address for read/write cbBuffer Count of bytes for read/write bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId cbDone bEOF TRUE == End of file N FB_ECFOECLOSEfbAdsRW  ADSRDWRTEX` RisingEdge R_TRIG`sErrText  '' T_MaxString`hFoe T_HFoe File over EtherCAT handle bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusybError nErrId N FB_ECFOELOAD RisingEdge R_TRIG`fbFwOpen  FB_FileOpen` fbFwClose  FB_FileClose`fbFwRead  FB_FileRead` fbFwWrite  FB_FileWrite`fbFwSeek  FB_FileSeek`fbFwTell  FB_FileTell` fbFoeOpen  FB_EcFoeOpen` fbFoeClose  FB_EcFoeClose` fbFoeAccess FB_EcFoeAccess` fbGetState FB_EcGetSlaveState`! fbSetState FB_EcSetSlaveState`" fbGetProtErr FB_EcGetLastProtErrInfo`$buffer ?`& 0x4000 bytes nStep`'bFw`( TRUE => firmware file opened bFoe`)# TRUE => file over EtherCAT opened bMode`* TRUE => bootstrap mode enabled oldState`+cbFSize`, sFSrvNetID  '' T_AmsNetID`- bGetProtErr`.sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr& Address of the EtherCAT slave device. sPathName  T_MaxString2 Firmware file path e.g.: 'c:\Firmware\ELXXS.efw' dwPass Password eMode  eFoeMode_Write E_EcFoeMode Read/write access mode bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout@  3 States the time before the function is cancelled. bBusy bError nErrIdcbLoad nProgresssInfo  '' T_MaxString) Extended FoE protocol error information N FB_ECFOEOPENfbAdsRW  ADSRDWRTEX` RisingEdge R_TRIG`sErrText  '' T_MaxString`sDrive`sDir  T_MaxString` sFileName  T_MaxString`sExt  T_MaxString`nStep`sNetId  T_AmsNetId! AmsNetId of the EtherCAT device.nPort  T_AmsPort Address of the EtherCAT device. sPathName  T_MaxString Firmware file path name dwPass Password eMode  eFoeMode_Write E_EcFoeMode File over EtherCAT access mode bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusy bError nErrIdhFoe T_HFoe File over EtherCAT handle N FB_ECGETALLSLAVEADDRnStep` fbAdsReadEx  ADSREADEX`fbGetSlaveCount FB_EcGetSlaveCount` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.pAddrBuf A Contains the address of the buffer the addresses are copied to. cbBufLenW Size of the buffer pAddrBuf. The size of the buffer must be at least nSlave * 2 Bytes.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId nSlavesN FB_ECGETALLSLAVECRCERRORSnStep` fbAdsReadEx  ADSREADEX`fbGetSlaveCount FB_EcGetSlaveCount` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. pCrcErrorBuf B Contains the address of the buffer the crc errors are copied to. cbBufLen[ Size of the buffer pCrcErrorBuf. The size of the buffer must be at least nSlave * 4 Bytes.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId nSlavesN FB_ECGETALLSLAVESTATESnStep` fbAdsReadEx  ADSREADEX`fbGetSlaveCount FB_EcGetSlaveCount` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. pStateBuf  ST_EcSlaveState> Contains the address of the buffer the states are copied to. cbBufLenX Size of the buffer pStateBuf. The size of the buffer must be at least nSlave * 2 Bytes.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId nSlavesN FB_ECGETCONFSLAVES nTotalSlavesnStated` fbTrigger R_TRIG` fbAdsRead ADSREAD`nIdxOffs`nIndex` nBlockIndex` nSlavesRead` stLocalInfo ST_EcSlaveConfigData`!nSDO_IDX_SBP_SLAVECONFIGDATASTART`nSDO_IDX_SBP_CONFIGUREDSLAVES ` !nADSIOFFS_ECAT_COE_COMPLETEACCESS`!sNetId  T_AmsNetId'AmsNetId of the EtherCAT master device.pArrEcConfSlaveInfo  ST_EcSlaveConfigDatacbBufLenv Size of the buffer arrEcConfSlaveInfo. The size of the buffer must be at least nSlave * SIZEOF(ST_EcSlaveConfigData).bExecutetTimeout3 States the time before the function is cancelled. bBusy bError nErrorId nSlavesN FB_ECGETLASTPROTERRINFO fbAdsRead ADSREAD` fbLocalNetID FB_GetLocalAmsNetId` fbTaskIndex GETCURTASKINDEX`nStep` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr& Address of the EtherCAT slave device. eProtocol  eEcMbxProt_FoEE_EcMbxProtType Mailbox protocol type bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId info ST_EcLastProtErrInfoN FB_ECGETMASTERSTATE fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId state (Current State of EtherCAT master device.N FB_ECGETSCANNEDSLAVES nTotalSlavesnStated` fbTrigger R_TRIG` fbAdsRead ADSREAD` fbAdsWrite ADSWRITE` stScanStatus ST_EcScannedSlaveStatus`nIdxOffs`nIndex` nBlockIndex` nSlavesRead` stLocalInfo ST_EcSlaveScannedData` nScanCommand`nSDO_IDX_SBP_SLAVEINFODATASTART`!nSDO_IDX_SBP_SCANCOMMANDSTART`"nSDO_IDX_SBP_SCANNEDSLAVES@`#!nADSIOFFS_ECAT_COE_COMPLETEACCESS`$bExecutesNetId  T_AmsNetId'AmsNetId of the EtherCAT master device.pArrEcScannedSlaveInfo  ST_EcSlaveScannedDatacbBufLenw Size of the buffer arrEcConfSlaveInfo. The size of the buffer must be at least nSlave * SIZEOF(ST_EcSlaveScannedData).tTimeout3 States the time before the function is cancelled. bBusy bError nErrorId nSlaves N FB_ECGETSLAVECOUNT fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId nSlaves Count of EtherCAT slave devices.N FB_ECGETSLAVECRCERROR fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId crcError  ST_EcCrcError &Crc error of the EtherCAT slave devie.N FB_ECGETSLAVECRCERROREX fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId crcError ST_EcCrcErrorEx &Crc error of the EtherCAT slave devie.N FB_ECGETSLAVEIDENTITY fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddrAddress of the slave device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId identity ST_EcSlaveIdentity +Slave identity of the EtherCAT slave devie.N FB_ECGETSLAVESTATE fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId state ST_EcSlaveState +Current State of the EtherCAT slave device.N FB_ECLOGICALREADCMDfbAdsRW  ADSRDWRTEX`cmd  ST_EcMaxCmd` RisingEdge R_TRIG`nStep`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.logAddr logical address to read from.len length of data to read. pDstBuf; Contains the address of the buffer for the received data. bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId wkcreceived working counterN FB_ECLOGICALWRITECMDfbAdsRW  ADSRDWRTEX`cmd  ST_EcMaxCmd` RisingEdge R_TRIG`nStep`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.logAddr logical address to read from.len length of data to read. pSrcBuf; Contains the address of the buffer for the received data. bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId wkcreceived working counterN FB_ECMASTERFRAMESTATISTIC fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG` internal used struct nStepd` nOldTimeStamp`nOldSendFrames`nOldSendQueuedFrames` fDeltaTime` nDeltaFrames`nDeltaQueuedFrames`stFrameStatistic ST_EcMasterStatistic`ECADS_IGRP_MASTER_STATISTIC ` sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId nLostFrames fFramesPerSecond nLostQueuedFramesfQueuedFramesPerSecondN !FB_ECMASTERFRAMESTATISTICCLEARCRC fbAdsWrite ADSWRITE` RisingEdge R_TRIG` internal used struct nStepd`ECADS_IGRP_MASTER_CRC`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId N $FB_ECMASTERFRAMESTATISTICCLEARFRAMES fbAdsWrite ADSWRITE` RisingEdge R_TRIG` internal used struct nStepd`ECADS_IGRP_MASTER_STATISTIC `sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId N %FB_ECMASTERFRAMESTATISTICCLEARTXRXERR fbAdsWrite ADSWRITE` RisingEdge R_TRIG` internal used struct nStepd`ECADS_IGRP_MASTER_CRC`sNetId  T_AmsNetId AmsNetId of the CPU.nEcMasterDevID Device ID of EtherCAT Master bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. bBusy bError nErrId N FB_ECPHYSICALREADCMDfbAdsRW  ADSRDWRTEX`cmd  ST_EcMaxCmd` RisingEdge R_TRIG`nStep`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.adpa Configured address (fixed addressing) or position(autoincrement addressing) of the slave device.ado8 Offset of register/dpram in EtherCAT Slave Controller.len length of data to read. eType  eAdressingType_FixedE_EcAdressingType adressing typepDstBuf; Contains the address of the buffer for the received data. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusy bErrornErrIdwkcreceived working counterN FB_ECPHYSICALWRITECMDfbAdsRW  ADSRDWRTEX`cmd  ST_EcMaxCmd` RisingEdge R_TRIG`nStep`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.adpa Configured address (fixed addressing) or position(autoincrement addressing) of the slave device.ado8 Offset of register/dpram in EtherCAT Slave Controller.len length of data to read. eType  eAdressingType_FixedE_EcAdressingType adressing typepSrcBuf; Contains the address of the buffer for the received data. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusy bErrornErrIdwkcreceived working counterN FB_ECREQMASTERSTATE fbAdsWrite ADSWRITE` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. state3 State requested from the EtherCAT master device.bBusy bError nErrId N FB_ECREQSLAVESTATE fbAdsWrite ADSWRITE` RisingEdge R_TRIG`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout3 States the time before the function is cancelled. state1 State requested from the EtherCAT slave device.bBusy bError nErrId N FB_ECSETMASTERSTATE fbReq FB_EcReqMasterState`fbGet FB_EcGetMasterState` waitTimer TON` pollTimer TON` RisingEdge R_TRIG` globState`subState`newState`bBreak`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout'3 States the time before the function is cancelled. reqState2 State requested from the EtherCAT master device.bBusy bError nErrId currState 4 Current state received from EtherCAT master device N FB_ECSETSLAVESTATE fbReq FB_EcReqSlaveState`fbGet FB_EcGetSlaveState` waitTimer TON` pollTimer TON` RisingEdge R_TRIG` globState`subState`newState`bBreak`sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device.bExecuteF Function block execution is triggered by a rising edge at this input.tTimeout'3 States the time before the function is cancelled. reqState0 State requested from the EtherCAT slave device.bBusy bError nErrId currState ST_EcSlaveState 3 Current state received from EtherCAT slave device N FB_ECSOEREADnOffset` fbAdsReadEx  ADSREADEX` RisingEdge R_TRIG` sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device.nIdn SoE idn.nElement SoE element.nDriveNo Drive numberbCommand D bCommand must be set, if internal command excecution should be usedpDstBuf ; Contains the address of the buffer for the received data. cbBufLen 3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusybErrornErrIdN FB_ECSOEWRITEnOffset` fbAdsWrite ADSWRITE` RisingEdge R_TRIG` sNetId  T_AmsNetId( AmsNetId of the EtherCAT master device. nSlaveAddr Address of the slave device.nIdn SoE idn.nElement SoE element.nDriveNo Drive numberbCommand D bCommand must be set, if internal command excecution should be usedpSrcBuf D Contains the address of the buffer containing the data to be send. cbBufLen 3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusybErrornErrIdN FB_SOEREAD_BYDRIVEREF fbEcSoERead  FB_EcSoEReadiState bExecute_IiErrIddwData  stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC nIdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023nElement SoE element.pDstBuf; Contains the address of the buffer for the received data. cbBufLen3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusy bError iAdsErrId iSercosErrId dwAttributeN FB_SOEWRITE_BYDRIVEREF fbEcSoEWrite  FB_EcSoEWriteiErrIdiState bExecute_I stDriveRef  ST_DriveRefh contains sNetID of EcMaster, nSlaveAddr of EcDrive, nDriveNo of EcDrive, either preset or read from NC nIdnH SoE IDN: e.g. "S_0_IDN + 1" for S-0-0001 or "P_0_IDN + 23" for P-0-0023nElement SoE element.pSrcBufD Contains the address of the buffer containing the data to be send. cbBufLen3 Contains the max. number of bytes to be received. bExecute F Function block execution is triggered by a rising edge at this input.tTimeout 3 States the time before the function is cancelled. bBusy bError iAdsErrId iSercosErrIdN FILETIME_TO_DCTIMEft T_ULARGE_INTEGER` bOV` in  T_FILETIME: Number of 100-nanosecond intervals since January 1, 1601 FILETIME_TO_DCTIME T_DCTIMEN STRING_TO_DCTIMEb  16#32, 16#30, 16#30, 16#30, (* year 2000 *) 16#2D(*-*), 16#30, 16#31(*01*), (* month *) 16#2D(*-*), 16#30, 16#31(*01*), (* day *) 16#2D(*-*), 16#30, 16#30(*00*), (* hour *) 16#3A(*:*), 16#30, 16#30(*00*), (* minute *) 16#3A(*:*), 16#30, 16#30(*00*), (* second *) 16#2E(*.*), 16#30, 16#30, 16#30, 16#30, 16#30, 16#30, 16#30, 16#30, 16#30(*000000000*), (* nanoseconds *) 16#002000-01-01-00:00:00.000000000` null delimiter dct T_DCTIME`ts  TIMESTRUCT`ft  T_FILETIME`mcs`n`bFmt` Index7001in7 Input string, format: '2007-03-07-12:23:33.123456789' STRING_TO_DCTIME T_DCTIMEN SYSTEMTIME_TO_DCTIMEdct  DCTIMESTRUCT` in  TIMESTRUCT System time as struct micro Microseconds: 0..999 nano Nanoseconds: 0..999 SYSTEMTIME_TO_DCTIME T_DCTIMEN qC:\TWINCAT\PLC\LIB\STANDARD.LIB@CONCATSTR1STR2CONCATNCTDM Variable for CD Edge DetectionCD Count Down on rising edge LOAD Load Start Value PV Start Value Q  Counter reached 0 CV  Current Counter Value NCTUM Variable for CU Edge Detection CU Count Up RESET Reset Counter to 0 PV Counter Limit Q  Counter reached the Limit CV  Current Counter Value NCTUDMU Variable for CU Edge Detection MD Variable for CD Edge Detection CU Count Up CD Count Down RESET  Reset Counter to Null LOAD  Load Start Value PV  Start Value / Counter Limit QU Counter reached Limit QD Counter reached Null CV Current Counter Value NDELETESTRLENPOSDELETENF_TRIGM CLK Signal to detect Q Edge detected NFINDSTR1STR2FINDNINSERTSTR1STR2POSINSERTNLEFTSTRSIZELEFTNLENSTRLENNMIDSTRLENPOSMIDNR_TRIGM CLK Signal to detect Q Edge detected NREPLACESTR1STR2LPREPLACENRIGHTSTRSIZERIGHTNRSSETRESET1Q1 NSEMAXCLAIM RELEASE BUSY NSRSET1RESETQ1 NTOFM  internal variable StartTime internal variable IN? starts timer with falling edge, resets timer with rising edge PT time to pass, before Q is set Q 2 is FALSE, PT seconds after IN had a falling edge ET  elapsed time NTONM  internal variable StartTime internal variable IN? starts timer with rising edge, resets timer with falling edge PT time to pass, before Q is set Q 0 is TRUE, PT seconds after IN had a rising edge ET  elapsed time NTP StartTime  internal variable IN! Trigger for Start of the Signal PT' The length of the High-Signal in 10ms Q The pulse ET & The current phase of the High-Signal NoC:\TWINCAT\PLC\LIB\TcBase.lib@FW_ADSCLEAREVENTSSTAMP_I ACCESSCNT_IBUSY_IERR_IERRID_I READ_SAV_I TICKSTART_IsNetIdbClearnModetTimeoutbBusy bError nErrId N FW_ADSLOGDINT nCtrlMasksMsgFmtnArg FW_AdsLogDINTNFW_ADSLOGEVENT STAMPREQ_I STAMPRES_I STAMPSIG_I STAMPCON_I ACCESSCNT_I AMSADDR_I EVENT_I  FW_TcEventpTCEVENTSTREAM_ICBEVENTSTREAM_InSTATE_I nSTATEREQ_I nSTATERES_I nSTATESIG_I nSTATECON_I!ERR_I"ERRID_I# bEVENT_SAV_I$bEVENTQUIT_SAV_I% TICKSTART_I& sNetIdnPortbEvent bEventQuitstEventConfigData  FW_TcEventpEventDataAddress pointer cbEventDataLength bFbCleanup tTimeout  nEventStatebErrornErrIdbQuitNFW_ADSLOGLREAL nCtrlMasksMsgFmtfArgFW_AdsLogLREALN FW_ADSLOGSTR nCtrlMasksMsgFmtsArg FW_AdsLogSTRN FW_ADSRDWRTSTAMP_I ACCESSCNT_IBUSY_IERR_IERRID_I WRTRD_SAV_I PDESTADDR_I TICKSTART_I sNetIdnPortnIdxGrpnIdxOffs cbWriteLen cbReadLen pWriteBuff pReadBuff bExecute tTimeout bBusybErrornErrIdcbRead count of bytes actually read NFW_ADSRDWRTINDCLEAR_IbClear bValidsNetIdnPort nInvokeId nIdxGrp nIdxOffs cbReadLen cbWriteLen pWriteBuffNFW_ADSRDWRTRES RESPOND_IsNetIdnPort nInvokeIdnErrId cbReadLen pReadBuffbRespond N FW_ADSREADSTAMP_I ACCESSCNT_IBUSY_IERR_IERRID_I READ_SAV_I TICKSTART_IsNetIdnPortnIdxGrpnIdxOffs cbReadLen pReadBuffbExecute tTimeout bBusy bErrornErrIdcbRead count of bytes actually read NFW_ADSREADDEVICEINFOSTAMP_I ACCESSCNT_IBUSY_IERR_IERRID_I RDINFO_SAV_I TICKSTART_IsNetIdnPortbExecutetTimeoutbBusy bError nErrId sDevName nDevVersion N FW_ADSREADINDCLEAR_IbClearbValidsNetIdnPort nInvokeId nIdxGrp nIdxOffs cbReadLen N FW_ADSREADRES RESPOND_IsNetIdnPort nInvokeIdnErrId cbReadLen pReadBuffbRespond NFW_ADSREADSTATESTAMP_I ACCESSCNT_IBUSY_IERR_IERRID_I RDSTATE_SAV_I TICKSTART_IsNetIdnPortbExecutetTimeoutbBusy bError nErrId nAdsState nDevState N FW_ADSWRITESTAMP_I ACCESSCNT_IBUSY_IERR_IERRID_I WRITE_SAV_I TICKSTART_IsNetIdnPortnIdxGrpnIdxOffs cbWriteLen pWriteBuffbExecute tTimeout bBusy bErrornErrIdNFW_ADSWRITECONTROLSTAMP_I ACCESSCNT_IBUSY_IERR_IERRID_I WRITE_SAV_I TICKSTART_IsNetIdnPort nAdsState nDevState cbWriteLen pWriteBuffbExecute tTimeout bBusy bErrornErrIdNFW_ADSWRITEINDCLEAR_IbClearbValidsNetIdnPort nInvokeId nIdxGrp nIdxOffs cbWriteLen pWriteBuff NFW_ADSWRITERES RESPOND_I sNetIdnPort nInvokeIdnErrIdbRespondNFW_DRAND FirstCall_i HoldRand_i R250_Buffer_i  R250_Index nSeedfRndNumNFW_GETCPUACCOUNT dwCpuAccountNFW_GETCPUCOUNTER dwCpuCntLo dwCpuCntHiNFW_GETCURTASKINDEXnIndexNFW_GETSYSTEMTIMEdwTimeLodwTimeHiNFW_GETVERSIONTCBASEnVersionElementFW_GetVersionTcBaseN FW_LPTSIGNAL nPortAddrnPinNobOnOff  FW_LptSignalN FW_MEMCMPpBuf1 First buffer pBuf2 Second buffer cbLen Number of characters  FW_MemCmpN FW_MEMCPYpDest New buffer pSrc Buffer to copy from cbLen Number of characters to copy  FW_MemCpyN FW_MEMMOVEpDest New buffer pSrc Buffer to copy from cbLen Number of characters to copy  FW_MemMoveN FW_MEMSETpDest Pointer to destination nFillByte Character to set cbLen Number of characters  FW_MemSetN FW_PORTREAD nPortAddr eNoOfByte  FW_NoOfByte FW_PortReadN FW_PORTWRITE nPortAddr eNoOfByte  FW_NoOfBytenValue FW_PortWriteNqC:\TWINCAT\PLC\LIB\TcSystem.lib@OADSCLEAREVENTSfbAdsClearEvents FW_AdsClearEventsNetID  T_AmsNetIdbCleariModetTimeoutbBusy bErr iErrId N ADSLOGDINT msgCtrlMask msgFmtStr  T_MaxStringdintArg ADSLOGDINTN ADSLOGEVENT fbAdsLogEvent FW_AdsLogEvent NETID  T_AmsNetIdPORTEvent EventQuitEventConfigData TcEventEventDataAddress pointer EventDataLength FbCleanup TMOUT  EventStateErrErrIdQuitN ADSLOGLREAL msgCtrlMask msgFmtStr  T_MaxStringlrealArg ADSLOGLREALN ADSLOGSTR msgCtrlMask msgFmtStr  T_MaxStringstrArg  T_MaxString ADSLOGSTRN ADSRDDEVINFOfbAdsReadDeviceInfo FW_AdsReadDeviceInfoNETID  T_AmsNetIdPORT  T_AmsPortRDINFOTMOUTBUSY ERR ERRID DEVNAME DEVVER N ADSRDSTATEfbAdsReadState FW_AdsReadStateNETID  T_AmsNetIdPORT  T_AmsPortRDSTATETMOUTBUSY ERR ERRID ADSSTATE DEVSTATE N ADSRDWRT fbAdsRdWrt  FW_AdsRdWrt NETID  T_AmsNetIdPORT  T_AmsPortIDXGRPIDXOFFSWRITELENREADLENSRCADDR DESTADDR WRTRD TMOUT BUSYERRERRIDN ADSRDWRTEX fbAdsRdWrt  FW_AdsRdWrt NETID  T_AmsNetIdPORT  T_AmsPortIDXGRPIDXOFFSWRITELENREADLENSRCADDR DESTADDR WRTRD TMOUT BUSYERRERRIDCOUNT_R count of bytes actually read N ADSRDWRTIND fbAdsRdWrtInd FW_AdsRdWrtIndCLEAR VALIDNETID  T_AmsNetIdPORT  T_AmsPortINVOKEID IDXGRP IDXOFFS RDLENGTH WRTLENGTH DATAADDRN ADSRDWRTRES fbAdsRdWrtRes FW_AdsRdWrtResNETID  T_AmsNetIdPORT  T_AmsPortINVOKEIDRESULTLENDATAADDRRESPOND N ADSREAD fbAdsRead  FW_AdsReadNETID  T_AmsNetIdPORT  T_AmsPortIDXGRPIDXOFFSLENDESTADDRREAD TMOUT BUSY ERRERRIDN ADSREADEX fbAdsRead  FW_AdsReadNETID  T_AmsNetIdPORT  T_AmsPortIDXGRPIDXOFFSLENDESTADDRREAD TMOUT BUSY ERRERRIDCOUNT_R count of bytes actually read N ADSREADIND fbAdsReadInd  FW_AdsReadIndCLEARVALIDNETID  T_AmsNetIdPORT  T_AmsPortINVOKEID IDXGRP IDXOFFS LENGTH N ADSREADRES fbAdsReadRes  FW_AdsReadResNETID  T_AmsNetIdPORT  T_AmsPortINVOKEIDRESULTLENDATAADDRRESPOND N ADSWRITE fbAdsWrite  FW_AdsWriteNETID  T_AmsNetIdPORT  T_AmsPortIDXGRPIDXOFFSLENSRCADDRWRITE TMOUT BUSY ERRERRIDN ADSWRITEIND fbAdsWriteInd FW_AdsWriteIndCLEARVALIDNETID  T_AmsNetIdPORT  T_AmsPortINVOKEID IDXGRP IDXOFFS LENGTH DATAADDR N ADSWRITERES fbAdsWriteRes FW_AdsWriteRes NETID  T_AmsNetIdPORT  T_AmsPortINVOKEIDRESULTRESPONDN ADSWRTCTLfbAdsWriteControl FW_AdsWriteControlNETID  T_AmsNetIdPORT  T_AmsPortADSSTATEDEVSTATELENSRCADDRWRITE TMOUT BUSY ERRERRIDN ANALYZEEXPRESSIONInputExp DoAnalyze ExpResult OutStringN ANALYZEEXPRESSIONCOMBINEDIndex InputExp DoAnalyze ExpResultOutTable  ExpressionResult OutString N ANALYZEEXPRESSIONTABLEIndex InputExp DoAnalyze ExpResultOutTable  ExpressionResultN APPENDERRORSTRINGstrOldstrNewAppendErrorStringN BAVERSION_TO_DWORDnVersion` nRevision` nBuild` BAVERSION_TO_DWORDN CLEARBIT32dwConstinVal32bitNo CLEARBIT32N CSETBIT32dwConstinVal32bitNobitVal& value to which the bit should be set  CSETBIT32N DRANDfbDRand FW_DRand SeedNumN F_COMPAREFWVERSIONsoll`ist`major` requiered major version minor`  requiered minor version revision` ) requiered revision/service pack version patch` 0 required patch version (reserved, default = 0 )F_CompareFwVersionN F_CREATEAMSNETIDidx`nIds  T_AmsNetIdArr Ams Net ID as array of bytes. F_CreateAmsNetId  T_AmsNetIdN F_CREATEIPV4ADDRidx`nIds  T_IPv4AddrArr< Internet Protocol dotted address (ipv4) as array of bytes. F_CreateIPv4Addr  T_IPv4AddrN F_GETVERSIONTCSYSTEMnVersionElementF_GetVersionTcSystemN F_IOPORTREADnAddr Port address eSize E_IOAccessSize Number of bytes to read  F_IOPortReadN F_IOPORTWRITEnAddr Port address eSize E_IOAccessSize Number of bytes to write nValue Value to write  F_IOPortWriteN F_SCANAMSNETIDSpNetID`b  T_AmsNetIdArr`w` id` Index7001sNetID  T_AmsNetID: String containing the Ams Net ID. E.g. '127.16.17.3.1.1' F_ScanAmsNetIds  T_AmsNetIdArrN F_SCANIPV4ADDRIDSb  T_AmsNetIdArr` Index7001sIPv4  T_IPv4AddrM String containing the Internet Protocol dotted address. E.g. '172.16.7.199' F_ScanIPv4AddrIds  T_IPv4AddrArrN F_SPLITPATHNAMEpPath pSlash pDotplength sPathName  T_MaxStringF_SplitPathNamesDrive sDir  T_MaxString sFileName  T_MaxStringsExt  T_MaxString N F_TOASCpCharstrQQF_ToASCN F_TOCHRpChar cF_ToCHRQQN FB_BADEVICEIOCONTROLfbRW O ( PORT := AMSPORT_R3_SYSSERV, IDXGRP := SYSTEMSERVICE_BADEVAPI, IDXOFFS := 0 )  T_AmsPortL ADSRDWRTEX`req ST_AdsBaDevApiReq`state`rtrig R_TRIG` sNetID  '' T_AmsNetID` Ams net id affinity  ( lower :=0, higher := 0 )T_U64KAFFINITY`) Affinity mask (default = 0 = not used) nModifier`+ Optional command modifier (0 == not used) nIdxGrp` Api function group nIdxOffs` Api function offset cbWriteLen`  Input data byte size cbReadLen`  Output data byte size pWriteBuff`  Pointer to input data buffer pReadBuff`  Pointer to output data buffer bExecute` & Rising edge starts command execution tTimeout`bBusy`bError`nErrID`cbRead` Count of bytes actually read N FB_BAGENGETVERSIONfbCtrl  ( nModifier := 0, affinity := ( lower := 0, higher := 0 ), nIdxGrp := BADEVAPIIGRP_GENERAL, nIdxOffs := BADEVAPIIOFFS_GENERAL_VERSION )  ( lower :=0, higher := 0 )T_U64KAFFINITYFB_BaDeviceIoControl`rtrig R_TRIG`state`rsp`sNetID  '' T_AmsNetID` ams net id bExecute`& rising edge starts command execution tTimeout`bBusy` bError` nErrID` nVersion` nRevision` nBuild`N FB_CREATEDIR fbAdsRdWrt  FW_AdsRdWrtsNetId  T_AmsNetId ams net id sPathName  T_MaxString max directory length = 255 ePath  PATH_GENERIC E_OpenPath+ Default: Create directory at generic path bExecute% rising edge start command execution tTimeoutbBusy bError nErrId N FB_EOF fbAdsRdWrt  FW_AdsRdWrtnEOF RisingEdge R_TRIG FallingEdge F_TRIGsNetId  T_AmsNetId ams net id hFile file handle bExecute control input tTimeoutbBusy bError nErrId bEOF N FB_FILECLOSE fbAdsRdWrt  FW_AdsRdWrtsNetId  T_AmsNetId ams net id hFile% file handle obtained through 'open' bExecute close control input tTimeoutbBusy bError nErrId N FB_FILEDELETE fbAdsRdWrt  FW_AdsRdWrt tmpOpenModesNetId  T_AmsNetId ams net id sPathName  T_MaxString file path and name ePath  PATH_GENERIC E_OpenPath Default: Open generic file bExecute open control input tTimeoutbBusy bError nErrId N FB_FILEGETS fbAdsRdWrt  FW_AdsRdWrt RisingEdge R_TRIG FallingEdge F_TRIGsNetId  T_AmsNetId ams net id hFile file handle bExecute control input tTimeoutbBusy bError nErrId sLine  T_MaxString bEOF N FB_FILEOPEN fbAdsRdWrt  FW_AdsRdWrt tmpOpenModetmpHndl RisingEdge R_TRIG FallingEdge F_TRIGsNetId  T_AmsNetId ams net id sPathName  T_MaxString max filename length = 255 nMode open mode flags ePath  PATH_GENERIC E_OpenPath Default: Open generic file bExecute open control input tTimeoutbBusy bError nErrId hFile file handle N FB_FILEPUTS fbAdsRdWrt  FW_AdsRdWrt RisingEdge R_TRIG FallingEdge F_TRIGsNetId  T_AmsNetId ams net id hFile file handle sLine  T_MaxString string to write bExecute control input tTimeoutbBusy bError nErrId N FB_FILEREAD fbAdsRdWrt  FW_AdsRdWrt RisingEdge R_TRIG FallingEdge F_TRIGsNetId  T_AmsNetId ams net id hFile file handle pReadBuff buffer address for read cbReadLen count of bytes for read bExecute read control input tTimeoutbBusy bError nErrId cbRead count of bytes actually read bEOFN FB_FILERENAME fbAdsRdWrt  FW_AdsRdWrt tmpOpenMode sBothNames   T_MaxString = SIZEOF( T_MaxString ) * 2 nOldLennNewLen RisingEdge R_TRIG FallingEdge F_TRIGsNetId  T_AmsNetId ams net id sOldName  T_MaxString max filename length = 255 sNewName  T_MaxString max filename length = 255 ePath  PATH_GENERIC E_OpenPath Default: generic file pathbExecute open control input tTimeoutbBusy bError nErrId N FB_FILESEEK fbAdsRdWrt  FW_AdsRdWrt tmpSeekPos sNetId  T_AmsNetId ams net id hFile file handle nSeekPos  new seek pointer position eOrigin  SEEK_SET E_SeekOrigin bExecute  seek control input tTimeout bBusybErrornErrIdN FB_FILETELL fbAdsRdWrt  FW_AdsRdWrtsNetId  T_AmsNetId ams net id hFile file handle bExecute control input tTimeoutbBusy bError nErrId nSeekPos  On error, nSEEKPOS returns -1 N FB_FILEWRITE fbAdsRdWrt  FW_AdsRdWrt RisingEdge R_TRIG FallingEdge F_TRIGsNetId  T_AmsNetId ams net id hFile file handle pWriteBuff buffer address for write cbWriteLen count of bytes for write bExecute write control input tTimeoutbBusy bError nErrId cbWrite! count of bytes actually written N FB_PCWATCHDOGbRetVal iTimeiIdxiPortArr > 16#2E, 16#2E, 16#2E, 16#2F, 16#2E, 16#2F, 16#2E, 16#2F, 16#2E .../././.iArrEn > 16#87, 16#87, 16#07, 16#08, 16#F6, 16#05, 16#30, 16#01, 16#AA 0iArrDis > 16#87, 16#87, 16#07, 16#08, 16#F6, 16#00, 16#30, 16#00, 16#AA 0tTimeOut; Watchdog TimeOut Time 1s..255s, disabled if tTimeOut < 1s bEnable Enable / Disable Watchdog bEnabled2 TRUE: Watchdog Enabled; FALSE: Watchdog Disabled bBusy FB still busy bError  FB has error nErrId  FB error ID N FB_REMOVEDIR fbAdsRdWrt  FW_AdsRdWrtsNetId  T_AmsNetId ams net id sPathName  T_MaxString max filename length = 255 ePath  PATH_GENERIC E_OpenPath+ Default: Delete directory at generic path bExecute& rising edge starts command execution tTimeoutbBusy bError nErrId N FB_SIMPLEADSLOGEVENTfbEvent  ADSLOGEVENT cfgEvent TcEventbInitSourceIDEventID bSetEventbQuitErrId Error N FILECLOSE fbAdsWrite  FW_AdsWriteNETID  T_AmsNetId ams net id HFILE) file handle obtained through 'FILEOPEN' CLOSE close control input TMOUTBUSY ERR ERRID N FILEOPEN fbAdsWrite  FW_AdsWrite RisingEdge R_TRIG FallingEdge F_TRIGNETID  T_AmsNetId ams net id FPATHNAME  T_MaxString# default max filename length = 255 OPENMODE open mode flags OPEN open control input TMOUTBUSY ERR ERRID HFILE file handle N FILEREAD fbAdsRead  FW_AdsReadNETID  T_AmsNetId ams net id HFILE file handle BUFADDR buffer address for read COUNT count of bytes for read READ read control input TMOUTBUSY ERR ERRID COUNT_R count of bytes actually read N FILESEEK fbAdsWrite  FW_AdsWriteNETID  T_AmsNetId ams net id HFILE file handle SEEKPOS new seek pointer position SEEK seek control input TMOUTBUSY ERR ERRID N FILEWRITE fbAdsWrite  FW_AdsWrite RisingEdge R_TRIG FallingEdge F_TRIGtmpCountNETID  T_AmsNetId ams net id HFILE file handle BUFADDR buffer address for write COUNT count of bytes for write WRITE write control input TMOUTBUSY ERR ERRID COUNT_W! count of bytes actually written N FW_CALLGENERICFBfbCall w ( sNetID := '', nPort := 16#1234, bExecute := FALSE, tTimeout := T#0s, ACCESSCNT_I := 16#0000BEC1 )4 FW_AdsRdWrt`funGrp`# Function block group (identifier) funNum`$ Function block number (identifier) pWrite`+ Byte length of output parameter structure cbWrite`* Byte length of input parameter structure pRead`  Points ot output buffer cbRead`  Points to input buffer nErrID`  0 => no error, <> 0 => error cbReturned`, Number of successfully returned data bytes N FW_CALLGENERICFUNfbCall y ( sNetID := '', nPort := 16#1234, bExecute := FALSE, tTimeout := T#0s, ACCESSCNT_I := 16#0000BEC2 )¾4 FW_AdsRdWrt` don't use it! funGrp` Function group (identifier) funNum`$ Function block number (identifier) pWrite`+ Byte length of output parameter structure cbWrite` * Byte length of input parameter structure pRead`  Points ot output buffer cbRead`  Points to input buffer pcbReturned` , Number of successfully returned data bytes FW_CallGenericFunN GETBIT32dwConstinVal32bitNoGETBIT32N GETCPUACCOUNTfbGetCpuAccount FW_GetCpuAccount cpuAccountDWN GETCPUCOUNTERfbGetCpuCounter FW_GetCpuCounter  cpuCntLoDW cpuCntHiDWN GETCURTASKINDEXfbGetCurTaskIndex FW_GetCurTaskIndexindexN GETSYSTEMTIMEfbGetSystemTime FW_GetSystemTime timeLoDWtimeHiDWN GETTASKTIMEout ` cbReturned` timeLoDWtimeHiDWN LPTSIGNALPortAddrPinNoOnOff  LPTSIGNALN MEMCMPpBuf1 First buffer pBuf2 Second buffer n Number of characters MEMCMPN MEMCPYdestAddr New buffer srcAddr Buffer to copy from n Number of characters to copy MEMCPYN MEMMOVEdestAddr New buffer srcAddr Buffer to copy from n Number of characters to copy MEMMOVEN MEMSETdestAddr Pointer to destination fillByte Character to set n Number of characters MEMSETN ROL32inVal32nROL32N ROR32inVal32nROR32N SETBIT32dwConstinVal32bitNoSETBIT32N SFCACTIONCONTROL S_FF RSL_TMR TOND_TMR TONP_TRIG R_TRIGSD_TMR TONSD_FF RSDS_FF RSDS_TMR TONSL_FF RSSL_TMR TON NR0S0LDPSD DS SL T QN SHL32inVal32nSHL32N SHR32inVal32nSHR32N mC:\TWINCAT\PLC\LIB\TcNC.lib@8AXACT fbAdsWrite ADSWRITE RisingStart R_TRIG RisingStop R_TRIG x_stNcStart  ST_NcStartx_nStepx_bStopAXIDSTARTSTOPMODEVELOCITYTARGPOSTMOUT BUSY ERR ERRIDN AXACTEX fbAdsWrite ADSWRITE RisingStart R_TRIG RisingStop R_TRIG x_stNcStartEx  ST_NcStartExx_nStepx_bStop AXIDSTARTSTOPMODEVELOCITYTARGPOSACCEL DECEL JERK TMOUT BUSYERRERRIDN AXCPL fbAdsWrite ADSWRITE RisingCplOn R_TRIG RisingCplOff R_TRIGx_stNcCoupleSlave ST_NcCoupleSlavex_nStep x_bCplOff AXIDMASTERIDCPLMODECPLPAR1CPLPAR2CPLPAR3 CPLPAR4 CPLON CPLOFF TMOUT BUSYERRERRIDN AXCPLMULTITAB fbAdsWrite ADSWRITE RisingCplOn R_TRIG RisingCplOff R_TRIGx_stNcCoupleTabSlave ST_NcCoupleTabSlavex_nStep x_bCplOffAXIDMASTERIDNOTABS NOPROFILETABSTABIDS CPLON CPLOFF TMOUT BUSYERRERRIDN AXCPLTAB fbAdsWrite ADSWRITE RisingCplOn R_TRIG RisingCplOff R_TRIGx_stNcCoupleTabSlave ST_NcCoupleTabSlavex_nStep x_bCplOff AXIDMASTERID SLAVEOFFSET MASTEROFFSET SLAVEABSOLUT MASTERABSOLUT TABID CPLON CPLOFF TMOUT BUSYERRERRIDN AXFNC fbAdsWrite ADSWRITEFallingSetDrive F_TRIG FallingManFW F_TRIG FallingManBW F_TRIG RisingReset R_TRIG RisingCalibr R_TRIG RisingSetPos R_TRIGRisingSetDrive R_TRIG RisingSetTarg R_TRIG RisingManFW R_TRIG RisingManBW R_TRIG x_stNcSetPos  ST_NcSetPos!x_stNcStartDriveOut ST_NcStartDriveOut" x_stNewEndPos ST_NcNewEndPos# x_stNcStart  ST_NcStart$ x_bSetDrive&x_bManFW'x_bManBW(x_nStep) AXIDRESETCALIBRSETPOSSETDRIVESETTARGMODE VAL MANFW MANBW TMOUT BUSYERRERRIDN AXISCAMDATAQUEUED nStateDWord AxisCamDataQueuedN AXISCAMSCALINGPENDING nStateDWord AxisCamScalingPendingN AXISCAMTABLEQUEUED nStateDWord AxisCamTableQueuedN AXISCONTROLLOOPCLOSED nStateDWordAxisControlLoopClosedN AXISDRIVEDEVICEERROR nStateDWordAxisDriveDeviceErrorN AXISEXTERNALLATCHVALID nStateDWordAxisExternalLatchValidN AXISGETOVERRIDEPERCENT nOverrideAxisGetOverridePercentN AXISGOTNEWTARGETPOSITION nStateDWord AxisGotNewTargetPositionN AXISHASBEENSTOPPED nStateDWordAxisHasBeenStoppedN AXISHASEXTSETPOINTGEN nStateDWordAxisHasExtSetPointGenN AXISHASJOB nStateDWord AxisHasJobN AXISINERRORSTATE nStateDWordAxisInErrorStateN AXISINPOSITIONWINDOW nStateDWordAxisInPositionWindowN AXISINPROTECTEDMODE nStateDWordAxisInProtectedModeN AXISINPTPMODE nStateDWord  AxisInPTPModeN AXISIODATAISINVALID nStateDWordAxisIoDataIsInvalidN AXISISATTARGETPOSITION nStateDWordAxisIsAtTargetPositionN AXISISCALIBRATED nStateDWordAxisIsCalibratedN AXISISCALIBRATING nStateDWordAxisIsCalibratingN AXISISCOMPENSATING nStateDWordAxisIsCompensatingN AXISISCOUPLED nCoupleState AxisIsCoupledN AXISISMOVING nStateDWord AxisIsMovingN AXISISMOVINGBACKWARDS nStateDWordAxisIsMovingBackwardsN AXISISMOVINGENDLESS nStateDWordAxisIsMovingEndlessN AXISISMOVINGFORWARD nStateDWordAxisIsMovingForwardN AXISISNOTINTARGETPOSITION nStateDWordAxisIsNotInTargetPositionN AXISISNOTMOVING nStateDWordAxisIsNotMovingN AXISISREADY nStateDWord AxisIsReadyN AXISJOBPENDING nStateDWord AxisJobPendingN AXISREACHEDCONSTANTVELOCITY nStateDWordAxisReachedConstantVelocityN AXISSETACCEPTBLOCKEDDRIVESIGNAL nDeCtrlDWord bEnable AxisSetAcceptBlockedDriveSignalN AXISSETCONTROLLERENABLE nDeCtrlDWordbControllerEnable AxisSetControllerEnableN AXISSETFEEDENABLEMINUS nDeCtrlDWordbFeedEnableMinus AxisSetFeedEnableMinusN AXISSETFEEDENABLEPLUS nDeCtrlDWordbFeedEnablePlus AxisSetFeedEnablePlusN AXISSETOVERRIDEPERCENTfOverridePercentAxisSetOverridePercentN AXISSETREFERENCINGCAMSIGNAL nDeCtrlDWordbReferencingCamSignal AxisSetReferencingCamSignalN AXISSOFTLIMITMAXEXCEEDED nStateDWordAxisSoftLimitMaxExceededN AXISSOFTLIMITMINEXCEEDED nStateDWordAxisSoftLimitMinExceededN AXSCOM fbAdsWrite ADSWRITE RisingCompOn R_TRIG RisingCompOff R_TRIGx_stNcCompensation ST_NcCompensationx_nStep x_bCompOff AXIDMODEACCPACCMVDELTAVPROC COMPVAL COMPDIST COMP_ON COMP_OFF TMOUTBUSYERRERRIDN F_GETCOMPENSATIONELEMENTATpTemp ST_CompensationElementpTable ST_CompensationElementnElementF_GetCompensationElementAt ST_CompensationElementN F_GETLEFTINDEXfStep fPosfMinfMaxnCountF_GetLeftIndexN F_GETVERSIONTCNCnVersionElementF_GetVersionTcNCN F_ISCOMPENSATIONDIRECTIONeActive  WorkingDirectionNoneE_WorkingDirection eRequested  WorkingDirectionNoneE_WorkingDirectionF_IsCompensationDirectionN !F_LINEARINTERPOLATIONCOMPENSATIONab fPos stElement1 ST_CompensationElement stElement2 ST_CompensationElement!F_LinearInterpolationCompensationN FB_AXISNEWTARGPOSANDVELO fbSetPosVelo ADSWRITE stNewPosVelo ST_NcSetNewPosVeloiAxisIdeCmdType E_CmdTypeNewTargPosAndVelofTargPos fSwitchPos eTargPosType  E_TargPosTypefVelobExecute tTimeout bBusy bErriErrIdN FB_GETAXISAMSADDR fbAdsRead ADSREAD risingEdge R_TRIG fallingEdge F_TRIG readBuffer   pNetIdBytes pUintsNetId  T_AmsNetIdiAxisIdbExecutetTimeout default since 2007-08-15 KSt bBusy bError iErrId AxisNetId  T_AmsNetId AxisPort  T_AmsPort AxisNetIdBytes  AxisChannel added 2007-03-23 KSt N FB_POSITIONCOMPENSATION nStatedwSizeeActiveDirection  WorkingDirectionNoneE_WorkingDirection bExecCalc stElement1 ST_CompensationElement stElement2 ST_CompensationElement! nLeftIndex"ERRORCODE_PARAMSIZECK%ERRORCODE_PARAMPOSDK&ERRORCODE_TCNCNOTIMPLEK'Enable ) rising edge triggers initialize routine pTable ST_CompensationElementcbSize Compensation0.0ErrorErrorIdActive ReferenceAxis NCTOPLC_AXLESTRUCTDesc ST_CompensationDescN FB_REGISTERCOMKL25XX+state statemachine state EntryState# state at the beginning of a cycle ErrorState state where an error comes up TerminalInterface ST_NcTerminalInterface TriggerRead R_TRIG TriggerWrite R_TRIGBusyRead busy with reading a register BusyWrite busy with writing a register fbAdsRead1  ADSREADEX! fbAdsRead2  ADSREADEX" fbAdsWrite1 ADSWRITE# fbAdsWrite2 ADSWRITE$ fbAdsWrite3 ADSWRITE% EncoderID'DriveID( EncoderType) DriveType* NcMappingType+stateReadNcTerminalProcessImage-2 state of terminal feedback polling state-machine EnableReadNcTerminalProcessImage.ReadNcTerminalProcessImageDone/ stateWriteNcTerminalProcessImage1' state of terminal write state-machine "ExecuteWriteNcTerminalProcessImage2WriteNcTerminalProcessImageDone3$fbTriggerWriteNcTerminalProcessImage R_TRIG4TimerStateTimeout TON6 TriggerError R_TRIG7iError8 iRegNumber9 iRegValue:tempbyte<tempWriteRequest=NCMAPPINGTYPE_KL2521 @# supports KL2502 / KL2521 / IP2512 NCMAPPINGTYPE_KL2531 A supports KL2531 / KL2541 NCMAPPINGTYPE_KL2532 B5 supports KL2532 / KL2542 / KL2535 / KL2545 / KL2552 NCMAPPINGTYPE_KL5001C supports KL5001 ADSTIMEOUTDSTATEMACHINETIMEOUT'E5 maximum time to stay in a state of the statemachine ERRORCODE_INVALIDPARAMETERKG"ERRORCODE_TERMINALTYPENOTSUPPORTED@KHERRORCODE_WRITEERRORAKIERRORCODE_AXISENABLEDBKJ&ERRORCODE_TIMEOUTREGISTERCOMMUNICATIONKKReadWrite RegNumberRegValueDone Busy Error ErrorID TerminalType CurrentRegNumberCurrentRegValue AxisRefIn NCTOPLC_AXLESTRUCT AxisRefOut PLCTONC_AXLESTRUCTN FB_WRITEPOSITIONCORRECTION GetThisTaskIndex GETCURTASKINDEX CycleTimeMaxDeltaVelocityMaxDeltaPositionDeltaCorrectionInitialDeltaCorrectionEndOfEnablePhaseiCorrectionMode E_PositionCorrectionModestateNumberOfCyclesDeltaCorrectionPerCycleLastPositionCorrectionValueEnablePositionCorrectionValueCorrectionMode E_PositionCorrectionMode Acceleration CorrectionLength 8 optional length - comparable to 'superposition length' BusyErrorErrorIDLimiting AxisRefIn NCTOPLC_AXLESTRUCT AxisRefOut PLCTONC_AXLESTRUCTN GET_TCNCUTILITIES_VERSIONbGet Get_TcNcUtilities_VersionN sC:\TWINCAT\PLC\LIB\TcBaseMath.lib@FW_FLOORlr_inFW_FloorN FW_LREALFRAClr_in FW_LrealFracN FW_LREALMODPlr_vallr_mod FW_LrealModPN FW_LREALTRUNClr_in FW_LrealTruncNoC:\TWINCAT\PLC\LIB\TcMath.lib@F_GETVERSIONTCMATHnVersionElementF_GetVersionTcMathN FLOORlr_inFLOORN FRAClr_inFRACN LMODlr_Valuelr_ArgLMODN LTRUNClr_inLTRUNCN MODABSlr_Valuelr_ArgMODABSN MODTURNSlr_Tmplr_Valuelr_ArgMODTURNSN R@AXCTRL HomeAxis1 - SercosHoming HomeBusy_Ax1 MC_Enable1 MC_Power EnStatus1EnBusy1 EnActive1 EnError1 EnErrorID1 NcFn_Ax1 !AXFNC NcSpFn_Ax1 AXACTBusy_Ax1 Error_Ax1 ErrorID_Ax1 fbSoeWrite  FB_EcSoEWritefbDrvReset_Ax1  FB_SoEResetN@MAINN@ SERCOSHOMING% tADSTimeOut*#state*& ErrorState*'& state where the latest error occured HomingParameter*(iHomingVelocity*) HomingCommand**HomingCommandFeedback*+HomingProcedureStarted*, HomingStatus*-LagDistanceMonitoring*.SavedLagDistanceMonitoring*/iDone*0Aborted*1 ScalingType*2PreferredScaling*3 LinearScaling*4RotationalScaling*5VelocityFactor*65 HomingVelocity will be multiplicated before dowload WriteNC ADSWRITE*8ReadNC ADSREAD*9Trigger R_TRIG*: SetActPos MC_SetPosition*;HomeAx MC_Home*<Delay TON*>ExecuteOffTrigger F_TRIG*? ResetAxis MC_Reset*@NcReferenceFlag*ADriveStatusWord*B fbSoeWrite  FB_EcSoEWrite*D fbSoeRead  FB_EcSoERead*E SoeTimeOut*F +++ TEST +++ ReadSercos148 ADSREAD*JIDN148*K ReadSercos403 ADSREAD*LIDN403*MBitChangeCommand*NstSetPositionOptions ST_SetPositionOptions*O B.ROOST 14.12.2011 Execute* HomePosition* Position value at home switch Done* successfully done Busy* busy, not in initial state CommandAborted* Aborted Error* Error flag ErrorId* Error code Axis AXIS_REF* N@ *(͗KۗKKK +localhostA3wSASA >w0 w3w>2SASASAL$wwanU:Tt$wUw wSASAuQV l,,,K^\\Klauss3\drive-c\Projekte\TwinCAT PLC NC Samples\SERCOS Homing\Teststand\SERCOS Homing.pro@NI/*BECKCONFI3*/ !@@3Standard N ȱVAR_GLOBAL END_VAR ",StandardMAINN$p!"X""Standard"= "=@**** NUUVAR_CONFIG END_VAR ',XtigGlobale_VariablenN N(*ele N {VAR_GLOBAL Axis1 : AXIS_REF; AmsNetId_Arr AT %IW300 : T_AmsNetIdArr ; NC_Enable : BOOL := FALSE; NC_Home_Ax1 : BOOL := FALSE; NC_Reset_Ax1 : BOOL := FALSE; NC_Go_Ax1 : BOOL := FALSE; NC_MP_Ax1 : BOOL := FALSE; NC_MN_Ax1 : BOOL := FALSE; NC_HomePos_Ax1 : LREAL := 0.0; NC_TargetPos_Ax1 : LREAL := 0.0; NC_DemVel_Ax1 : LREAL := 100.0; NC_Ready_Ax1 : BOOL := FALSE; NC_Cal_Ax1 : BOOL := FALSE; NC_HasJob_Ax1 : BOOL := FALSE; NC_NotMoving_Ax1 : BOOL := FALSE; NC_MovingFw_Ax1 : BOOL := FALSE; NC_MovingBw_Ax1 : BOOL := FALSE; NC_InTargetPos_Ax1 : BOOL := FALSE; NC_InPosRange_Ax1 : BOOL := FALSE; Drv_Reset_Ax1 : BOOL := FALSE; AmsNetId_str : T_AmsNetId; SoE_Srv_ResState : UINT := 0; SoE_Tst_GenericRead : BOOL := FALSE; SoE_Tst_GenericWrite : BOOL := FALSE; SoE_wait_res_cnt : UINT := 0; SoeSlvAddr : UINT := 1001; SoeIndex : WORD := 0; SoeElementNr : BYTE := 16#40; (* read write value for default *) SoeReadLen : UDINT := 0; SoeWriteLen : UDINT := 0; SoeBusy : BOOL := FALSE; SoeErrFlag : BOOL := FALSE; SoeErrID : UDINT := 0; SoeReadBuffer : ARRAY[0..3] OF DWORD; ptSoeReadBuffer : POINTER TO BYTE; SoeWriteBuffer : ARRAY[0..3] OF DWORD; ptSoeWriteBuffer : POINTER TO BYTE; END_VAR 'C tao taTwinCAT_ConfigurationN Nfenc fct(* Generated automatically by TwinCAT - (read only) *) VAR_CONFIG .Axis1.PlcToNc AT %QB0 : PLCTONC_AXIS_REF; .Axis1.NcToPlc AT %IB308 : NCTOPLC_AXIS_REF; END_VAR',nVariable_ConfigurationN N/!0VAR_CONFIG END_VAR K|0|0@A@MS Sans Serif@3DEFAULTSystemK|0|0@A@MS Sans Serif@ hh':'mm':'ssdd'-'MM'-'yyyy',,%AxCtrlN NDPROGRAM AxCtrl VAR HomeAxis1 : SercosHoming; HomeBusy_Ax1 : BOOL; MC_Enable1 : MC_Power; EnStatus1 : BOOL; EnBusy1 : BOOL; EnActive1 : BOOL; EnError1 : BOOL; EnErrorID1 : UDINT; NcFn_Ax1 : AXFNC; NcSpFn_Ax1 : AXACT ; Busy_Ax1 : BOOL; Error_Ax1 : BOOL; ErrorID_Ax1 : UDINT; fbSoeWrite : FB_EcSoEWrite ; fbDrvReset_Ax1 : FB_SoEReset; END_VAR(* Call enable NC Axis1 ====================*) MC_Enable1( Enable := NC_Enable, Enable_Positive := TRUE, Enable_Negative := TRUE, Override := 100.0, (* in percent - Beckhoff proprietary input *) BufferMode := MC_BlendingPrevious, Axis := Axis1, Status => EnStatus1, Busy => EnBusy1, Active => EnActive1, Error => EnError1, ErrorID => EnErrorID1 ); (* Call Homing sequence ====================*) IF NC_Home_Ax1 THEN HomeAxis1( Execute := TRUE, HomePosition := NC_HomePos_Ax1, Axis := Axis1, Busy => HomeBusy_Ax1 ); (* Position value at home switch *) IF HomeAxis1.Done THEN HomeAxis1(Axis := Axis1, Execute := FALSE); NC_Home_Ax1 := FALSE; END_IF END_IF (* Call Reset NC Axis 1 ==================*) NcFn_Ax1( AXID := 1, RESET := NC_Reset_Ax1, CALIBR := FALSE, SETPOS := FALSE, SETDRIVE := FALSE, SETTARG := FALSE, MANFW := NC_MP_Ax1, MANBW := NC_MN_Ax1, MODE := 1, (* absolut positioning *) VAL := 50.0); (* Call Reset drive Axis 1 ===================*) IF Drv_Reset_Ax1 THEN fbDrvReset_Ax1( Axis := Axis1, Execute := TRUE, ); IF NOT fbDrvReset_Ax1.Busy THEN fbDrvReset_Ax1(Axis := Axis1, Execute := FALSE); Drv_Reset_Ax1 := FALSE; END_IF END_IF (* Call move to new target position Axis 1 ================================*) NcSpFn_Ax1( AXID := 1, START := NC_Go_Ax1, MODE := 1, (* absolut positioning *) VELOCITY:= NC_DemVel_Ax1, TARGPOS := NC_TargetPos_Ax1, TMOUT := T#2s); (* Building NC status bits for visualization NC Axis 1 ========================================*) NC_Ready_Ax1 := AxisIsReady( Axis1.NcToPlc.StateDWord ); NC_Cal_Ax1 := AxisIsCalibrated( Axis1.NcToPlc.StateDWord ); NC_HasJob_Ax1 := AxisHasJob( Axis1.NcToPlc.StateDWord ); NC_NotMoving_Ax1 := AxisIsNotMoving( Axis1.NcToPlc.StateDWord ); NC_MovingFw_Ax1 := AxisIsMovingForward( Axis1.NcToPlc.StateDWord ); NC_MovingBw_Ax1 := AxisIsMovingBackwards( Axis1.NcToPlc.StateDWord );,XtMMAINN NPROGRAM MAIN VAR END_VAR AxCtrl(); *,BW SercosHomingN N FUNCTION_BLOCK SercosHoming (* The SERCOS homing function block triggers the Drive Controlled Homing procedure History: 17.06.2002 KSt V1.000.000, Tested with Beckhoff AX2003, also designed for Kollmorgen/Seidel, Indramat and PacSci 05.07.2002 KSt V1.000.001, Tested with Indramat Ecodrive 16.09.2002 KSt V1.000.002, abort sequence added 25.10.2005 KSt V1.000.003, additional test read of HommingCommand (IDN148) after write 18.11.2005 KSt V1.000.004, final read of HommingCommand (IDN148) and check for zero 15.12.2011 Whp V1.000.005, adaptions to SoE Communication interface for a LinMot servo drive and for TcMC2.lib *) VAR_INPUT Execute : BOOL; HomePosition : LREAL; (* Position value at home switch *) (* HomingVelocity : LREAL; (* mm/s with linear scaling or deg/s with rotational scaling *) (* other units are not supported by this function block *) DirectionNegative : BOOL; (* invert home search direction *) DevicePort : UINT; (* ADS port of SERCOS device, usually (16#7x00 + SERCOS-ID - 1) *) *) END_VAR VAR_OUTPUT Done : BOOL; (* successfully done *) Busy : BOOL; (* busy, not in initial state *) CommandAborted : BOOL; (* Aborted *) Error : BOOL; (* Error flag *) ErrorId : UDINT; (* Error code *) END_VAR VAR_IN_OUT Axis : AXIS_REF; END_VAR VAR CONSTANT tADSTimeOut : TIME := T#1s; END_VAR VAR state: INT; ErrorState: INT; (* state where the latest error occured *) HomingParameter: WORD; iHomingVelocity: DINT; HomingCommand: WORD; HomingCommandFeedback: WORD; HomingProcedureStarted: BOOL; HomingStatus: WORD; LagDistanceMonitoring: UINT; SavedLagDistanceMonitoring: UINT; iDone: BOOL; Aborted: BOOL; ScalingType: DWORD; PreferredScaling: BOOL; LinearScaling: BOOL; RotationalScaling: BOOL; VelocityFactor : LREAL; (* HomingVelocity will be multiplicated before dowload *) WriteNC : ADSWRITE; ReadNC : ADSREAD; Trigger: R_TRIG; SetActPos : MC_SetPosition; HomeAx : MC_Home; Delay : TON; ExecuteOffTrigger: F_TRIG; ResetAxis: MC_Reset; NcReferenceFlag: DWORD; DriveStatusWord: DWORD; fbSoeWrite : FB_EcSoEWrite ; fbSoeRead : FB_EcSoERead; SoeTimeOut : TIME := T#2s; (* +++ TEST +++ *) (* Permanent SERCOS parameter monitoring *) ReadSercos148 : ADSREAD; IDN148: WORD; ReadSercos403 : ADSREAD; IDN403: WORD; BitChangeCommand: BOOL; stSetPositionOptions: ST_SetPositionOptions; (* B.ROOST 14.12.2011 *) END_VAR e (* state machine for SERCOS drive controlled homing *) ExecuteOffTrigger(CLK:=Execute); IF ExecuteOffTrigger.Q THEN state := 0; END_IF CASE state OF 0 : (* initial state, wait for trigger *) Busy := FALSE; Done := iDone; CommandAborted := Aborted; Trigger( CLK:=Execute ); IF Trigger.Q THEN Busy := TRUE; Done := FALSE; iDone := FALSE; CommandAborted := FALSE; Aborted := FALSE; Error := FALSE; ErrorID := 0; ErrorState := 0; WriteNC( WRITE:=FALSE ); ReadNC( READ:=FALSE ); SetActPos(Execute:=FALSE, Axis:=Axis1); ResetAxis(Execute:=FALSE, Axis:=Axis); Delay(IN:=FALSE); HomingCommandFeedback := 0; AmsNetId_str := F_CreateAmsNetId( AmsNetId_Arr ); ptSoeWriteBuffer := ADR(SoeWriteBuffer); ptSoeReadBuffer := ADR(SoeReadBuffer); state := 10; END_IF 10 : (* read lag distance monitoring parameter *) ReadNC(NETID:='' , PORT:=AMSPORT_R0_NC , IDXGRP:=NCIDXG_AXPARMS+DWORD_TO_UINT(Axis1.NcToPlc.AxisId) , IDXOFFS:=16#20010 , LEN:=SIZEOF(SavedLagDistanceMonitoring) , DESTADDR:=ADR(SavedLagDistanceMonitoring) , READ:=TRUE , TMOUT:=T#1s); IF NOT ReadNC.Busy AND NOT ReadNC.Err THEN ReadNC( READ:=FALSE ); state := 20; END_IF 20 : (* disable lag distance monitoring *) LagDistanceMonitoring := 0; WriteNC(NETID:='' , PORT:=AMSPORT_R0_NC , IDXGRP:=NCIDXG_AXPARMS+DWORD_TO_UINT(Axis1.NcToPlc.AxisId) , IDXOFFS:=16#20010 , LEN:=SIZEOF(LagDistanceMonitoring) , SRCADDR:=ADR(LagDistanceMonitoring) , WRITE:=TRUE , TMOUT:=T#1s); IF NOT WriteNC.Busy AND NOT WriteNC.Err THEN WriteNC( WRITE:=FALSE ); state := 25; END_IF 25 : (* disable NC reference flag *) NcReferenceFlag := 0; WriteNC(NETID:='' , PORT:=AMSPORT_R0_NC , IDXGRP:=NCIDXG_AXFUNCS+DWORD_TO_UINT(Axis1.NcToPlc.AxisId) , IDXOFFS:=16#1B , LEN:=SIZEOF(NcReferenceFlag) , SRCADDR:=ADR(NcReferenceFlag) , WRITE:=TRUE , TMOUT:=T#1s); IF NOT WriteNC.Busy AND NOT WriteNC.Err THEN WriteNC( WRITE:=FALSE ); (* state := 30; *) state := 60; (* skip homing configuration !!!! *) END_IF (* 30 : (* set S-0-0147, homing parameter *) (* this parameter is not supported with LinMot Servo Drives !!!! *) (* homing parameter description: Bit 0: Direction, 0 => Positive/Clockwise Direction Bit 1: 0 => First Marker Pulse after Positive Edge of Home Switch Bit 2: Home switch Location, 0:Master 1:Drive Bit 3: Feedback Source, 0:Motor 1:External Bit 5: Evaluation of Home Switch, 0 => Home Switch evaluated Bit 6: Evaluation of Position Feedback Marker Pulse, 1 => Marker Pulse not evaluated Bit 7: Axis stops on home position *) HomingParameter := 16#84; (* HomingParameter := 16#A4;*) HomingParameter := HomingParameter + SEL(DirectionNegative,0,1); (* WriteSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=147 , IDXOFFS:=0 , LEN:=SIZEOF(HomingParameter) , SRCADDR:=ADR(HomingParameter) , WRITE:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 147; SoeWriteBuffer[0] := HomingParameter; SoeWriteLen := 2; SoeElementNr := 16#40; fbSoeWrite(bExecute := FALSE); fbSoeWrite( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pSrcBuf := ptSoeWriteBuffer, (* The address (pointer) of the send buffer. *) cbBufLen := SoeWriteLen, (* Contains the max. number of bytes to write. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 31; 31: (* wait homing parameter written *) fbSoeWrite( bBusy=> SoeBusy, bError=> SoeErrFlag, nErrId=> SoeErrID); IF NOT SoeBusy AND NOT SoeErrFlag THEN fbSoeWrite( bExecute:=FALSE ); state := 40; END_IF 40 : (* read velocity scaling parameters from IDN 44 *) (* IDN 44: Bit 0..2: 1 = linear scaling, 2 = rotational scaling Bit 3 : 0 = preferred scaling 1 = parameter scaling This function block only supports 'preferred scaling' either linear or rotational *) ReadSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=44 , IDXOFFS:=0 , LEN:=SIZEOF(ScalingType) , DESTADDR:=ADR(ScalingType) , READ:=TRUE , TMOUT:=tADSTimeOut ); IF NOT ReadSercos.Busy AND NOT ReadSercos.ERR THEN PreferredScaling := (ScalingType AND 2#1000) = 0; LinearScaling := (ScalingType AND 2#111) = 1; RotationalScaling := (ScalingType AND 2#111) = 2; IF PreferredScaling AND (LinearScaling OR RotationalScaling) THEN IF LinearScaling THEN VelocityFactor := 60000; (* linear scaling *) ELSE VelocityFactor := 1.0E4/6; (* rotational scaling *) END_IF state := 50; ELSE (* if not preferred Scaling is used then the velocity scaling depends on other IDNs as IDN-43 to IDN-46 In this case the function block has to be adapted or the external HomingVelocity parameter has to be adjusted. *) Error := TRUE; ErrorID := 16#FFFFFFFF; ErrorState := state; state := 0; END_IF ReadSercos(READ:=FALSE); END_IF 50 : (* set S-0-0041, homing velocity *) iHomingVelocity := LREAL_TO_DINT(HomingVelocity * VelocityFactor); WriteSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=41 , IDXOFFS:=0 , LEN:=SIZEOF(iHomingVelocity) , SRCADDR:=ADR(iHomingVelocity) , WRITE:=TRUE , TMOUT:=tADSTimeOut ); IF NOT WriteSercos.Busy AND NOT WriteSercos.Err THEN WriteSercos( WRITE:=FALSE ); state := 60; END_IF *) 60 : (* set S-0-0148, homing command, start homing *) HomingCommand := 3; (* start homing *) (* WriteSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=0 , LEN:=SIZEOF(HomingCommand) , SRCADDR:=ADR(HomingCommand) , WRITE:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeWriteBuffer[0] := HomingCommand; SoeWriteLen := 2; SoeElementNr := 16#40; fbSoeWrite(bExecute := FALSE); fbSoeWrite( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pSrcBuf := ptSoeWriteBuffer, (* The address (pointer) of the send buffer. *) cbBufLen := SoeWriteLen, (* Contains the max. number of bytes to write. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 61; 61: (* wait homing start written *) fbSoeWrite( bBusy=> SoeBusy, bError=> SoeErrFlag, nErrId=> SoeErrID); IF NOT SoeBusy AND NOT SoeErrFlag THEN fbSoeWrite( bExecute:=FALSE ); state := 70; END_IF 70 : (* read S-0-0148 data status, check if homing command is accepted and finished *) (* S-0-0148 changes to 7 after the Homing Command is written and changes back to 3 after homing is finished *) (* ReadSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=1 , LEN:=SIZEOF(HomingCommandFeedback) , DESTADDR:=ADR(HomingCommandFeedback) , READ:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeReadLen := 2; SoeElementNr := 16#40; fbSoeRead(bExecute := FALSE); fbSoeRead( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pDstBuf := ptSoeReadBuffer, (* Contains the address of the buffer for the received data. *) cbBufLen := SoeReadLen, (* Contains the max. number of bytes to be received. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 71; 71: (* wait until homing state read *) fbSoeRead( bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID); IF NOT SoeBusy THEN (* Abort waiting on a falling edge of Execute *) HomingCommandFeedback := DWORD_TO_WORD(SoeReadBuffer[0]); CASE HomingCommandFeedback OF 3 : (* homing procedure successfully finished *) state := 100; 7 : (* homing procedure started *) state := 70; HomingProcedureStarted := TRUE; 15 : (* homing procedure aborted *) Error := TRUE; ErrorID := 16#FFFFFFFE; (* Homing ended with error *) state := 300; (* abort *) ELSE state := 70; END_CASE END_IF IF ExecuteOffTrigger.Q THEN Aborted := TRUE; fbSoeRead(bExecute := FALSE); state := 300; (* abort *) END_IF 100 : (* read S-0-0403, Home position feedback value status *) (* ReadSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=403 , IDXOFFS:=0 , LEN:=SIZEOF(HomingStatus) , DESTADDR:=ADR(HomingStatus) , READ:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 403; SoeReadLen := 2; SoeElementNr := 16#40; fbSoeRead(bExecute := FALSE); fbSoeRead( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pDstBuf := ptSoeReadBuffer, (* Contains the address of the buffer for the received data. *) cbBufLen := SoeReadLen, (* Contains the max. number of bytes to be received. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 101; 101: (* wait until homing status read *) fbSoeRead( bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID); IF NOT SoeBusy THEN HomingStatus := DWORD_TO_WORD(SoeReadBuffer[0]); IF (HomingStatus AND 2#00000001) = 0 THEN Error := TRUE; ErrorID := 16#FFFFFFFD; (* Homing finished but 403 is zero *) state := 300; (* abort *) ELSE Delay(IN:=FALSE , PT:=t#100ms ); state := 120; END_IF fbSoeRead(bExecute := FALSE); END_IF 110 : (* Wait some time before resetting the TwinCAT axis position *) ;(* Delay(IN:=TRUE , PT:=t#1000ms ); IF Delay.Q THEN Delay(IN:=FALSE); state := 120; END_IF *) 120 : (* set TwinCAT NC axis position to HomePosition value *) stSetPositionOptions.ClearPositionLag := TRUE; (* B.ROOST 14.12.2011 *) SetActPos(Execute:=TRUE , Position:=HomePosition , Options := stSetPositionOptions, Mode:= FALSE, Axis:=Axis); IF SetActPos.Done THEN SetActPos(Execute:=FALSE, Axis:=Axis); state := 130; END_IF 130 : (* set S-0-0148, homing command, stop homing *) HomingCommand := 0; (* stop homing *) (* WriteSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=0 , LEN:=SIZEOF(HomingCommand) , SRCADDR:=ADR(HomingCommand) , WRITE:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeWriteBuffer[0] := HomingCommand; SoeWriteLen := 2; SoeElementNr := 16#40; fbSoeWrite(bExecute := FALSE); fbSoeWrite( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pSrcBuf := ptSoeWriteBuffer, (* The address (pointer) of the send buffer. *) cbBufLen := SoeWriteLen, (* Contains the max. number of bytes to write. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 131; 131: (* wait homing stop written *) fbSoeWrite( bBusy=> SoeBusy, bError=> SoeErrFlag, nErrId=> SoeErrID); IF NOT SoeBusy AND NOT SoeErrFlag THEN fbSoeWrite( bExecute:=FALSE ); state := 140; END_IF 140 : (* monitoring S-0-0148 data status, check if homing command is accepted and finished *) (* ReadSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=1 , LEN:=SIZEOF(HomingCommandFeedback) , DESTADDR:=ADR(HomingCommandFeedback) , READ:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeReadLen := 2; SoeElementNr := 16#40; fbSoeRead(bExecute := FALSE); fbSoeRead( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pDstBuf := ptSoeReadBuffer, (* Contains the address of the buffer for the received data. *) cbBufLen := SoeReadLen, (* Contains the max. number of bytes to be received. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 141; 141: (* wait until homing state read *) fbSoeRead( bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID); IF NOT SoeBusy THEN (* Abort waiting on a falling edge of Execute *) HomingCommandFeedback := DWORD_TO_WORD(SoeReadBuffer[0]); IF HomingCommandFeedback = 0 THEN (* 0=finished *) state := 200; ELSE state := 140; END_IF END_IF (* Abort waiting on a falling edge of Execute *) IF ExecuteOffTrigger.Q THEN Aborted := TRUE; fbSoeRead(bExecute := FALSE); state := 400; END_IF 200 : (* set lag distance monitoring to its original value *) LagDistanceMonitoring := 0; WriteNC(NETID:='' , PORT:=AMSPORT_R0_NC , IDXGRP:=NCIDXG_AXPARMS+DWORD_TO_UINT(Axis1.NcToPlc.AxisId) , IDXOFFS:=16#20010 , LEN:=SIZEOF(SavedLagDistanceMonitoring) , SRCADDR:=ADR(SavedLagDistanceMonitoring) , WRITE:=TRUE , TMOUT:=T#1s); IF NOT WriteNC.Busy AND NOT WriteNC.Err THEN WriteNC( WRITE:=FALSE ); iDone := NOT Aborted; state := 210; END_IF 210 : (* Enable NC reference flag *) NcReferenceFlag := 1; WriteNC(NETID:='' , PORT:=AMSPORT_R0_NC , IDXGRP:=NCIDXG_AXFUNCS+DWORD_TO_UINT(Axis1.NcToPlc.AxisId) , IDXOFFS:=16#1B , LEN:=SIZEOF(NcReferenceFlag) , SRCADDR:=ADR(NcReferenceFlag) , WRITE:=TRUE , TMOUT:=T#1s); IF NOT WriteNC.Busy AND NOT WriteNC.Err THEN WriteNC( WRITE:=FALSE ); state := 0; END_IF (*============= ABORT =================*) 300 : (* set S-0-0148, homing command, abort homing *) HomingCommand := 1; (* abort homing *) fbSoeRead(bExecute := FALSE); (* WriteSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=0 , LEN:=SIZEOF(HomingCommand) , SRCADDR:=ADR(HomingCommand) , WRITE:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeWriteBuffer[0] := HomingCommand; SoeWriteLen := 2; SoeElementNr := 16#40; fbSoeWrite(bExecute := FALSE); fbSoeWrite( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pSrcBuf := ptSoeWriteBuffer, (* The address (pointer) of the send buffer. *) cbBufLen := SoeWriteLen, (* Contains the max. number of bytes to write. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 301; 301: (* wait homing abort written *) fbSoeWrite( bBusy=> SoeBusy, bError=> SoeErrFlag, nErrId=> SoeErrID); IF NOT SoeBusy AND NOT SoeErrFlag THEN fbSoeWrite(bExecute := FALSE); Delay(IN:=FALSE); state := 310; END_IF 310 : (* monitoring S-0-0148, abort state feedback status *) Delay(IN:=TRUE , PT:=t#2000ms ); (* ReadSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=1 , LEN:=SIZEOF(HomingCommandFeedback) , DESTADDR:=ADR(HomingCommandFeedback) , READ:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeReadLen := 2; SoeElementNr := 16#40; fbSoeRead(bExecute := FALSE); fbSoeRead( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pDstBuf := ptSoeReadBuffer, (* Contains the address of the buffer for the received data. *) cbBufLen := SoeReadLen, (* Contains the max. number of bytes to be received. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 311; 311: (* wait until homing state read *) fbSoeRead( bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID); IF NOT SoeBusy THEN (* Abort waiting on a falling edge of Execute *) HomingCommandFeedback := DWORD_TO_WORD(SoeReadBuffer[0]); IF HomingCommandFeedback = 5 THEN (* 5 = command aborted *) Delay(IN:=FALSE); state := 320; ELSE state := 310; (* read again *) END_IF IF Delay.Q THEN (* command should be executed *) Delay(IN:=FALSE); state := 320; END_IF END_IF 320 :(* Wait some time before resetting the TwinCAT axis position *) Delay(IN:=TRUE , PT:=t#200ms ); IF Delay.Q THEN Delay(IN:=FALSE); state := 330; END_IF 330 : (* Reset *) ResetAxis(Execute:=TRUE , Axis:=Axis ); IF ResetAxis.Done OR ResetAxis.Error THEN ResetAxis(Execute:=FALSE, Axis:=Axis); state := 340; END_IF 340 : (* set S-0-0148, homing command, stop homing *) HomingCommand := 0; (* stop homing *) (* WriteSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=0 , LEN:=SIZEOF(HomingCommand) , SRCADDR:=ADR(HomingCommand) , WRITE:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeWriteBuffer[0] := HomingCommand; SoeWriteLen := 2; SoeElementNr := 16#40; fbSoeWrite(bExecute := FALSE); fbSoeWrite( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pSrcBuf := ptSoeWriteBuffer, (* The address (pointer) of the send buffer. *) cbBufLen := SoeWriteLen, (* Contains the max. number of bytes to write. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 341; 341: (* wait homing stop written *) fbSoeWrite( bBusy=> SoeBusy, bError=> SoeErrFlag, nErrId=> SoeErrID); IF NOT SoeBusy AND NOT SoeErrFlag THEN fbSoeWrite( bExecute:=FALSE ); Delay(IN:=FALSE); state := 350; END_IF 350 : (* monitoring S-0-0148 data status, check if homing command is accepted and finished *) Delay(IN:=TRUE , PT:=t#1000ms ); (* ReadSercos(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=1 , LEN:=SIZEOF(HomingCommandFeedback) , DESTADDR:=ADR(HomingCommandFeedback) , READ:=TRUE , TMOUT:=tADSTimeOut ); *) SoeIndex := 148; SoeReadLen := 2; SoeElementNr := 16#40; fbSoeRead(bExecute := FALSE); fbSoeRead( sNetId := AmsNetId_str, (* AmsNetId of the EtherCAT master device.*) nSlaveAddr := SoeSlvAddr, (* Address of the slave device.*) nIdn := SoeIndex, (* Identification number of the parameter that is to be written*) nElement := SoeElementNr, (* parameter element 16#40 value *) nDriveNo := 0, (* drive number ? *) bCommand := FALSE, (* internal execution command ? *) pDstBuf := ptSoeReadBuffer, (* Contains the address of the buffer for the received data. *) cbBufLen := SoeReadLen, (* Contains the max. number of bytes to be received. *) bExecute := TRUE, (* Function block execution is triggered by a rising edge at this input.*) tTimeout := SoeTimeOut, (* States the time before the function is cancelled. *) bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID ); state := 351; 351: (* wait until homing state read *) fbSoeRead( bBusy => SoeBusy, bError => SoeErrFlag, nErrId => SoeErrID); IF NOT SoeBusy THEN (* Abort waiting on a falling edge of Execute *) HomingCommandFeedback := DWORD_TO_WORD(SoeReadBuffer[0]); IF HomingCommandFeedback = 0 THEN (* 0 = command aborted *) Delay(IN:=FALSE); state := 400; ELSE state := 350; (* read again *) END_IF IF Delay.Q THEN (* command should be executed *) Delay(IN:=FALSE); state := 400; END_IF END_IF 400 : (* set lag distance monitoring to its original value *) LagDistanceMonitoring := 0; fbSoeRead(bExecute := FALSE); WriteNC(NETID:='' , PORT:=AMSPORT_R0_NC , IDXGRP:=NCIDXG_AXPARMS+DWORD_TO_UINT(Axis1.NcToPlc.AxisId) , IDXOFFS:=16#20010 , LEN:=SIZEOF(SavedLagDistanceMonitoring) , SRCADDR:=ADR(SavedLagDistanceMonitoring) , WRITE:=TRUE , TMOUT:=T#1s); IF NOT WriteNC.Busy AND NOT WriteNC.Err AND NOT SoeBusy THEN WriteNC( WRITE:=FALSE ); iDone := NOT Aborted; state := 0; END_IF END_CASE (* check for errors *) IF state <> 0 THEN IF SoeErrFlag THEN Error := TRUE; ErrorId := SoeErrID; ELSIF WriteNC.ERR AND WriteNC.WRITE THEN (* IF WriteNC.ERR AND WriteNC.WRITE THEN *) Error := TRUE; ErrorId := WriteNC.ErrId; ELSIF ReadNC.ERR AND ReadNC.READ THEN Error := TRUE; ErrorId := ReadNc.ErrId; ELSIF SetActPos.Error AND SetActPos.Execute THEN Error := TRUE; ErrorID := SetActPos.ErrorId; END_IF IF Error THEN ErrorState := state; state := 0; END_IF END_IF (* +++ TEST +++ *) (* Permanent SERCOS parameter monitoring for use with TwinCAT Scope View *) (* ReadSercos148(NETID:='' , PORT:=DevicePort , IDXGRP:=148 , IDXOFFS:=1 , LEN:=SIZEOF(IDN148) , DESTADDR:=ADR(IDN148) , READ:=NOT ReadSercos148.READ OR ReadSercos148.BUSY , TMOUT:=tADSTimeOut ); ReadSercos403(NETID:='' , PORT:=DevicePort , IDXGRP:=403 , IDXOFFS:=0 , LEN:=SIZEOF(IDN403) , DESTADDR:=ADR(IDN403) , READ:=NOT ReadSercos403.READ OR ReadSercos403.BUSY , TMOUT:=tADSTimeOut ); *) ,n HOMING_PANELN @N!d @I @ @}AxCtrl.HomeAxis1.state Homing State: %s@ @~3N#AxCtrl.HomeBusy_Ax1 Start Homing NC_Home_Ax1 NC_Home_Ax1@ @<m[&Kaxis1.NcToPlc.ErrorCode NC Error ID: %d@ @}AxCtrl.HomeAxis1.ErrorState Error State: %s@ @}AxCtrl.HomeAxis1.ErrorId Error ID: %s@ @3# NC_Enable NC Enable NC_Enable@ @@3# Ax1 Reset NC_Enable NC_Reset_Ax1@ @dcsNC_TargetPos_Ax1 Target Pos: %f mm@ @cAxis1.NcToPlc.SetPos Setpoint Pos: %f @ @cAxis1.NcToPlc.ActPos Actual Pos: %f @ @;7VkF NC_Go_Ax1Ax1 Go  NC_Enable NC_Go_Ax1@ @h3# NC_MP_Ax1Ax1 +  NC_Enable NC_MP_Ax1@ @d34# NC_MN_Ax1Ax1 -  NC_Enable NC_MN_Ax1@ @c NC_DemVel_Ax1 Demand Vel: %f@ @d}sNC_HomePos_Ax1 Home Pos: %f mm@ @{P`X NC_Ready_Ax1@ @P!`XReady@ @{_og NC_Cal_Ax1@ @_!og Calibrated@ @{n~x NC_HasJob_Ax1@ @n!~vHas Job@ @{}NC_NotMoving_Ax1@ @}! NOT Moving@ @{NC_MovingFw_Ax1@ @! Moving Fw@ @{NC_MovingBw_Ax1@ @! Moving Bw@ @{AQIAxis1.NcToPlc.StateDWord.28@ @A!QIDrive Device Error@ @{3# Drive Reset Drv_Reset_Ax1 NC_Reset_Ax1@Y,BWe 'TcTestAndSet.lib 23.2.09 10:50:08@PqI"TcDrive.lib 17.3.10 11:50:30@K%TcMc2Drive.lib 19.1.10 09:34:38@nUK TcMC2.lib 12.3.10 10:50:30@fK&TcUtilities.lib 31.1.11 12:11:32@FM%TcEtherCAT.lib 6.10.10 10:25:58@@L"STANDARD.LIB 5.6.98 10:03:02@Fw5!TcBase.lib 14.5.09 10:14:08@ J#TcSystem.lib 18.2.11 15:15:48@^M TcNC.lib 10.10.08 15:55:34@lH%TcBaseMath.lib 27.7.04 10:07:56@lA!TcMath.lib 23.9.04 13:15:30@bRATestAndSet@Global_Variables@F_ConvWordToSTAX5000C1D@E_AX5000_DriveOpModeE_FwUpdateStateE_IndraDriveCs_DriveOpModeE_SoE_AttribLenE_SoE_CmdControlE_SoE_CmdState E_SoE_Type ST_AX5000_C1DST_AX5000DriveStatusST_IndraDriveCs_C1DST_IndraDriveCsDriveStatusST_SoE_CPxInvParamListST_SoE_CPxInvParamList25ST_SoE_DiagNumListST_SoE_DiagNumList30ST_SoE_DiagNumList50 ST_SoE_StringST_SoE_StringEx%F_ConvWordToSTAX5000DriveStatus@#F_ConvWordToSTIndraDriveCsC1D@+F_ConvWordToSTIndraDriveCsDriveStatus@F_GetVersionTcDrive@+FB_SoEAX5000FirmwareUpdate_ByDriveRef@/FB_SoEAX5000ReadActMainVoltage_ByDriveRef@-FB_SoEAX5000SetMotorCtrlWord_ByDriveRef@%FB_SoEExecuteCommand_ByDriveRef@/FB_SoEReadAmplifierTemperature_ByDriveRef@%FB_SoEReadClassXDiag_ByDriveRef@'FB_SoEReadCommandState_ByDriveRef@'FB_SoEReadDcBusCurrent_ByDriveRef@'FB_SoEReadDcBusVoltage_ByDriveRef@&FB_SoEReadDiagMessage_ByDriveRef@%FB_SoEReadDiagNumber_ByDriveRef@)FB_SoEReadDiagNumberList_ByDriveRef@+FB_SoEReadMotorTemperature_ByDriveRef@FB_SoEReset_ByDriveRef@*FB_SoEWriteCommandControl_ByDriveRef@$FB_SoEWritePassword_ByDriveRef@Global_Variables@$F_GetVersionTcMc2Drive@ FB_SoEAX5000FirmwareUpdate@$FB_SoEAX5000ReadActMainVoltage@"FB_SoEAX5000SetMotorCtrlWord@FB_SoEExecuteCommand@FB_SoERead@$FB_SoEReadAmplifierTemperature@FB_SoEReadClassXDiag@FB_SoEReadCommandState@FB_SoEReadDcBusCurrent@FB_SoEReadDcBusVoltage@FB_SoEReadDiagMessage@FB_SoEReadDiagNumber@FB_SoEReadDiagNumberList@ FB_SoEReadMotorTemperature@FB_SoEReset@FB_SoEWrite@FB_SoEWriteCommandControl@FB_SoEWritePassword@Global_Variables@__F_AxisState@I_E_ParameterType_E_ReadWriteParameterMode_E_TcMC_STATES_E_TcNC_CmdState _E_TcNC_CmdTypeNewTargPosAndVelo_E_TcNC_PosSetType_E_TcNC_ServoState_E_TcNC_SlaveTypes_E_TcNC_StartPosType_E_TcNC_TargPosType_E_TouchProbeState_ST_FunctionBlockResults_ST_NCADS_Axis_ST_NCADS_AxisFunctions_ST_NCADS_AxisParameter_ST_NCADS_AxisState_ST_NCADS_IDXOFFS_AxisFunctions_ST_NCADS_IDXOFFS_AxisParameter_ST_NCADS_IDXOFFS_AxisState _ST_NCADS_IDXOFFS_TableFunctions _ST_NCADS_IDXOFFS_TableParameter_ST_NCADS_Table_ST_NCADS_TableFunctions_ST_NCADS_TableParameter_ST_ParaStruct_ST_TcNC_Compensation2_ST_TcNC_CoupleSlave_ST_TcNC_CoupleSlaveMultiMaster_ST_TcNC_DecoupleSlave_ST_TcNc_OperationModes _ST_TcNC_SetEncoderSaclingFactor_ST_TcNC_SetPos_ST_TcNC_SetPosOnTheFly!_ST_TcNC_UnversalAxisStartRequest"_ST_TcNC_UnversalAxisStartResponseAXIS_REFE_AxisErrorCodesE_DestallDetectMode E_DestallMode E_JogModeE_PositionType E_ReadModeE_SetScalingFactorMode E_SignalEdgeE_SuperpositionAbortOptionE_SuperpositionMode E_TouchProbeMC_AxisParameter MC_AxisStates MC_BufferMode MC_Direction MC_HomingModeNCTOPLC_AXIS_REFPLCTONC_AXIS_REF ST_AdsAddressST_AxisComponentsST_AxisOpModesST_AxisParameterSet ST_AxisStatusST_DriveAddressST_GearInDynOptionsST_GearInMultiMasterOptionsST_GearInOptionsST_GearOutOptionsST_HomingOptions ST_McOutputsST_MoveOptionsST_PowerStepperStructST_SetEncoderScalingOptionsST_SetPositionOptionsST_SuperpositionOptionsST_TableCharacValues TRIGGER_REF_F_GetIndexGroup@_F_ReadStatus@_F_TcMC_DWORD_TO_HEXSTR@_F_TcMC_Round@_FB_MoveUniversalGeneric@._FB_MoveUniversalGeneric.ActErrorMessage@8_FB_MoveUniversalGeneric.ActMonitorContinousMotion@7_FB_MoveUniversalGeneric.ActMonitorDiscreteMotion@-_FB_MoveUniversalGeneric.ActMonitorStop@0_FB_MoveUniversalGeneric.ActNcCycleCounter@_FB_ReadWriteParameter@_FBAXIS_REF@_FBAXIS_REF.ReadStatus@_TCMCGLOBAL@F_AxisCamDataQueued@F_AxisCamScalingPending@F_AxisCamTableQueued@F_AxisControlLoopClosed@F_AxisExternalLatchValid@ F_AxisGotNewTargetPosition@F_AxisHasBeenStopped@F_AxisHasExtSetPointGen@F_AxisHasJob@F_AxisInErrorState@F_AxisInPositionWindow@F_AxisInProtectedMode@F_AxisInPTPmode@F_AxisIoDataIsInvalid@F_AxisIsAtTargetPosition@F_AxisIsCalibrated@F_AxisIsCalibrating@F_AxisIsCompensating@F_AxisIsCoupled@F_AxisIsMoving@F_AxisIsMovingBackwards@F_AxisIsMovingEndless@F_AxisIsMovingForward@F_AxisIsNotMoving@F_AxisIsReady@F_AxisJobPending@ F_AxisMotionCommandsLocked@#F_AxisReachedConstantVelocity@F_GetVersion_TcMC2@MC_AbortSuperposition@MC_AbortTrigger@MC_ExtSetPointGenDisable@MC_ExtSetPointGenEnable@MC_ExtSetPointGenFeed@MC_GearIn@MC_GearIn.ActGearInDyn@MC_GearIn.WriteGearRatio@MC_GearInDyn@MC_GearInMultiMaster@MC_GearOut@ MC_Halt@ MC_Home@ MC_Jog@MC_Jog.ActCheckJogEnd@MC_Jog.ActJogMove@MC_MoveAbsolute@MC_MoveAdditive@MC_MoveContinuousAbsolute@MC_MoveContinuousRelative@MC_MoveModulo@%MC_MoveModulo.MC_MoveModuloCall@MC_MoveRelative@MC_MoveSuperImposed@MC_MoveVelocity@MC_OverrideFilter@MC_Power@MC_PowerStepper@MC_ReadActualPosition@MC_ReadActualVelocity@MC_ReadAxisComponents@MC_ReadAxisError@MC_ReadBoolParameter@MC_ReadDriveAddress@MC_ReadParameter@MC_ReadParameterSet@MC_ReadStatus@MC_Reset@ MC_SetEncoderScalingFactor@MC_SetOverride@MC_SetPosition@ MC_Stop@MC_Stop.ActStop@MC_TouchProbe@)MC_TouchProbe.ActTouchProbeActivate@0MC_TouchProbe.ActTouchProbeMonitorActivity@2MC_TouchProbe.ActTouchProbeMonitorLatchValid@0MC_TouchProbe.ActTouchProbeMonitorPlcEvent@,MC_TouchProbe.ActTouchProbeStartupInit@MC_WriteBoolParameter@MC_WriteParameter@TcMC_GlobalConstants@ARG_TO_CSVFIELD@> ADSDATATYPEIDE_AmsLoggerMode E_ArgType E_DbgContextE_DbgDirection E_EnumCmdTypeE_FileRBufferCmdE_HashPrefixTypes E_MIB_IF_TypeE_NumGroupTypesE_PersistentModeE_PrefixFlagParamE_RegValueTypeE_RouteTransportType E_SBCSTypeE_ScopeServerState E_TimeZoneIDE_TypeFieldParamE_UTILITIES_ERRORCODESOTSTRUCTPROFILERSTRUCTREMOTEPCREMOTEPCINFOSTRUCTROUTERINFOSTRUCTST_AmsGetTimeZoneInformationST_AmsLoggerReqST_AmsRouteEntryST_AmsRouteEntryHeadST_AmsRouteSystemEntryST_DeviceIdentificationST_DeviceIdentificationExST_FileAttributesST_FileRBufferHeadST_FindFileEntryST_FindFileSystemEntryST_FormatParametersST_HKeySrvReadST_HKeySrvWriteST_IP_ADAPTER_INFOST_IP_ADDR_STRINGST_IPAdapterHwAddrST_IPAdapterInfo ST_SBCSTable#ST_ScopeServerRecordModeDescriptionST_TcRouterStatusInfoST_TimeZoneInformationSTARTPROC_BUFFERSYMINFO_BUFFER SYMINFOSTRUCTT_Arg T_FILETIMET_FIX16 T_FloatRecT_HashTableEntry T_HHASHTABLE T_HLINKEDLISTT_HUGE_INTEGERT_LARGE_INTEGERT_LinkedListEntryT_UHUGE_INTEGERT_ULARGE_INTEGER TIMESTRUCTBCD_TO_DEC@BE128_TO_HOST@BE16_TO_HOST@BE32_TO_HOST@BE64_TO_HOST@BYTEARR_TO_MAXSTRING@CSVFIELD_TO_ARG@CSVFIELD_TO_STRING@DATA_TO_HEXSTR@DCF77_TIME@DCF77_TIME_EX@DEC_TO_BCD@DEG_TO_RAD@DINT_TO_DECSTR@DT_TO_FILETIME@DT_TO_SYSTEMTIME@DWORD_TO_BINSTR@DWORD_TO_DECSTR@DWORD_TO_HEXSTR@DWORD_TO_OCTSTR@F_ARGCMP@F_ARGCPY@F_ARGIsZero@F_BIGTYPE@ F_BOOL@ F_BYTE@F_BYTE_TO_CRC16_CCITT@F_CheckSum16@F_CRC16_CCITT@F_CreateHashTableHnd@F_CreateLinkedListHnd@F_DATA_TO_CRC16_CCITT@ F_DINT@ F_DWORD@F_FormatArgToStr@F_GetDayOfWeek@F_GetDOYOfYearMonthDay@F_GetFloatRec@F_GetMaxMonthDays@F_GetMonthOfDOY@F_GetVersionTcUtilities@F_GetWeekOfTheYear@ F_HUGE@ F_INT@ F_LARGE@ F_LREAL@ F_LTrim@ F_REAL@ F_RTrim@ F_SINT@F_STRING@F_SwapReal@F_SwapRealEx@F_ToLCase@F_ToUCase@ F_UDINT@ F_UHUGE@ F_UINT@F_ULARGE@ F_USINT@ F_WORD@F_YearIsLeapYear@FB_AddRouteEntry@FB_AmsLogger@FB_BasicPID@FB_BufferedTextFileWriter@'FB_BufferedTextFileWriter.A_Reset@FB_ConnectScopeServer@FB_CSVMemBufferReader@FB_CSVMemBufferWriter@FB_DbgOutputCtrl@FB_DbgOutputCtrl.A_Log@FB_DbgOutputCtrl.A_LogHex@FB_DbgOutputCtrl.A_Reset@FB_DisconnectScopeServer@FB_EnumFindFileEntry@FB_EnumFindFileList@FB_EnumRouteEntry@FB_EnumStringNumbers@FB_FileRingBuffer@!FB_FileRingBuffer.A_AddTail@FB_FileRingBuffer.A_Close@ FB_FileRingBuffer.A_Create@!FB_FileRingBuffer.A_GetHead@FB_FileRingBuffer.A_Open@$FB_FileRingBuffer.A_RemoveHead@FB_FileRingBuffer.A_Reset@FB_FormatString@FB_GetAdaptersInfo@ FB_GetDeviceIdentification@"FB_GetDeviceIdentificationEx@FB_GetHostAddrByName@FB_GetHostName@FB_GetLocalAmsNetId@FB_GetRouterStatusInfo@FB_GetTimeZoneInformation@FB_HashTableCtrl@FB_HashTableCtrl.A_Add@!FB_HashTableCtrl.A_GetFirst@)FB_HashTableCtrl.A_GetIndexAtPosPtr@ FB_HashTableCtrl.A_GetNext@FB_HashTableCtrl.A_Lookup@FB_HashTableCtrl.A_Remove@"FB_HashTableCtrl.A_RemoveAll@$FB_HashTableCtrl.A_RemoveFirst@FB_HashTableCtrl.A_Reset@FB_LinkedListCtrl@&FB_LinkedListCtrl.A_AddHeadValue@&FB_LinkedListCtrl.A_AddTailValue@"FB_LinkedListCtrl.A_FindNext@"FB_LinkedListCtrl.A_FindPrev@!FB_LinkedListCtrl.A_GetHead@*FB_LinkedListCtrl.A_GetIndexAtPosPtr@!FB_LinkedListCtrl.A_GetNext@!FB_LinkedListCtrl.A_GetPrev@!FB_LinkedListCtrl.A_GetTail@)FB_LinkedListCtrl.A_RemoveHeadValue@)FB_LinkedListCtrl.A_RemoveTailValue@-FB_LinkedListCtrl.A_RemoveValueAtPosPtr@FB_LinkedListCtrl.A_Reset@*FB_LinkedListCtrl.A_SetValueAtPosPtr@FB_LocalSystemTime@FB_MemBufferMerge@FB_MemBufferSplit@FB_MemRingBuffer@ FB_MemRingBuffer.A_AddTail@ FB_MemRingBuffer.A_GetHead@#FB_MemRingBuffer.A_RemoveHead@FB_MemRingBuffer.A_Reset@FB_MemRingBufferEx@"FB_MemRingBufferEx.A_AddTail@#FB_MemRingBufferEx.A_FreeHead@&FB_MemRingBufferEx.A_GetFreeSize@"FB_MemRingBufferEx.A_GetHead@ FB_MemRingBufferEx.A_Reset@FB_RegQueryValue@FB_RegSetValue@FB_RemoveRouteEntry@ FB_ResetScopeServerControl@FB_SaveScopeServerData@FB_ScopeServerControl@FB_SetTimeZoneInformation@FB_StartScopeServer@FB_StopScopeServer@FB_StringRingBuffer@#FB_StringRingBuffer.A_AddTail@#FB_StringRingBuffer.A_GetHead@&FB_StringRingBuffer.A_RemoveHead@!FB_StringRingBuffer.A_Reset@FB_TextFileRingBuffer@%FB_TextFileRingBuffer.A_AddTail@#FB_TextFileRingBuffer.A_Close@"FB_TextFileRingBuffer.A_Open@#FB_TextFileRingBuffer.A_Reset@FB_WritePersistentData@FILETIME_TO_DT@FILETIME_TO_SYSTEMTIME@FIX16_TO_LREAL@FIX16_TO_WORD@FIX16Add@FIX16Align@FIX16Div@FIX16Mul@FIX16Sub@GetRemotePCInfo@HEXSTR_TO_DATA@HOST_TO_BE128@HOST_TO_BE16@HOST_TO_BE32@HOST_TO_BE64@INT64_TO_LREAL@Int64Add64@Int64Add64Ex@Int64Cmp64@Int64Div64Ex@Int64IsZero@Int64Negate@Int64Not@Int64Sub64@IsFinite@LARGE_INTEGER@LARGE_TO_ULARGE@LREAL_TO_FIX16@LREAL_TO_FMTSTR@LREAL_TO_INT64@LREAL_TO_UINT64@MAXSTRING_TO_BYTEARR@NT_AbortShutdown@NT_GetTime@NT_Reboot@NT_SetLocalTime@NT_SetTimeToRTCTime@NT_Shutdown@NT_StartProcess@OTSTRUCT_TO_TIME@PBOOL_TO_BOOL@PBYTE_TO_BYTE@PDATE_TO_DATE@PDINT_TO_DINT@PDT_TO_DT@PDWORD_TO_DWORD@PHUGE_TO_HUGE@PINT_TO_INT@PLARGE_TO_LARGE@PLC_ReadSymInfo@PLC_ReadSymInfoByName@PLC_ReadSymInfoByNameEx@PLC_Reset@PLC_Start@PLC_Stop@PLREAL_TO_LREAL@PMAXSTRING_TO_MAXSTRING@PREAL_TO_REAL@Profiler@PSINT_TO_SINT@PSTRING_TO_STRING@PTIME_TO_TIME@PTOD_TO_TOD@PUDINT_TO_UDINT@PUHUGE_TO_UHUGE@PUINT_TO_UINT@PUINT64_TO_UINT64@PULARGE_TO_ULARGE@PUSINT_TO_USINT@PWORD_TO_WORD@RAD_TO_DEG@ROUTETRANSPORT_TO_STRING@ RTC@ RTC_EX@ RTC_EX2@ScopeASCIIExport@ScopeExit@ScopeGetRecordLen@ScopeGetState@ScopeLoadFile@ScopeManualTrigger@ScopeSaveAs@ScopeSetOffline@ScopeSetOnline@ScopeSetRecordLen@ScopeViewExport@STRING_TO_CSVFIELD@STRING_TO_SYSTEMTIME@STRING_TO_UINT64@SYSTEMTIME_TO_DT@SYSTEMTIME_TO_FILETIME@SYSTEMTIME_TO_STRING@TC_Config@TC_CpuUsage@TC_Restart@ TC_Stop@TC_SysLatency@TIME_TO_OTSTRUCT@UInt32x32To64@UINT64_TO_LREAL@UINT64_TO_STRING@UInt64Add64@UInt64Add64Ex@UInt64And@UInt64Cmp64@UInt64Div16Ex@UInt64Div64@UInt64Div64Ex@UInt64isZero@UInt64Limit@UInt64Max@UInt64Min@UInt64Mod64@UInt64Mul64@UInt64Mul64Ex@UInt64Not@UInt64Or@UInt64Rol@UInt64Ror@UInt64Shl@UInt64Shr@UInt64Sub64@UInt64Xor@ULARGE_INTEGER@ULARGE_TO_LARGE@WORD_TO_FIX16@WritePersistentData@Global_Variables@KCONVERTDCTIMETOPOS@ DCTIMESTRUCTE_EcAdressingType E_EcFoeModeE_EcMbxProtTypeE_EcScanSlavesCommandStatus ProductCode ST_DriveRef ST_EcCrcErrorST_EcCrcErrorEx ST_EcHeaderST_EcLastProtErrInfoST_EcMasterStatistic ST_EcMaxCmdST_EcScannedSlaveStatusST_EcSlaveConfigDataST_EcSlaveIdentityST_EcSlaveScannedDataST_EcSlaveStateST_EcSlaveStateBitsST_PlcDriveRefST_SoE_DriveRefST_TPCTYPE_CODE_XXDDDST_TPCTYPE_CODE_XXDDXDST_TPCTYPE_CODE_XXDXDDST_TPCTYPE_CODE_XXDXDXDT_DCTIME T_DCTIME32T_HFoeCONVERTPOSTODCTIME@DCTIME_TO_DCTIMESTRUCT@DCTIME_TO_FILETIME@DCTIME_TO_STRING@DCTIME_TO_SYSTEMTIME@DCTIMESTRUCT_TO_DCTIME@F_CheckVendorId@&F_ConvBK1120CouplerStateToString@F_ConvExtTimeToDcTime@"F_ConvMasterDevStateToString@F_ConvProductCodeToString@F_ConvSlaveStateToBits@F_ConvSlaveStateToString@F_ConvStateToString@F_ConvTcTimeToDcTime@F_ConvTcTimeToExtTime@F_GetActualDcTime@F_GetCurDcTaskTime@F_GetCurDcTickTime@F_GetCurExtTime@F_GetVersionTcEtherCAT@FB_EcCoESdoRead@FB_EcCoESdoReadEx@FB_EcCoESdoWrite@FB_EcCoESdoWriteEx@FB_EcDcTickTimeBaseCalc@FB_EcDcTimeCtrl@FB_EcDcTimeCtrl.A_GetDay@$FB_EcDcTimeCtrl.A_GetDayOfWeek@FB_EcDcTimeCtrl.A_GetHour@ FB_EcDcTimeCtrl.A_GetMicro@ FB_EcDcTimeCtrl.A_GetMilli@!FB_EcDcTimeCtrl.A_GetMinute@ FB_EcDcTimeCtrl.A_GetMonth@FB_EcDcTimeCtrl.A_GetNano@!FB_EcDcTimeCtrl.A_GetSecond@FB_EcDcTimeCtrl.A_GetYear@FB_EcExtSyncCalcTimeDiff@FB_EcExtSyncCheck@FB_EcFoeAccess@FB_EcFoeClose@FB_EcFoeLoad@FB_EcFoeOpen@FB_EcGetAllSlaveAddr@FB_EcGetAllSlaveCrcErrors@FB_EcGetAllSlaveStates@FB_EcGetConfSlaves@FB_EcGetLastProtErrInfo@FB_EcGetMasterState@FB_EcGetScannedSlaves@FB_EcGetSlaveCount@FB_EcGetSlaveCrcError@FB_EcGetSlaveCrcErrorEx@FB_EcGetSlaveIdentity@FB_EcGetSlaveState@FB_EcLogicalReadCmd@FB_EcLogicalWriteCmd@FB_EcMasterFrameStatistic@'FB_EcMasterFrameStatisticClearCRC@*FB_EcMasterFrameStatisticClearFrames@+FB_EcMasterFrameStatisticClearTxRxErr@FB_EcPhysicalReadCmd@FB_EcPhysicalWriteCmd@FB_EcReqMasterState@FB_EcReqSlaveState@FB_EcSetMasterState@FB_EcSetSlaveState@FB_EcSoERead@FB_EcSoEWrite@FB_SoERead_ByDriveRef@FB_SoEWrite_ByDriveRef@FILETIME_TO_DCTIME@STRING_TO_DCTIME@SYSTEMTIME_TO_DCTIME@Globale_Variablen@CONCAT@ CTD@ CTU@ CTUD@ DELETE@ F_TRIG@ FIND@ INSERT@ LEFT@ LEN@ MID@ R_TRIG@ REPLACE@ RIGHT@RS@ SEMA@SR@ TOF@ TON@TP@Global Variables 0@zFW_AdsClearEvents@ FW_NoOfByteFW_SystemInfoTypeFW_SystemTaskInfoType FW_TcEventFW_AdsLogDINT@FW_AdsLogEvent@FW_AdsLogLREAL@FW_AdsLogSTR@FW_AdsRdWrt@FW_AdsRdWrtInd@FW_AdsRdWrtRes@FW_AdsRead@FW_AdsReadDeviceInfo@FW_AdsReadInd@FW_AdsReadRes@FW_AdsReadState@FW_AdsWrite@FW_AdsWriteControl@FW_AdsWriteInd@FW_AdsWriteRes@FW_DRand@FW_GetCpuAccount@FW_GetCpuCounter@FW_GetCurTaskIndex@FW_GetSystemTime@FW_GetVersionTcBase@FW_LptSignal@FW_MemCmp@FW_MemCpy@FW_MemMove@FW_MemSet@FW_PortRead@FW_PortWrite@O,ADSCLEAREVENTS@E_IOAccessSize E_OpenPath E_SeekOriginE_TcEventClassE_TcEventClearModesE_TcEventPriorityE_TcEventStreamTypeExpressionResult SFCActionType SFCStepTypeST_AdsBaDevApiHeadST_AdsBaDevApiIoCtlModifierST_AdsBaDevApiReq ST_AmsAddrSYSTEMINFOTYPESYSTEMTASKINFOTYPE T_AmsNetId T_AmsNetIdArr T_AmsPort T_IPv4Addr T_IPv4AddrArr T_MaxStringT_U64KAFFINITYTcEventADSLOGDINT@ADSLOGEVENT@ADSLOGLREAL@ADSLOGSTR@ADSRDDEVINFO@ADSRDSTATE@ADSRDWRT@ADSRDWRTEX@ADSRDWRTIND@ADSRDWRTRES@ ADSREAD@ADSREADEX@ADSREADIND@ADSREADRES@ADSWRITE@ADSWRITEIND@ADSWRITERES@ADSWRTCTL@AnalyzeExpression@AnalyzeExpressionCombined@AnalyzeExpressionTable@AppendErrorString@BAVERSION_TO_DWORD@CLEARBIT32@CSETBIT32@ DRAND@F_CompareFwVersion@F_CreateAmsNetId@F_CreateIPv4Addr@F_GetVersionTcSystem@F_IOPortRead@F_IOPortWrite@F_ScanAmsNetIds@F_ScanIPv4AddrIds@F_SplitPathName@ F_ToASC@ F_ToCHR@FB_BaDeviceIoControl@FB_BaGenGetVersion@FB_CreateDir@ FB_EOF@FB_FileClose@FB_FileDelete@FB_FileGets@FB_FileOpen@FB_FilePuts@FB_FileRead@FB_FileRename@FB_FileSeek@FB_FileTell@FB_FileWrite@FB_PcWatchdog@FB_RemoveDir@FB_SimpleAdsLogEvent@FILECLOSE@FILEOPEN@FILEREAD@FILESEEK@FILEWRITE@FW_CallGenericFb@FW_CallGenericFun@GETBIT32@GETCPUACCOUNT@GETCPUCOUNTER@GETCURTASKINDEX@GETSYSTEMTIME@GETTASKTIME@LPTSIGNAL@ MEMCMP@ MEMCPY@ MEMMOVE@ MEMSET@ ROL32@ ROR32@SETBIT32@SFCActionControl@ SHL32@ SHR32@Global_Variables@=%AXACT@E_CmdTypeNewTargPosAndVeloE_CompensationTableTypeE_NcSlaveTypesE_PositionCorrectionMode E_ServoStateE_StartPosType E_TargPosTypeE_WorkingDirection GRF_AXCONFIGGRF_SINGLEAXCONFIGNCDRIVESTRUCT_INNCDRIVESTRUCT_OUTNCENCODERSTRUCT_INNCENCODERSTRUCT_OUTNCTOPLC_AXLESTRUCTNCTOPLC_AXLESTRUCT2PLCTONC_AXLESTRUCTPLCTONC_AXLESTRUCT2ST_CompensationDescST_CompensationElementST_NCADS_EMERGENCYSTOPST_NcCompensationST_NcCoupleSlaveST_NcCoupleTabSlaveST_NcNewEndPosST_NcSetNewPosVelo ST_NcSetPos ST_NcStartST_NcStartDriveOut ST_NcStartExST_NcTerminalInterface AXACTEX@ AXCPL@AXCPLMULTITAB@AXCPLTAB@ AXFNC@AxisCamDataQueued@AxisCamScalingPending@AxisCamTableQueued@AxisControlLoopClosed@AxisDriveDeviceError@AxisExternalLatchValid@AxisGetOverridePercent@AxisGotNewTargetPosition@AxisHasBeenStopped@AxisHasExtSetPointGen@AxisHasJob@AxisInErrorState@AxisInPositionWindow@AxisInProtectedMode@AxisInPTPMode@AxisIoDataIsInvalid@AxisIsAtTargetPosition@AxisIsCalibrated@AxisIsCalibrating@AxisIsCompensating@AxisIsCoupled@AxisIsMoving@AxisIsMovingBackwards@AxisIsMovingEndless@AxisIsMovingForward@AxisIsNotInTargetPosition@AxisIsNotMoving@AxisIsReady@AxisJobPending@!AxisReachedConstantVelocity@%AxisSetAcceptBlockedDriveSignal@AxisSetControllerEnable@AxisSetFeedEnableMinus@AxisSetFeedEnablePlus@AxisSetOverridePercent@!AxisSetReferencingCamSignal@AxisSoftLimitMaxExceeded@AxisSoftLimitMinExceeded@ AXSCOM@ F_GetCompensationElementAt@F_GetLeftIndex@F_GetVersionTcNC@F_IsCompensationDirection@'F_LinearInterpolationCompensation@FB_AxisNewTargPosAndVelo@FB_GetAxisAmsAddr@FB_PositionCompensation@FB_RegisterComKL25xx@/FB_RegisterComKL25xx.ActCheckTerminalType@1FB_RegisterComKL25xx.ActNcTerminalMappingIn@2FB_RegisterComKL25xx.ActNcTerminalMappingOut@8FB_RegisterComKL25xx.ActReadNcTerminalProcessImage@9FB_RegisterComKL25xx.ActWriteNcTerminalProcessImage@ FB_WritePositionCorrection@Get_TcNcUtilities_Version@Global_Variables@FW_Floor@FW_LrealFrac@FW_LrealModP@FW_LrealTrunc@ F_GetVersionTcMath@ FLOOR@ FRAC@ LMOD@ LTRUNC@ MODABS@MODTURNS@bnmeec =2 POUs ProgrammeAxCtrlMAIN SercosHoming* Data typesVisualizations HOMING_PANELGlobal VariablesGlobale_VariablenTwinCAT_ConfigurationVariable_ConfigurationC^C localhostP localhostP localhostP߳.z