586,497 active members*
1,448 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Need HELP posting handwitten program
Results 1 to 13 of 13
  1. #1
    Join Date
    May 2008
    Posts
    37

    Need HELP posting handwitten program

    I have written a program by hand and am trying to use Mastercam to send the program to the machine with no luck. Mastercam still sends my NC files created with Mastercam just fine so I know the communications is working.

    I am afraid I have something embedded in my program that my Fadal is having a hard time reading. When I go to load the program it will take the first line and thats about all.

    A little background on my program. I wrote the program in Excel as it was easy to organize variables and my program in general. I then copied the program from Excel and pasted it into Notepad so now it looked like a normal text document. I also tried saving the Excel file as a text (tab delimited) file as well. I changed the extension on lthe files to .nc and tried sending them via Mastercam.

    My question is, are there sublties about a text file that need to be considered when writing or posting them?

    Also, is there a good software for communicating with my machine just to send and maybe receive programs?

  2. #2
    You are downloading, not posting.
    That aside, take a close look at the files from MC and your manual program.
    Is there a % or some other character at the beginning or end?
    An NC file is an ASCII text file. If you had it in Notepad the format should be correct.
    The one line transfer is a hint. At the end of line, the Carraige Return - Line Feed (CR-LF) character may be different between MC and Notepad. CR-LF is terminology that dates to the teletype terminals used yeears ago. You see it as a new line of code starting at the first column. The control interprets this character as an End Of Block (EOB) character. Copy a couple lines from the MC program and stick them at the top, then edit them to look like your program without changing the CR-LF and see if that helps. There may be settings in the DNC portion of MC that is using a different character.

    You could use Hyperterminal which (I think) is part of DOS or your Windows operating system to transfer programs. Otherwise download a demo version of DNC software, like Multi-DNC which you can use free for 30 days. Multi-DNC that I used only counted down while the software was running so potentially could be used quite awhile as long as you only keep it open for the download or upload.

  3. #3
    Join Date
    May 2008
    Posts
    37
    I added semicolons to one of my shorter macros and tried to download it. It made it about halfway through the code and then the machine alarmed with an error. Below is the code

    %
    N0102 P8002 (Milling a hole);
    N0104 (VARIABLES);
    N0106 (E = #8 depth of cut);
    N0108 (T = #20 top of hole - z value);
    N0110 (B = #2 bottom of hole- z value);
    N0112 (C = #3 cutter diameter);
    N0114 (D = #7 diameter of hole);
    N0116 (F = #9 milling feedrate);
    N0118 (U = #21 mill plunge rate);
    N0120 (S = #19 spindle speed);
    N0122 (FORMULAS);
    N0124 #11 = [#20-#2] (depth of hole);
    N0126 #17 = [#11/#8] (number of loops - unrounded);
    N0128 #18 = FIX[#17] (number of loops - rounded down);
    N0130 #32 = [[#7-#3]/2] (calculate the X travel of the;
    N0132 (approach path - based on the);
    N0134 (assumption of 180 degree arc);
    N0136 (G CODE);
    N0138 M03 S#19;
    N0140 G0 G90 Z[#20+.020] (rapid to .020" above top of hole);
    N0142 G91 Z-#8 F#21 (plunge down incremental by depth of cut of tool);
    N0144 G91 G03 X-#32 I-[#32/2] J0. F#9 (arc approach to final diameter);
    N0146 WHILE [#30 LE #18] DO1 (start plung and arc loops);
    N0148 #30=#30+1;
    N0150 Z-#8 F#21 (plunge in to material);
    N0152 G03 I#32 J0. F#9 (mill in circular arc);
    N0154 END1;
    N0156 G0 Z#2 F#21 (plunge to final depth using absolute position);
    N0158 G91 G03 I#32 J0. F#9 (mill in circular arc);
    N0160 G91 G03 X#32 I[#32/2] J0. F#9 (escape to center of hole);
    N0162 G0 G90 Z[#20+.02] (rapid to .020" above top of hole);
    N0164 M99;
    %


    It made it throught line 136 but alarmed out after that. Any suggestions?

  4. #4
    At first glance you should use all capital letters. A different ASCII code may be used for lower case, I'm not sure.

    It would help to know the error code.

    Could be buffer overrun. Use a lower baud rate or better yet hardware handshaking RTS/CTS (no X-on X-off).

    If it is buffer overrun and you start using handshaking, it will help to know what baud rate you could transmit at without sending it too fast for the control to read it. Nothing to be gained in a hurry-up-and-wait mode of file transfer. So slow it down until the error goes away, or slow it way down first to see if that's it then bump it up until you have a problem and back it off. You might be at 9600 baud which is way too fast for an older machine.

    The control probably has baud settings as well as the DNC software and if you want to transfer both ways they should match.

    I've added a 5ms delay at EOB to my DNC software parameters on an old machine to give the handshaking a better chance to respond.

  5. #5
    Join Date
    Aug 2011
    Posts
    2517
    what was the alarm number/description?

    if this is not a typo this might be it....

    N0130 #32 = [[#7-#3]/2] (calculate the X travel of the;

    the ) is missing on the end

  6. #6
    Join Date
    Jun 2008
    Posts
    1511
    Good catch Ford. I believe that is probably the problem.

    Keystone,
    You never mentioned what Fanuc control you are using and you never said what alarm you are getting. I am also surprised that you have no O or : with the program number at the beginning. Fanuc typically needs to see one of these characters before uploading to the control.

    Stevo

  7. #7
    Join Date
    Aug 2011
    Posts
    2517
    In the past I've found if the O or : is missing the control will auto-make program O0001 when it comes into the control. That probably explains why it started to accept the program.

  8. #8
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by fordav11 View Post
    In the past I've found if the O or : is missing the control will auto-make program O0001 when it comes into the control. That probably explains why it started to accept the program.
    Interesting!! I have seen it the exact opposite but this is typically when it was a typo of a zero instead of an O. I never had any reason to “not” have a program number at the top as keystone is doing. Good info.

    Stevo

  9. #9
    Join Date
    May 2008
    Posts
    37
    Quote Originally Posted by fordav11 View Post
    In the past I've found if the O or : is missing the control will auto-make program O0001 when it comes into the control. That probably explains why it started to accept the program.
    I had actually changed the "P" to an "O" prior to trying to download the program and still no luck.

  10. #10
    Join Date
    May 2008
    Posts
    37
    Quote Originally Posted by stevo1 View Post
    Good catch Ford. I believe that is probably the problem.

    Keystone,
    You never mentioned what Fanuc control you are using and you never said what alarm you are getting. I am also surprised that you have no O or : with the program number at the beginning. Fanuc typically needs to see one of these characters before uploading to the control.

    Stevo
    I am trying to load this program into a Fadal 3016L with their 88HS legacy controller. This controller has the option to program in Fadal Format or Fanuc 6M/10M/11M.

    To load programs I type "TA,1" at the command prompt and it starts looking for the program. At which point I normally would send the .NC file from my laptop using Mastercam and the Fadal would read the program.

    Question, do you think that I need to switch over to Fanuc format prior to sending the program? And if I do, would the same command I use in Fadal format (TA,1) still work or is that a command unique to Fadal?

    As for the "O" word, I corrected that prior to sending and that was not the problem.

    I am new to Fanuc as the Fadal and Mastercam is all I have known up till now. But I am very eager to learn all I can about macros and subprograms and how to utilize them to make me a better programmer. I do have a pretty good knowledge of G code but have not used or are familiar with every last G or M code. I do have an engineering background and understand how to utilize logics and math to create good programs and macros. But I do not have the years of CNC experience and I am having to learn everything the hard way as I have no one to apprentice under.

    I very much appreciate all the help I am receiving here as it is very valuable to me. Thanks

  11. #11
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by keystone76 View Post
    I had actually changed the "P" to an "O" prior to trying to download the program and still no luck.
    Did you add the right ) parenthesis to the end of the comment in line N0130 as Ford had stated?

    Also if you are going to change the P to an O you need to remove the N0102 in the line. It should look like this.
    %
    O8002 (Milling a hole);
    N0104 (VARIABLES);


    This will make the program number in the control program number 8002

    Stevo

  12. #12
    Join Date
    Sep 2010
    Posts
    1230
    keystone76,
    Check for a PM containing my email address. Send me a copy of a file created by MC that transfers correctly, and a copy of your hand written file that you're having trouble with. I will be able to interpret any control (unprintable) characters that may be in one file and not the other.

    PS
    Your Private Message quota is full. Accordingly, I can't send you a PM. Attach the two files requested above in a Zip file to a Post. To be able to detect any imbedded control characters, I have to have the files as created and not just a text listing in the post.

    Regards,

    Bill

  13. #13
    Join Date
    May 2008
    Posts
    37
    Quote Originally Posted by angelw View Post
    keystone76,
    Check for a PM containing my email address. Send me a copy of a file created by MC that transfers correctly, and a copy of your hand written file that you're having trouble with. I will be able to interpret any control (unprintable) characters that may be in one file and not the other.

    PS
    Your Private Message quota is full. Accordingly, I can't send you a PM. Attach the two files requested above in a Zip file to a Post. To be able to detect any imbedded control characters, I have to have the files as created and not just a text listing in the post.

    Regards,

    Bill
    Bill,

    I am leaving town tomorrow and will be away for a week. I will be back at my shop next Friday and will be able to send you those files then. Thanks in advance.

Similar Threads

  1. Replies: 0
    Last Post: 12-27-2010, 09:55 AM
  2. About posting?
    By Netjams in forum DIY CNC Router Table Machines
    Replies: 4
    Last Post: 04-13-2006, 01:55 AM
  3. Posting RFQ
    By cncadmin in forum RFQ (Request for Quote)
    Replies: 0
    Last Post: 11-04-2004, 05:57 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
  •