CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-05-2012, 10:22 AM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road
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?
Reply With Quote

  #2   Ban this user!
Old 01-05-2012, 11:44 AM
 
Join Date: Apr 2010
Location: USA
Posts: 184
mfgbydesign is on a distinguished road
Buy me a Beer?

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.
Reply With Quote

  #3   Ban this user!
Old 01-05-2012, 12:45 PM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road

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?
Reply With Quote

  #4   Ban this user!
Old 01-05-2012, 01:03 PM
 
Join Date: Apr 2010
Location: USA
Posts: 184
mfgbydesign is on a distinguished road
Buy me a Beer?

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.
Reply With Quote

  #5   Ban this user!
Old 01-05-2012, 01:05 PM
fordav11's Avatar  
Join Date: Aug 2011
Location: Fordaville
Posts: 939
fordav11 is on a distinguished road

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
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-05-2012, 07:13 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

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
Reply With Quote

  #7   Ban this user!
Old 01-05-2012, 11:54 PM
fordav11's Avatar  
Join Date: Aug 2011
Location: Fordaville
Posts: 939
fordav11 is on a distinguished road

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.
Reply With Quote

  #8   Ban this user!
Old 01-06-2012, 08:54 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

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
Reply With Quote

  #9   Ban this user!
Old 01-06-2012, 12:13 PM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road

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.
Reply With Quote

  #10   Ban this user!
Old 01-06-2012, 12:29 PM
 
Join Date: May 2008
Location: US
Posts: 28
keystone76 is on a distinguished road

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
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 01-06-2012, 12:41 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

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
Reply With Quote

  #12   Ban this user!
Old 01-06-2012, 05:00 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

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
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 01:18 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361