PDA

View Full Version : Fanuc blueprint in solidcam and repeating code



pinguS
11-24-2009, 05:16 PM
A few questions.

1. Can solidworks output G-Code in the fanuc style blueprint programming..

i.e. in a simple program style

Normal program output by solidcam would be:
G1 Z0. F0.1
X9.
G3 X10.Z-1.R1.
G1 Z-10.

Fanuc 'blueprint' (i think this is what it is called) would be:
G1 Z0. F0.1
X10. R1.
Z-10.

Is this something can be changed in the .gpp file processor?


2. In the post processor file can somebody direct me to where I should edit so that when ever I can have lets say "M98 P1" at the beginning of a tool call and then at the end. This is just a sub program to home the machine after tool usage.

i.e.
N101 M13 S1000 (First tool call)
M98 P1 (home before tool change)
...
...
...
M98 P1 (home after tool used)
M01

N202 M13 S1500 (Second tool call)
M98 P1 (home before tool change)
...
...
...
M98 P1 (home after tool used)
M01

Brakeman Bob
11-25-2009, 03:09 AM
You can configure the GPP file to output code in what ever format you want. However I am confused by what you want in point (1). The code in red indicates a circular move and the code in blue indicates a linear move. What is it you are after?

Point (2) can be achieved in a variety of ways. First one to try is add a line to @change_tool thus

{nl, 'M98 P1 (home after tool used)'}

This will output the text between single quotes on a new line. the tricky bit is finding where to put it in @change_tool (indeed, if it goes there). Look for a line

{nl, 'M01'}

as a clue.

pinguS
11-25-2009, 04:03 PM
Thanks for the info, i will try an get back to you this, regarding point 1.

The code is from CNC turning
The blue line in linear actually does the same as the one in red but if you are writing straight onto the CNC, the machine will calulate the radius start point and end point itself i.e.

G1 Z0. F0.1
X10. R1. will automatically work out the G3 start and end points and carry on with the next line
Z-10.

I'm guessing this is unique to Fanuc, and unlikely to be part of any Cam system

Brakeman Bob
11-26-2009, 03:17 AM
No, it's not unique to Fanuc but it is more often found on contols aimed at "programming at the machine". The CAM will do what you want but will need some delicate work in the GPP file and some decisions from you regarding the rules under which this code is generated. For example, the code you gave is for a little corner radii where the two lines are tangential; what about if you want an internal radii where one of the lines is not tangential to the arc. How would you program that at the machine?

pinguS
11-26-2009, 04:28 AM
On the machine we can do one of the following, assuming all starting at X0. Z0. and angle 0 Deg is away from spindle(these are examples of external, but similar fashion for internal)

Radius:
G1 X5. Z-2.38 R0.8 (radius calculated at end of this non tangent line)
Z-5.5

Radius with angle:
G1 X5. A110. R0.8 (this calculates the end point of the angle with the radius)

Travel at angle then radius, automaticall find next end point(also with angle):
G1 A110. R0.8 (travels from X0Z0 at angle 110deg and radius at end)
X27.24 Z-16.35 A170. (this automatically stops previous line to achieve this angle to finish point)

In the last example, the Cam system would normally output something like:
G01 X22.08 Z-4.02 (no angle definition)
G03 X23.11 Z-4.63 R0.8 (radius on seperate line)
G01 X27.24 Z-16.35 (no angle definition)
So when doing it manually, the CNC version is probably easier to read, adjust and saves calculations

Do these make sense??

Also to tweak the GPP, where exactly in the GPP file would this sort of thing be implemented.

Another question is, when you do canned cycles, the GPP automatically uses G71 in the output, but if I wanted to change these where would you do this, is it in the GPP files or in solidcam itself?
Reason why I ask is not only curiosity, but also I would only like to output Block numbers only when canned cycles are used, not at every line.

thanks in advance

Brakeman Bob
11-26-2009, 03:11 PM
Right, there is a lot to go at there and it all would benefit from a better understanding of the post processor files. I would strongly suggest that you download from the SolidCAM website the PDF file of the GGP tool manual. This will explain the role of the MAC file (which defines the machine) and the GPP file (which creates code from the raw output of the CAM). Somewhere near the top of the GPP file there should be a line thus

; trace all

If you uncomment this line and post a program you will see all the output from the CAM and by studying this output you will see things that you find useful in creating the code you need. In the case of your radius question look at the output following @arc and there will get the arc start position, the end position, the radius, the co-ordinates the arc centre and the direction. Changing the output lines in the GPP file (they have curly braces) you can get what you need.
Some of these curly braces have either "nl" or "nb" at the start and this prompts either a new line without block number (nl) or with block number (nb). Then you must change a setting in the MAC to outbut block numbers but if you are already getting block numbers this is already set.

