Skip to content

Simulator always in Cycle_start #21

@maoterodapena

Description

@maoterodapena

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)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions