Results 1 to 4 of 4

Thread: Command line switch to selext machine config?

  1. #1
    Registered
    Join Date
    Jul 2006
    Location
    USA
    Posts
    50
    Downloads
    0
    Uploads
    0

    Command line switch to selext machine config?

    Hi,

    Is there a way to tell NCPlot when it starts what machine configuration to use?

    I have gcode for both mills and lathes - so when I invoke NCPlot programatically, and pass the gcode file name to open as part of the command line, NC plot does not know (50% of the time) how to interpret the loaded gcode... I'm getting tired of having to manually change the machine config after ncplot loads

    What I think I'd like is a way to tell NCPLot the machine config to use via a command line switch. Then when loading mill gcode I'd tell it to use the mill config, when loading lathe gcode, I'd tell it to load the lathe machine config.

    Or maybe there is another way to solve this?

    Dave


  2. #2
    Gold Member MetLHead's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    749
    Downloads
    0
    Uploads
    0
    Hi Dave,

    There is actually two ways to do this: The first is a command line switch as you mentioned, and the second is a script command.

    You can select a machine configuration via a command line option by editing the NCPlot shortcut. Right click the shortcut and select properties. The shortcut target string normally looks something like this:
    "C:\Program Files (x86)\NCPlot v2.23\NCPlot.exe"

    To specifiy a configuration, add the switch "config" to it like this:
    "C:\Program Files (x86)\NCPlot v2.23\NCPlot.exe" config="mill"

    You can create multiple shortcuts this way each starting NCPlot with a different configuration.

    Another way to automatically select a configuration is to add a script command to the beginning of your programs:
    (## NCPLOT.NCPSETCONFIG "MILL")

    If you add this line to your program before any program commands then NCPlot will execute this as a script command, allowing you to set the configuration per program. The script command is executed once each time the file is loaded. This method actually allows you to execute ANY script command on file load, and there can be more than one line. Any line that starts with "(## " is treated as a script command as long as it appears before any G-Codes.

    Thanks,
    Scott


  3. #3
    Registered
    Join Date
    Jul 2006
    Location
    USA
    Posts
    50
    Downloads
    0
    Uploads
    0
    Thanks Scott - that should do nicely.

    Are there other command line switches and if so are they in the docs somewerhe? I looked for command line & switches etc but didn't find them in help.

    Dave


  4. #4
    Gold Member MetLHead's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    749
    Downloads
    0
    Uploads
    0
    Dave,

    The config switch is the only command line option. I'll try to get these added to the help before the next update.

    Thanks,
    Scott


Similar Threads

  1. need some help with homing switch config
    By jcizek in forum LinuxCNC (formerly EMC2)
    Replies: 8
    Last Post: 01-24-2011, 01:59 AM
  2. 2.5D and Command Line Messages
    By 2_many_hobbies in forum G-Code Programing
    Replies: 2
    Last Post: 12-22-2009, 08:54 AM
  3. Problem- Sketch Line command V22 ?
    By hall6ppc in forum BobCad-Cam
    Replies: 4
    Last Post: 12-10-2008, 07:20 PM
  4. command line control
    By wjfiles in forum Mechanical Calculations/Engineering Design
    Replies: 2
    Last Post: 06-04-2006, 08:11 AM
  5. Line command
    By CNCadmin in forum General CAM Discussion
    Replies: 4
    Last Post: 06-26-2003, 03:42 PM

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.