Skip to content
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

MceStartStop; add reset after stop #26

Open
yeu-degroot opened this issue Jun 14, 2023 · 0 comments
Open

MceStartStop; add reset after stop #26

yeu-degroot opened this issue Jun 14, 2023 · 0 comments

Comments

@yeu-degroot
Copy link
Collaborator

There could be a risk that the command buffer fills up over time due to abrupted commands.

Consider adding an MLxReset after MLxStop:

// -------------------------------------
// stop and flush buffered motions with MLxStop
// -------------------------------------
50:
  fbStop.Enable := TRUE;
  IF fbStop.Sts_EN AND fbStop.Sts_DN AND (MLX.SystemState <> 9)
    AND (MLX.SystemState <> 10) AND (MLX.SystemState <> 11) THEN
    IF fbStop.Sts_ER THEN
      io.nErrorCode := 1000 + io.nSmStartStop;
      io.nSmStartStop := 70;
    ELSE
      io.nSmStartStop := 51;
    END_IF;
  END_IF;

// -------------------------------------
// NEW: reset system with MLxReset
// -------------------------------------
51:
  fbReset.Enable := TRUE;
  IF fbReset.Sts_EN AND fbReset.Sts_DN THEN
    IF fbReset.Sts_ER THEN
      io.nErrorCode := 1000 + io.nSmStartStop;
      io.nSmStartStop := 70;
    ELSE
      io.nSmStartStop := 45;
    END_IF;
  END_IF;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant