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 > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 03-01-2007, 04:04 PM
 
Join Date: Mar 2007
Location: USA
Posts: 25
Miguel Gonzalez is on a distinguished road
G Code Variances from machine to machine?

Hello everyone, this is my first post on CNC Zone. I'm happy to see there is a resource such as this on the internet!

Bare with me as I am new to G-Code programming, but I have recently tried to connect my company's plasma table (a TITAN by MG Industries with a Hypertherm Navigator controller from about 10 years ago) to a new computer which runs our new Hydrajet water cutting system. The old plasma table keeps giving me error messages every time I try to download a CNC script created with the software I am now using with the Waterjet system (IGEMS for those familiar with it). The code produced by the old software we used previously (SDS 5.6) works fine on the plasma table, and I have compared print-outs of the code produced by the SDS software and that produced by the IGEMS software and I've noticed some differences in the way they write their code.

Are these slight differences the reason the old machine wont download the programs properly? Is there anything I can do to enable the old machine to read the script from the new software, or to make the software write the code in the same manner as the old software did?

Please keep in mind I know next to nothing about CNC programming - I'm taking it upon myself to teach myself how it works and needless to say its a bit of a rocky road!
Reply With Quote

  #2   Ban this user!
Old 03-01-2007, 07:07 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

070301-2000 EST USA

Miguel:

I know nothing about the machines you refer to. Thus, your questions are not clear to me.

It appears that you have two computers, or you have disposed of an older computer. How did or does the old or new computer communicate with the machine that you download to? Are you using RS232 for this download communication path? If so what are the details on cable wiring, all parameter settings, and kind of RS232 port?

If not RS232 what is the communication path for the download?

.
Reply With Quote

  #3   Ban this user!
Old 03-01-2007, 10:00 PM
Genguy's Avatar  
Join Date: Nov 2005
Location: Canada
Posts: 83
Genguy is on a distinguished road

In addition to the port configuration and wiring differences that Gar has mentioned, there are likely differences in the gcode as well. Some machines require a % sign to signal the start and end of a program, some do not recognize LF (line feed) or CR (carriage return) statements. The gcode itself will have slight differences for each machine and manufacture's control. Many gcodes are industry standard but some of them are reserved for custom use and some others may have different uses between a mill or a lathe for example. Some gcodes may not work at all because that particular machine does not have that option installed or enabled. All of these items can cause an error when sending a program.
You really need to use the programming manual for that machine's control to know the function of each gcode for sure. If you are writing code by hand, then you need to learn each one as you go until you are familiar with each function. If you use a CAM program, then there is a "post processor" that translates the standard output of the software to the specific codes that the individual machine requires. In that case a different post processor will need to be used for each machine.
Reply With Quote

  #4   Ban this user!
Old 03-02-2007, 09:10 AM
 
Join Date: Mar 2007
Location: USA
Posts: 25
Miguel Gonzalez is on a distinguished road

Originally Posted by gar View Post
070301-2000 EST USA

Miguel:

I know nothing about the machines you refer to. Thus, your questions are not clear to me.

It appears that you have two computers, or you have disposed of an older computer. How did or does the old or new computer communicate with the machine that you download to? Are you using RS232 for this download communication path? If so what are the details on cable wiring, all parameter settings, and kind of RS232 port?

If not RS232 what is the communication path for the download?

.
That is correct - we have two computers, but we have not disposed of the older one yet until we get the new one communicating properly.

For the communication device we are using an RS232 Fiber Optic line driver and utilize the PhoenixLink software provided by Messer Industries. It is connected through Com Port 1 with a baud rate of 9600. The communication between the computer and the plasma machine work fine - but once the files are retrieved they cannot be read properly and I always get an error message.
Reply With Quote

  #5   Ban this user!
Old 03-02-2007, 09:21 AM
 
Join Date: Mar 2007
Location: USA
Posts: 25
Miguel Gonzalez is on a distinguished road

