Results 1 to 4 of 4

Thread: LoadProgram into variable?

  1. #1
    Registered
    Join Date
    Nov 2004
    Location
    USA
    Posts
    446
    Downloads
    0
    Uploads
    0

    LoadProgram into variable?

    I am trying to make my interface pop up the file select window and store the filename into a var \50 instead of executing it.

    Is there a neat and clean way to do this?
    I understand that I could put the command !\50=C$/galiloi/work/xxxx.run right into each program itself, but this is not an option because I dont want the file to execute.
    I came up with the idea that I could set a flag (!\49=1), then have each program that is loaded read that flag, set \50 and then EOP if the flag is 1 or continue executing if the flag is 0 but this just seems messy.

    Is there not a better way to do this using a single command line under an Mcode?

    Thanks
    Murphy

    Murphy's tip of the day! <<A new feature posted by the guy who asks to many questions ..
    This code will create a file with a numerical value and add +1 to it each time its run. A new file will be created with a name that is 1 number higher than the last file. (\75 must be a number for this to work)
    [[FILE_NAMING_ROUTINE]]
    !\75={\75+1} :\76=\75.DMC :FILEOPEN WRITE;C$/GALILOI/WORK/\76 :FILEWRITE \999 :FILECLOSE WRITE


  2. #2
    Registered
    Join Date
    Apr 2003
    Location
    United States
    Posts
    290
    Downloads
    0
    Uploads
    0
    Murphy,

    The LOADPROGRAM command all by itself will pop-up the Windows file and folders menu where you can select from any directory or NetWork drive.

    The file will load into memory when doing so, but as long as you don't run the file, using CYCLESTART or RUN from the MDI window then it doesn't execute.

    The LOADPROGRAM command can be put into an MCODE as you asked. If you also put on the next line the command FILENAME then you can store the file name you picked into a variable. There is also a FULL option that stores the complete filename and path into the variable too.

    Tech Support
    CamSoft Corp.
    (951) 674-8100
    support@camsoftcorp.com
    www.cnccontrols.com
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Registered
    Join Date
    Nov 2004
    Location
    USA
    Posts
    446
    Downloads
    0
    Uploads
    0
    The FILENAME command is not listed in my Camsoft manual.

    It is listed under the setup.exe help file. You just solved my 6 hour problem with less than 8 letters. LOL Thank you.!!

    Murphy


  4. #4
    Registered
    Join Date
    Apr 2003
    Location
    United States
    Posts
    290
    Downloads
    0
    Uploads
    0
    Murphy,

    The new version has the FILENAME command. When you go into diagnostics you see all the commands listed and spelled to you correctly as you type in interactively.

    !FILENAME \1

    Tech Support
    CamSoft Corp.
    (951) 674-8100
    support@camsoftcorp.com
    www.cnccontrols.com
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


Similar Threads

  1. parametric programming
    By Karl_T in forum CamSoft Products
    Replies: 21
    Last Post: 05-24-2005, 03:58 PM
  2. variable speed dc drive
    By DragnsBane in forum General Electronics Discussion
    Replies: 5
    Last Post: 02-08-2005, 09:07 PM
  3. Variable IO Numbers
    By squarewave in forum CamSoft Products
    Replies: 2
    Last Post: 10-15-2004, 03:42 PM
  4. S/S Relays and Variable Speed Routers
    By InventIt in forum General Electronics Discussion
    Replies: 1
    Last Post: 08-24-2004, 01:05 PM
  5. Variable Frequency Drives...how do they work?
    By mastercnc in forum General Electronics Discussion
    Replies: 4
    Last Post: 05-27-2004, 09:59 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.