![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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. |
|
#6
| |||
| |||
| 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 |
|
#8
| |||
| |||
| Stevo |
|
#9
| |||
| |||
|
I had actually changed the "P" to an "O" prior to trying to download the program and still no luck. |
|
#10
| |||
| |||
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 |
| Sponsored Links |
|
#11
| |||
| |||
| 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
| |||
| |||
| 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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outputting Common variable values into a program (with automated program number) | yaji63 | Fanuc | 0 | 12-27-2010 02:55 AM |
| Need Help With Job posting. | OKUMA Tech | Forum Questions or Problems | 0 | 08-25-2009 10:14 PM |
| Need Help With posting | joe aiello | Forum Questions or Problems | 3 | 10-05-2008 10:30 AM |
| About posting? | Netjams | DIY-CNC Router Table Machines | 4 | 04-12-2006 07:55 PM |
| Posting RFQ | CNCadmin | RFQ (Request for Quote). | 0 | 11-03-2004 10:57 PM |