As regards canned cycles, you first have to define the drill cycles in the MAC and then add the code in the GPP that is executed when that cycle is called. In turning (not my strong point) you may also need to turn "procedures" (or "procs" in GPP speak) on and then the routines get complicated.

Get the manual, study it and have a go. There are good examples in the manual but they are mainly milling but saying that, code is code and it is the priciples that count.

Good luck.

pinguS
11-26-2009, 03:46 PM
Thanks for the information,

I have been playing around with it for a while, with ability to change G code style ext. I will read up more on the Arcs etc.

However one thing, even by going through the manual I cant see is how do you enable the G70 style programming.

For example in solidcam I have generated a rouging Long tool
Then generated the finish operation to profile the rouginh defined path.

But the code still outputs the finish cycle in code, not with a simple call to the canned cycle used in roughing, generally I would expect just G70 P10 Q90 or something similar, not a rewrite of code????

Brakeman Bob
11-26-2009, 05:37 PM
What you are asking about is the use of "Procedures". When you have set them up SolidCAM will generate a loop of code. Now the default method of output for loops is in sub-programs which will be called from the main program. If you want to output a loop and refer to it by block numbers it gets complicated and involved the creation of temporary files prior to stitching the program together and then deleting them. The latter bit is not in the manual but the calls fof opening a file, writing to it, copying from it and deleting said file are there under the document generation routines - you just have to be a bit imaginative :)

Good luck

pinguS
11-27-2009, 07:03 AM
Ok so I've looked at the loop code procedures

The post is already outputting G71 long roughing code, with all the rest of the line P*** Q*** U** W*** F***

But when it comes to the turning, it rewrites the code, could this be because of different tooling radius ext in roughing selection and in the finishing as they are set up as seperate operations, or do I really need to write the procedure for finishing. (maybe I could see what using the roughing tool to do the finishing, and see what gets output),

Also is there not an easier viewer for reading GPP files, instead of notepad. Something like what C++ or Turbo Cad editors were like would be better, all colourful ext.

Brakeman Bob
11-27-2009, 12:53 PM
Right, as I said turning is not my strong point so treat what I write with some indulgence if I am not exactly accurate. Please, if someone out there has more experience with the turning side of SolidCAM then make yourself known as I am far outside my comfort zone.

In a turning job there is on one of the pages a little check box called (I think) "USE CYCLES"; if this is checked then the CAM generates different source code that have the looping calls. Also in the MAC file there are a number of variables that can be set to generate looping code in different ways and they have a big impact on the code that the CAM passes to the post and guess what, they interact with each other so there is the potential for hours of endless fun.

I can't recall if turning jobs utilise CAM geometries like milling ones. When I am milling a pocket or a profile and I am using two different tools I define the geometry for tool A calling it "POCKET" and set the job description to "RGH_POCKET_T1!. Then for finishing I just select the profile "POCKET" from the drop-down box and give the job the description "FIN_POCKET_T2". Can you not do that in the turning module?

As regards the different code for roughing & finishing. Would this depend on what you doing with tool compensation? I believe most modern controls make programming at tool rad centre a thing of the past and the control handles the change in desired path when the tool tip radius is changed - I know our Hitachi Seiki HiCell does and that is i4 years old. The post can be set to output tool rad centre or true profile (where the code reflects the shape on the drawing) so it might be an idea to check this out.

I feel your pain when reading GPP files. I bought UltraEdit from IDM Software (it was about £28 in a bundle with UltraCompare) and wrote my own syntax format for the GPP files and the post output when "trace" is set. This has all the pretty colours you wish and if you get it right it, hide nested "if" statements and the click of a mouse. I just wish SolidCAM would add a SELECT CASE function to the GPP, it would make life so much simpler.

nadnar
12-13-2009, 10:02 PM
pinguS

Have you had any luck using the G70 command for finishing? I have spent numerous hours on getting this to work to no avail. The biggest problem I have run into is that the G71 command is always output with no finish allowance called out in the code ( U0. W0.) beacause Solidworks always uses longhand for the finish routine. I have never had a problem with the way it calls code out, but would like to use G70 so it will use less memory for the program.(I have an 0T-A control with limited memory). If i want to edit the code I have to set my settings in Solidcam to leave zero for finish allowance and then insert my own G70 block after, but it kind of defeats the purpose of CAM software.

Thanks

Dan

pinguS
12-14-2009, 02:50 AM
nadnar

I haven't been able to as of yet get the G70 stuff into solidcam, yes it does need rewrite of the whole blueprint fanuc stuff to work.

However to leave an allowance on U.0 and W.0 try and change the setting in rough data from ZX-ABS to ZX, can't remember where it is but its somewhere in the technology section. This should leave an allowance, but I just currently manually put in the G70 lines after an output from the post processor or just add an extra line in the post processor to output G70 *** and the end of job section.

Doronby
10-11-2014, 10:48 AM
can you please share your Ultraedit syntax formatter for GPP