Welcome to Our Community

Some features disabled for guests. Register Today.

Grbl profile? New 4th in control? Control gcode syntax?

Discussion in 'General Talk' started by John Raney, Dec 6, 2022.

  1. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Networking (IT) issues aren't really something we can help with. If the scanner comes up with the wrong IP it might be that your PC has multiple IPs (or multiple Network cards, physical or virtual) compliciting things.

    But if the BlackBox is successfully connected to the same network as the PC, the scan will find it.

    So if its not working, possibly the BlackBox couldn't connect to Wifi. Or the PC has a problem.

    USB cable is the simpler option.
     
  2. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    It was a fix that came to me as I was falling to sleep, plug in the usb dummy.
     
  3. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    I have x32 usb connected to bb. interface does not work, firmware not read. Grbl not connected.

    usb removed and interface works.

    is that the way the system works?
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Can't have two hosts (bosses) be in charge at the same time :)

    What's Interface's main selling point? 2 seconds into the advert video?



    It replaces the PC. Take your pick: PC "or" Interface.

    Further reading: Section 5.1 of the BlackBox Documentation docs:blackbox-x32:aux-serial [OpenBuilds Documentation]
    And also the Important Note sections of docs:interface:connect-blackbox-x32 [OpenBuilds Documentation]
    Interface usage demo: docs:interface:usage-instructions [OpenBuilds Documentation]
     
  5. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Hello, is there a grbl program that will tell me how to calibrate my x axis or 4th axis. I am using a 100:1 drive. Maybe something that generates x steps and I look at a mark on the chuck, keep changing the steps until I get a full turn
    Thanks John
     
  6. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,461
    Likes Received:
    1,915
    there is this for linear axes
    GRBL settings calculator

    the math is not difficult and is explained in several places on these forums. (though not directly for rotary wrapping)
    C-Beam™ Machine - Plate Maker

    the theory says that you can start with a completely unknown system and calibrate it, ie no idea about gearbox ratio, motor steps, microstepping or anything else, just set some defaults and try and correct using the formulas in the link above. The difficulty would be in accurately determining a full rotation

    however, this system is not unknown, making it easier.
    200 step per rev motor
    8x microstepping (default in Blackbox)
    = 1600 steps per rev of the motor
    * 100 gearbox ratio
    = 160 000 steps per rev on the 4th axis

    but GRBL needs steps/mm which would apply at the circumference of the part you are machining for a wrapped toolpath.
    steps/mm = stepsperrev / circumference
    or
    steps/mm = 160000 / (pi * diameter) (in millimeters)
    or
    steps/mm = 50929.58 / diameter

    you can stickynote that number to your PC so you can reset steps/mm for each job easily, keep a 50 cent pocket calculator handy for the job.
     
  7. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    "GRBL needs steps/mm which would apply at the circumference of the part you are machining for a wrapped toolpath." I am milling a 2 x 2" part out of the gadget. if the circumference of the square is therefore sq rt of 2 sq + 2 sq then is the diameter would be 2.83 inches. am i thinking about this correctly? Thanks for your help !!!
     
  8. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Check the link - extensive discussion on calculation as well as tutorial how to wrap in there.
     
    David the swarfer likes this.
  9. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Thanks got the Lead lathe file and printed out, will relax and read. On the previous question about the circumference I got almost all the steps earlier except for the steps/mm and the circumference. does my question about circumference make sense?
     
  10. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Hello
    I am trying to calibrate the steps/mm on my rotary setup using a short grbl program to spin my chuck. I have used Girac's math and i don't get a reasonable answer.

    I have y and A running the y axis, z running the z axis and X tuning the chuck. I am trying to establish the correct numbers of steps per mm for the chuck spin. I wrote this grbl program but it will not spin the chuck or x axis as expected. Here is the program. G21;G90;G0 X0;G0 X360;M30.

    G21 ; Set units to millimeters
    G90 ; Absolute positioning

    ; Move X-axis to the starting position
    G0 X0 ; Move X to position 0

    ; Rotate X-axis 360 degrees (assuming one revolution is 360 units)
    G0 X360 ; Move X to position 360

    M30 ; End of program

    Actually I asked ChatGPT to help rewrite it. When i put the complete line in the bottom of control It will move the chuck maybe 1 mm. I have also tried to execute each step one by one and i still do not get the expected results, very little movement. steps/mm is set to around 1500 not the linear ~198.

    Also I am not sure if this is the problem but continuous jog seems to be intermittent. Is there any way to fix this, maybe a reload of Control would help.

    Your help with the grbl program would be nice. I am also wondering if there needs to be a pause in the program but that doesn't make much sense.

    Thanks

    John
     
  11. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Start with calculating the theoretical numbers

    Motor, probably 200 steps per rotation
    BlackBox = 1/8th microstepping. 8*200 = 1600 steps per rotation of the motor
    Count the pulley teeth and calculate the gear ratios (count and post here if you need help) and multiply with the 1600. Will tell you exactly how many steps per rotation then divide by 360 = steps per degree

    Setup your controller with the theoretical values before you try to test
     
  12. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    In addition I have placed the GRBL program in a file and tried to Run Program in Control but nothing reasonable happened.
     
  13. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    The chuck is 100:1, no pully, so we get 160,000 and then divide by 360 we get 444.44. So given that number I would want to check to see if it is correct using the GRBL program. Do you think the program makes sense?

    John
     
  14. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    You could, I would just use the jog buttons. Set zero and then jog 3x100s + 6x 10s (DRO will show 360) - did it do 360deg?
    (Or type 360 and then enter in DRO, instead of multiple jog button clicks, but buttons might be easier)

    [​IMG]
     
  15. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    try theoretical number first, if still stuck post a Grbl Settings backup for review
     
  16. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    365
    Likes Received:
    282
    Beware of using G0 unless you *know* that the max rate for the axis ($110 for X axis) is set to a number that works. It is entered in mm/min so will need to be changed if you radically change the steps per mm for an axis and/or the hardware attached to the driver. You may need to re-adjust the acceleration settings for that axis, too ($120 for the X axis).

    It's a little safer to use G1 and specify a feedrate (maybe 100mm/min to start with and work up).
     
  17. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Thanks MisterG and Peter. I am out of the house right now hopefully will get to jog it this evening.

    john
     
  18. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,461
    Likes Received:
    1,915
    John, I did a post about this in your other thread, did that math not work for you?
    Error #20
     
  19. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    I think Vectric's wrapping tool needs steps per deg (as steps per mm, just steps per unit) it does the linear conversion for you at CAM time?

    RotaryMachiningandWrapping6 (1).png

    As used by Giarcs Lead Lathe LEAD Lathe

    And calibration at LEAD Lathe
     
    David the swarfer likes this.
  20. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Processing of the variables did not work, at least not for now. I am in the process of walking into the correct steps/mm with a mark on my chuck. The variables said it should be ~444. We will see what the number is when I put the 444 in and jog to the correct value. At the doc all day today so hopefully tomorrow will give the answer. I will also say there have been some approach problems along the way. J
     
  21. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Hi in setting my rotary steps/mm, my chuck is 319.18 mm circumference. I took a guess and set the steps/mm in the profile to 500, set the x axis which drives my rotary to 0.0 mm. I put a tape mark on the chuck and ran the chuck 360 deg that is from tape mark to tape mark. The readout was 319.149. I think that was a fantastic first guess and a keeper.

    In a different subject I tried to update control to the new version and it updated to the same version xx.371. Upon further inspection it might be the first line, top line, that hasn’t changed from 371.

    I will go to gadget now a see if I can create a rounding tool path.

    thanks for your help
     
  22. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    371 is the latest. The older version was 370 - back in June 2023 from which you should update to 1.0.371

    Releases · OpenBuilds/OpenBuilds-CONTROL

    I am working toward V1.0.372 - pushing code to a draft already - but its not released, couple more tickets to close first
    OpenBuilds-CONTROL/CHANGELOG.txt at master · OpenBuilds/OpenBuilds-CONTROL

    Well, not a keeper, still far off

    But. 319.149 / 360 = 0.886525 * 500 = 443.2625

    Making my earlier calculation:

    which gave you


    probably the proper Keeper (;

    Change the 500 to 444.44
     
  23. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Hi

    my rotary chuck had a diameter of 4 inches. It converts to 319.18 mm circumference. When I run this cumference with a steps/mm of 500 I get a rotation of 360 deg.

    when I run the same 500 steps/mm on the create rounding gadget with a radial selection the chuck only seems to rotate ~1/4 of the way around. Radial indicates that it should rotate 360.

    I am stumped, should I change the steps/mm. Peter you indicated the steps per mm should be really in degrees. So does 360 divided by 319.18 = steps per
    ?? Make sense? It doesn’t seem to.

    Advice is surely desired

    thanks

    john
     
  24. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
  25. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    I ran the creat rounding toolpath using the radial approach (around cylinder) with the suggested 444 steps/in. The x axis turned back and forth not around about a quarter turn. I changed 444 to 888 and 222 and still no movement larger than about a 1/4 turn.
    So I thought maybe I should run the gadget and run the program for 444 steps per inch. Since I was confused as to which post processor I was dealing with I ran the openbuilds post processor for mm and then inches. Neither gave a result that was much greater than ~1/4.

    As I said I am using the openbuilds post processor. Is there an openbuilds pp for rotary jobs that I am missing.

    Reviewing math

    Result, Are we looking for steps/mm or steps/degree? so let’s do both.

    nema 17 = 200 steps per rotation x 8 micro stepping at the stepper =1600 or 160,000 per rotation at output of gear box or chuck

    gear box has an input to output ratio of 100:1

    chuck diameter 4”

    Therefore chuck circumference 4 x pi = 12.5663 inches
    In mm, 319.18 mm circumference

    160,000/319.18 = 500 steps per mm

    or 444 steps/ degree, I think this is used in the profile steps per/mm line 100

    Doesn’t this indicate that 500 or 444 should be the profile line 100 number?

    When changing steps/mm do I need to change anything else in the profile?

    since the only time I was able to get an agreeable rotation was jogging 318.18 mm with a profile 100# equal to 500 and a chuck rotation of 360 deg. Not using the gadget. There must be something more the gadget needs to work properly.

    I think when running the gadget for different values of steps/mm profile line 100# has a problem in my process. Ie. change line 100 then run program again with no program change may be a problem but I did run the gadget with line 100 change but no real difference.

    Thanks in advance for your comments

    john
     
  26. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,015
    Likes Received:
    1,680
    Are you using the Rotary Demon post processor? My math was based on using that post processor with imported 3D stl files.

    Edit:
    Hmmm. Looks like I need to watch a Vectric vidoe or two. For some reason it is plunging the Vcarve to the axis.
    upload_2024-4-20_10-19-39.png
     
    #86 Giarc, Apr 20, 2024
    Last edited: Apr 20, 2024
  27. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    No I am not using the Rotary Demon post processor. I was not aware of it. Since I didn’t see an openbuilds rotary I figured openbuilds inches or mm was what I should use. I will give it a try today. I assume I should use your number, I have to look up, something like 56970/diameter for steps per mm. I assume that is always finish diameter as I think you implied. So for running around my chuck it would be 4 in dia and for the gadget the finished diameter is 1.5 inches converted to mm. Please correct my thoughts if necessary.

    thanks

    John
     
  28. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    Just read your previous note again. The steps/mm =50929/ diameter applied at the circumference of the FiINISHED ( my word but implied by you) object you are machining for a wrapped toolpath. So the profile line 100 would be in mm.
     
  29. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    I see your recent edit but I am not sure what the edit means “ for some reason, it is plugging the Vcarve to the axis”
     
  30. John Raney

    Builder

    Joined:
    Nov 11, 2020
    Messages:
    91
    Likes Received:
    17
    I found the rotary demon but all jobs are along the X and Wrap Y. I am along the Y and wrap X. I chose this augmentation since I wanted to make longer objects like canes. I am tempted to make the stand alone machine but not now.
     

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