Welcome to Our Community

Some features disabled for guests. Register Today.

Blackbox x32 - how to run from Raspberry Pi

Discussion in 'Control Software' started by ljkelm, Apr 1, 2024.

  1. ljkelm

    ljkelm New
    Builder

    Joined:
    Apr 1, 2024
    Messages:
    4
    Likes Received:
    0
    I recently purchased a blackbox x32 and I'm trying to get it programmed to run on a raspberry pi. It is able to home as expected, but when I send g-code to it from the pi (streaming via python), it does not go to the correct location, but when I stream the same g-code from your software, it works fine. The Pi is able to stream g-code to other devices and they behave correctly.

    To give a specific example: I am giving it the following gcode:

    $H
    G21
    G1 F100 Z200

    From OpenBuilds Control software, it does everything as expected. From the pi, it runs the homing cycle and then the z axis does not move.

    The pi streams GRBL gcode to both this controller and other arduinos, and the arduinos run fine but the Blackbox x32 does not.
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,074
    Likes Received:
    4,125
    Don't forget the details our support team recommended you supply for our forum members to help you
     
  3. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,074
    Likes Received:
    4,125
    Also, make sure to setzero, or move in Machine Coordinates
     
  4. ljkelm

    ljkelm New
    Builder

    Joined:
    Apr 1, 2024
    Messages:
    4
    Likes Received:
    0

    The python script I'm using to run the controller is as follows:

    upload_2024-4-3_13-52-44.png
    upload_2024-4-3_13-53-3.png
    upload_2024-4-3_13-53-21.png
    It will run correctly sometimes, but other times the pi will fail to successfully send the message and sits waiting for a response to the $H
     
  5. ljkelm

    ljkelm New
    Builder

    Joined:
    Apr 1, 2024
    Messages:
    4
    Likes Received:
    0
    I'm not sure what you mean by that - doesn't the $H set the machine 0?
     
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,074
    Likes Received:
    4,125
  7. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,074
    Likes Received:
    4,125
    Yes, but make sure you either also set work coordinates (if your moves are in work coordinates) or otherwise always move in machine coordinates.
     
  8. ljkelm

    ljkelm New
    Builder

    Joined:
    Apr 1, 2024
    Messages:
    4
    Likes Received:
    0
    There is no queuing, it is running one line at a time. Sometime it works and sometimes it fails to connect but I don't get any sort of error, the controller just doesn't respond.
     
  9. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,074
    Likes Received:
    4,125
    Thats the Ping Pong management described in the wiki.
    Grbl v1.1 Interface
    Still needed to avoid overrunning the onboard buffer that often looks like ignored comms (ignored due to buffer being full).

    Or perhaps you had a homing error, or its still homing. Are you tracking the status? Are you handling non "OK" responses too? (To get alarm and errors)

    But more basic are you remembering to add a newline character after each command?
     
  10. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,277
    Likes Received:
    1,833
    machine zero, yes, but not WORKPIECE zero, used by G54.
    please read this Home, Fusion360 and G53 Z moves
     
    Peter Van Der Walt likes this.

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