hello guys & girls i try to minimize operators setup time & keystrokes as much as possible, and when it comes to radius compensation, i mostly use 2 methods :
1) virtual trajectory : no G41/G42, toolpath being computed directly on the center of the radius
it requires less keystrokes near the panel, since there are no declarations for the radius, nor for the P-quadrant
also the toolpath is smoother, there are no comp lead-in & lead-out movements, and also transitions between segments that are not tangent are greatly reduced, or eliminated whenever possible ( less joint points, less segments = less decc/acc sessions = code performs faster )
2) normal comp code, with G41/G42, but with less keystrokes near the panel : in this way, the operator should only measure X&Zoffset, and forget about setting the radius or the P-quadrant, that are being set from code instead
in this code, i run a pre-finish cut + a finish cut, among same toolpath, only by changing the radius :
if you wish to declare for tool=5 a radius=0.8 in comp quad P3, simply use CALL OCOMP LV01 = 5 LV02 = 3 LV03 = 0.8 ( tool P radius )Code:CALL OCOMP LV01 = offset LV02 = 2 LV03 = 0.2 ( inputs radius=LV03 into offset=LV01 for quadrant=LV02 ) toolpath ( prefinish cut : toolpath is being cut with a radius <> tool_radius ) CALL OCOMP LV01 = offset LV02 = 2 LV03 = 0.4 toolpath ( finish cut : toolpath is being cut with a radius = tool_radius )
soubroutine ocomp is listed below
it works as long as the P value from the offsets table is zero; if someone changes the P value inside the offsets table, and that value is <> value from code, then a conflict will appear; to prevent this potential conflict, is required to have a system variable for the P ( that does not exist @ this moment )
kindly
Code:OCOMP ( compensation quadrant : LV01 = offset LV02 = P LV03 = radius ) ( requires P0 inside offset table ) IF [ LV03 GE 0 ] NJUMP NLOOP M0 ( duuh ) GOTO NLOOP NJUMP NOEX IF [ LV02 NE 1 ] N1 NOEX LVXS = - 1 LVZS = - 1 ( p1 -- ) GOTO NEND N1 IF [ LV02 NE 2 ] N2 NOEX LVXS = - 1 LVZS = + 1 ( p2 -+ ) GOTO NEND N2 IF [ LV02 NE 3 ] N3 NOEX LVXS = + 1 LVZS = + 1 ( p3 ++ ) GOTO NEND N3 IF [ LV02 NE 4 ] N4 NOEX LVXS = + 1 LVZS = - 1 ( p4 +- ) GOTO NEND N4 IF [ LV02 NE 5 ] N5 NOEX LVXS = 0 LVZS = - 1 ( p5 0- ) GOTO NEND N5 IF [ LV02 NE 6 ] N6 NOEX LVXS = - 1 LVZS = 0 ( p6 -0 ) GOTO NEND N6 IF [ LV02 NE 7 ] N7 NOEX LVXS = 0 LVZS = + 1 ( p7 0+ ) GOTO NEND N7 IF [ LV02 NE 8 ] N8 NOEX LVXS = + 1 LVZS = 0 ( p8 +0 ) GOTO NEND N8 IF [ LV02 NE 9 ] N9 NOEX LVXS = 0 LVZS = 0 ( p9 00 ) GOTO NEND N9 M0 ( undefined P quadrant ) GOTO N9 NEND NOEX VNSRX [ LV01 ] = LV03 * LVXS NOEX VNSRZ [ LV01 ] = LV03 * LVZS RTS ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
Similar Threads:
- Problem- 21i - Finish bore does not cut oversized rough pass, comp or no comp
- Need Help!- 18T and coding
- Newbie- IGF tool Quadrants for Okuma lathe
- Need Help!- Need help with coding
- G2/G3 Coding
we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...