Solidcam to EMC2 post processor

More
11 Apr 2014 04:06 #45819 by jtc
Replied by jtc on topic Solidcam to EMC2 post processor
I'm testing this post processor on SolidWorks2014. I can use in milling operations, and linuxcnc accept the code (simulation only for now). But for the turning version, I can't find the machine FANUC0T, so I'm wondering if I need the FANUC0T.VMID file to be able to select the machine.

João

Please Log in or Create an account to join the conversation.

More
02 Sep 2014 08:24 - 02 Sep 2014 08:26 #50615 by library
I found the post processor by Robo Dan and other forum members to be very useful for starting out. Along the way as I've added parts to my G0704 mill I have modified it to support these things:
  • Auto Z touch off plate code from OrangeCat (calls M600 at beginning of file and intercepts M6 T# calls to measure each tool)
  • G33.1 rigid tapping support (must have mill setup to do rigid tapping).
  • Clearer naming. Instead of Fanuc5a the controller is called LinuxCNC.
  • Prints out a list of all the tools used in the job at the top of the gcode output including their descriptive names.
  • Uses LinuxCNC DEBUG command to print out the tool needed at each tool change.
  • Outputs gcode files with .ngc extension instead of .tap
  • General cleanup of the commented out code
  • Increased precision for all coordinates. Helps with TPI during tapping
  • Tool Length offset (Gcode 43) is commented out on lines 372 for the version without auto touch off. If you change tools or use the TLO table in linuxcnc you'll probably want to uncomment it

CAVEATS

I have not tested everything possible. Specifically I have not done any 4th axis stuff or any tool compensation. The way I use Solidcam is to select all the operations in a setup and generate a single gcode file for these. As long as it simulates right in Solidcam, linuxcnc will work the exact same way. I have tested nothing with changing planes or multiple setups in one file (ie MAC 1, MAC 2 in same file). I create a new file for each machining position since I need to take the part out of the vise, change it around and re-zero anyway.

If you use the auto z touch off version make sure you clear the TLO before *each* job (ie hitting start). I have a button to clear the TLO using pyvcp and an led that shows me if the TLO is currently set.

I have also not touched nor added the lathe controller. I will be looking at that in the next 6 months as I get my lathe converted to a simple 2 axis lathe.

INSTALLATION

Unzip the zip file and copy all 4 of the files to your Gpptool directory. Use windows search if you don't know where the Solidcam Gpptool directory is. Decide whether you want to run the auto z touch off version or not and then rename the version you want to use to LINUXCNC.GPP. Afterwards fire up SolidCam and LinuxCNC will appear in your list of controllers.

Unless you have an auto z touch off plate and have remapped M600 and M6 in linuxcnc you really don't want to run the auto touch off version.

BUGS

I know of only one strange situation with the auto touch off version. If you abort in the middle of the job and then want to restart on a certain line the Auto Z touch off measuring doesn't work properly. The proper procedure is to clear the current tool length offset, use the MDI to issue M600, Start the program again (I usually start right at a tool change). Practice, or watch the Z height closely or you will bury a tool in the work piece.

YMMV, not responsible if you destroy your machine or it kills your dog.

File Attachment:

File Name: LinuxCNC-S...ssor.zip
File Size:11 KB
Attachments:
Last edit: 02 Sep 2014 08:26 by library. Reason: added disclaimer
The following user(s) said Thank You: spangledboy, rokag3, waiduci, therv, kdws

Please Log in or Create an account to join the conversation.

More
02 Sep 2014 16:23 #50621 by cncbasher
thanks for your post , i'll take a look

Please Log in or Create an account to join the conversation.

More
17 Nov 2014 20:31 #53168 by pippin88
I'm having a problem with Solidcam 2014 gcode generation for my lathe.

I use a friend's seat and have cobbled together my own post processor for a LinuxCNC lathe (I don't have access to a reseller post because I'm just using his seat).

I'm making a poly-v belt pulley.

Solidworks 2014
Solidcam 2014

When I try to run the code to profile the pulley grooves, I get an error in LinuxCNC: "Current point same as end point of arc"
It points to this code:
G1 X75.
G3 X74.2062 Z-3.4819 R0.6032
G1 X71.964 Z-3.89
   X73.84 Z-4.231
G3 X73.84 Z-5.8887 R0.88185 [B](this line errors)[/B]
G1 X71.964 Z-6.23
   X73.84 Z-6.571
G3 X73.84 Z-8.2287 R0.88185[B] (this line errors)[/B]
G1 X71.964 Z-8.57
   X73.84 Z-8.911
G3 X73.84 Z-10.5687 R0.88185 [B](this line errors)[/B]
G1 X71.964 Z-10.91
   X74.206 Z-11.318
G3 X75. Z-11.8849 R0.6032
G1 X75.486
G0 X87.
   Z3.
M30
%


GWizard editor gives the following:
Line 593: G3 X73.84 Z-5.8887 R0.88185 
G3: Counter-clockwise circular interpolation (move in a circular arc at feed speed)
Relative IJK resolves to absolute IJK = I73.84 J0 K-4.231
 (R)adius = 0.88185
Helical interpolation along Z-axis. Helix depth = -1.6
 Arc endpoint: 73.8400, 0.0000, -5.8887
 Arc center coordinates: 73.8400, 1.7637, -4.2310, radius = 2.4205 (determined by R)
 Arc angles: 270.0 to 270.0(.0 degrees total)
 Helix pitch in program units = .0
Time: 40:50.5
Adj Time: 40:52.9
V End: 50
[B]ERROR: Current location is the same as the end location for this arc.  [/B]

I've worked out I can avoid the error if I don't do a finish operation - I rough and then do a semi-finish (iso turning), leaving only 0.01mm, and the code runs fine.
I've tried finish with stair turning and iso turning - both produce this error.

Attached are:
Image of faulty toolpath (in GWizardE)
Image of working file with 0.01 offset semi-finish toolpath (in GWizardE)
Image of toolpath in Solidcam
.gpp file
.prp file
Full gcode problem file
Full gcode working file with 0.01 offset semi-finish

Help is much appreciated
I spent all day today trying to find a solution to this! I've googled and looked at other posts, and the post (.gpp) manual, but I can't claim to understand a lot of it.
Attachments:

Please Log in or Create an account to join the conversation.

More
07 Mar 2015 11:39 #56529 by rokag3




This is a video which is a key to work on the postprocessor it also explain the preprocessor function.

so preprocessor define the hardware of your machine

the gpp.file is the post processor.
you have a very important instruction which is trace that must be put in init procedure

@init_post ; @ mark the start of a procedure (; is the delimiter for comment so not executed
trace "all" : 5 ; trace "name of the procedure or all for all the procedure"
endp ; mark the end of the procedure

trace "all" 5 will give you all the variable with their value and the procedure used
if you have a small level of coding it should be enough for you to modify your file
unfortunately there is only one lesson available
hope you will look this video with the same interest than me

Please Log in or Create an account to join the conversation.

More
07 Mar 2015 20:12 #56534 by jtc
Replied by jtc on topic Solidcam to EMC2 post processor
some months ago for a while a try to find information how to change the post processor of solidcam, the nearest thing to this video was this pdf:

pt.scribd.com/doc/198250222/SolidCAM-Gpptool-User-Guide#scribd

I think that is for a old version of solidcam, but the concepts are present.

In that time made a small changes on post processor for lathe that someone posted in the forum, but is wasn't perfect, had some errors when use compensation, but, correcting manually the code, I had make a few parts with help of solidcam. for the volume of parts that I make I didn´t feel the need of correct all the issues...


I will install this last post processor and test it.

João

Please Log in or Create an account to join the conversation.

More
10 Mar 2015 09:24 #56607 by library
Pippin88 - Do you have the vmid file as well for your Solidcam post. I'm working on my linuxcnc lathe and Solidcam is driving me nuts.

In LinuxCNC the lathe is setup so Y+ is pointing at the floor. X+ is towards the operator (and the tool because we're mostly using converted manual lathes). The problem is Solidcam seems to have no way to represent this in the vmid machine setup file. It always assumes Y+ is at the ceiling and your tool is on the backside of the lathe. So your simulation is wrong. If you're turning a .50 piece of metal to .45 It will go to X+ .50 which is actually on the opposite side you're expecting it.

I've worked around this by checking the box in each turning operation called "Negative X Output". This makes the simulation show up properly but the actual gcode is then reversed. So in the post I set xpos_f = 5.4(*-1) to multiply everything by -1 and flip it again. Now the simulation matches the gcode (except the simulation shows negative instead of positive in the Simulation Data screen).

I've played with the VMID file and setup different Vectors on the axes but I'm just not getting it. I'm wondering if you (or anyone else) has solved this problem.

It might also be the reason your arcs are not working. The coordinate system might be flipped. The linuxcnc lathe path describes the plane (XZ, G18) you should be in as well as arcs being reversed. Your post didn't set the G18 and instead relied on the Solidcam output to select it. Mine (maybe due to the vmid not being correct) always picks G17.

Linux CNC Lathe Arc Documentation

Please Log in or Create an account to join the conversation.

More
10 Mar 2015 13:41 #56608 by rokag3
I am not sure but maybe you do not have the good axis order like xyz in state of zyx this can be change in the machine id editor (may be i say a big stupidities sorry in advance)

Please Log in or Create an account to join the conversation.

More
10 Mar 2015 16:18 - 10 Mar 2015 16:21 #56610 by pippin88
I haven't used the lathe in a little while, but from memory I just work in solidcam reversed - that is the tool paths are selected and simulated as if it were a back tool lathe, with upside down tools.

I got the post working ok for the job I needed, but I can't really remember how... I coded diameter mode in the post I think, and made some changes around that.

File Attachment:

File Name: LinuxCNCSo...athe.zip
File Size:8 KB
Attachments:
Last edit: 10 Mar 2015 16:21 by pippin88.

Please Log in or Create an account to join the conversation.

More
10 Mar 2015 23:29 #56640 by library

I haven't used the lathe in a little while, but from memory I just work in solidcam reversed - that is the tool paths are selected and simulated as if it were a back tool lathe, with upside down tools.


Yeah, I'm thinking that's the best option at this point. If I work in this mode then rotate the display so it looks like it should (Tool on the operator side) it feels normal and then I don't have to remember to check the Negative X Output setting.

Thanks for the vmid, I'll play with it a little more before I give up. Your website has also been very helpful for linuxcnc and lathes, thanks.

Please Log in or Create an account to join the conversation.

Moderators: Skullworks
Time to create page: 0.100 seconds
Powered by Kunena Forum