wanglei
|
fadcf27b75
|
Support every named project object through one reviewed rename tool
|
2026-12-05 22:46:29 +08:00 |
|
wanglei
|
860602b480
|
Review, apply and undo scoped vision asset and step renames
|
2026-12-05 22:33:24 +08:00 |
|
wanglei
|
fc49db64a8
|
Apply and undo reviewed device names and workflow edits in the live editor
|
2026-12-05 22:25:25 +08:00 |
|
wanglei
|
f0d69cd932
|
Rename DI and DQ channels with typed workflow and cylinder references
|
2026-12-05 22:19:50 +08:00 |
|
wanglei
|
cfb25928cb
|
Apply and undo reviewed axis, point and workflow changes across recipes
|
2026-12-05 22:13:44 +08:00 |
|
wanglei
|
2b66063b4d
|
Apply and undo reviewed vision function renames in MCP and WPF
|
2026-12-05 21:57:31 +08:00 |
|
wanglei
|
c4f406e975
|
Review, apply and undo point names with their scoped matrix and script references
|
2026-12-05 21:49:35 +08:00 |
|
wanglei
|
ea414f488e
|
Apply and undo reviewed workflow renames through MCP and WPF
|
2026-12-05 21:43:50 +08:00 |
|
wanglei
|
3bd6a7872e
|
Guard batch commits and verify live editor rename and undo
|
2026-12-05 21:38:38 +08:00 |
|
wanglei
|
058ba4fcae
|
Apply variable renames and guarded inverse drafts across project files
|
2026-12-05 21:34:17 +08:00 |
|
wanglei
|
f4dee92233
|
Track live script edits and verify cancel and save with real WPF dialogs
|
2026-12-05 21:30:05 +08:00 |
|
wanglei
|
559eb230a6
|
Apply reviewed workflow source only after explicit WPF approval
|
2026-12-05 21:26:51 +08:00 |
|
wanglei
|
444953d81a
|
Preview and apply scoped MCP edits with editor approval and conflict checks
|
2026-12-05 21:20:55 +08:00 |
|
wanglei
|
b972271a14
|
Persist portable PLCSharp project directories and configuration
|
2026-12-05 21:12:52 +08:00 |
|
wanglei
|
12b51e0ca2
|
Carry pending Modbus RTU replies across client replacement
|
2026-12-05 20:41:09 +08:00 |
|
wanglei
|
d83d1750d1
|
Preserve outstanding RTU replies across serial port reopen
|
2026-12-05 20:38:01 +08:00 |
|
wanglei
|
114fd5d3e4
|
Isolate silent Modbus RTU stations on a shared bus
|
2026-12-05 20:35:37 +08:00 |
|
wanglei
|
8d3114efa1
|
隔离 Modbus RTU 超时请求的迟到应答
|
2026-12-05 20:28:47 +08:00 |
|
wanglei
|
4a96aa38e2
|
拒绝 CRC 正确但与请求不匹配的 Modbus RTU 应答
|
2026-12-05 20:20:04 +08:00 |
|
wanglei
|
38401bb901
|
拒绝与当前请求不匹配的 Modbus TCP 应答
|
2026-12-05 20:19:01 +08:00 |
|
wanglei
|
3de85630c6
|
按实际接收帧校验 Modbus RTU 写入和异常应答
|
2026-12-05 20:16:10 +08:00 |
|
wanglei
|
e49e90329b
|
修正 Modbus TCP 请求头多计一个字节的长度
|
2026-12-05 20:15:11 +08:00 |
|
wanglei
|
26d5212e55
|
矩阵点沿用起始点的安全高度和运动倍率
|
2026-12-05 20:14:19 +08:00 |
|
wanglei
|
eaabfd10cd
|
按坐标系正常结束状态确认本次插补完成
|
2026-12-05 20:12:18 +08:00 |
|
wanglei
|
599883e247
|
气缸反馈失效时清除旧点位和到位状态
|
2026-12-05 20:06:25 +08:00 |
|
wanglei
|
4951c97a3e
|
按配置的物理端口回读数字输入和输出
|
2026-12-05 20:05:15 +08:00 |
|
wanglei
|
1e52339a8c
|
按目标轴下发停轴、使能和参数保存命令
|
2026-12-05 20:04:30 +08:00 |
|
wanglei
|
634e11c325
|
分别刷新和显示气缸 A/B 位输出状态
|
2026-12-05 20:02:07 +08:00 |
|
wanglei
|
c55bff6c32
|
验证脚本入口后再标记编译成功
|
2026-12-05 20:01:44 +08:00 |
|
wanglei
|
5c022bfd26
|
切换配方前等待旧工作流退出
|
2026-12-05 20:01:10 +08:00 |
|
|
|
24325d2535
|
补齐文件编码:把编辑过程中被丢掉的 UTF-8 BOM 和 LF 行尾归一回仓库约定
本仓库的 .cs 都是 UTF-8 with BOM + CRLF。前面几个提交里,编辑工具把 App.xaml.cs、LoginModel.cs、VisionFunction.cs 首行的 BOM 掉了(表现为每个提交都多出一行无关的 -using/+using diff);新建的 TaskTool.cs、WorkerGuard.cs 及三个测试文件则是无 BOM 的 LF。
这里统一补回 BOM、行尾归一为 CRLF。改动只是编码,逐文件 diff 都只有首行一处,无代码变化。
|
2026-11-17 23:30:49 +08:00 |
|
|
|
b97083f556
|
修复异常被静默吞掉:补 UI 线程兜底 + 给 17 个轮询线程装上异常报警
两条异常「消失」的路径:
1) App.RegisterEvents 只挂了 TaskScheduler.UnobservedTaskException 与 AppDomain.UnhandledException,
全项目没有 Application.DispatcherUnhandledException。WPF UI 线程里的异常(视觉 handler 里 33 处
Dispatcher.Invoke 委托内部抛出即属此类)会直接让进程闪退,只留一行日志。
2) 17 个 BackgroundWorker 轮询线程全都只订阅 DoWork。BackgroundWorker 会捕获 DoWork 的异常并放进
RunWorkerCompletedEventArgs.Error,没人订阅就等于吞掉:while(!CancellationPending) 循环直接退出,
轴/IO/通讯/机器人/气缸的扫描从此不再刷新,而界面看起来一切正常 —— 对上位机这是最危险的失败模式。
改法:
- 新增 Core/Prism/WorkerGuard:Watch(worker, 用途名) 给 worker 挂上「因异常结束就必须上报」的兜底,
上报出口由启动时 SetFaultSink 注入(Core 层不依赖 App);正常取消(e.Error==null)不算故障,不上报;
上报通道自身异常被吞掉,兜底逻辑不成为新的崩溃源。
- App.xaml.cs:注册 DispatcherUnhandledException —— 记录日志 + 走统一 errLog 报警通道 + Handled=true
让进程继续存活(设备运行中闪退比界面某处出错危险得多);OutOfMemoryException 不拦截,交回运行时终止;
ReportError 带重入保护,避免「报警通道自己出错」造成无限递归。errLog 通道此前只有 ModelBase 在用。
- 17 个 new BackgroundWorker 构造处统一包成 WorkerGuard.Watch(...),并给每个轮询起了中文名(报警里能看出是谁死了)。
- 顺带删掉 App.xaml.cs 里一处没有配对 disable 的孤立 #pragma warning restore VSTHRD200。
新增 5 个 WorkerGuard 回归测试(异常上报内容 / 正常结束不上报 / 正常取消不上报 / 出口抛异常不外泄 / null 参数)。构建 0 error,测试 54/54 通过。
|
2026-11-17 23:21:05 +08:00 |
|
|
|
d8695fdc68
|
修复用户注册/改密/删除不落盘:三处写操作都没有 Save()
LoginModel 里三条写路径只改内存,从不提交到 SQLite(全类唯一一次 Save 在首次启动建 admin 处):
- ExecuteRegister:Users.Add(newUser) 后无 Save() —— 注册的新用户重启即消失,但界面当场显示「注册成功」。
- ExecuteChangePassword:先改内存里的 SelectUser.Password,再改 EF 实体,同样没有 Save();且库里查不到该用户时整段静默什么都不做 —— 改了密码重启又变回旧密码。
- ExecuteManage(Delete):Remove + UserList.Remove 后无 Save() —— 删除的用户重启复活。
改法(保持原有 UI 行为,只把落盘补上并把顺序摆正):
- 三条路径统一为「先 Save 成功、再改内存/UI」;失败时回滚并 SendErrDialog 报告,绝不在落盘失败时报成功。
- 注册失败 detach 已 Added 的实体;删除失败 detach 已 Deleted 的实体(等于取消这次删除)。
- 改密失败还原 Password 并清掉 Password 的 IsModified 挂起改动,避免被后续无关的 Save 悄悄提交。
- 改密时库里查不到该用户则补写一条(兼容历史版本注册未落盘留下的数据)。
落盘回归测试依赖 DatasContext 库路径可注入(目前写死 ./Config/Datas.db),待 P0-4 补好接缝后再补用例。构建 0 error,现有测试 49/49 通过。
|
2026-11-17 23:16:43 +08:00 |
|
|
|
57c6dd9234
|
修复视觉步骤假超时:CTS 建了却从未传给 Task.Run,超时形同虚设
- VisionFunction.RunAllAsync case 3:原来新建 CancellationTokenSource(5s) 但 await Task.Run(...) 没有传 token,
于是 catch (OperationCanceledException) when (cts.IsCancellationRequested) 永远不命中;相机掉线或算法卡死时
RunAllAsync 永不返回,且硬编码 5 秒与文案里读的 Flow.TimeoutSeconds 不一致(该配置项此前完全无效)。
- 新增 Core/Tools/TaskTool.RunWithTimeoutAsync:Task.Run + Task.WaitAsync 真实限时,
<=0 作为显式关闭超时的逃生门;超时后明确按「步骤被放弃、结果不可信」处理。
- 超时改用 FlowModel.TimeoutSeconds(单步超时现在是可配置的)。
- 新增 6 个 TaskTool 回归测试(含「等待必须停在超时点」的时间断言)。构建 0 error,测试 49/49 通过。
|
2026-11-17 23:14:32 +08:00 |
|
|
|
6a9862bbbc
|
合并 IO 配置面板:SmcIO/EmcIO → 通用 ControllerIO
- 删除 Config/SmcIO 与 Config/EmcIO(两面板仅 ON/OFF 按钮和列宽不同,ON/OFF 调的 DQON/DQOFF 两种 SDK 都支持,非板卡差异)
- 新增 Config/ControllerIO(保留 ON/OFF 手动输出按钮,两种板卡通用)
- ControllersModel: Config 命令去掉 switch(Type) 分支,Type≠Undefined 时直接创建 ControllerIO
- Controller: 连接循环补 SDK==null 保护;XAML 按钮改名 配置→配置IO
|
2026-10-16 03:56:48 +08:00 |
|
|
|
9085c9b178
|
控制器:型号选定后下拉框只读,新增删除按钮
- Controllers.xaml: 型号 ComboBox 默认禁用,仅 Type=Undefined 时可选;新增删除按钮
- Controller: Type setter 允许重置为 Undefined;后台循环加 SDK null 保护;新增 Reset()(停轴→关SDK→置null→清Axes/DI/DQ→复位状态)
- ControllersModel: ControllerManage 新增 Delete 命令(确认框→Reset→清运行时集合与DB全部相关表→型号重置为Undefined)
|
2026-10-16 03:25:14 +08:00 |
|
|
|
45f505cec3
|
重构:运动控制只支持单一控制器
- ControllersModel: Controllers 集合 + SelectedController 改为单个 Controller 属性,删除新增/删除控制器命令
- Axis/DI/DQ/Cylinder: 删除 ControllerID/ControllerNumber/IOController 外键字段
- Controllers.xaml: 控制器 DataGrid 改为单控制器表单(型号/IP/备注/在线状态/保存/配置)
- Cylinders: 删除控制器选择下拉列
- SystemConfigViewModel: Excel 导入导出删除 Controller sheet 及 ImportControllers
- 获取控制器.spt 脚本模板改为直接取 Controller
|
2026-10-16 02:06:57 +08:00 |
|
|
|
6cab601d25
|
气缸
|
2026-08-12 11:49:54 +08:00 |
|
|
|
d98e2480d5
|
距离
|
2026-08-04 11:52:30 +08:00 |
|
|
|
deb1be9026
|
完善拍照
|
2026-08-04 01:22:23 +08:00 |
|
|
|
2070c58fc3
|
改进脚本
|
2026-08-03 14:32:48 +08:00 |
|
|
|
6abfddb8ab
|
显示调整
|
2026-08-01 10:06:10 +08:00 |
|
|
|
5fbc546198
|
修复一些内存泄漏
|
2026-07-31 18:26:08 +08:00 |
|
|
|
219a186529
|
释放图片内存
|
2026-07-31 17:58:04 +08:00 |
|
|
|
fae1fe3c36
|
编译脚本时清理旧垃圾
|
2026-07-31 14:59:50 +08:00 |
|
|
|
05a65c62b9
|
IO 0 OFF 1 ON
|
2026-07-31 13:22:58 +08:00 |
|
|
|
92d9eff676
|
libdmtx解码
|
2026-07-30 23:43:50 +08:00 |
|
|
|
b964cd0102
|
io操作
|
2026-07-28 17:57:18 +08:00 |
|
|
|
7eaa2edacc
|
自动整理代码格式
|
2026-07-26 19:09:45 +08:00 |
|
|
|
1d2df8e3cf
|
脚本执行异常处理
|
2026-07-26 17:20:04 +08:00 |
|