Welcome to Our Community

Some features disabled for guests. Register Today.

Issues with Start button on Spark Concepts xPro v4

Discussion in 'Controller Boards' started by markus506, Jun 11, 2019.

  1. markus506

    markus506 New
    Builder

    Joined:
    Jun 11, 2019
    Messages:
    3
    Likes Received:
    0
    Hi everyone,

    Complete newb here. I have Spark Concepts xPro v4 board. I am using the motor to do a basic 6" linear movement then come back to the start. All I want to be able to do is connect a button to the 'start/play' button on the board and have the program execute. I am able to run the program from OpenBuilds control and the motor will turn. However, when I press the button, nothing happens. I do get a notification in the console that the button was pressed, but the code doesn't execute. Any ideas? I have posted the G-code below.

    ; GCODE Generated by cam.openbuilds.com on 2019-06-11
    G21 ; mm-mode
    ; Operation 0: CNC: Vector (no offset)
    ; Tool Diameter: 6.35

    G0 Z0
    G0 F1000 X0.0000 Y0.0000

    G0 Z0
    G1 F300 Z-1.0000
    G1 F15000 X150.0000 Y0.0000 Z-1.0000 S1000
    G1 F15000 X150.0000 Y0.0000 Z-1.0000 S1000
    G1 F15000 X0.0000 Y0.0000 Z-1.0000 S1000
    G1 F15000 X0.0000 Y0.0000 Z-1.0000 S1000
    G1 F15000 X0.0000 Y0.0000 Z-1.0000 S1000
    ; retracting back to z-safe
    G0 Z0
     
  2. sharmstr

    sharmstr Master
    Moderator Builder

    Joined:
    Mar 23, 2018
    Messages:
    827
    Likes Received:
    460
    Interesting. It doesnt start the job, but it will resume a paused job. While job is running is wont pause a job.

    @Peter Van Der Walt what say ye?
     
  3. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    1,558
    Likes Received:
    818
    Grbl's cycle start needs something in Grbls own queue 'to start'. Ie Resume, not really Start as you'd imagine.

    So typically youd preface the gcode with a feedhold or M0
    Start sending gcode (it sits in hold status)
    Walk up to machine and hit Cycle Start to begin processing if you want to use is as a start.

    As per gnea/grbl

     
    sharmstr likes this.
  4. markus506

    markus506 New
    Builder

    Joined:
    Jun 11, 2019
    Messages:
    3
    Likes Received:
    0
    Thanks guys. So, I put a feed/hold (!) at the start. The program paused, and the start button worked. Now, is there a way to repeat the program? I would like it, once it completes its cycle, to start running the code again, encounter the feed/hold, then wait for the start/resume. I am using this on a carriage, where the start/resume is controlled by a PLC. Thus, I need the program to be able to cycle continuously.

    Thanks again!
     
  5. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    1,558
    Likes Received:
    818
    If your use case is Automation, i'd skip Grbl and GCode and just use Arduino? OpenBuilds/ArduinoStepperDriver for example if its just one axis
     
    #5 Peter Van Der Walt, Jun 11, 2019
    Last edited: Jun 11, 2019
  6. sharmstr

    sharmstr Master
    Moderator Builder

    Joined:
    Mar 23, 2018
    Messages:
    827
    Likes Received:
    460
    Thanks for the explanation Peter. Still learning. :)
     
  7. markus506

    markus506 New
    Builder

    Joined:
    Jun 11, 2019
    Messages:
    3
    Likes Received:
    0
    Normally, yes, we would use a different stepper with a controller that has built in programming capabilities. However, we decided to buy the whole kit, with the linear slide, for a prototype. If I'm not able to do a program loop, I'll probably have to go back to a different controller/motor.
     
  8. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    1,558
    Likes Received:
    818
    The XPRO is just an arduino with onboard steppers.

    You can change that example sketch above only slightly (run only if triggered, not inside the loop) Arduino Button Tutorial could be adapted to react to the input from the PLC
    Next up, define the step/dir/enable pins according to the pinout from gnea/grbl (Whichever axis you are using for your slide)

    Upload to the XPRO (May need the atmgea328pb board type installed: MCUdude/MiniCore
     

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