Originally Posted by Genguy View Post
In addition to the port configuration and wiring differences that Gar has mentioned, there are likely differences in the gcode as well. Some machines require a % sign to signal the start and end of a program, some do not recognize LF (line feed) or CR (carriage return) statements. The gcode itself will have slight differences for each machine and manufacture's control. Many gcodes are industry standard but some of them are reserved for custom use and some others may have different uses between a mill or a lathe for example. Some gcodes may not work at all because that particular machine does not have that option installed or enabled. All of these items can cause an error when sending a program.
You really need to use the programming manual for that machine's control to know the function of each gcode for sure. If you are writing code by hand, then you need to learn each one as you go until you are familiar with each function. If you use a CAM program, then there is a "post processor" that translates the standard output of the software to the specific codes that the individual machine requires. In that case a different post processor will need to be used for each machine.
I see what you mean - I have looked through some of the software's settings and noticed it had two post-processors which can be loaded. One of them was made by the waterjet's manufacturers and is specific for that machine, and then it has a "standard" setting for all other machines. The "standard" setting still dosent work for the old plasma table, and the old postprocessor I used for the plasma table is written on a different file extension (the new postprocessor extensions are .lua files where as the old post processor seems to be a 3 different files - two for plasma, one for oxy - that were put into a folder within the old CAM software package).

So it seems to me like I have to talk to either the manufacturer of the machine, the controller or the software and see if I can get the postprocessor for this machine in a .lua extension?
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-02-2007, 07:04 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

070302-1948 EST USA

Miguel Gonzalez:

I still lack an understanding of the problem.

I believe you are implying that an old computer communicated successfully with your Titan machine. And that was done with your mentioned fiber link. Also this still works. You have old software and new software, and somehow you can look at the output from the two different program sources, and they are not the same.

Can you put the old program created into a file rather than sending it directly to the Titan machine? I assume you can. Do that, then in the old computer send that file to the Titan with some communication program that alters nothing in the file. Does that load into the Titan successfully? Is so, then put a copy of that file on the new computer, make the connections, and then send that file to the Titan. Does this work?

.
Reply With Quote

  #7  
Old 03-02-2007, 11:16 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,539
Al_The_Man is on a distinguished road
Buy me a Beer?

I think it is a Genguy mentioned, a program format problem rather than RS232 transmission problem, unfortunately if you do not have a post-processor for the machine in question, you may have to convert the files manually in a word processor.
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

  #8   Ban this user!
Old 03-05-2007, 01:46 PM
 
Join Date: Mar 2007
Location: USA
Posts: 25
Miguel Gonzalez is on a distinguished road

Originally Posted by gar View Post
070302-1948 EST USA

Miguel Gonzalez:

I still lack an understanding of the problem.

I believe you are implying that an old computer communicated successfully with your Titan machine. And that was done with your mentioned fiber link. Also this still works. You have old software and new software, and somehow you can look at the output from the two different program sources, and they are not the same.

Can you put the old program created into a file rather than sending it directly to the Titan machine? I assume you can. Do that, then in the old computer send that file to the Titan with some communication program that alters nothing in the file. Does that load into the Titan successfully? Is so, then put a copy of that file on the new computer, make the connections, and then send that file to the Titan. Does this work?

.
Yes, we have two computer stations, basically. One has the old software which outputs G Code which works with the Titan plasma. The new computer uses new software which outputs a variation of the G Code. I can look at the G Code by opening the .txt files created by each program and then compare the two for differences.

Here is an example of the G Code produced by the old software:

%
P12019012
G70
G91
G40
G00X2.220Y-2.464
M19
M20
G01X-0Y0.652
G03X0.030Y0.001I0.030J-0.688
M21
G00X0.030Y1.811
M20
G01X-0Y-0.220
G02X-0.042Y0I-0.030J-2.280
G01X0.080Y0.080
M21
M19
M30

Here is an example of the G Code produced by the new software:


