Skip to content

Commit

Permalink
V2.0: Fix issues #6
Browse files Browse the repository at this point in the history
  • Loading branch information
feecat committed Jan 18, 2024
1 parent 4b6b9ae commit abc4f49
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Binary file modified OpenSML.library
Binary file not shown.
Binary file modified OpenSML_TC3.library
Binary file not shown.
4 changes: 2 additions & 2 deletions src/OpenSML_AxisController.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ CASE iState OF
Axis.Modes_of_operation:=8;//Cyclic Synchronous Position Mode
Axis.ControlWord.3:=Axis.Modes_of_operation_display=8;//Success change mode, enable operation
otg.CurrentPosition:=DINT_TO_LREAL(Axis.Position_Actual_Value) / Control.Scale;//Write actual position to otg
IF Axis.StatusWord.2 THEN//Operation Enabled
IF Axis.StatusWord.2 AND Axis.Modes_of_operation_display = 8 THEN//Operation Enabled, Mode Changed success
iState:=20;
END_IF
20://Movement
Expand All @@ -92,7 +92,7 @@ CASE iState OF
TargetPosition:= Control.lrFollowPosition ,
TargetVelocity:= JogVel ,
TargetAcceleration:= 0 ,
CycleTIme:=0.01,
CycleTIme:= Control.CycleTime,
MaxVelocity:= MoveVel,//Control.para.MaxVelocity ,
MaxAcceleration:= Control.MaxAcceleration ,
MaxJerk:= Control.MaxJerk);//accept new position and going on
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSML_ProfilePosition.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CASE iState OF
10://Set Mode
Axis.Modes_of_operation:=1;//Profile Position Mode
Axis.ControlWord.3:=Axis.Modes_of_operation_display=1;//Success change mode, enable operation
IF Axis.StatusWord.2 THEN//Operation Enabled
IF Axis.StatusWord.2 AND Axis.Modes_of_operation_display = 1 THEN//Operation Enabled, Mode Changed success
iState:=20;
END_IF
20://Movement
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSML_ProfileVelocity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ CASE iState OF
10://Set Mode
Axis.Modes_of_operation:=3;//Profile Velocity Mode
Axis.ControlWord.3:=Axis.Modes_of_operation_display=3;//Success change mode, enable operation
IF Axis.StatusWord.2 THEN//Operation Enabled
IF Axis.StatusWord.2 AND Axis.Modes_of_operation_display = 3 THEN//Operation Enabled, Mode Changed success
iState:=20;
END_IF
20://Movement
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSML_SyncPosition.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CASE iState OF
Axis.Modes_of_operation:=8;//Cyclic Synchronous Position Mode
Axis.ControlWord.3:=Axis.Modes_of_operation_display=8;//Success change mode, enable operation
otg.CurrentPosition:=DINT_TO_LREAL(Axis.Position_Actual_Value) / lrScale;//Write actual position to otg
IF Axis.StatusWord.2 THEN//Operation Enabled
IF Axis.StatusWord.2 AND Axis.Modes_of_operation_display = 8 THEN//Operation Enabled, Mode Changed success
iState:=20;
END_IF
20://Movement
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSML_SyncVelocity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ CASE iState OF
END_IF
10://Set Mode
Axis.Modes_of_operation:=8;//Cyclic Synchronous Position Mode
Axis.ControlWord.3:=Axis.Modes_of_operation_display=9;//Success change mode, enable operation
Axis.ControlWord.3:=Axis.Modes_of_operation_display=8;//Success change mode, enable operation
otg.CurrentPosition:=DINT_TO_LREAL(Axis.Position_Actual_Value) / lrScale;//Write actual position to otg
IF Axis.StatusWord.2 THEN//Operation Enabled
IF Axis.StatusWord.2 AND Axis.Modes_of_operation_display = 8 THEN//Operation Enabled, Mode Changed success
iState:=20;
END_IF
20://Movement
Expand Down

0 comments on commit abc4f49

Please sign in to comment.