Page 1 of 2 12 LastLast
Results 1 to 12 of 19

Thread: I need help Simulating my code.

  1. #1
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    9
    Downloads
    0
    Uploads
    0

    Question I need help Simulating my code.

    Im not sure what program is best to simulate my code.

    Please see the attachemts.

    The file extension is .H but i renamed it to txt.

    I have built a program from scratch using visual basic .NET. where the

    output would be the CNC code.

    I tried using the free CNC Simulator but im still having difficulties with.

    Any help would be appreciated. Thanx in advance.
    Attached Files Attached Files


  2. #2
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    Modified your code. Altered all the 'L's to N1 and added G01 and this is the result.
    Attached Thumbnails Attached Thumbnails I need help Simulating my code.-toolpathgear.jpg  


  3. #3
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    9
    Downloads
    0
    Uploads
    0
    WOW !!! THANX ..


    Man may you post the modified code and may you please tell me what software your using to show the preview ?


  4. #4
    Moderator Switcher's Avatar
    Join Date
    Apr 2005
    Location
    mydxf.blogspot.com
    Posts
    3,665
    Downloads
    0
    Uploads
    0
    www.ncplot.com


    .
    Attached Thumbnails Attached Thumbnails I need help Simulating my code.-123.jpg  
    Free DXF Files - myDXF.blogspot.com


  • #5
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    9
    Downloads
    0
    Uploads
    0
    Thanx Man. I still want to know what software kiwi used. His drawing shows the origin (x,y) . Which i like. If you know what program he ued please let me know.


  • #6
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    I used BobCADCAM V20.
    As I use a FAGOR controller I altered to the required format by using MSword;

    N1 G01 X-30.938 Y-160
    N1 X-22.987 Y-160
    N1 X-22.444 Y-159.986
    N1 X-22.131 Y-159.969
    N1 X-21.862 Y-159.95
    N1 X-21.614 Y-159.929
    N1 X-21.381 Y-159.907
    N1 X-21.158 Y-159.884


  • #7
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    9
    Downloads
    0
    Uploads
    0
    Thanx man, I downloaded the software.

    I opened my file and used. moved the header part (First six lines) to a text file (Cut - Paste) so that [The word Tool & call wont be affected].

    Then used the find and replace feature: Find"L(space)" Replace with "(space) (space)". Then pasted back what i cut.Then in the bobcam editor window i hit on Edit > Renumber ,then added in the G01 Manually.

    I can see youve used N1 All the way along have u used it at the very begining as well ? Anyways heres my modfied code is it correct this way ? BTW how do i run a simulation ?

    N1 BEGIN PGM NNT MM
    N2 BLK FORM 0.1 Z X+100 Y+100 Z+0
    N3 BLK FORM 0.2 X+200 Y+200 Z+100
    N4 TOOL DEF 1 L+0 R+10
    N5 TOOL CALL 1 Z S1 F1
    N6 M6
    N7 X+89 Y+89 Z+101 F1 M3
    N8 X+201 F1
    N9 Y-160
    N10 Z-1
    N11 G01 X-30.938 Y-160
    N12 X-22.987 Y-160
    N13 X-22.444 Y-159.986
    N14 X-22.131 Y-159.969


  • #8
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    I deleted all the lines down to your main code line N11. Didn't examine them for errors.
    I could have just deleted the L instead of converting to a line number (N????)

    To simulate :Edit/Select All...........Edit/Geometry from NC


  • #9
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    The first 5 lines will vary, depending on the controller.
    For lines with comments my FAGOR controller requires a ';' where others use '('
    Using line numbers (N????) is optional.


  • #10
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    9
    Downloads
    0
    Uploads
    0
    Thanx for your reply man, I have one question regarding the Workpiece.

    Quick Intro:-

    I have built a Spur gear Calculator program using Visual Basic .NET



    Now Basically this window is under CNC code.

    The highlighted items show the dimensions of the workpiece.



    Now if im to draw my gear using BobCAD-CAM where should the fixture holding the workpiece be located at ?




    Please see the attachments for the code.

    This code is different from the one i posted earlier.
    Attached Files Attached Files


  • #11
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    You have done well with your calculator. Does it calculate a involute path?

    I'm thinking a 3 axis vertical mill.
    I would think the centre of the gear would be the origin X0 Y0 and the piece would be held with a bolt at this point or held with a vice or lathe chuck which is fixed to the table.


  • #12
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    9
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Kiwi View Post
    You have done well with your calculator. Does it calculate a involute path?

    I'm thinking a 3 axis vertical mill.
    I would think the centre of the gear would be the origin X0 Y0 and the piece would be held with a bolt at this point or held with a vice or lathe chuck which is fixed to the table.
    This program is specifically for spur gears calculations.




    Now Basically what i want to do is tie the input machining parameters with the offset i got(Tool path CNC Code - see picture below).



    The purpose of that is to move the centre of the gear to the centre of the workpiece.




    Regarding the same input parameters that i input back in post # 10 this

    would be my output (not the tool path generated).

    .

    So basically from the above picture you can see that when i apply both both new offset equations for the gear the values of a=b=0 on the other hand when i apply them for the pinion the value of a = (Distance Centre; Distance from the centre of the gear to the centre of the pinion), and b=0.

    Moving to the CNC Window:



    Hitting the OK button:



    And now this is how i managed to write the first couple of lines my CNC Code header. *Note the values used in the machining parameters in the following pictures are different from the one ive been taking pictures of.















    I could have used my old CNC code the one showing here:



    But as i mentioned i want to do the translation so that after the code is saved from my program all i have to do is upload and run program. Any help is welcomed.


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Wierd NC Code and G-Code
      By Tazzer in forum General CAM Discussion
      Replies: 10
      Last Post: 01-09-2012, 02:07 PM
    2. learning g code or cad-cam code output?
      By slow_rider in forum G-Code Programing
      Replies: 3
      Last Post: 02-27-2010, 09:48 PM
    3. G-code for beginners - want to learn G-code
      By FPV_GTp in forum G-Code Programing
      Replies: 7
      Last Post: 11-18-2008, 12:25 AM
    4. looking for g code 3d from bobcadcam or simmilar for indexer lpt v5 with g code soft
      By troyswood in forum Ability Systems - LPT Indexer and G-Code
      Replies: 2
      Last Post: 12-24-2006, 10:21 PM
    5. Simulating TurboCNC code
      By kombayotch in forum TurboCNC
      Replies: 4
      Last Post: 03-10-2006, 10:00 AM

    Tags for this Thread

    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.