587,753 active members*
3,084 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006
    Posts
    53

    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
    Join Date
    Mar 2003
    Posts
    765
    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
    Join Date
    Jul 2006
    Posts
    53
    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
    Join Date
    Mar 2003
    Posts
    765
    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, 07: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, 02:54 PM
  3. Sketch Line command V22 ?
    By hall6ppc in forum BobCad-Cam
    Replies: 4
    Last Post: 12-11-2008, 01:20 AM
  4. command line control
    By wjfiles in forum Mechanical Calculations/Engineering Design
    Replies: 2
    Last Post: 06-04-2006, 01:11 PM
  5. Line command
    By cncadmin in forum Uncategorised CAM Discussion
    Replies: 4
    Last Post: 06-26-2003, 08:42 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
  •