Results 1 to 9 of 9

Thread: Help with cncsimulator

  1. #1
    Registered
    Join Date
    Feb 2012
    Location
    Hungary
    Posts
    8
    Downloads
    0
    Uploads
    0

    Help with cncsimulator

    So, I'm practicing stuff I'm learning about CNC's gcode with cncsimulator.

    However, I can't register on cncsimulator's website. When I registered, I didn't receive an activation e-mail and couldn't re-register since,as all my e-mail accounts I try to register with are blocked by cncsimulator's botblock thingy. So I can't ask for help there.

    Anyway, I'm currently learning subprograms. The task is simple: take a a4-sized sheet and drill holes into it with a 4mm diametre tool, spaced apart by 10mm.

    I have two problems:

    1. I can only use the G25 (subroutine call) command and I can't call a separate .nc file. Even if it's actively in the buffer (or not). I've tried to configure the subprogram directory, I've copied the subprogram files into the default subprogram directory, but it still refuses to see anything ("can't open subprogram"). I'm running Windows XP, so it can't be an administrator-error.

    2. I can't get the thing to repeat subprograms. I know I should use the "U[number or repetitions]" but no matter where I place it, it just won't register.

    For reference here is the program's gcode, using subroutines:
    Code:
    O1001  (Main program: drilling a into an a4-sized sheet)
    N0  G90 G94 T4 M3 
    N5  G0 Z50 
    N10  G0 X10 Y10 
    N15  G25 L40 U21
    N20  
    N25  G0 G54 
    N30  M2 
    N35  O1002 (subprogram: coloum)
    N40  G25 L70 U29 
    N45  G91 
    N50  g0 z50
    N55  G0 X10 Y0 
    N60  G90 
    N65  M17 
    N70  U29 O1003 (subprogram: hole drilling)
    N75  G1 z4
    N80  G91 
    N85  G81 Z7 
    N90  G0 Y10 
    N95  G90 
    N100  M17
    Can anybody please help me?


  2. #2
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    I'm the CNC Simulator MASTER

    The support forum is basically useless. No one there knows anything and the forum is nearly dead so don't bother wasting your time.

    The program only accepts common G codes using standard Fanuc programming procedures. G25 is not accepted.
    Remember the place where you read about G25 being used to call a sub program and do not go there ever again.

    Use M98 P1002 L2
    this will call up program 1002 two times. But your method is wrong anyway. your program won't work like that even if you wrote it using common G-codes.

    what you want to do can be done pretty easily with a macro but cncsimulator won't read macros

    easiest way is use G81 drilling cycle with X Y points for each hole in one quarter of the page then mirror each quadrant and repeat the drilling to achieve a full page of holes.

    or make a sub to drill one line across the page using G81 with X drill movement and repeat the sub with a new start point outside the sub.
    Here's a very simplified example (1st hole we will call X0 Y0)

    O1000
    T1
    M6
    G97 S1000 M3
    G90 G0 X0 Y0
    G43 H1 Z10.0
    M98 P1001
    G0 X0 Y-10.0
    M98 P1001
    G0 X0 Y-20.0
    M98 P1001
    (etc etc etc)
    ....
    ....
    M30


    O1001
    G81 Z-10.0 F100
    X-10.0
    X-20.0
    X-30.0
    X-40.0
    X-50.0
    X-60.0
    X-70.0
    X-80.0
    X-90.0
    X-100.0
    X-110.0
    X-120.0
    X-130.0
    X-140.0
    X-150.0
    X-160.0
    X-170.0
    X-180.0
    X-190.0
    X-200.0
    X-210.0
    G80
    M99
    Last edited by fordav11; 02-22-2012 at 09:25 AM.


  3. #3
    Registered
    Join Date
    Feb 2012
    Location
    Hungary
    Posts
    8
    Downloads
    0
    Uploads
    0
    The program only accepts common G codes using standard Fanuc programming procedures. G25 is not accepted.
    Remember the place where you read about G25 being used to call a sub program and do not go there ever again.
    Actually, within cncsimulator, it is used. It's in the help file, its forum and no other command was accepted.

    Use M98 P1002 L2
    this will call up program 1002 two times. But your method is wrong anyway. your program won't work like that even if you wrote it using common G-codes.
    Cncsimulator will not accept the m98 command. It will simply ignore it.

    However, G25 (only within cncsimulator, this one to avoid confusion) will work for making a subroutine.

    However, it will only do the subroutine ONCE and my problem is that I can't figure out how to make it repeat. The code I have above WILL RUN (it won't ignore the subroutine commands or give me an error message), but it only does it once.

    And I can't call a subprogram (a separate .nc file) because it is unable to open another .nc file (except itself, oddly enough), regardless whether it is loaded in the buffer (currently open files) or not.

    As for using zero-point displacement: that's a clever idea and I admit that I haven't mastered zero-point displacement in-program (that is, name a zero point or actively change a zero point with code) yet. The point of the exercise however is the use subprograms. The point of using subprograms is to reduce program size.


  4. #4
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    my program is small enough to write it in 1 or 2 minutes. that qualifies as small.
    I have a different policy when coding programs..... I get the job done and move on.

    I use cncsimulator only to verify movement. I usually just copy/paste everything into one program to avoid this non-standard B.S.

    However .... this works without an error if you have a program called 1001.nc in the same dir as the cncsimulator.exe (or change the path in settings/file settings)

    G26 "1001.nc"

    however it does nothing :-/

    cncsimulator is probably written by hobbyists or 'engineers'. they have some non standard stuff in there. for my purposes of proving out standard lathe programs with G0/G1/G2/G3 it's perfect.


    ok update....

    I got it to work but it's WAY non-standard.
    This fills a 100x100 block with holes.
    (material block is 100x100)
    (G54 zero point offset is X0 Y100)

    O1000
    G54
    T1
    M6
    G97 S1000 M3
    G0 X0 Y0
    G43 H1 Z10.0
    G0 X0 Y-5.0
    G26 "prog1001.nc"
    G0 X0 Y-15.0
    G26 "prog1001.nc"
    G0 X0 Y-25.0
    G26 "prog1001.nc"
    G0 X0 Y-35.0
    G26 "prog1001.nc"
    G0 X0 Y-45.0
    G26 "prog1001.nc"
    G0 X0 Y-55.0
    G26 "prog1001.nc"
    G0 X0 Y-65.0
    G26 "prog1001.nc"
    G0 X0 Y-75.0
    G26 "prog1001.nc"
    G0 X0 Y-85.0
    G26 "prog1001.nc"
    G0 X0 Y-95.0
    G26 "prog1001.nc"
    M30

    prog1001.nc is....

    O1001
    G81 Z-10.0 F100
    G0 X10.0
    G81 Z-10.0
    G0 X20.0
    G81 Z-10.0
    G0 X30.0
    G81 Z-10.0
    G0 X40.0
    G81 Z-10.0
    G0 X50.0
    G81 Z-10.0
    G0 X60.0
    G81 Z-10.0
    G0 X70.0
    G81 Z-10.0
    G0 X80.0
    G81 Z-10.0
    G0 X90.0
    G81 Z-10.0
    G0 X100.0
    G81 Z-10.0
    G80
    M17



    Their interpretation of G81 is screwed too.
    You have to put G81 on every line and move the tool first.
    So it's basically acting like a G1 to Z value then rapid up to start point for one hole but it's not smart enough to move to the next XY point and repeat the Z movement.
    Attached Thumbnails Attached Thumbnails Help with cncsimulator-subprogram.jpg  
    Last edited by fordav11; 02-23-2012 at 05:11 AM.


  • #5
    Registered
    Join Date
    Feb 2012
    Location
    Hungary
    Posts
    8
    Downloads
    0
    Uploads
    0
    Not what I meant.


  • #6
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    I know. but I have explained how to get sub programs working.
    Now your problem is YOUR PROBLEM.


  • #7
    Registered
    Join Date
    Feb 2012
    Location
    Hungary
    Posts
    8
    Downloads
    0
    Uploads
    0
    Oh, I must apologise: I didn't notice that you've updated your post.

    EDIT: I'm going to go and see what other alternatives are there to cncsimulator. Something with a more proper g-code interpreter.
    Last edited by Zixinus; 02-23-2012 at 07:04 AM.


  • #8
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    you can actually edit the G/M codes yourself. Their interpreted function does not change but the number can be set to another number.
    Look in "turn_tolk.tlk" and "mill_tolk.tlk"

    I spoke to them when I was an admin on their forum a few years ago but they insisted because the program is free they can't justify the time and effort to make it more standard.

    Many hours of experimenting fun inside those .tlk files
    Last edited by fordav11; 02-24-2012 at 05:27 AM.


  • #9
    Registered
    Join Date
    Feb 2012
    Location
    Hungary
    Posts
    8
    Downloads
    0
    Uploads
    0
    The number/codephrase isn't the problem: it's how it interprets it. I still think that the code I've originally written should have worked, if with more standard commands. I can't be bothered to figure out not only how g-code works but how to get it to work on a broken interpreter.

    As for the developers not bothering to fix their interpreters, this is all I'll say: if they can't make a free program competently, they shouldn't expect people to be impressed by it enough to buy their professional product.

    EDIT: YES!


    Now unto a hunt for a proper CNC simulator.
    Last edited by Zixinus; 02-24-2012 at 03:58 PM.


  • Similar Threads

    1. CncSimulator Arcs
      By kgriffit in forum G-Code Programing
      Replies: 3
      Last Post: 10-30-2008, 10:34 AM
    2. Question about CNCSimulator
      By Chunky in forum General CAM Discussion
      Replies: 13
      Last Post: 06-11-2005, 02:08 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.