Work coordinate system or post processor modification
Hi,
I'm trying to output some test code from SolidworksCAM for woodworking cnc machine Morbidelli Author with Xilog controller. Post processor can be found in CamWorks library, so I used it.
Thees woodwork CNC machines have coordinate systems placed "upside down" (rotated around X) that means origin is placed on far left corner and on the top face of workpiece and Z-axis is pointing downwards (like marked on picture):
How should I place coordinate system in SolidworksCAM? I was unable to place it in the same was as it is on machine, as it does not allow me to point Z direction downwards. Also I'm not sure if that would be the right solution, as in output g-code Z values are correct so I guess this "invert" is done by post processor. What is not correct in g-code are Y coordinates which also should be inverted in same way as Z is, if I place work coordinate system in SolidworksCAM like this:
Is there anyone with similar machine? OR someone who is capable of making this modification in post processor so Y coordinates would also be "inverted". Post processor I use is HERE.
Re: Work coordinate system or post processor modification
CAMWorks will not allow you to create a matching coordinate system to what your machine uses. The CAMWorks coordinate system is actually more of a reference for you, the user, than it is for the machine. You need to have the post modified to output the proper values according to your machine configuration. I would start by asking your VAR if they know why the post that you have isn't working correctly. They will then be able to offer you options to get something that DOES work. I am fairly well versed in writing posts, but I am not very familiar with transformations like what you're dealing with, so I can't help you very much.
Re: Work coordinate system or post processor modification
I managed to modify post so that coordinates for linear moves are correct, and it looks like this (it was already a part of the code in LIB):
:SECTION=CALC_FLIP_ENDPOINT(DVAL,DEFAULTVAL,GC,GG, G_GROUP,MACH,PREV,REGISTER)
*
* Movement Register Calculations
*
:C: IF ATTROVERRIDE=YES THEN DVAL=ATTRDVALUE ELSE DVAL=DEFAULTVAL ENDIF
:C: PREV(REGISTER)=MACH(REGISTER)
*
:C: IF G_GROUP(GG(G_INC))<>GC(G_INC) THEN
:C: IF FORCE_XY=1 THEN
:C: IF REGISTER=24 OR REGISTER=25 THEN SETON() ENDIF
:C: ENDIF
:C: MACH(REGISTER)=(DVAL)
:C: DVAL=(-DVAL)
:C: RETURN
:C: ENDIF
Now I need modification for "flipping" J coordinate (register=10), currently this sections is like this:
:SECTION=CALC_CENTER(DVAL,DEFAULTVAL,GC,GG,G_GROUP ,MACH,PREV,P_REG,REGISTER,AIC)
*
* Center Calculations
*
* AIC = 0 - Absolute Center
* AIC = 1 - Incremental distance from Start to Center
* AIC = 2 - Absolute or Incremental distance from Start to Center
* AIC = 3 - Incremental distance from Center to Start
*
:C: IF ATTROVERRIDE=YES THEN DVAL=ATTRDVALUE ENDIF
:C: IF ATTROVERRIDE=NO AND AIC=0 THEN DVAL=DEFAULTVAL ENDIF
:C: IF ATTROVERRIDE=NO AND AIC=1 THEN DVAL=(DEFAULTVAL-PREV(P_REG)) ENDIF
:C: IF ATTROVERRIDE=NO AND AIC=2 AND G_GROUP(GG(G_ABS))=GC(G_ABS)
:C: THEN DVAL=(DEFAULTVAL)
:C: ENDIF
:C: IF ATTROVERRIDE=NO AND AIC=2 AND G_GROUP(GG(G_INC))=GC(G_INC)
:C: THEN DVAL=(DEFAULTVAL-PREV(P_REG))
:C: ENDIF
:C: IF ATTROVERRIDE=NO AND AIC=3 THEN DVAL=(PREV(P_REG)-DEFAULTVAL) ENDIF
Re: Work coordinate system or post processor modification
I flip my center for my right angle head
Here's my how I do it
:SECTION=CALC_CENTER(DVAL,DEFAULTVAL,GC,GG,G_GROUP ,MACH,PREV,P_REG,REGISTER,AIC)
:C: IF ATTROVERRIDE=YES THEN DVAL=ATTRDVALUE ENDIF
:C: IF ATTROVERRIDE=NO THEN DVAL=(DEFAULTVAL-PREV(P_REG)) ENDIF
:C: IF REGISTER=10 OR REGISTER=11 THEN RETURN ENDIF
:C: IF REGISTER=9 THEN
:C: IF working_plane<3 OR working_plane=5 THEN RETURN ENDIF
:C: ENDIF
* FLIP SECTION
:C: DVAL=(PREV(P_REG)-DEFAULTVAL)