%MAIN PROGRAM:101
(DATE:03/02/07 13:43:07
(MATERIAL:Steel)
(THICKNESS:0.2)
N10 MAIN-ZERO:X0.0 Y0.0
N11 ACTIVE-TOOLS:1

N12 TEMPORARY-ZERO:X0.3 Y0.5
N13 CALL-SUBROUTINE:1 (CUTTING NR:1 NAME:test101)

N14 END-PROGRAM

N15 DEFINE-SUBROUTINE:1 (CUTTING NAME:test101)
N16 G0 X3.0 Y4.0
N17 T3 (QUALITY:3)
N18 G0 Z0
N19 M4 (PIERCING TYPE 2)
N20 G4 F5.00
N21 G1 F39 G41 X3.0 Y4.5
N22 G3 X3.0 Y1.5 I3.0 J3.0
N23 G3 X3.0 Y4.5 I3.0 J3.0
N24 M5
N25 G40
N26 G0 Z3.9
N27 G0 X-0.0 Y-0.5
N28 T3 (QUALITY:3)
N29 G0 Z0
N30 M4 (PIERCING TYPE 2)
N31 G4 F5.00
N32 G1 F39 G41 X-0.0 Y-0.0
N33 G1 X-0.0 Y6.0
N34 G1 X6.0 Y6.0
N35 G1 X6.0 Y-0.0
N36 G1 X-0.0 Y-0.0
N37 G1 X-0.3 Y-0.0
N38 M5
N39 G40
N40 G0 Z3.9
%


As you can see there are some differences in the way the code is written, specifically near the beginning. The plasma gives me an error message saying Incorrect M Code.

The files are transmitted fine, it is the reading of them that seems to be a problem.
Reply With Quote

  #9   Ban this user!
Old 03-05-2007, 03:13 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

070305-1559 EST USA

Miguel:

I have not closely looked at your two programs, but here are gross differences.

%MAIN etc may be a severe problem and may be the cause of Incorrect M code.

The two programs do not look like the same part, but I have not looked closely.

No right paren on the date time line comment may be a problem.

The program structure of the second program is quite different than the first. Thus, it is not going to work.

Your problem is probably not new computer vs old computer, but different software intended for different CNCs.

Can you run the old software on the new machine, and if not, why not?

.
Reply With Quote

  #10   Ban this user!
Old 03-06-2007, 09:12 AM
 
Join Date: Mar 2007
Location: USA
Posts: 25
Miguel Gonzalez is on a distinguished road

Originally Posted by gar View Post
070305-1559 EST USA

Miguel:

I have not closely looked at your two programs, but here are gross differences.

%MAIN etc may be a severe problem and may be the cause of Incorrect M code.
I noticed this main difference as well, so I manually edited out the %MAIN but I continued to get error messages from other sources. I am not trained in coding G Code manually though, thus why I brought it here.

Originally Posted by gar View Post
070305-1559 EST USA

The two programs do not look like the same part, but I have not looked closely.

No right paren on the date time line comment may be a problem.
That is correct, they are not the same part. I only posted them up for illustrative purposes of the differences in the parameters used by the two different programs in writing the script.

Originally Posted by gar View Post
070305-1559 EST USA
The program structure of the second program is quite different than the first. Thus, it is not going to work.

Your problem is probably not new computer vs old computer, but different software intended for different CNCs.

Can you run the old software on the new machine, and if not, why not?

.
The old software runs off the DOS platform and we no longer have working installation disks for that particular software. Renewing our service contract with the company that created the old software would be quite expensive and is not something we would favor since we had some very serious problems with the stability of their software after they switched to a Windows enviroment for their CNC programs. It was so bad we reverted back to their DOS program because their Windows program did not work at all. The new software package we have aquired with the new computer (and a different company) is excellent, except it only works with our Waterjet and gets error messages on our Plasma. Ideally we would like to get both our machines working off the same platform and off a single computer station.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 03-06-2007, 10:12 AM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

070306-1051 EST USA

Miguel:

It does not help you much to compare two different parts on two different software packages.

You probably can not drop the first %. I would say it is a necessity that a first % exist. The problem is that your old CNC interprets the M of MAIN as an M code and no number is associated with M.

Generally DOS programs are reliable.

Your first G-code sample is relatively standard.

On-line you can download the HAAS mill manual from
http://www.haascnc.com/customer_serv...mc/96-8000.pdf

A generic postprocessor directed at Fanuc might produce code close to what you want.

You can manually write your own G-code program.

The P-line just after the first % is probably the program name. May or may not be required. In a HAAS or Fanuc program this would be an O-number.

Study the HAAS manual as that may help you understand the normal G-codes. And program structure.

.
Reply With Quote

  #12   Ban this user!
Old 03-06-2007, 11:26 AM
 
Join Date: Mar 2007
Location: USA
Posts: 25
Miguel Gonzalez is on a distinguished road

Originally Posted by gar View Post
070306-1051 EST USA

Miguel:

It does not help you much to compare two different parts on two different softtware packages.

You probably can not drop the first %. I would say it is a necessity that a first % exist. The problem is that your old CNC interprets the M of MAIN as an M code and no number is associated with M.

Generally DOS programs are reliable.

Your first G-code sample is relatively standard.

On-line you can download the HAAS mill manual from
http://www.haascnc.com/customer_serv...mc/96-8000.pdf

A generic postprocessor directed at Fanuc might produce code close to what you want.

You can manually write your own G-code program.

The P-line just after the first % is probably the program name. May or may not be required. In a HAAS or Fanuc program this would be an O-number.

Study the HAAS manual as that may help you understand the normal G-codes. And program structure.

.
I went ahead and created a simple part on both machines to produce the script for both. It is a 6" x 6" square with a 3" diameter circle in the center.

Listed first is the code from the old software & system:

%
P03020701
G70
G91
G40
G00X3.250Y-2.000
M19
M20
G41
G01X-0Y0.500
G03X0Y0I0J-1.500
M21
G40
G00X-3.000Y-5.000
M20
G41
G01X-0Y0.500
X0Y6.000
X6.000Y0
X0Y-6.000
X-6.000Y0
X-0.250Y0
M21
M19
M30

Listed below now is the code from the new software & system:

%
(DRWlasma101)
(MTR:Steel)
(THK:6.35)
(HPR:52000 BAR)
(ABR
(ABG:1 G/MIN)
(ORF:0.01)
(TUB:0.04)
G90
G97
G71
(T:1)
(C:Vertical Connector NO:1)
G00 X118.612 Y-81.917
M4 (TYPE:1)
M245
G41
G01 X120.644 Y-81.881 F281
G01 X120.644 Y-81.881
G03 X44.456 Y-83.219 I82.55 J-82.55 F319
G03 X120.604 Y-84.42 I82.55 J-82.55
M246
M3
G04 F0.5
G40
G00 X0. Y-6.35
M4 (TYPE:2)
M245
G04 F6.
G41
G01 X6.35 Y-6.35 F281
G01 X6.35 Y-6.35 F281
G01 X8.89 Y-6.35
G01 X11.43 Y-6.35 F365
G01 X13.97 Y-6.35 F449
G01 X151.13 Y-6.35 F534
G01 X153.67 Y-6.35 F449
G01 X156.21 Y-6.35 F365
G01 X158.75 Y-6.35 F281
G01 X158.75 Y-8.89
G01 X158.75 Y-11.43 F365
G01 X158.75 Y-13.97 F449
G01 X158.75 Y-151.13 F534
G01 X158.75 Y-153.67 F449
G01 X158.751 Y-156.21 F365
G01 X158.751 Y-158.75 F281
G01 X156.211 Y-158.75
G01 X153.671 Y-158.75 F365
G01 X151.131 Y-158.75 F449
G01 X13.97 Y-158.75 F534
G01 X11.43 Y-158.75 F449
G01 X8.89 Y-158.75 F365
G01 X6.35 Y-158.75 F281
G01 X6.35 Y-156.21
G01 X6.35 Y-153.67 F365
G01 X6.35 Y-151.13 F449
G01 X6.35 Y-13.97 F534
G01 X6.35 Y-11.43 F449
G01 X6.35 Y-8.89 F365
G01 X6.35 Y-6.35 F281
G01 X6.35 Y-6.35
G01 X6.35 Y-0.
M246
M3
G04 F0.5
G40
M30

In this instance, I receive an error on the line I put in bold, saying the Radius at Arc beginning and Radius at the End are not within the Arc Radial Error Tolerance: F319.

So its still not writing the code correctly, basically. There are similarities but there are some strong differences as well that are sufficient to make this not able to be interpreted correctly by the controller.

I am going to read that manual you linked. Thank you for that piece of information. I think the main problem from all the research I've done is the post processor is not writing the code in a way the controller can understand. I have tried to find a post processor file which will work with our new CAM software and the controller, but the new CAM software we use is based on the .LUA programming language which is very new, so there arent very many resources available. I wonder if I can somehow plug one of those generic post processors into the CAM software we are using and fall back on that - something I will have to try.
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
g-code on my mazatrol machine imwllc Mazak, Mitsubishi, Mazatrol 5 02-04-2011 08:46 AM
Help on correlating G-code to machine movement SteveS Machine Problems, Solutions , Wireless DNC, serial port 1 04-30-2006 07:02 PM
Mach 2 on old machine = great machine foamcutter Machines running Mach Software 6 12-16-2005 12:11 PM
Getting work(gcode) from machine a to machine b strat DIY-CNC Router Table Machines 9 07-07-2005 02:13 PM
Using Boss4 code in Boss9 machine pcsimp Bridgeport and Hardinge Mills 2 03-21-2005 07:56 AM




All times are GMT -5. The time now is 08: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