Results 1 to 2 of 2

Thread: Run G-code from script

  1. #1
    Registered
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    1
    Downloads
    0
    Uploads
    0

    Run G-code from script

    Is it possible to to send a g-code file to emc2 for execution from a script, crontab or maby trigged from the parallel port?

    Why?
    Using crontab one can create a "crazy" step motor clock, as an example.
    Or by pushing a button (parallel in port) trig a drink blender. Put in some liquor, move the glass and add a olive.


  2. #2
    Seb
    Seb is offline
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    58
    Downloads
    0
    Uploads
    0
    I made a servo clock when I was testing stuff during hostmot2 development. I bypassed the motion planner and went straight to HAL. The script looked something like this:


    #!/bin/sh
    while /bin/true ; do
    S=$(date +%S)
    REV_FRACTION=$(echo 5k 1 $S 60 / - p | dc)
    echo second is $S, going to $REV_FRACTION
    halcmd sets follow-the-leader $REV_FRACTION
    done

    follow-the-leader is the name of a net (aka signal) connected to the servo's pid command.


Similar Threads

  1. Problem- Busch Script.
    By Claude Boudreau in forum BobCad-Cam
    Replies: 0
    Last Post: 09-24-2008, 07:37 PM
  2. Newbie- VB6,VB.net,VB script,What one???
    By hydrospin01 in forum Visual Basic
    Replies: 11
    Last Post: 05-24-2008, 09:09 PM
  3. Lookahead Script
    By Rikard L in forum General CNC (Mill and Lathe) Control Software (NC)
    Replies: 0
    Last Post: 09-10-2007, 03:06 PM
  4. Engraving Script
    By id 10 t in forum Rhino 3D
    Replies: 0
    Last Post: 07-07-2006, 12:17 AM
  5. Backup Script..
    By Rekd in forum Mastercam
    Replies: 3
    Last Post: 09-11-2003, 10:34 AM

Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.