autocal: 新增单位与换算页(默认锁定)及轴页报警与事件日志
- 设备设置新增“单位与换算”页:显示各轴 UNITS、读回值、脉冲/mm 换算与核对状态; 默认锁定,点击“修改”后才可编辑,应用前弹窗确认,旋转轴偏离标定值时额外警告 - 轴调试页:脉冲当量改为只读并提供入口;新增报警与事件日志(报警、使能、 回零、读取失败、单位不符等)及单位核对摘要 - 新增 motion/unit_report.py、motion/events.py 及对应测试
This commit is contained in:
@@ -51,7 +51,8 @@
|
||||
"press_set": "Calibrated: press target = zero ± contact height.",
|
||||
"press_unset": "Not calibrated: Execute holds the press axis.",
|
||||
"close": "Close",
|
||||
"chip_hint": "Open device setup — {name}"
|
||||
"chip_hint": "Open device setup — {name}",
|
||||
"tab_units": "Units"
|
||||
},
|
||||
"move": {
|
||||
"execute": "Execute",
|
||||
@@ -164,7 +165,25 @@
|
||||
"home": "Home",
|
||||
"controls": "Actions",
|
||||
"mm_derived_tip": "Millimetres are derived from the pulse equivalent: a display value, not a calibrated length.",
|
||||
"enabled_count": "{on}/{total} axes enabled"
|
||||
"enabled_count": "{on}/{total} axes enabled",
|
||||
"units_open": "Units…",
|
||||
"units_locked_tip": "Units are locked and read-only here. Use Device setup → Units and press Modify to change them.",
|
||||
"events_title": "Alarms and events",
|
||||
"events_clear": "Clear log",
|
||||
"events_empty": "No events yet. Changes in alarms, enable, homing, read failures and unit mismatches are logged here.",
|
||||
"ev_connected": "Controller connected",
|
||||
"ev_disconnected": "Controller disconnected",
|
||||
"ev_alarm_on": "Axis {axis} alarm",
|
||||
"ev_alarm_off": "Axis {axis} alarm cleared",
|
||||
"ev_enabled": "Axis {axis} enabled",
|
||||
"ev_disabled": "Axis {axis} disabled",
|
||||
"ev_read_failed": "Axis {axis} read failed: {detail}",
|
||||
"ev_read_ok": "Axis {axis} readable again",
|
||||
"ev_home_started": "Axis {axis} homing started",
|
||||
"ev_home_done": "Axis {axis} homing complete",
|
||||
"ev_home_incomplete": "Axis {axis} homing ended without reporting complete",
|
||||
"ev_units_mismatch": "Axis {axis} UNITS mismatch: configured {expected}, read {observed}",
|
||||
"ev_units_ok": "Axis {axis} UNITS agree again"
|
||||
},
|
||||
"busdata": {
|
||||
"title": "Bus data exchange",
|
||||
@@ -911,5 +930,49 @@
|
||||
"close": "Close",
|
||||
"max_required": "Required; the program does not assume a value"
|
||||
}
|
||||
},
|
||||
"units": {
|
||||
"hint": "One place to check each direction's drive, its pulse equivalent (UNITS) and the resulting scale. Locked and read-only by default; press Modify to change a value, and the change is listed for confirmation before anything is written.",
|
||||
"col_role": "Direction",
|
||||
"col_axis": "Drive",
|
||||
"col_kind": "Type",
|
||||
"col_configured": "Configured UNITS",
|
||||
"col_observed": "Controller read-back",
|
||||
"col_scale": "Scale",
|
||||
"col_check": "Check",
|
||||
"kind_linear": "Linear (mm)",
|
||||
"kind_rotary": "Rotary (°)",
|
||||
"scale_linear": "1 unit = {mm} mm; {per} units/mm",
|
||||
"scale_rotary": "1 unit = {deg}°; {per} units/°",
|
||||
"status_ok": "Agree",
|
||||
"status_unread": "Not read",
|
||||
"status_mismatch": "Mismatch",
|
||||
"status_uncalibrated": "No angle scale",
|
||||
"status_invalid": "Invalid",
|
||||
"status_unmapped": "Unmapped",
|
||||
"tip_unread": "Not connected, or this axis's UNITS has not been read back yet.",
|
||||
"tip_mismatch": "The controller reads a different UNITS from the configured one: pose moves are refused and targets are not rescaled.",
|
||||
"tip_uncalibrated": "The rotary angle scale was only measured at the calibration equivalent; any other value needs a new calibration.",
|
||||
"tip_invalid": "UNITS must be a finite number above 0.",
|
||||
"tip_unmapped": "No drive is assigned to this direction; see Axis mapping.",
|
||||
"summary_ok": "Unit check: all {total} directions agree",
|
||||
"summary_bad": "Unit check: {bad} of {total} directions need attention",
|
||||
"summary_unread": "Unit check: not read yet (not connected)",
|
||||
"constants": "Fixed calibration constants (measured on the bench, not editable here): linear axes {ppm} pulses/mm; rotary axes {rotary}; all measured at UNITS={cal}. Millimetres and degrees are displayed values derived from these constants, not new measurements.",
|
||||
"rotary_item": "axis {axis}: {units} user units = 90°",
|
||||
"modify": "Modify",
|
||||
"apply": "Apply to controller",
|
||||
"cancel": "Cancel",
|
||||
"modify_offline": "Not connected to a controller; nothing can be modified.",
|
||||
"locked_note": "Locked: read-only.",
|
||||
"unlocked_note": "Unlocked: enter new values in the Configured UNITS column, then press Apply to controller.",
|
||||
"mapping_changed": "The axis mapping changed; unapplied edits were dropped and the page is locked again.",
|
||||
"invalid": "UNITS for {role} is not valid: enter a number above 0.",
|
||||
"no_change": "No change; locked again.",
|
||||
"applied": "Submitted UNITS for {count} drive(s); the read-back will show after the next refresh.",
|
||||
"change_line": "{role} · axis {axis}: {old} → {new}",
|
||||
"confirm_title": "Write UNITS",
|
||||
"confirm_body": "The following UNITS will be written to the controller:\n{changes}\n\nAfterwards every millimetre and degree reading, and every pose-move target, is recomputed with the new equivalent. Confirm that the platform is stopped and the mechanical ratio has been checked.",
|
||||
"confirm_rotary": "Note: UNITS for {roles} is not the calibration equivalent {cal}; the rotary axis has no angle scale at that value, so pose moves are refused until it is recalibrated."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
"press_set": "已标定:压轴目标 = 零点 ± 接触高度。",
|
||||
"press_unset": "未标定:执行动作会保持压轴不动。",
|
||||
"close": "关闭",
|
||||
"chip_hint": "点击打开设备设置 — {name}"
|
||||
"chip_hint": "点击打开设备设置 — {name}",
|
||||
"tab_units": "单位与换算"
|
||||
},
|
||||
"move": {
|
||||
"execute": "执行动作",
|
||||
@@ -164,7 +165,25 @@
|
||||
"home": "启动回零",
|
||||
"controls": "操作",
|
||||
"mm_derived_tip": "毫米值由脉冲当量换算得出,是显示值,不是标定长度。",
|
||||
"enabled_count": "已使能 {on}/{total} 轴"
|
||||
"enabled_count": "已使能 {on}/{total} 轴",
|
||||
"units_open": "单位与换算…",
|
||||
"units_locked_tip": "单位已锁定,这里只读。到“设备设置 → 单位与换算”点“修改”才能更改。",
|
||||
"events_title": "报警与事件",
|
||||
"events_clear": "清空记录",
|
||||
"events_empty": "暂无事件。报警、使能、回零、读取失败和单位不一致发生变化时,会记录在这里。",
|
||||
"ev_connected": "控制器已连接",
|
||||
"ev_disconnected": "控制器已断开",
|
||||
"ev_alarm_on": "轴 {axis} 报警",
|
||||
"ev_alarm_off": "轴 {axis} 报警已解除",
|
||||
"ev_enabled": "轴 {axis} 已使能",
|
||||
"ev_disabled": "轴 {axis} 已关闭使能",
|
||||
"ev_read_failed": "轴 {axis} 读取失败:{detail}",
|
||||
"ev_read_ok": "轴 {axis} 读取恢复",
|
||||
"ev_home_started": "轴 {axis} 开始回零",
|
||||
"ev_home_done": "轴 {axis} 回零完成",
|
||||
"ev_home_incomplete": "轴 {axis} 回零结束,但未报告完成",
|
||||
"ev_units_mismatch": "轴 {axis} UNITS 不一致:配置 {expected},读回 {observed}",
|
||||
"ev_units_ok": "轴 {axis} UNITS 已一致"
|
||||
},
|
||||
"busdata": {
|
||||
"title": "总线数据交互",
|
||||
@@ -911,5 +930,49 @@
|
||||
"close": "关闭",
|
||||
"max_required": "必须填写,程序不预设"
|
||||
}
|
||||
},
|
||||
"units": {
|
||||
"hint": "集中检查每个方向用的驱动器、脉冲当量(UNITS)和换算。默认锁定为只读;需要改动时点“修改”,写入前会列出改动并要求确认。",
|
||||
"col_role": "方向",
|
||||
"col_axis": "驱动器",
|
||||
"col_kind": "类型",
|
||||
"col_configured": "配置 UNITS",
|
||||
"col_observed": "控制器读回",
|
||||
"col_scale": "换算",
|
||||
"col_check": "检查",
|
||||
"kind_linear": "线性 (mm)",
|
||||
"kind_rotary": "旋转 (°)",
|
||||
"scale_linear": "1 单位 = {mm} mm;{per} 单位/mm",
|
||||
"scale_rotary": "1 单位 = {deg}°;{per} 单位/°",
|
||||
"status_ok": "一致",
|
||||
"status_unread": "未读回",
|
||||
"status_mismatch": "不一致",
|
||||
"status_uncalibrated": "无角度标定",
|
||||
"status_invalid": "配置无效",
|
||||
"status_unmapped": "未映射",
|
||||
"tip_unread": "未连接,或该轴的 UNITS 尚未成功读回。",
|
||||
"tip_mismatch": "控制器读回的 UNITS 与配置不同:姿态移动会被拒绝,不会重新换算目标。",
|
||||
"tip_uncalibrated": "旋转轴的角度比例只在标定当量下测量过;其他值需要重新标定。",
|
||||
"tip_invalid": "UNITS 必须是大于 0 的有限数。",
|
||||
"tip_unmapped": "该方向没有分配驱动器,见“轴映射”。",
|
||||
"summary_ok": "单位检查:{total} 个方向全部一致",
|
||||
"summary_bad": "单位检查:{bad}/{total} 个方向需要处理",
|
||||
"summary_unread": "单位检查:尚未读回(未连接)",
|
||||
"constants": "固定标定常数(来自实机测量,不能在此修改):线性轴 {ppm} 脉冲/mm;旋转轴 {rotary};以上在 UNITS={cal} 下测得。毫米与角度都是由这些常数换算的显示值,不是新的测量。",
|
||||
"rotary_item": "轴 {axis}:{units} 用户单位 = 90°",
|
||||
"modify": "修改",
|
||||
"apply": "应用到控制器",
|
||||
"cancel": "取消",
|
||||
"modify_offline": "未连接控制器,无法修改。",
|
||||
"locked_note": "已锁定:只读显示。",
|
||||
"unlocked_note": "已解锁:在“配置 UNITS”列输入新值,然后点“应用到控制器”。",
|
||||
"mapping_changed": "轴映射已改变,未应用的修改已放弃并重新锁定。",
|
||||
"invalid": "{role} 的 UNITS 无效:需要大于 0 的数字。",
|
||||
"no_change": "没有改动,已重新锁定。",
|
||||
"applied": "已提交 {count} 个驱动器的 UNITS;读回结果将在下一次刷新后显示。",
|
||||
"change_line": "{role} · 轴 {axis}:{old} → {new}",
|
||||
"confirm_title": "写入 UNITS",
|
||||
"confirm_body": "将向控制器写入以下 UNITS:\n{changes}\n\n写入后,全部毫米和角度读数以及姿态移动的目标都按新当量重新计算。请确认平台已停止,并已核对机械传动比。",
|
||||
"confirm_rotary": "注意:{roles} 的 UNITS 不是标定当量 {cal},旋转轴在该当量下没有角度标定,姿态移动会被拒绝,直到重新标定。"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user