I am building an offline controller for a generic 3018, using a nano and interfacing into the 8 pin connector on the control board. All works as planned except when I hit a limit switch. BTW the Homing function works as expected. In UGS, if that happens, I just click “Soft Reset” then “Unlock” then I can jog off the limit switch ( maybe have to do that routine twice). With the Online controller, it stays locked even when I issue a $X command. The only way to get off the limit switch, by software, is to use the Reset button on the main controller board, then send $X from the offline controller. I can jog maybe two? steps then it locks again and I have to do the same routine again ie. reset the main controller board then send $X. I have tried sending ctrl-x (which I can see on the serial data screen) but it doesn’t help and I don’t really know if the main controller board is recognising it. Any help would be appreciated.
First, make sure you have filtered your switch inputs for EMI and noise. Switch bounce / False triggers cause the behaviour you see. Grbl handles switch clearance moves correctly (ignores the switch if the move is out of the switch. Provided move is sufficient to clear the switch, and does not bounce/retrigger or get falsely triggered by EMI
All switch lines filtered with op amp circuitry. System works no problems with UGS, Candle, Lasergrbl. As I said in my original post it’s not a problem coming off a limit switch with UGS etc. Only a problem with the offline controller I am building. Definitely not a noise problem.
Unfortunately we cannot directly assist with the code for that, but in theory: After a Hard Limits alarm, Ctrl+X and then jogging out of the switch must work Only possible gotchas are: - X and Y switches crossed wiring - x triggers, but controller thinks its y, you jog x = retriggers hard limit because controller wanted Y to jog out of the switch - make sure the Ctrl+X string is sent correctly ( for example Serial.print((char) 0x18); ) - Tripple check the noise observation with UGS - i hear you, believe me i've been in that very same boat - oscilloscope set to trigger on signal going lower than 2.5v on the MCUs input pin would help confirm noise too. Between PC and Offline controller sometimes the Grounding is just a little different or something similar. Had that chase me up for a week or two a couple years ago. The way Grbl works is clear - you can jog out of a switch after Ctrl+x: If it alarms again, the ONLY reason is that the signal retriggered. That last option is that something in your code still thinks its alarmed, eg not parsing the feedback strings correctly or something similar - when you reset your code properly clears some variable? I.e Grbl is not actually erroring out, the host code just thinks it is
Thanks for the the ctrl-x format. I wasn’t using that exact format. I’ll try tomorrow and see if that works. The reason I have to jog out a couple of times is due to the switch lever length/type - I have to back off 4mm during homing routine, to clear/open the switches. Cheers
Grbl already handles that. If the jogging direction is "away from the switch" it will ignore the first trigger. Avoid using multiple jog moves to clear the switch though. Do a 10mm move, or use continous jogging.
Thanks for the reply. Homing works fine even with my offline controller set-up. I have a button press routine to clear the limit switch after it triggers. I’ll up the jog movement when clearing the limit switch now I know the correct ctrl-x call.