Dynamic work Offset in 5-Axis XYZAC
- Aciera
- Offline
- Administrator
- Posts: 4001
- Thank you received: 1729
This is not clear to me. The DWO is calculated when you call G55.4 and added to your current Work Offset (eg G54). The Rotation Point is set to define the position of your table rotary assembly respective to your machine absolute zero. In this sense the Rotation Point does not change at all unless you change the rot-point values in the ini.Now I am facing another problem, the DWO offsets are mentioned in INI file but it seems that linuxcnc is not able to configure the offset and move the 5-Axis to it's new Rotation Point accordingly.
It is still using the Old Rotation Point.
Note that the vismach simulation does not use the Rotation Point values at all, it is hard coded to have the Machine Absolute zero in the center of the rotary table.
Please Log in or Create an account to join the conversation.
- akg1904
- Offline
- Premium Member
- Posts: 100
- Thank you received: 3
Thanks for the Reply.
I tried to understand how DWO works in linuxCNC but there are many thing which I don't understand.
From my understanding DWO can be used to mill a part when it is not placed center on the machine bed or can be used if one wants to load more than one part on a bed.
So I have integrated Plopez9000 dwo_on.ngc and dwo_off.ngc. I optimized the ini and hal file so that offset and rot-points can be specified in the INI itself under [XYZAC_KINS].
I launched LinuxCNC, moved X, Y, Z and rotated C axis individually while toggling between G55.4 and G55.5 in the MDI and noticed no change in the DRO. Only when I rotate A-axis and gave G55.4 there was a change in Y and Z axis accordingly.
The following is a section in the dwo_on.ngc file that I didn't understand:
(CURRENT WORKOFFSET X,Y,Z SETTING)
#<x-pos> = #[5221+[#5220-1]*30]
#<y-pos> = #[5222+[#5220-1]*30]
#<z-pos> = #[5223+[#5220-1]*30]
Am I supposed to calibrate or configure something here? What is 5221, 5222, 5223 and 5220 and what is the mathematical operation about?
How does the fixture position get updated to some other point on bed?
Also is there a test to check if everything is working fine?
I cant seem to understand how DWO works.....
Regards
Abhishek
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 4001
- Thank you received: 1729
(CURRENT WORKOFFSET X,Y,Z SETTING)
#<x-pos> = #[5221+[#5220-1]*30]
#<y-pos> = #[5222+[#5220-1]*30]
#<z-pos> = #[5223+[#5220-1]*30]
Am I supposed to calibrate or configure something here? What is 5221, 5222, 5223 and 5220 and what is the mathematical operation about?
Those are numbered parameters as explained here:
linuxcnc.org/docs/html/gcode/overview.ht...:numbered-parameters
So the code is supposed to read the x,y,z-values of the current work offset (eg G54, G55 ...).
However I think that there may be a bug in those three lines as the parameter values are 20 apart and not 30 as the code uses.
Parameter #5220 shows the currently active coordinate system.
The (x,y,z) values for G54 are stored in parameters (#5221, #5222, #5223)
those for for G55 are stored in parameters (#5241, #5242, #5243)
those for for G56 are stored in parameters (#5261, #5262, #5263)
So in my opinion the code should be:
(CURRENT WORKOFFSET X,Y,Z SETTING)
#<x-pos> = #[5221+[#5220-1]*20]
#<y-pos> = #[5222+[#5220-1]*20]
#<z-pos> = #[5223+[#5220-1]*20]
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 4001
- Thank you received: 1729
Not sure as I have not had time to actually play around with it yet, maybe I'll get a chance to look at it tomorrow.I launched LinuxCNC, moved X, Y, Z and rotated C axis individually while toggling between G55.4 and G55.5 in the MDI and noticed no change in the DRO. Only when I rotate A-axis and gave G55.4 there was a change in Y and Z axis accordingly.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 4001
- Thank you received: 1729
Also the bug in dwo_on.ngc is confirmed so you might want to modifiy to this:
o<dwo_on> sub
(CANCEL G52 OFFSET)
G52 X0 Y0 Z0
(X,Y,Z ROTARY CENTER)
#<x-rot-point>=[#<_ini[XYZAC_KINS]X-ROT-POINT>]
#<y-rot-point>=[#<_ini[XYZAC_KINS]Y-ROT-POINT>]
#<z-rot-point>=[#<_ini[XYZAC_KINS]Z-ROT-POINT>]
#<dy>=[#<_ini[XYZAC_KINS]Y-OFFSET>]
#<dz>=[#<_ini[XYZAC_KINS]Z-OFFSET>]
(CURRENT WORKOFFSET X,Y,Z SETTING)
#<x-pos> = #[5221+[#5220-1]*20]
#<y-pos> = #[5222+[#5220-1]*20]
#<z-pos> = #[5223+[#5220-1]*20]
(CURRENT WORKOFFSET ANGLES TO CALCULATE)
#<a_deg> = #<_a>
#<c_deg> = #<_c>
(NEW X POS)
#<new-x-pos>=[ + COS[#<c_deg>] * [#<x-pos> - #<x-rot-point>]]
#<new-x-pos>=[#<new-x-pos> - SIN[#<c_deg>] * [#<y-pos> - #<y-rot-point>]]
#<new-x-pos>=[#<new-x-pos> + #<x-rot-point>]
(NEW Y POS)
#<new-y-pos>=[ + SIN[#<c_deg>] * COS[#<a_deg>] * [#<x-pos> - #<x-rot-point>]]
#<new-y-pos>=[#<new-y-pos> + COS[#<c_deg>] * COS[#<a_deg>] * [#<y-pos> - #<y-rot-point>]]
#<new-y-pos>=[#<new-y-pos> - SIN[#<a_deg>] * [#<z-pos> - #<z-rot-point>]]
#<new-y-pos>=[#<new-y-pos> - COS[#<a_deg>] * #<dy>]
#<new-y-pos>=[#<new-y-pos> + SIN[#<a_deg>] * #<dz>]
#<new-y-pos>=[#<new-y-pos> + #<dy>]
#<new-y-pos>=[#<new-y-pos> + #<y-rot-point>]
(NEW Z POS)
#<new-z-pos>=[ + SIN[#<c_deg>] * SIN[#<a_deg>] * [#<x-pos> - #<x-rot-point>]]
#<new-z-pos>=[#<new-z-pos> + COS[#<c_deg>] * SIN[#<a_deg>] * [#<y-pos> - #<y-rot-point>]]
#<new-z-pos>=[#<new-z-pos> + COS[#<a_deg>] * [#<z-pos> - #<z-rot-point>]]
#<new-z-pos>=[#<new-z-pos> - SIN[#<a_deg>] * #<dy>]
#<new-z-pos>=[#<new-z-pos> - COS[#<a_deg>] * #<dz>]
#<new-z-pos>=[#<new-z-pos> + #<dz>]
#<new-z-pos>=[#<new-z-pos> + #<z-rot-point>]
(SET DIFF AS G52)
G52 X[#<new-x-pos>-#<x-pos>] Y[#<new-y-pos>-#<y-pos>] Z[#<new-z-pos>-#<z-pos>]
o<dwo_on> endsub
Please Log in or Create an account to join the conversation.