فهرست منبع

OP100 打码对接服务端计划下发,改为请求-反馈自动流程

  - PLC IP 改为 192.168.90.86
  - 产品 PN 改由服务端下发,删除硬编码下拉和 pn 参数
  - 取码后加锁,本件完成前不重复取码
  - PLC 反馈到位自动结束本轮并显示“打码成功”,不提交工位结果
  - 增加信号灯和 DB5000.260 码内容回显
  - PLC 读写加锁,写码后读回校验并记录日志
wangxichen 3 روز پیش
والد
کامیت
fa36ba0b7d
2فایلهای تغییر یافته به همراه16 افزوده شده و 3 حذف شده
  1. 13 1
      src/com/mes/ui/MesClient.java
  2. 3 2
      src/com/mes/ui/PlcUtil.java

+ 13 - 1
src/com/mes/ui/MesClient.java

@@ -89,6 +89,7 @@ public class MesClient extends JFrame {
     public static JLabel feedingLight;
     public static JLabel replyLight;
     public static JLabel plcCodeLabel; // PLC 码内容回显(DB5000.260)
+    public static JLabel successLabel; // 打码成功提示
     public static ImageIcon imageGreen;
     public static ImageIcon imageGray;
     public static Timer lightTimer;
@@ -209,6 +210,9 @@ public class MesClient extends JFrame {
         planStop = false;
         nextRetryTime = 0;
         qrLoaded = false;
+        if(successLabel != null){
+            successLabel.setVisible(false);
+        }
         MesClient.finish_ok_bt.setEnabled(false);
         MesClient.finish_ng_bt.setEnabled(false);
         product_sn.setText("");
@@ -548,9 +552,17 @@ public class MesClient extends JFrame {
         // PLC 码内容回显
         plcCodeLabel = new JLabel("PLC码(DB5000.260):-");
         plcCodeLabel.setFont(new Font("微软雅黑", Font.PLAIN, 18));
-        plcCodeLabel.setBounds(81, 270, 810, 35);
+        plcCodeLabel.setBounds(81, 270, 600, 35);
         indexPanelA.add(plcCodeLabel);
 
+        // 打码成功提示:PLC 反馈到位后显示
+        successLabel = new JLabel("打码成功");
+        successLabel.setFont(new Font("微软雅黑", Font.BOLD, 22));
+        successLabel.setForeground(Color.GREEN);
+        successLabel.setBounds(700, 270, 190, 35);
+        successLabel.setVisible(false);
+        indexPanelA.add(successLabel);
+
         finish_ok_bt = new JButton("OK");
         finish_ok_bt.setEnabled(false);
         finish_ok_bt.addActionListener(new ActionListener() {

+ 3 - 2
src/com/mes/ui/PlcUtil.java

@@ -68,11 +68,12 @@ public class PlcUtil {
             MesClient.resultSubmitted = false;
         }
 
-        // 二维码反馈:打码完成,结束本轮(只打码,不提交工位结果)
+        // 二维码反馈:打码成功,结束本轮(只打码,不提交工位结果)
         if(reply && MesClient.qrLoaded && !MesClient.resultSubmitted){
             MesClient.resultSubmitted = true;
             MesClient.resetScanA();
-            MesClient.setMenuStatus("打码完成,等待下一件",0);
+            MesClient.successLabel.setVisible(true);
+            MesClient.setMenuStatus("打码成功,等待下一件",0);
         }
 
         // 计划已完成/无计划时不再自动取码;失败后按间隔重试