587,884 active members*
3,978 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Posts
    1

    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
    Join Date
    Jan 2006
    Posts
    58
    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. Busch Script.
    By Claude Boudreau in forum BobCad-Cam
    Replies: 0
    Last Post: 09-25-2008, 12:37 AM
  2. VB6,VB.net,VB script,What one???
    By hydrospin01 in forum Visual Basic
    Replies: 11
    Last Post: 05-25-2008, 02:09 AM
  3. Lookahead Script
    By Rikard L in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 09-10-2007, 08:06 PM
  4. Engraving Script
    By id 10 t in forum Rhino 3D
    Replies: 0
    Last Post: 07-07-2006, 05:17 AM
  5. Backup Script..
    By Rekd in forum Mastercam
    Replies: 3
    Last Post: 09-11-2003, 03:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •