-
Notifications
You must be signed in to change notification settings - Fork 3
acc,dcc,jerk,homing #1121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
acc,dcc,jerk,homing #1121
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -795,29 +795,29 @@ NAMESPACE AXOpen.Components.Festo.Drives | |||||||||||||||
| _scalingReadState := UINT#28; | ||||||||||||||||
| END_IF; | ||||||||||||||||
| END_IF; | ||||||||||||||||
|
|
||||||||||||||||
| //Rotary | ||||||||||||||||
| IF _scalingReadState = UINT#27 THEN | ||||||||||||||||
| ScalingConstantRequiredPosition := _exp[-1*(TO_INT(PNU_11724) )]; // TODO verify scaling with Automation Suite | ||||||||||||||||
| ScalingConstantActualPosition := LREAL#1.0/ScalingConstantRequiredPosition; // TODO verify scaling with Automation Suite | ||||||||||||||||
|
|
||||||||||||||||
| ScalingConstantRequiredVelocity := _exp[-1*(TO_INT(PNU_11725) )]; // TODO verify scaling with Automation Suite | ||||||||||||||||
| ScalingConstantActualVelocity := PNU_12345 * _exp[(TO_INT(PNU_11725) + 3)] / LREAL#1073741824.0; // 16#4000 0000 ~~ 1073741824 // TODO verify scaling with Automation Suite | ||||||||||||||||
|
|
||||||||||||||||
| ScalingConstantRequiredAcceleration := LREAL#16384.0 * _exp[TO_INT(PNU_11726)] / PNU_810; // 16#4000 ~~ 16384 | ||||||||||||||||
| ScalingConstantRequiredAcceleration := LREAL#16384.0 * _exp[TO_INT(PNU_11726)+3] / PNU_810; // 16#4000 ~~ 16384 | ||||||||||||||||
| ScalingConstantActualAcceleration := LREAL#1.0 / ScalingConstantRequiredAcceleration; | ||||||||||||||||
|
|
||||||||||||||||
| ScalingConstantRequiredDeceleration := LREAL#16384.0 * _exp[TO_INT(PNU_11726)] / PNU_811; // 16#4000 ~~ 16384 | ||||||||||||||||
| ScalingConstantRequiredDeceleration := LREAL#16384.0 * _exp[TO_INT(PNU_11726)+3] / PNU_811; // 16#4000 ~~ 16384 | ||||||||||||||||
| ScalingConstantActualDeceleration := LREAL#1.0 / ScalingConstantRequiredDeceleration; | ||||||||||||||||
|
Comment on lines
+806
to
810
|
||||||||||||||||
|
|
||||||||||||||||
| ScalingConstantRequiredTorque := 1; | ||||||||||||||||
| ScalingConstantActualTorque := PNU_11122 / 16384; // 16#4000 ~~ 16384 | ||||||||||||||||
|
|
||||||||||||||||
| ScalingConstantRequiredJerk := _exp[TO_INT(PNU_11727)]; | ||||||||||||||||
| ScalingConstantRequiredJerk := _exp[TO_INT(PNU_11727)+3]; | ||||||||||||||||
|
||||||||||||||||
| ScalingConstantRequiredJerk := _exp[TO_INT(PNU_11727)+3]; | |
| ScalingConstantRequiredJerk := _exp[MAX(-10, MIN(10, TO_INT(PNU_11727) + 3))]; |
Copilot
AI
Apr 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If AxisType is not #Rotary or #Linear here (e.g., #Undefined / #Error), ValueWriteLINT is left unchanged and the write still proceeds, which can accidentally write a stale value to PNU 11734. Add an ELSE that aborts the write and transitions to an error state (with a Messenger message), or set a safe default and explicitly handle unsupported axis types.
| Parametrization.Inputs.ValueWriteLINT := TO_LINT(Position * -10000000.0); | |
| Parametrization.Inputs.ValueWriteLINT := TO_LINT(Position * -10000000.0); | |
| ELSE | |
| Parametrization.Inputs.Enable := FALSE; | |
| Messenger.Activate( UINT#1456, eAxoMessageCategory#Error); | |
| MC_HomeErrorID := DINT#1456; | |
| State := UINT#59; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with nearby expressions (e.g.,
(TO_INT(PNU_11725) + 3)), consider adding spaces around the+ 3in these_exp[...]indices to improve readability.