586,058 active members*
4,636 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Milltronics > Arguments for Subroutines (G65)
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Posts
    2

    Red face Arguments for Subroutines (G65)

    I'm programming in G-Code on a Milltronics Centurion 6 SLS controller. I like to call subroutines using G65, but all my efforts to pass arguments to subroutines have failed.

    My program crashes when I try to reference a parameter within a subroutine. I get an "invalid numeric" error. I think the error code was 550. The failing subroutine block looks like this ....

    G68 R#4 X0 Y0

    I've got a Centurion 6 Manual for Conversational Programming. Has anyone seen a Centurion 6 Manual for G-code programming? I'd sure like to have something like that!

    Has anyone ever connected a regular keyboard to a Centurion 6? Is that worth the trouble?

    Is there any difference between a subroutine and a macro? Which word is preferable?

    I appreciate your assistance.

  2. #2
    Join Date
    Aug 2005
    Posts
    385
    Hiya,

    Is there ANY way you could do this is conversational and then open the program in text and just read how your machine automatically writes the code correctly?? I've done this on more than one occasion when I had to call up subroutines for a bobcad file that was generated in G-code and because of that I had to write a longhand program to rotate and call up the correct subs to cut the spokes on a motorcycle wheel~

    Also, the sub might have to be something like ####.txt or something similar... In my case it was that added to the end in order to get it to work...

    As for the keyboard on a Cent 6, I dunno except on my cent 5 it was just a simple matter of drilling a tiny hole and running the cord inside to plug it in!!
    EXIT 85 Manufacturing "The best custom wheels, period" (www.exit85.com)
    Experts in low volume, highly complicated, one-off forged aluminum wheels

  3. #3
    Join Date
    Aug 2007
    Posts
    2
    Gimpy,

    Thanks for your speedy response. I will try the converstational code as soon as I get some time to experiment.

    I noticed that there is no "#" key on either of the Milltronics keypads. That would certainly suggest that Milltronics G-Code does not allow pound signs (#).

    Do I need to do something like "G68 R*4 X0 Y0" or "G68 R[4] X0 Y0"? Have you ever passed an argument to a Milltronics subroutine. How did you do it?

  4. #4
    Join Date
    Aug 2007
    Posts
    2
    Gimpy,

    I got it working today. I called the subroutine like this:

    G65 P9100 R45.0

    That will set "Argument R" to the value 45.0.
    Since the letter "R" is the 18th letter of the alphabet, Argument R is now stored in the 18th parameter memory location, aka Parameter 18 or "P18".

    Inside the subroutine, I referenced Argument R (aka P18) like this:

    G68 R[P18] X0 Y0 <-- executes as G68 R45.0 X0 Y0

    On a Centroid controller, one can refer to Argument R as "#R"

    G68 R#R X0 Y0 <-- executes as G68 R45.0 X0 Y0 on Centroid

    There has got to be a Milltronics syntax that is analagous to the Centroid "#R" syntax, but I haven't been able to figure it out. Do you know?

  5. #5
    Join Date
    Aug 2005
    Posts
    385
    LOL, oh my God!! I have no idea what you're talking about, that was so far over my head!! All I was referring to with the (####.txt) was that you could name the subroutine something like 1243 or any combination of numbers... In the case of Bobcad I used letters and numbers to reference different geometry I wanted to cut...

    My code literally reads something like:

    N1 CALL 1234

    or

    N1 CALL SPOKE3.txt

    I forget exactly but I think if I generated code through conversational and wanted to call it as a sub in a text file I had to add something to the end like (.txt) except it was a different set of letters... Sorry bro if I wasn't much help, lol, all I know is I do it a lot and it works but I couldn't tell you what register in the computer it was using. (I thought registers were the things in the check out isle at Walmart, I know nothing about any other kind.)

    I'm glad you got it figured out, sorry I'm not better versed in computer nomenclature~
    EXIT 85 Manufacturing "The best custom wheels, period" (www.exit85.com)
    Experts in low volume, highly complicated, one-off forged aluminum wheels

  6. #6
    Join Date
    Mar 2006
    Posts
    370
    I keep a small keyboard connected to my cent 6 all the time. I use it for editing. I also have my cent 6 on my Ethernet with my CAD-CAM PCs. I edit the g-code files on the windows machines too.

    I thought the # was on shift 3, my machine is not running right now or I would go over and check.

    Cheers
    Dave

Similar Threads

  1. EMC and Subroutines?
    By watchman in forum LinuxCNC (formerly EMC2)
    Replies: 9
    Last Post: 06-17-2007, 08:30 PM
  2. Oi subroutines help
    By mishikwest in forum Fanuc
    Replies: 1
    Last Post: 08-01-2006, 11:17 PM
  3. passing arguments to a sub program
    By kiprip in forum Mazak, Mitsubishi, Mazatrol
    Replies: 1
    Last Post: 07-13-2006, 05:11 PM
  4. Fanuc 15m Subroutines
    By BROCD in forum Fanuc
    Replies: 11
    Last Post: 02-27-2006, 02:04 PM
  5. Subroutines in Mill Master Pro
    By truline in forum G-Code Programing
    Replies: 0
    Last Post: 10-08-2005, 06:37 AM

Posting Permissions

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