diff --git a/solution/_Config/CNC/Axes/tcUNIT_virtual_axis.xti b/solution/_Config/CNC/Axes/tcUNIT_virtual_axis.xti
new file mode 100644
index 0000000..65dd9ce
--- /dev/null
+++ b/solution/_Config/CNC/Axes/tcUNIT_virtual_axis.xti
@@ -0,0 +1,302 @@
+
+
+
+ __FILENAME__
+ 171
+
+ Inputs
+
+
+ Outputs
+
+
+
+
diff --git a/solution/_Config/CNC/CNC.xti b/solution/_Config/CNC/CNC.xti
new file mode 100644
index 0000000..8e99e26
--- /dev/null
+++ b/solution/_Config/CNC/CNC.xti
@@ -0,0 +1,573 @@
+
+
+
+ CNC
+
+ CNC-Task GEO
+
+
+ CNC-Task SDA
+
+
+ CNC-Task COM
+
+ ].prg[ ]
+#
+# prg -> Program path
+# log_nr -> logical program path number
+# typ -> Programmpfadtyp ( 0x01 Main program path )
+# ( 0x02 Sub program path )
+# ( 0x03 Main- and sub program path )
+#
+# prioritaet -> priority of the program path,
+# (if there are multible program paths with the same type)
+#
+# additional program path, customer
+pfad[0].prg[0] sub
+pfad[0].log_nr[0] 1 # logical path number
+pfad[0].typ[0] 0x07 # main- and subprogram path, MSG SAVE
+pfad[0].prioritaet[0] 1 # priority
+#
+# program path for sub programs
+pfad[0].prg[1] cycles
+pfad[0].log_nr[1] 2 # logical path number
+pfad[0].typ[1] 0x03 # main- and subprogram path
+pfad[0].prioritaet[1] 2 # priority
+#
+# program path for cycles
+pfad[0].prg[2] customer
+pfad[0].log_nr[2] 3 # logical path number
+pfad[0].typ[2] 0x03 # main- and subprogram path
+pfad[0].prioritaet[2] 3 # priority
+#
+# ------------------------------------------------------------------------------------------------------
+# Do not change data below this line!!!
+# Daten unterhalb dieser Zeile nicht aendern, teilweise werden durch
+# den Systemmanager Aenderungen automatisch durchgefuehrt!!!
+# ------------------------------------------------------------------------------------------------------
+#
+#
+kanal_anzahl 0
+ext_var_max 100
+#
+# ----------------------------------------
+# Lists for configuration data
+# ----------------------------------------
+listen ASCII
+#
+default_sda_mds tc_virtual_1\default_sda.lis
+#
+hand_mds tc_virtual_2\hand_mds.lis
+#
+konf_path .
+#
+default_achs_mds tc_virtual_3\default_mds.lis
+zahl_mds 1
+achs_mds[0] tc_virtual_4\achsmds1.lis
+#
+zahl_kw 0
+#
+Ende
+
+]]>
+
+
+
+
+
+
+
+
diff --git a/solution/_Config/NC/Axes/tcUNIT_simulated_axis.xti b/solution/_Config/NC/Axes/tcUNIT_simulated_axis.xti
new file mode 100644
index 0000000..6036e30
--- /dev/null
+++ b/solution/_Config/NC/Axes/tcUNIT_simulated_axis.xti
@@ -0,0 +1,1526 @@
+
+
+
+
+ UINTARR2
+ 32
+ UINT
+
+ 0
+ 2
+
+
+ [%u, %u]
+ [0]
+ [1]
+
+
+ 0x%08x [%u, %u]
+ .
+ [0]
+ [1]
+
+
+ 0x%08x (%u)
+ .
+ .
+
+
+
+ NCENCODERSTRUCT_IN2B
+ 320
+
+ nDataIn1
+ UINTARR2
+ 32
+ 0
+
+
+ nDataIn2
+ UINTARR2
+ 32
+ 32
+
+
+ nState1
+ USINT
+ 8
+ 64
+
+
+ nState2
+ USINT
+ 8
+ 72
+
+
+ nState3
+ USINT
+ 8
+ 80
+
+
+ nState4
+ USINT
+
+ 8
+ 88
+
+
+ nDataIn3
+ UINTARR2
+ 32
+ 96
+
+
+ nDataIn4
+ UINTARR2
+ 32
+ 128
+
+
+ nDataIn5
+ UINTARR2
+ 32
+ 160
+
+
+ nDataIn6
+ UINTARR2
+ 32
+ 192
+
+
+ nState5
+ USINT
+ 8
+ 224
+
+
+ nState6
+ USINT
+ 8
+ 232
+
+
+ nState7
+ USINT
+ 8
+ 240
+
+
+ nState8
+ USINT
+ 8
+ 248
+
+
+ nDcInputTime
+ DINT
+ 32
+ 256
+
+
+ nDataIn7
+ UINTARR2
+ 32
+ 288
+
+
+
+ NCENCODERSTRUCT_IN
+
+ 96
+
+
+
+
+
+ NCENCODERSTRUCT_OUT2
+ 320
+
+ nDataOut1
+ UINTARR2
+ 32
+ 0
+
+
+ nDataOut2
+ UINTARR2
+ 32
+ 32
+
+
+ nCtrl1
+ USINT
+ 8
+ 64
+
+
+ nCtrl2
+ USINT
+ 8
+ 72
+
+
+ nCtrl3
+ USINT
+ 8
+ 80
+
+
+ nCtrl4
+ USINT
+ 8
+ 88
+
+
+ nDataOut3
+ UINTARR2
+ 32
+ 96
+
+
+ nDataOut4
+ UINTARR2
+ 32
+ 128
+
+
+ nDataOut5
+ UINTARR2
+ 32
+ 160
+
+
+ nDataOut6
+ UINTARR2
+ 32
+ 192
+
+
+ nCtrl5
+ USINT
+ 8
+ 224
+
+
+ nCtrl6
+ USINT
+ 8
+ 232
+
+
+ nCtrl7
+ USINT
+ 8
+ 240
+
+
+ nCtrl8
+ USINT
+ 8
+ 248
+
+
+
+ NCENCODERSTRUCT_OUT
+
+ 96
+
+
+
+
+
+ NCDRIVESTRUCT_IN2
+ 320
+
+ nDataIn1
+ UINTARR2
+ 32
+ 0
+
+
+ nDataIn2
+ UINTARR2
+ 32
+ 32
+
+
+ nState1
+ USINT
+ 8
+ 64
+
+
+ nState2
+ USINT
+ 8
+ 72
+
+
+ nState3
+ USINT
+ 8
+ 80
+
+
+ nState4
+ USINT
+
+ 8
+ 88
+
+
+ nDataIn3
+ UINTARR2
+ 32
+ 96
+
+
+ nDataIn4
+ UINTARR2
+ 32
+ 128
+
+
+ nDataIn5
+ UINTARR2
+ 32
+ 160
+
+
+ nDataIn6
+ UINTARR2
+ 32
+ 192
+
+
+ nState5
+ USINT
+ 8
+ 224
+
+
+ nState6
+ USINT
+ 8
+ 232
+
+
+ nState7
+ USINT
+ 8
+ 240
+
+
+ nState8
+ USINT
+ 8
+ 248
+
+
+ nDcOutputTime
+ DINT
+ 32
+ 256
+
+
+
+ NCDRIVESTRUCT_IN
+
+ 96
+
+
+
+
+
+ NCDRIVESTRUCT_OUT2
+ 320
+
+ nDataOut1
+ UINTARR2
+ 32
+ 0
+
+
+ nDataOut2
+ UINTARR2
+ 32
+ 32
+
+
+ nCtrl1
+ USINT
+ 8
+ 64
+
+
+ nCtrl2
+ USINT
+ 8
+ 72
+
+
+ nCtrl3
+ USINT
+ 8
+ 80
+
+
+ nCtrl4
+ USINT
+ 8
+ 88
+
+
+ nDataOut3
+ UINTARR2
+ 32
+ 96
+
+
+ nDataOut4
+ UINTARR2
+ 32
+ 128
+
+
+ nDataOut5
+ UINTARR2
+ 32
+ 160
+
+
+ nDataOut6
+ UINTARR2
+ 32
+ 192
+
+
+ nCtrl5
+ USINT
+ 8
+ 224
+
+
+ nCtrl6
+ USINT
+ 8
+ 232
+
+
+ nCtrl7
+ USINT
+ 8
+ 240
+
+
+ nCtrl8
+ USINT
+ 8
+ 248
+
+
+
+ NCDRIVESTRUCT_OUT
+
+ 96
+
+
+
+
+
+ PLCTONC_AXIS_REF_CTRL
+ 32
+
+ Enable
+ BIT
+ 1
+ 0
+
+
+ FeedEnablePlus
+ BIT
+ 1
+ 1
+
+
+ FeedEnableMinus
+ BIT
+ 1
+ 2
+
+
+ HomingSensor
+ BIT
+ 1
+ 5
+
+
+ AcceptBlockedDrive
+ BIT
+ 1
+ 8
+
+
+ PlcDebugFlag
+ BIT
+ 1
+ 30
+
+
+ NcDebugFlag
+ BIT
+ 1
+ 31
+
+
+ %08x
+
+
+ 0x%08x
+
+
+ 16#%08X
+
+
+
+ PLCTONC_AXIS_REF
+ 1024
+
+ ControlDWord
+ PLCTONC_AXIS_REF_CTRL
+ 32
+ 0
+
+
+ Override
+ UDINT
+ 32
+ 32
+
+
+ AxisModeRequest
+ UDINT
+ 32
+ 64
+
+
+ AxisModeDWord
+ UDINT
+ 32
+ 96
+
+
+ AxisModeLReal
+ LREAL
+ 64
+ 128
+
+
+ PositionCorrection
+ LREAL
+ 64
+ 192
+
+
+ ExtSetPos
+ LREAL
+ 64
+ 256
+
+
+ ExtSetVelo
+ LREAL
+ 64
+ 320
+
+
+ ExtSetAcc
+ LREAL
+ 64
+ 384
+
+
+ ExtSetDirection
+ DINT
+ 32
+ 448
+
+
+ ExtControllerOutput
+ LREAL
+ 64
+ 512
+
+
+ GearRatio1
+ LREAL
+ 64
+ 576
+
+
+ GearRatio2
+ LREAL
+ 64
+ 640
+
+
+ GearRatio3
+ LREAL
+ 64
+ 704
+
+
+ GearRatio4
+ LREAL
+ 64
+ 768
+
+
+ MapState
+ BOOL
+ 8
+ 832
+
+
+ PlcCycleControl
+ BYTE
+ 8
+ 840
+
+
+ PlcCycleCount
+ BYTE
+ 8
+ 848
+
+
+
+ NcStructType
+ 1
+
+
+
+
+ NCAXLESTRUCT_FROMPLC3
+
+
+
+
+ NCTOPLC_AXIS_REF_STATE
+ 32
+
+ Operational
+ BIT
+ 1
+ 0
+
+
+ Homed
+ BIT
+ 1
+ 1
+
+
+ NotMoving
+ BIT
+ 1
+ 2
+
+
+ InPositionArea
+ BIT
+ 1
+ 3
+
+
+ InTargetPosition
+ BIT
+ 1
+ 4
+
+
+ Protected
+ BIT
+ 1
+ 5
+
+
+ ErrorPropagationDelayed
+ BIT
+ 1
+ 6
+
+
+ HasBeenStopped
+ BIT
+ 1
+ 7
+
+
+ HasJob
+ BIT
+ 1
+ 8
+
+
+ PositiveDirection
+ BIT
+ 1
+ 9
+
+
+ NegativeDirection
+ BIT
+ 1
+ 10
+
+
+ HomingBusy
+ BIT
+ 1
+ 11
+
+
+ ConstantVelocity
+ BIT
+ 1
+ 12
+
+
+ Compensating
+ BIT
+ 1
+ 13
+
+
+ ExtSetPointGenEnabled
+ BIT
+ 1
+ 14
+
+
+ PhasingActive
+ BIT
+ 1
+ 15
+
+
+ ExternalLatchValid
+ BIT
+ 1
+ 16
+
+
+ NewTargetPos
+ BIT
+ 1
+ 17
+
+
+ ContinuousMotion
+ BIT
+ 1
+ 19
+
+
+ ControlLoopClosed
+ BIT
+ 1
+ 20
+
+
+ CamTableQueued
+ BIT
+ 1
+ 21
+
+
+ CamDataQueued
+ BIT
+ 1
+ 22
+
+
+ CamScalingPending
+ BIT
+ 1
+ 23
+
+
+ CmdBuffered
+ BIT
+ 1
+ 24
+
+
+ PTPmode
+ BIT
+ 1
+ 25
+
+
+ SoftLimitMinExceeded
+ BIT
+ 1
+ 26
+
+
+ SoftLimitMaxExceeded
+ BIT
+ 1
+ 27
+
+
+ DriveDeviceError
+ BIT
+ 1
+ 28
+
+
+ MotionCommandsLocked
+ BIT
+ 1
+ 29
+
+
+ IoDataInvalid
+ BIT
+ 1
+ 30
+
+
+ Error
+ BIT
+ 1
+ 31
+
+
+ %08x
+
+
+ 0x%08x
+
+
+ 16#%08X
+
+
+
+ NCTOPLC_AXIS_REF_OPMODE
+ 32
+
+ OpModePosAreaMonitoring
+ BIT
+ 1
+ 0
+
+
+ OpModeTargetPosMonitoring
+ BIT
+ 1
+ 1
+
+
+ OpModeLoop
+ BIT
+ 1
+ 2
+
+
+ OpModeMotionMonitoring
+ BIT
+ 1
+ 3
+
+
+ OpModePEHTimeMonitoring
+ BIT
+ 1
+ 4
+
+
+ OpModeBacklashCompensation
+ BIT
+ 1
+ 5
+
+
+ OpModeDelayedErrorReaction
+ BIT
+ 1
+ 6
+
+
+ OpModeModulo
+ BIT
+ 1
+ 7
+
+
+ OpModeSimulationAxis
+ BIT
+ 1
+ 8
+
+
+ OpModePosLagMonitoring
+ BIT
+ 1
+ 16
+
+
+ OpModeVeloLagMonitoring
+ BIT
+ 1
+ 17
+
+
+ OpModeSoftLimitMinMonitoring
+ BIT
+ 1
+ 18
+
+
+ OpModeSoftLimitMaxMonitoring
+ BIT
+ 1
+ 19
+
+
+ OpModePosCorrection
+ BIT
+ 1
+ 20
+
+
+ OpModeAllowSlaveCommands
+ BIT
+ 1
+ 21
+
+
+ OpModeAllowExtSetAxisCommands
+ BIT
+ 1
+ 22
+
+
+ ApplicationRequest
+ BIT
+ 1
+ 23
+
+
+
+ NCTOPLC_AXIS_REF_STATE2_FLAGS
+ 32
+
+ AvoidingCollision
+ BIT
+ 1
+ 0
+
+
+ %08x
+
+
+ 0x%08x
+
+
+ 16#%08X
+
+
+
+ NCTOPLC_AXIS_REF_STATE2
+ 32
+
+ Value
+ DWORD
+ 32
+ 0
+
+
+ Flags
+ NCTOPLC_AXIS_REF_STATE2_FLAGS
+ 32
+ 0
+
+
+ %08x
+
+
+ 0x%08x
+
+
+ 16#%08X
+
+
+
+ NCTOPLC_AXIS_REF_CAMCOUPLINGSTATE
+ 8
+
+ CamActivationPending
+ BIT
+ 1
+ 0
+
+
+ CamDeactivationPending
+ BIT
+ 1
+ 1
+
+
+ CamActive
+ BIT
+ 1
+ 2
+
+
+ CamDataQueued
+ BIT
+ 1
+ 6
+
+
+ CamScalingPending
+ BIT
+ 1
+ 7
+
+
+
+ UINTARR8
+ 128
+ UINT
+
+ 0
+ 8
+
+
+
+ NCTOPLC_AXIS_REF
+ 2048
+
+ StateDWord
+ NCTOPLC_AXIS_REF_STATE
+ 32
+ 0
+
+
+ ErrorCode
+ UDINT
+ 32
+ 32
+
+
+ AxisState
+ UDINT
+
+ 32
+ 64
+
+
+ AxisModeConfirmation
+ UDINT
+ 32
+ 96
+
+
+ HomingState
+ UDINT
+
+ 32
+ 128
+
+
+ CoupleState
+ UDINT
+
+ 32
+ 160
+
+
+ SvbEntries
+ UDINT
+ 32
+ 192
+
+
+ SafEntries
+ UDINT
+ 32
+ 224
+
+
+ AxisId
+ UDINT
+ 32
+ 256
+
+
+ OpModeDWord
+ NCTOPLC_AXIS_REF_OPMODE
+ 32
+ 288
+
+
+ ActPos
+ LREAL
+ 64
+ 320
+
+
+ ModuloActPos
+ LREAL
+ 64
+ 384
+
+
+ ActiveControlLoopIndex
+ UINT
+ 16
+ 448
+
+
+ ControlLoopIndex
+ UINT
+ 16
+ 464
+
+
+ ModuloActTurns
+ DINT
+ 32
+ 480
+
+
+ ActVelo
+ LREAL
+ 64
+ 512
+
+
+ PosDiff
+ LREAL
+ 64
+ 576
+
+
+ SetPos
+ LREAL
+ 64
+ 640
+
+
+ SetVelo
+ LREAL
+ 64
+ 704
+
+
+ SetAcc
+ LREAL
+ 64
+ 768
+
+
+ TargetPos
+ LREAL
+ 64
+ 832
+
+
+ ModuloSetPos
+ LREAL
+ 64
+ 896
+
+
+ ModuloSetTurns
+ DINT
+ 32
+ 960
+
+
+ CmdNo
+ UINT
+ 16
+ 992
+
+
+ CmdState
+ UINT
+ 16
+ 1008
+
+
+ SetJerk
+ LREAL
+ 64
+ 1024
+
+
+ SetTorque
+ LREAL
+ 64
+ 1088
+
+
+ ActTorque
+ LREAL
+ 64
+ 1152
+
+
+ StateDWord2
+ NCTOPLC_AXIS_REF_STATE2
+ 32
+ 1216
+
+
+ StateDWord3
+ DWORD
+ 32
+ 1248
+
+
+ TouchProbeState
+ DWORD
+ 32
+ 1280
+
+
+ TouchProbeCounter
+ DWORD
+ 32
+ 1312
+
+
+ CamCouplingState
+ NCTOPLC_AXIS_REF_CAMCOUPLINGSTATE
+
+ 0
+ 8
+
+ 64
+ 1344
+
+
+ CamCouplingTableID
+ UINTARR8
+ 128
+ 1408
+
+
+ ActTorqueDerivative
+ LREAL
+ 64
+ 1536
+
+
+ SetTorqueDerivative
+ LREAL
+ 64
+ 1600
+
+
+ ActPosWithoutPosCorrection
+ LREAL
+ 64
+ 1792
+
+
+ ActAcc
+ LREAL
+ 64
+ 1856
+
+
+ DcTimeStamp
+ UDINT
+ 32
+ 1920
+
+
+
+ NcStructType
+ 2
+
+
+
+
+ NCAXLESTRUCT_TOPLC
+
+
+ NCAXLESTRUCT_TOPLC2
+
+
+ NCAXLESTRUCT_TOPLC3
+
+
+ NCAXLESTRUCT_TOPLC4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ __FILENAME__
+
+
+
+
+
+ Inputs
+
+ In
+ NCENCODERSTRUCT_IN2B
+ 1024
+
+ nDataIn1
+
+
+ nDataIn2
+
+
+ nState4
+
+
+
+ nDataIn3
+
+
+ nDataIn4
+
+
+ nDataIn5
+
+
+ nDataIn6
+
+
+ nDataIn7
+
+
+
+
+ Outputs
+
+ Out
+ NCENCODERSTRUCT_OUT2
+ 2048
+
+ nDataOut1
+
+
+ nDataOut2
+
+
+ nDataOut3
+
+
+ nDataOut4
+
+
+ nDataOut5
+
+
+ nDataOut6
+
+
+
+
+
+
+
+
+
+
+ Inputs
+
+ In
+ NCDRIVESTRUCT_IN2
+ 1344
+
+ nDataIn1
+
+
+ nDataIn2
+
+
+ nState4
+
+
+
+ nDataIn3
+
+
+ nDataIn4
+
+
+ nDataIn5
+
+
+ nDataIn6
+
+
+
+
+ Outputs
+
+ Out
+ NCDRIVESTRUCT_OUT2
+ 2368
+
+ nDataOut1
+
+
+ nDataOut2
+
+
+ nCtrl2
+
+
+
+ nCtrl3
+
+
+
+ nDataOut3
+
+
+ nDataOut4
+
+
+ nDataOut5
+
+
+ nDataOut6
+
+
+
+
+
+
+
+
+
+
+ Inputs
+
+ FromPlc
+ PLCTONC_AXIS_REF
+
+
+
+ Outputs
+
+ ToPlc
+ NCTOPLC_AXIS_REF
+
+ AxisState
+
+
+
+ HomingState
+
+
+
+ CoupleState
+
+
+
+
+
+
diff --git a/solution/_Config/NC/NC.xti b/solution/_Config/NC/NC.xti
index 759c7a3..0347cfe 100644
--- a/solution/_Config/NC/NC.xti
+++ b/solution/_Config/NC/NC.xti
@@ -16,5 +16,6 @@
NC-Task 1 SVB
+
diff --git a/solution/solution.tsproj b/solution/solution.tsproj
index bcc972e..c5894d3 100644
--- a/solution/solution.tsproj
+++ b/solution/solution.tsproj
@@ -875,6 +875,7 @@ External Setpoint Generation:
+
{3EBB9639-5FF3-42B6-8847-35C70DC013C8}
@@ -893,7 +894,7 @@ External Setpoint Generation:
-
+
tc_epicscommodule Instance
{08500001-0000-0000-F000-000000000064}
@@ -906,6 +907,72 @@ External Setpoint Generation:
tc_project_app Instance
{08500001-0000-0000-F000-000000000064}
+
+ PlcTask Inputs
+
+ GVL.axes[1].inputs.bLimitFwd
+
+ BOOL
+
+
+ GVL.axes[1].inputs.bLimitBwd
+
+ BOOL
+
+
+ GVL.axes[1].inputs.bHomeSensor
+
+ BOOL
+
+
+ GVL.axes[1].inputs.bEncLAtch
+
+ BOOL
+
+
+ GVL.axes[1].Axis.NcToPlc
+ NCTOPLC_AXIS_REF
+
+ AxisState
+
+
+
+ HomingState
+
+
+
+ CoupleState
+
+
+
+
PlcTask Outputs
@@ -913,6 +980,10 @@ External Setpoint Generation:
BOOL
+
+ GVL.axes[1].Axis.PlcToNc
+ PLCTONC_AXIS_REF
+
@@ -920,5 +991,15 @@ External Setpoint Generation:
+
+
+
+
+
+
+
+
+
+
diff --git a/solution/tc_project_app/GVLs/GVL_APP.TcGVL b/solution/tc_project_app/GVLs/GVL_APP.TcGVL
index e125049..ecb46e3 100644
--- a/solution/tc_project_app/GVLs/GVL_APP.TcGVL
+++ b/solution/tc_project_app/GVLs/GVL_APP.TcGVL
@@ -7,7 +7,7 @@ VAR_GLOBAL
END_VAR
VAR_GLOBAL CONSTANT
- axisNum : UINT:=0;
+ axisNum : UINT:=1;
//axisCoupleMax : UINT:=4;
END_VAR]]>
diff --git a/solution/tc_project_app/POUs/MAIN.TcPOU b/solution/tc_project_app/POUs/MAIN.TcPOU
index 2621b5e..a07b19d 100644
--- a/solution/tc_project_app/POUs/MAIN.TcPOU
+++ b/solution/tc_project_app/POUs/MAIN.TcPOU
@@ -140,7 +140,6 @@ END_IF]]>
@@ -310,7 +309,6 @@ END_FOR]]>
-
diff --git a/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU b/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU
index 844227f..2d569d3 100644
--- a/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU
+++ b/solution/tc_project_app/Test/common/FB_tcUNIT_common.TcPOU
@@ -1,7 +1,7 @@
-
-
-
+
-
+
-
-
+
-
+
-
-
+
+ iAxisIndex: INT; // The idex of the axis to action the method on.
+END_VAR
+]]>
-
+GVL.axes[iAxisIndex].config.fVelocity := tcUNIT_GVL.fDEFAULT_TARGET_VELOCITY;
+GVL.axes[iAxisIndex].config.fAcceleration := tcUNIT_GVL.fDEFAULT_TARGET_ACCELERATION;
+GVL.axes[iAxisIndex].config.fDeceleration := tcUNIT_GVL.fDEFAULT_TARGET_DECCELERATION;
+GVL.axes[iAxisIndex].config.fOverride := tcUNIT_GVL.fDEFAULT_TARGET_OVERRIDE;
+GVL.axes[iAxisIndex].config.fPosition := tcUNIT_GVL.fDEFAULT_POSITION;]]>
-
-
+
-
+GVL.axes[iAxisIndex].config.fVelocity := fTargetVelocity;
+GVL.axes[iAxisIndex].config.fAcceleration := fTargetAcceleration;
+GVL.axes[iAxisIndex].config.fDeceleration := fTargetDeceleration;
+GVL.axes[iAxisIndex].config.fPosition := fTargetPosition;
+]]>
-
-
+
-
+GVL.axes[iAxisIndex].inputs.bLimitBwd := FALSE;
+GVL.axes[iAxisIndex].inputs.bLimitFwd := FALSE;
+GVL.axes[iAxisIndex].inputs.bEncLAtch := FALSE;
+GVL.axes[iAxisIndex].inputs.bHomeSensor := FALSE;
+]]>
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/Test/common/tcUNIT_GVL.TcGVL b/solution/tc_project_app/Test/common/tcUNIT_GVL.TcGVL
index ed05340..10cbe42 100644
--- a/solution/tc_project_app/Test/common/tcUNIT_GVL.TcGVL
+++ b/solution/tc_project_app/Test/common/tcUNIT_GVL.TcGVL
@@ -1,12 +1,10 @@
-
\ No newline at end of file
diff --git a/solution/tc_project_app/Test/standard_library_tests/FB_Axis_TEST.TcPOU b/solution/tc_project_app/Test/standard_library_tests/FB_Axis_TEST.TcPOU
index 59ff389..e80efba 100644
--- a/solution/tc_project_app/Test/standard_library_tests/FB_Axis_TEST.TcPOU
+++ b/solution/tc_project_app/Test/standard_library_tests/FB_Axis_TEST.TcPOU
@@ -6,18 +6,83 @@
FUNCTION_BLOCK FB_Axis_TEST EXTENDS tcUnit.FB_TestSuite
VAR
fbCommon: FB_tcUNIT_common;
- Axis: POINTER TO ST_AxisStruct := ADR(GVL.axes[1]);
+ iTargetAxis: INT := 1; // The of the axis within GVL.axes[] to test against.
END_VAR]]>
+SetAxisControl_Enabled();
+CheckAxisStatus_Moving();
+SetAxisConfig_Acceleration();
+CheckAxisStatus_NewPosition();
+SetAxisControl_Velocity();
+SetAxisInputs_bLimitFwd();]]>
-
-
+
+
+ nMaxCycles OR ExpectedResult = Result THEN
+ AssertEquals(Expected := ExpectedResult,
+ Actual := Result,
+ Message := 'Axis is not moving.');
+ TEST_FINISHED();
+ELSE
+ nCycle := nCycle + 1;
+END_IF]]>
+
+
+
+
+
+ nCycleMax OR ExpectedResult = Result THEN
+ AssertEquals(Expected := ExpectedResult,
+ Actual := Result,
+ Message := 'fPosition of the axis is different.');
+ TEST_FINISHED();
+ELSE
+ nCycle := nCycle + 1;
+END_IF]]>
+
+
+
+
-
-
+
-
-
-
-
-
- nMaxCycles OR ExpectedResult = Result THEN
AssertEquals(Expected := ExpectedResult,
Actual := Result,
- Message := 'Axis is not moving.');
+ Message := 'Axis is not enabled.');
+ TEST_FINISHED();
+ELSE
+ nCycle := nCycle + 1;
END_IF
-
-fbCommon.SetDefaults(GVL.Axes[1]);
-TEST_FINISHED();]]>
+]]>
-
-
-
-
-
-
-
-
+
+
+
+
+ nMaxCycles OR ExpectedResult = Result THEN
+ AssertEquals(Expected := ExpectedResult,
+ Actual := Result,
+ Message := 'Axis bLimitFwd is not enabled.');
+ TEST_FINISHED();
+ELSE
+ nCycle := nCycle + 1;
+END_IF]]>
+
+
+
-
+
+
+
+
+
+
+
+
-
+
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/tc_project_app.plcproj b/solution/tc_project_app/tc_project_app.plcproj
index d880255..e87ef80 100644
--- a/solution/tc_project_app/tc_project_app.plcproj
+++ b/solution/tc_project_app/tc_project_app.plcproj
@@ -369,14 +369,14 @@
- Tc2_MC2, * (Beckhoff Automation GmbH)
+ Tc2_MC2, 3.3.28.0 (Beckhoff Automation GmbH)
-
-
+
+
"<ProjectRoot>"
{192FAD59-8248-4824-A8DE-9177C94C195A}
@@ -427,15 +427,15 @@
-
-
- System.Boolean
- System.Collections.Hashtable
- System.Int32
- {54dd0eac-a6d8-46f2-8c27-2f43c7e49861}
- System.String
-
-
+
+
+ System.Boolean
+ System.Collections.Hashtable
+ System.Int32
+ {54dd0eac-a6d8-46f2-8c27-2f43c7e49861}
+ System.String
+
+
\ No newline at end of file
diff --git a/solution/tc_project_app/tc_project_app.tmcRefac b/solution/tc_project_app/tc_project_app.tmcRefac
new file mode 100644
index 0000000..58df39a
--- /dev/null
+++ b/solution/tc_project_app/tc_project_app.tmcRefac
@@ -0,0 +1,25 @@
+
+
+
+
+ SetAxisControl_Enabled
+ i
+ nCycle
+
+
+ SetAxisControl_Enabled
+ iMaxCount
+ nMaxCycles
+
+
+ CheckAxisStatus_NewPosition
+ iCount
+ nCycle
+
+
+ CheckAxisStatus_NewPosition
+ iMaxCount
+ nCycleMax
+
+
+
\ No newline at end of file