Welcome to Our Community

Some features disabled for guests. Register Today.

Additional or extended settings masks

Discussion in 'Control Software' started by Sword, Apr 21, 2023.

  1. Sword

    Sword New
    Builder

    Joined:
    Apr 1, 2023
    Messages:
    22
    Likes Received:
    2
    I've use bitmask values for parameters with Centroid CNC12, but I'm not sure how they are used with OB Control/GRBL. For example, I'm looking at some of the $22=<mask> options here. Are they set with only one bit choice, or are they added up.

    On a related note, if homing is required at restart or other situations, should there not be a "in your face" warning that machine home has not been set, or perhaps I need bit2 applied along with another bit. The only thing I've seen is a small message at the bottom saying that it can't move in that direction. It would be nice, if the machine is not homed, that you could jog towards the machine home and then issue a home all once close. No other operations would be allowed until homed. I've made a "Park" macro that is to be used before shutting down for the day that positions the axes close to home for quicker homing, but that only works if you use it. ;)

    Thanks,
    Scott
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
    Most bitmasks allow adding up yes.
     
  3. Sword

    Sword New
    Builder

    Joined:
    Apr 1, 2023
    Messages:
    22
    Likes Received:
    2
    Thanks. I did try some, but it seems that only 0 or 1 really work. Other values may set $22 blank and disable soft limits. Setting soft limits back on and then $22 back to 1 throws an error and you have to do soft limits first and then come back and set $22 to 1.

    Not being sure how bit0 (in the attached list) is counted, I tried 7 and that puts it in an error #46 undefined loop. I did however get the desired "Homing required" warning pop up for a split second before getting in an endless error loop. What I'd like would be bits 0-3 and possibly 7.

    This is with OpenBuilds Control, and from what I see, it seems like with $22=1, bit0,1, and 3 definitions are in play, but there's never any kind of warning for homing required (bit2), even with $65=1 set. It seems like there is some kind of settings overlap with $22 bit2 and $65.

    The part that I'm missing is just a simple "Homing Required" warning, so the customer/user knows what he needs to do first upon start up or any other situation that requires a rehome.

    Scott

    $22=<mask>
    Changed from original boolean to exclusive bitmask for enabling homing and homing features.

    bit0 - enable homing. Only when this bit is set can the other bits be set.
    bit1 - enable single axis homing commands.
    bit2 - homing on startup required.
    bit3 - set machine origin to 0.
    bit4 - two switches shares one input pin.
    bit5 - allow manual homing of axes not automatically homed.
    bit6 - override locks, allow reset to clear homing on startup required alarm.
    bit7 - keep homed status on reset if possible.
     
  4. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    407
    Likes Received:
    323
    I think you may have been 1 place out.
    The value of each bit:

    Bit 0 = 1
    Bit 1 = 2
    Bit 2 = 4
    Bit 3 = 8
    Bit 4 = 16
    Bit 5 = 32
    Bit 6 = 64
    Bit 7 = 128


    That would be:
    1 + 2 + 4 + 8 = 15
    or:
    1 + 2 + 4 + 8 + 128 = 143

    (I'm not guaranteeing it will work, though!)
     
    Peter Van Der Walt likes this.
  5. Sword

    Sword New
    Builder

    Joined:
    Apr 1, 2023
    Messages:
    22
    Likes Received:
    2
    Thanks for that reference. Found it with $help settings also. I've tried all combinations and it appears that 0 or 1 are the only ones that work. Anything else puts it in an error 46 loop as soon as the alarm is clicked off, and then task manager/end task on OB is needed. Am I missing something else to enable the mask settings for $22? My settings inserted.

    Side note, once $help settings is issued, you can no longer get to the GRBL settings page, and quitting/restarting is required to get back. ?

    Code:
    $0=10.0  ;  Step pulse time, microseconds
    $1=255  ;  Step idle delay, milliseconds
    $2=1  ;  Step pulse invert, mask
    $3=0  ;  Step direction invert, mask
    $4=0  ;  Invert step enable pin, boolean
    $5=7  ;  Invert limit pins, boolean/mask
    $6=1  ;  Invert probe pin, boolean
    $7=0  ;  Disable spindle with 0 speed, boolean
    $8=0  ;  Ganged axes direction invert as bitfield
    $10=511  ;  Status report options, mask
    $11=0.010  ;  Junction deviation, millimeters
    $12=0.002  ;  Arc tolerance, millimeters
    $13=0  ;  Report in inches, boolean
    $14=0  ;  Limit pins invert, mask
    $15=0  ;  Coolant pins invert, mask
    $16=0  ;  Spindle pins invert, mask
    $17=0  ;  Control pins pullup disable, mask
    $18=0  ;  Limit pins pullup disable, mask
    $19=0  ;  Probe pin pullup disable, boolean
    $20=1  ;  Soft limits enable, boolean
    $21=0  ;  Hard limits enable, boolean
    $22=1  ;  Homing cycle enable, boolean (Grbl) / mask (GrblHAL)
    $23=0  ;  Homing direction invert, mask
    $24=50.0  ;  Homing locate feed rate, mm/min
    $25=800.0  ;  Homing search seek rate, mm/min
    $26=250  ;  Homing switch debounce delay, milliseconds
    $27=2.000  ;  Homing switch pull-off distance, millimeters
    $28=0.100  ;  G73 retract distance, in mm
    $29=0.0  ;  Step pulse delay (ms)
    $30=1000.000  ;  Maximum spindle speed, RPM
    $31=0.000  ;  Minimum spindle speed, RPM
    $32=0  ;  Laser-mode enable, boolean
    $33=5000.0  ;  Spindle PWM frequency
    $34=0.0  ;  Spindle off Value
    $35=0.0  ;  Spindle min value
    $36=100.0  ;  Spindle max value
    $37=0  ;  Stepper deenergize mask
    $39=1  ;  Enable printable realtime command characters, boolean
    $40=0  ;  Apply soft limits for jog commands, boolean
    $43=1  ;  Homing passes
    $44=4  ;  Homing cycle 1
    $45=3  ;  Homing cycle 2
    $46=0  ;  Homing cycle 3
    $62=0  ;  Sleep Enable
    $63=2  ;  Feed Hold Actions
    $64=1  ;  Force Init Alarm
    $65=1  ;  Require homing sequence to be executed at startup
    $70=7  ;  Network Services
    $73=1  ;  Wifi Mode
    $74=
    $75=
    $100=314.960  ;  X-axis steps per millimeter
    $101=314.960  ;  Y-axis steps per millimeter
    $102=758.941  ;  Z-axis steps per millimeter
    $110=3000.000  ;  X-axis maximum rate, mm/min
    $111=3000.000  ;  Y-axis maximum rate, mm/min
    $112=1000.000  ;  Z-axis maximum rate, mm/min
    $120=150.000  ;  X-axis acceleration, mm/sec^2
    $121=150.000  ;  Y-axis acceleration, mm/sec^2
    $122=100.000  ;  Z-axis acceleration, mm/sec^2
    $130=303.000  ;  X-axis maximum travel, millimeters
    $131=450.000  ;  Y-axis maximum travel, millimeters
    $132=76.000  ;  Z-axis maximum travel, millimeters
    $300=obcontrol  ;  Hostname
    $302=192.168.5.1  ;  IP Address
    $303=192.168.5.1  ;  Gateway
    $304=255.255.255.0  ;  Netmask
    $305=23  ;  Telnet Port
    $306=80  ;  HTTP Port
    $307=81  ;  Websocket Port
    $341=0  ;  Tool Change Mode
    $342=30.0  ;  Tool Change probing distance
    $343=25.0  ;  Tool Change Locate Feed rate
    $344=200.0  ;  Tool Change Search Seek rate
    $345=100.0  ;  Tool Change Probe Pull Off rate
    $370=0  ;  Invert I/O Port Inputs (mask)
    $384=0  ;  Disable G92 Persistence
    $I=custom
     
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
    Known bug, not fixed yet.
     
  7. Sword

    Sword New
    Builder

    Joined:
    Apr 1, 2023
    Messages:
    22
    Likes Received:
    2
    Thanks. Any thoughts on the "error 46 unknown" issue when applying anything other than 0 or 1 for $22 additional/extended settings in OB Control? I'd really like to get the homing warning working before handing this machine off to the customer. I do get the warning message dialog/window with $22=5 or 7, but as soon as you hit unlock, the error 46 comes up and hitting OK just keeps looping the error. End task is then required.

    This is with OB Control and a BlackBox X32.

    Scott
     
  8. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
    Any other words along with the error 46 :)? Screenshot or log extracts?

    I am not in office till Monday to replicate the issue for you
     
  9. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
  10. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    407
    Likes Received:
    323
    Not really my bag, but I'm intrigued:

    Acording to this, error 46 is 'Homing Required'

    Your options (5 or 7) enable homing & require it on startup.

    Do you still get the error if you home the machine, rather than unlocking?

    It may be that you have to set bit 6 (64) to "allow reset to clear homing on startup required alarm" to clear the alarm without homing.

    So:
    5 => 69
    7 => 71

    May be garbage, but possibly worth a try.

    (Written before @Peter Van Der Walt posted )
     
    Peter Van Der Walt likes this.
  11. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
    But way better :) i am on holiday, replying via Phone :) only back in office tomorrow so I appreciate the help!
     
    Misterg likes this.
  12. Sword

    Sword New
    Builder

    Joined:
    Apr 1, 2023
    Messages:
    22
    Likes Received:
    2
    I tried both of those values. No warning, but you can unlock it. Home All button is disabled then, but you can home with $H.

    If I go from $22=1 to $22=5, I will then get the Alarm 11 Homing Required. If I hit Clear, then I get the Error 46. If I hit Cancel, Home All is disabled, and sending $H works, but Home All stays disabled. Upon the next restart, no warning, and clearing the alarm goes into the Error 46 loop.

    Not sure how to extract logs, other than a copy/paste, but can't do that when the error happens. Are they saved somewhere? Look at the usual places in windows, but none looked to be useful.

    This issue and Z probing are kicking my butt. Finally got probing to work (sort of) after finally finding some info on needing to flash the firmware manually, but It still doesn't seem to work right. It doesn't do the search part of the probe, just seeks (slow seek rate) and touches once instead of twice. ? I've searched so much for answers on this little thing it's ridiculous!

    Error_46.png GRBL_Alarm_11.png
     
  13. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
    So, trying to catch up. There seems to be a couple of not so typical custom settings in play. Why not our proven profiles? Not all new grblhal features are supported by CONTROL.

    If its a custom machine, all that should have happened was:
    1) update firmware (Section 7.1 of BlackBox X32 Documentation - with your current set of weird settings, i'd recommend the Flash AND ERASE SETTINGS option to get us back to a clean slate)
    2) CONTROL > Grbl Settings tab > Select machine from the list (Nearest similar, or the CUSTOM option).
    3) if you have limits installed, click the Limits Installed switch next to machine selection that sets $22=1 which CONTROL needs and is compatible with grbl and grblHAL, and also enables Hard Limits
    4) scroll down and customize (but only settings like steps per mm, acceleration, max rate, directions, endstop positions etc etc - not advanced functionality etc at first - get the machine working first, basic profiles for the win.)

    Save and reset - perfect for initial shakedown

    Later on you can play with nonstandard features but understand if its not something from our profiles it may be untested, and may need additional CONTROL development, and will take a while. If the community needs a specific new feature (eg $22 something other than 1/0) it gets logged on github.com, prioritised according to other needs and popularity of request, and eventually developed. Logged this one here https://github.com/OpenBuilds/OpenBuilds-CONTROL/issues/311


    Did you follow section 7.1 (and read section 7.2) if not, possibly thats why (see Dec 2022 update re probe)
     
  14. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
    Address the disabled homing button in next version, but
    Won't play nicely with CONTROL without major rewrite. Just remember to Home :)
    Forcing homing to happen before anything else can happen means we can't pull our basic info like Build Info, Grbl Settings, etc before its homed, causing the error loop
     
  15. terjeio

    terjeio Well-Known
    Builder

    Joined:
    Oct 18, 2020
    Messages:
    61
    Likes Received:
    63
    This is not correct - it is possible to issue $-commands while alarm 11 is active. Error 46 is from an attempt to clear the alarm with $X which is not possible, either send $H or skip sending $X and continue to request the required system information.
    Alarms 1, 2, 10 and 17 are the alarms that block anything but a reset. However, unlike legacy grbl, grblHAL handles real-time status requests when one of these alarms are active.
     
  16. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,500
    Likes Received:
    4,422
    Understood. Thus, quickly implemented fix for the other issue (which is an annoyance, having your home button grayed out with Homing enabled), but don't have time right now to rewrite that part of CONTROL to have a clear alarm without $X, etc test it, etc just to support the 'bit2 - homing on startup required.' just yet. It stays on the todo, and we revisit when its not a crazy monday (;
    That one, unlike the Home Button, is not a "needed" feature, and as a company, time has to be prioritised, as explained above.
     
  17. Sword

    Sword New
    Builder

    Joined:
    Apr 1, 2023
    Messages:
    22
    Likes Received:
    2
    Because it's a custom machine (rebuilt old Probotix Fireball V90 :eek:), so that's what I started with.

    I just figured that since I'd seen posts, while searching for homing options, mentioning the Additional/Extended settings for $22, and that they were available to use in the machine config, that I'd try them. A note that they weren't compatible with Control would have been helpful and saved much time.

    1) Didn't know that firmware needed to be updated manually. Finally found that out after searching for probe issues, where the probe routine just stopped at the touch plate and failed.
    2) Did that.
    3)Limits are installed at max axes, don't have or need hard limits (using soft limits). Again, since Additional/Extended were shown as available with $help settings, I wanted to try to get a homing required message on screen for the user.
    4) Did that.

    After finally finding some reference to the issue, I did do that, and it started working. It would be nice to have a "Sticky" post in the OB Control software thread that has setup and use documentation covering these kind of things all in one place, so one doesn't have to search through many unrelated searches. Just for reference, here's a good example of that from the Centroid forum.

    One last question about Z probing with the wizard. I assumed that it used the settings for the toolchange parameters of locate rate, search rate, and pull off rate, and because of those, it would do a double touch probe (fast then slow). Apparently it only probes the Z once and the probe rate and distance are hard coded at 100/-25. Is that correct? Here's the terminal from the probing routine showing .

    Probe Routine.png

    So, I'll be leaving $22=1, single tap Z probing, and handing the little rebuilt machine off to the user. ;) I do like the little BlackBox X32 system though for these smaller machines, and might consider one for myself sometime for a small build, but the reset/homing options need to be in place. Cool little, affordable kit with a lot of stuff packed into a small package with great potential!

    Thanks for the help,
    Scott
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice