grblHAL / core

grblHAL core code and master Wiki
Other
305 stars 74 forks source link

grblHal defaults to ALARM XYZ HOLD CYCLE START with pico and UGS #360

Closed ghost closed 2 months ago

ghost commented 10 months ago

RPi pico connects to ubuntu 22.04 on serial /dev/ttyACM0 using Universal G-code Sender but goes directly to the ALARM XYZ HOLD CYCLE START alarm statement. Advance documentation says a mask at $22 could remove alarm but no infor for setting the mask. Is it Hex,octal or binary? The pico is not connected to any inputs or outputs only serial connection for testing. Also where is the configuration file located so I could make changes to it? thanks

terjeio commented 10 months ago

See this Wiki page.

Advance documentation says a mask at $22 could remove alarm

$22 is for setting homing options, $14 is for inverting the control inputs that usually causes initial alarms. Mask settings are decimal, you can use the $$ command for info. E.g. $$=14 will output something like this:

    1 - Feed hold (2)
    2 - Cycle start (4)
    6 - EStop (64)
Inverts the control signals (active low).
NOTE: Block delete, Optional stop, EStop and Probe connected are optional signals, availability is driver dependent.

Add the values in brackets for the options you want.

The core config file is found here.

ghost commented 10 months ago

thanks for the help but I am not clear as to how to set the bit fields? is it $2= (X in decimal) so x = 1 would change the Feed Hold or is it X= 2 changes the Feed Hold. An example would help So is it $2=4 to invert cycle start or $4=1 thanks

terjeio commented 10 months ago

1 - Feed hold (2) -> First number is the bit index, starting from 0 so bit 1, value in brackets is 2, thus use $14=2 to invert feed hold. $14=6 (2+4) will invert feed hold and cycle start. Some examples also in the above linked Wiki page.

ghost commented 10 months ago

Thanks for your patients I have found $14=6 brings the alarm down to ALARM:XYZ PROBE . Where can i find the folder containing the start-up config file to make these changes permanent.? thanks

terjeio commented 10 months ago

Inver the probe input with $6=1 to get rid of the last message. BTW the probe pin asserted status is not an alarm state so UGS is wrong about that.

Where can i find the folder containing the start-up config file to make these changes permanent.?

The $-settings makes them practically permanent, that is until the core setting format is changed and you flash an update - which is not very often. Default values for the settings are in the grbl/config.h file, which folder this is stored in on your machine I do not know. If you edit this file please take note of the IMPORTANT information in the header.

ghost commented 10 months ago

Thanks but $6=1 did not clear the last message I tried that after you explained the $14= If I am correct the UGS machine setup wizard is not loading a startup a file to the pico ? If so then I need to change the pico settings using only the $ settings? Which means I need to write a python program to query the processor and change the settings directly.

terjeio commented 10 months ago

Thanks but $6=1 did not clear the last message I tried that after you explained the $14=

Try shorting the probe pin to ground then.

You can also check the real time report Pn: element, if the probe pin is not detected active there should be no letter P in the response.

ghost commented 10 months ago

To remove all of the alarm conditions I used $14=70 that worked the best. I am still trying to gather and find all the files needed to compile grbl-hal on my local machine.