打开 1个任务 DjangoReinhard 打开了这个问题 2021 年 9 月 27 日 · 7条评论 打开 1个任务 解释器的错误单位处理#1279 DjangoReinhard 打开了这个问题 2021 年 9 月 27 日 · 7条评论 注释 姜戈莱因哈德 评论了 2021 年 9 月 27 日 (独立)解释器的错误单元处理 以下是我重现该问题所遵循的步骤: github master 的 rip 安装 使用此工具表: T2 P1 Z20 D2 ;2.00mm 4 schneiden fräser T3 P2 Z53 D3 ;3.00mm 2 刃立铣刀 T6 P3 Z30 D6 ;6.00mm 4 schneiden fräser T4 P5 Z40 D8 ;8,00mm 4 schneiden fräser T23 P7 Z50 D10 ;10,00mm 4 schneiden fräser T7 P8 Z50 D12 ;12,00mm 4 schneiden fräser T1 P9 Z123 D4.568 ;45 度 V 刀 这个命令行: cat gmoccapy_2_tools_with_cutter_radius_compensation.ngc | rs274 -g -v linuxcnc.var -i some.ini -t tool.tbl 我得到了这些结果: executing 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) 2 N..... SET_G5X_OFFSET(1, 8165.0024, 12700.0000, -5080.0000, 0.0000, 0.0000, 0.0000) 3 N..... SET_G92_OFFSET(3004.1677, 209.2678, 78.7400, 0.0000, 0.0000, 0.0000) 4 N..... SET_XY_ROTATION(0.0000) 5 N..... SET_FEED_REFERENCE(CANON_XYZ) READ => ; Gmoccapy_2_tools_with_compensation.ngc READ => ; testprogram to mill two circles with cutter radius compensation READ => ; and two different tools READ => READ => ; set the basic settings, this should be READ => ; on every program the beginning READ => G17 6 N..... SELECT_PLANE(CANON_PLANE_XY) READ => G21 7 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) READ => G54 8 N..... COMMENT("interpreter: continuing to use same coordinate system") READ => G61 9 N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) READ => G40 10 N..... COMMENT("interpreter: cutter radius compensation off") READ => G49 11 N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) READ => G80 12 N..... COMMENT("interpreter: motion mode set to none") READ => G90 READ => READ => ; get the first tool READ => T3 M6 13 N..... SELECT_TOOL(3) 14 N..... START_CHANGE() 15 N..... STOP_SPINDLE_TURNING(0) 16 N..... COMMENT("AXIS,hide") 17 N..... STRAIGHT_TRAVERSE(-11169.1702, -12909.2678, 5001.2600, 0.0000, 0.0000, 0.0000) 18 N..... COMMENT("AXIS,show") 19 N..... CHANGE_TOOL(2) READ => G43 20 N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 1346.2000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) READ => T1 21 N..... SELECT_TOOL(1) READ => READ => ; go to center of the workpiece READ => G0 X50 Y50 22 N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 3655.0600, 0.0000, 0.0000, 0.0000) READ => G0 Z30 23 N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 30.0000, 0.0000, 0.0000, 0.0000) READ => READ => ; turn on spindle clockwise READ => S3000 24 N..... SET_SPINDLE_SPEED(0, 3000.0000) READ => M3 25 N..... START_SPINDLE_CLOCKWISE(0) READ => READ => ; coolant on READ => M8 26 N..... FLOOD_ON() READ => READ => G0 Z10 27 N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 10.0000, 0.0000, 0.0000, 0.0000) READ => F250 28 N..... SET_FEED_RATE(250.0000) READ => G1 Z0 29 N..... STRAIGHT_FEED(50.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) READ => READ => ; tool radius compensation READ => ; go in circle with lower feed rate READ => G41 30 N..... COMMENT("interpreter: cutter radius compensation on left") READ => G3 X70 Y50 Z-1 I10 J0 Radius of cutter compensation entry arc is not greater than the tool radius G3 X70 Y50 Z-1 I10 J0 READ => READ => ; make first circle with normal feed READ => F2000 31 N..... SET_FEED_RATE(2000.0000) READ => G3 I -20 Radius of cutter compensation entry arc is not greater than the tool radius G3 I -20 READ => READ => ; out of the workpiece READ => G3 X50 Y50 Z1 I-10 J0 Radius of cutter compensation entry arc is not greater than the tool radius G3 X50 Y50 Z1 I-10 J0 READ => G0 Z30 Length of cutter compensation entry move is not greater than the tool radius G0 Z30 READ => READ => ; coolant off READ => M9 32 N..... MIST_OFF() 33 N..... FLOOD_OFF() READ => READ => ; turn off cutter radius compensation, otherwise no tool change is possible READ => G40 34 N..... COMMENT("interpreter: cutter radius compensation off") READ => M6 35 N..... START_CHANGE() 36 N..... STOP_SPINDLE_TURNING(0) 37 N..... COMMENT("AXIS,hide") 38 N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 3655.0600, 0.0000, 0.0000, 0.0000) 39 N..... COMMENT("AXIS,show") 40 N..... CHANGE_TOOL(7) READ => G43 41 N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 3124.2000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) READ => READ => ; optional stop for testing READ => (MSG, optional stop, i.e. for cleaning the workpiece, or other thinks) 42 N..... MESSAGE(" optional stop, i.e. for cleaning the workpiece, or other thinks") READ => M1 43 N..... OPTIONAL_PROGRAM_STOP() READ => READ => ; go again to the center of the workpiece READ => G0 X50 Y50 44 N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 1877.0600, 0.0000, 0.0000, 0.0000) READ => G0 Z10 45 N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 10.0000, 0.0000, 0.0000, 0.0000) READ => READ => ; turn on spindle clockwise READ => S6000 46 N..... SET_SPINDLE_SPEED(0, 6000.0000) READ => M3 47 N..... START_SPINDLE_CLOCKWISE(0) READ => READ => ; mist on READ => M7 48 N..... MIST_ON() READ => READ => G0 Z10 49 N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 10.0000, 0.0000, 0.0000, 0.0000) READ => F400 50 N..... SET_FEED_RATE(400.0000) READ => G1 Z1 51 N..... STRAIGHT_FEED(50.0000, 50.0000, 1.0000, 0.0000, 0.0000, 0.0000) READ => READ => ; Werkzeugradienkompensation ein READ => ; Anfahrradius mit Eintauchgeschwindigkeit READ => G41 52 N..... COMMENT("interpreter: cutter radius compensation on left") READ => G3 X65 Y50 Z-1 I7.5 J0 Radius of cutter compensation entry arc is not greater than the tool radius G3 X65 Y50 Z-1 I7.5 J0 READ => READ => ; 2. Kreis mit Vorschubgeschwindigkeit fräsen READ => F1000 53 N..... SET_FEED_RATE(1000.0000) READ => G3 I-15 Radius of cutter compensation entry arc is not greater than the tool radius G3 I-15 READ => READ => ; Aus dem Werkstück READ => G3 X50 Y50 Z1 I-7.5 J0 Radius of cutter compensation entry arc is not greater than the tool radius G3 X50 Y50 Z1 I-7.5 J0 READ => G0 Z30 Length of cutter compensation entry move is not greater than the tool radius G0 Z30 READ => READ => G0 Z30 Length of cutter compensation entry move is not greater than the tool radius G0 Z30 READ => G0 X50 Y50 Length of cutter compensation entry move is not greater than the tool radius G0 X50 Y50 READ => READ => M9 ; coolant off 54 N..... MIST_OFF() 55 N..... FLOOD_OFF() READ => M5 ; spindle off 56 N..... STOP_SPINDLE_TURNING(0) READ => M2 ; program end 57 N..... SET_G5X_OFFSET(1, 8165.0024, 12700.0000, -5080.0000, 0.0000, 0.0000, 0.0000) 58 N..... SET_XY_ROTATION(0.0000) 59 N..... SET_FEED_MODE(0, 0) 60 N..... SET_FEED_RATE(0.0000) 61 N..... STOP_SPINDLE_TURNING(0) 62 N..... SET_SPINDLE_MODE(0 0.0000) 63 N..... PROGRAM_END() READ => 64 N..... ON_RESET() 这是我期望发生的事情: 在使用工具#3处理 G43 时,我预计工具长度为 53 毫米,但解释器计算出 1346.2 毫米 – 这是来自工具表的长度值,被视为英制单位并将其转换为毫米。所有圆弧/圆都因刀具半径大而出错 后端初始化使用 mm 设置,并且已明确使用 G21 – 所以我看不出为什么 mm 机器的工具表条目应被视为英制值。 有关我的硬件和软件的信息: 我正在使用 debian stable (bullseye) 我正在使用这个内核版本 5.10.0-8-amd64 我在跑步 … rip安装来自linuxcnc github master自编译 合作者 安迪普 评论了 2021 年 9 月 28 日 我相信工具表被假定为配置的基本单位。 您使用的是公制配置吗? 作者 姜戈莱因哈德 评论了 2021 年 9 月 28 日 来自 ini 文件: [TRAJ] LINEAR_UNITS = mm ANGULAR_UNITS = degree 合作者 安迪普 评论了 2021 年 9 月 28 日 有那个理论。 我运行公制机器,并没有看到这个问题。 如果您使用 Axis 接口,这也是一个问题吗?我似乎记得 Gmoccapy 比其他 GUI 做了更多的内部工具处理。 合作者 再生开发 评论了 2021 年 9 月 28 日 他没有使用任何 UI,直接运行 rs274。这看起来像一个错误。工具表应始终以机器单位解释。 合作者 安迪普 评论了 2021 年 9 月 29 日 在那种情况下,我怀疑 sai 实际上并没有在 .ini 中寻找单位。我没有在 saicannon.cc 中看到任何搜索 TRAJ 的证据,我确实看到了一个硬编码函数: https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/sai/saicanon。抄送#L720 作者 姜戈莱因哈德 评论了 2021 年 9 月 29 日 安迪你是对的! 硬编码功能是邪恶的。 我试图用“_sai._length_unit_factor”更改硬编码数字,它似乎有效。 合作者 安迪普 评论了 2021 年 9 月 29 日 安迪你是对的!硬编码功能是邪恶的。我试图用“_sai._length_unit_factor”更改硬编码数字,它似乎有效。 但我怀疑变量反映了 G20 / G21 状态,而不是机器基础单位。 在检查是否指定了 INI 之后,该函数可能应该查看 INI。 免费注册 在 GitHub 上加入此对话。已有帐户? 登录评论 受让人 无人分配 标签 还没有 项目 还没有 里程碑 没有里程碑 发展 没有分支机构或拉取请求 3人参加
(独立)解释器的错误单元处理
以下是我重现该问题所遵循的步骤:
这是我期望发生的事情:
在使用工具#3处理 G43 时,我预计工具长度为 53 毫米,但解释器计算出 1346.2 毫米 – 这是来自工具表的长度值,被视为英制单位并将其转换为毫米。所有圆弧/圆都因刀具半径大而出错
后端初始化使用 mm 设置,并且已明确使用 G21 – 所以我看不出为什么 mm 机器的工具表条目应被视为英制值。
有关我的硬件和软件的信息: