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

Simulator always in Cycle_start #21

Open
maoterodapena opened this issue Oct 29, 2019 · 1 comment
Open

Simulator always in Cycle_start #21

maoterodapena opened this issue Oct 29, 2019 · 1 comment

Comments

@maoterodapena
Copy link

I was trying to connect simulator to bCNC software, but bCNC started a loop because gbrl detects the "CYCLE START" machine button allways on. I suppose other software will have the same issue as well.

As a workaround, I've commented the lines related to the CYCLE_START button in system.c (grbl code). I guess there is a more elegant way to do it in grbl-sim, but I don know how.

diff --git a/grbl/system.c b/grbl/system.c
index 55e6c40..5b87702 100644
--- a/grbl/system.c
+++ b/grbl/system.c
@@ -51,7 +51,7 @@ uint8_t system_control_get_state()
       if (bit_istrue(pin,(1<<CONTROL_FEED_HOLD_BIT))) { control_state |= CONTROL_PIN_INDEX_FEED_HOLD; }
     #endif
     if (bit_istrue(pin,(1<<CONTROL_RESET_BIT))) { control_state |= CONTROL_PIN_INDEX_RESET; }
-    if (bit_istrue(pin,(1<<CONTROL_CYCLE_START_BIT))) { control_state |= CONTROL_PIN_INDEX_CYCLE_START; }
+    // if (bit_istrue(pin,(1<<CONTROL_CYCLE_START_BIT))) { control_state |= CONTROL_PIN_INDEX_CYCLE_START; }
   }
   return(control_state);
 }
@@ -69,7 +69,7 @@ ISR(CONTROL_INT_vect)
       mc_reset();
     }
     if (bit_istrue(pin,CONTROL_PIN_INDEX_CYCLE_START)) {
-      bit_true(sys_rt_exec_state, EXEC_CYCLE_START);
+      //bit_true(sys_rt_exec_state, EXEC_CYCLE_START);
     }
     #ifndef ENABLE_SAFETY_DOOR_INPUT_PIN
       if (bit_istrue(pin,CONTROL_PIN_INDEX_FEED_HOLD)) {
@Lorente84
Copy link

hola ese mismo codigo me seviria para solucionar el mismo problema pero en lazer grbl

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

2 participants