Welcome to Our Community

Some features disabled for guests. Register Today.

direct control / communication with blackbox

Discussion in 'Control Software' started by Tyson Colby, Mar 27, 2020.

  1. Tyson Colby

    Builder

    Joined:
    Mar 27, 2020
    Messages:
    6
    Likes Received:
    3
    i read somewhere in the blackbox controller documentation that the USB is using an FTDI chip. so, i am assume that communication between host pc and blackbox controller is serial protocol. where can i find more information on directly issuing commands to the blackbox motion controller?

    my use case is this - i need to orchestrate many devices (bench power supply, bench dmm, balckbox motion controller, spectrometer, and another embedded system) with a single script to automate measurements and data collection. i want to be able to commend the motion system from software calls to index to a position, then do some other blocking tasks... then when ready, index the stages to a new location, repeat.

    thanks for any direction you can provide.
     
  2. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    BlackBox is, simplified, an Arduino and some stepper drivers in a box, so you communicate the same way you would with any other Arduino system, with grbl specifics from here gnea/grbl

    For this purpose the simple send-response method is perfect, you know when it's being executed and how long it'll take, and combined with the ? state query, you know where it is and/or when it's done moving at all times.
     
    Peter Van Der Walt likes this.
  3. Tyson Colby

    Builder

    Joined:
    Mar 27, 2020
    Messages:
    6
    Likes Received:
    3
    perfect. thank you, rob. the grbl documentation will get me going. appreciate the help.
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    and there are usually plenty of Grbl interface example codes for your language of choice, just google "my-choice-of-programming-language grbl interface" - you should find Nodejs, Python, Java, .Net, plenty of examples/ other opensource host applications, you can work from too.
    But do note that reading the Interface page on the Grbl wiki is a must! That's really all you need :) (and some basic knowledge of writing parsers, a bit of queue control, and a serialport API)
     
  5. BSmith

    BSmith New
    Builder

    Joined:
    Mar 30, 2021
    Messages:
    10
    Likes Received:
    2
    I think I'm also trying to do something similar with my OB Lead 1515. I want to put my mitre saw next to it at the end. I will clamp a fence that spans the CNC and extends to the mitre saw. Once I zero an endmill attached stop block to the saw I can pass a GCode for the Y axis for my cut length. My goal is to write a script that reads a file with all the cuts, when I hit the space bar it will advance and run the next GCode length. Would I use Open Builds control at all or do I just run the grbl directly with the black box? Can I zero using Open Builds Control and then switch to simple_stream.py? (grbl/simple_stream.py at master · gnea/grbl)
     
    #5 BSmith, Nov 13, 2021
    Last edited: Nov 13, 2021
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,051
    Likes Received:
    4,313
    You can zero using Python as well. Just checkout the G10 L20 command: LinuxCNC "G-Code" Quick Reference

    Whether to use control or your own scripts just depends on how comfortable you are writing scripts, do you have Python knowledge etc

    If you don't know Python, but do know Javascript, CONTROL macros may be the way Getting started with Javascript Macros in CONTROL / Library of Macros created by the community
     
  7. BSmith

    BSmith New
    Builder

    Joined:
    Mar 30, 2021
    Messages:
    10
    Likes Received:
    2
    wow those macros look awesome! I'm comfortable in python, but integrating with Control's GUI using js macros is a way better idea.
     
    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