Jelajahi Sumber

点位修改

liuwei 1 Minggu lalu
induk
melakukan
7de231c24b

+ 1 - 1
src/com/mes/component/PlcSignalMonitor.java

@@ -142,7 +142,7 @@ public class PlcSignalMonitor {
      */
     private JPanel createSignalDetailPanel() {
         List<String[]> signalList = new ArrayList<>();
-        signalList.add(new String[]{"请求扫码", plcDb + ".0.0", "PLC→MES"});
+        signalList.add(new String[]{"请求上料", plcDb + ".0.0", "PLC→MES"});
         signalList.add(new String[]{"下料信号", plcDb + ".0.1", "PLC→MES"});
         signalList.add(new String[]{"设备运行", plcDb + ".0.2", "PLC→MES"});
         signalList.add(new String[]{"设备通讯", plcDb + ".0.3", "PLC状态"});

+ 1 - 1
src/com/mes/component/WorkJPanelOP40.java

@@ -298,7 +298,7 @@ public class WorkJPanelOP40 extends JPanel {
         imageGray = new ImageIcon(MesClient.class.getResource("/bg/grey_dot.png"));
         imageGray.setImage(imageGray.getImage().getScaledInstance(20, 20, Image.SCALE_SMOOTH));
 
-        feedinglabel = new JLabel("请求扫码");
+        feedinglabel = new JLabel("请求上料");
         feedinglabel.setHorizontalAlignment(SwingConstants.LEFT);
         feedinglabel.setIcon(imageGreen);
         feedinglabel.setForeground(Color.BLACK);

+ 2 - 2
src/com/mes/component/WorkJPanelScan.java

@@ -354,11 +354,11 @@ public class WorkJPanelScan extends JPanel {
         if(isLocal == 1){
             return false;
         }else{
-            return readBoolean(plcDb+".0.1");   //扫码完成
+            return readBoolean(plcDb+".0.1");   // MES允许扫码
         }
     }
 
-    // 扫码完成反馈
+    // MES允许扫码 / 扫码完成反馈
     public boolean writeScanFinish(boolean bt){
         if(isLocal == 1){
             return false;

+ 20 - 105
src/com/mes/ui/MesClient.java

@@ -1086,7 +1086,8 @@ public class MesClient extends JFrame {
                 log.info("东侧MES状态切换: {}", mesEnabledEast ? "启用" : "屏蔽");
             }
         });
-        settingMenu.add(mesEastMenu);
+        // 东侧 MES 菜单隐藏(现场仅西侧三台);逻辑保留
+        // settingMenu.add(mesEastMenu);
 
         contentPane = new JPanel();
         contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
@@ -1158,10 +1159,10 @@ public class MesClient extends JFrame {
         tabbedPane.setFont(new Font("宋体", Font.BOLD, 22));
         contentPane.add(tabbedPane);
 
-        //首页1
+        // 现场仅 3 台 CNC(A/B/C);D–L 字段保留不删,不创建面板
         JPanel indexPanel1 = new JPanel();
         indexScrollPane1 = new JScrollPane(indexPanel1);
-        indexPanel1.setLayout(new GridLayout(2,2, 5, 5));
+        indexPanel1.setLayout(new GridLayout(1, 3, 5, 5));
         indexPanel1.setBackground(Color.LIGHT_GRAY);
 
         JPanel indexPanel40A = new JPanel();
@@ -1188,101 +1189,20 @@ public class MesClient extends JFrame {
         indexPanel40C.add(workJPanelOP40C);
         indexPanel1.add(indexPanel40C);
 
-        JPanel indexPanel40D = new JPanel();
-        indexPanel40D.setLayout(null);
-        indexPanel40D.setBackground(Color.WHITE);
-        workJPanelOP40D = new WorkJPanelOP40("D");
-        workJPanelOP40D.setBounds(10, 10, workJPanelOP40D.workWidth, workJPanelOP40D.workHeight);
-        indexPanel40D.add(workJPanelOP40D);
-        indexPanel1.add(indexPanel40D);
-
-        tabbedPane.addTab("OP055:A-D", null, indexScrollPane1, null);
+        workJPanelOP40D = null;
+        workJPanelOP40E = null;
+        workJPanelOP40F = null;
+        workJPanelOP40G = null;
+        workJPanelOP40H = null;
+        workJPanelOP40I = null;
+        workJPanelOP40J = null;
+        workJPanelOP40K = null;
+        workJPanelOP40L = null;
+
+        tabbedPane.addTab("OP055:A-C", null, indexScrollPane1, null);
         tabbedPane.setEnabledAt(0, true);
 
 
-        //首页2
-        JPanel indexPanel2 = new JPanel();
-        indexScrollPane2 = new JScrollPane(indexPanel2);
-        indexPanel2.setLayout(new GridLayout(2,2, 5, 5));
-        indexPanel2.setBackground(Color.LIGHT_GRAY);
-
-        JPanel indexPanel40E = new JPanel();
-        indexPanel40E.setLayout(null);
-        indexPanel40E.setBackground(Color.WHITE);
-        workJPanelOP40E = new WorkJPanelOP40("E");
-        workJPanelOP40E.setBounds(10, 10, workJPanelOP40E.workWidth, workJPanelOP40E.workHeight);
-        indexPanel40E.add(workJPanelOP40E);
-        indexPanel2.add(indexPanel40E);
-
-        JPanel indexPanel40F = new JPanel();
-        indexPanel40F.setLayout(null);
-        indexPanel40F.setBackground(Color.WHITE);
-        workJPanelOP40F = new WorkJPanelOP40("F");
-        workJPanelOP40F.setBounds(10, 10, workJPanelOP40F.workWidth, workJPanelOP40F.workHeight);
-        indexPanel40F.add(workJPanelOP40F);
-        indexPanel2.add(indexPanel40F);
-
-        JPanel indexPanel40G = new JPanel();
-        indexPanel40G.setLayout(null);
-        indexPanel40G.setBackground(Color.WHITE);
-        workJPanelOP40G = new WorkJPanelOP40("G");
-        workJPanelOP40G.setBounds(10, 10, workJPanelOP40G.workWidth, workJPanelOP40G.workHeight);
-        indexPanel40G.add(workJPanelOP40G);
-        indexPanel2.add(indexPanel40G);
-
-        JPanel indexPanel40H = new JPanel();
-        indexPanel40H.setLayout(null);
-        indexPanel40H.setBackground(Color.WHITE);
-        workJPanelOP40H = new WorkJPanelOP40("H");
-        workJPanelOP40H.setBounds(10, 10, workJPanelOP40H.workWidth, workJPanelOP40H.workHeight);
-        indexPanel40H.add(workJPanelOP40H);
-        indexPanel2.add(indexPanel40H);
-
-        tabbedPane.addTab("OP055:E-H", null, indexScrollPane2, null);
-
-
-
-        //首页3
-        JPanel indexPanel3 = new JPanel();
-        indexScrollPane3 = new JScrollPane(indexPanel3);
-        indexPanel3.setLayout(new GridLayout(2,2, 5, 5));
-        indexPanel3.setBackground(Color.LIGHT_GRAY);
-
-        JPanel indexPanel40I = new JPanel();
-        indexPanel40I.setLayout(null);
-        indexPanel40I.setBackground(Color.WHITE);
-        workJPanelOP40I = new WorkJPanelOP40("I");
-        workJPanelOP40I.setBounds(10, 10, workJPanelOP40I.workWidth, workJPanelOP40I.workHeight);
-        indexPanel40I.add(workJPanelOP40I);
-        indexPanel3.add(indexPanel40I);
-
-        JPanel indexPanel40J = new JPanel();
-        indexPanel40J.setLayout(null);
-        indexPanel40J.setBackground(Color.WHITE);
-        workJPanelOP40J = new WorkJPanelOP40("J");
-        workJPanelOP40J.setBounds(10, 10, workJPanelOP40J.workWidth, workJPanelOP40J.workHeight);
-        indexPanel40J.add(workJPanelOP40J);
-        indexPanel3.add(indexPanel40J);
-
-        JPanel indexPanel40K = new JPanel();
-        indexPanel40K.setLayout(null);
-        indexPanel40K.setBackground(Color.WHITE);
-        workJPanelOP40K = new WorkJPanelOP40("K");
-        workJPanelOP40K.setBounds(10, 10, workJPanelOP40K.workWidth, workJPanelOP40K.workHeight);
-        indexPanel40K.add(workJPanelOP40K);
-        indexPanel3.add(indexPanel40K);
-
-        JPanel indexPanel40L = new JPanel();
-        indexPanel40L.setLayout(null);
-        indexPanel40L.setBackground(Color.WHITE);
-        workJPanelOP40L = new WorkJPanelOP40("L");
-        workJPanelOP40L.setBounds(10, 10, workJPanelOP40L.workWidth, workJPanelOP40L.workHeight);
-        indexPanel40L.add(workJPanelOP40L);
-        indexPanel3.add(indexPanel40L);
-
-        tabbedPane.addTab("OP055:I-L", null, indexScrollPane3, null);
-
-
         // 扫码站 Tab(中转车关闭时不创建中转车面板)
         JPanel indexPanelTransfer = new JPanel();
         JScrollPane indexScrollPaneTransfer = new JScrollPane(indexPanelTransfer);
@@ -1309,7 +1229,7 @@ public class MesClient extends JFrame {
             indexPanelTransfer2.add(workJPanelOP40Transfer2);
             indexPanelTransfer.add(indexPanelTransfer2);
         } else {
-            indexPanelTransfer.setLayout(new GridLayout(1, 2, 5, 5));
+            indexPanelTransfer.setLayout(new GridLayout(1, 1, 5, 5));
             workJPanelOP40Transfer1 = null;
             workJPanelOP40Transfer2 = null;
         }
@@ -1322,13 +1242,8 @@ public class MesClient extends JFrame {
         indexPanelScanA.add(workJPanelScanA);
         indexPanelTransfer.add(indexPanelScanA);
 
-        JPanel indexPanelScanB = new JPanel();
-        indexPanelScanB.setLayout(null);
-        indexPanelScanB.setBackground(Color.WHITE);
-        workJPanelScanB = new WorkJPanelScan("B");
-        workJPanelScanB.setBounds(10, 10, workJPanelScanB.workWidth, workJPanelScanB.workHeight);
-        indexPanelScanB.add(workJPanelScanB);
-        indexPanelTransfer.add(indexPanelScanB);
+        // 东侧扫码站隐藏,不创建面板;类/字段/scanSnB 保留
+        workJPanelScanB = null;
 
         tabbedPane.addTab(transferEnabled ? "中转车" : "扫码站", null, indexScrollPaneTransfer, null);
 
@@ -1338,8 +1253,8 @@ public class MesClient extends JFrame {
         JTabbedPane workRecordTabbedPane = new JTabbedPane(JTabbedPane.TOP);
         workRecordTabbedPane.setFont(new Font("微软雅黑", Font.PLAIN, 14));
 
-        // 定义OP055子工位(A-L,共12个)
-        String[] subStations = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"};
+        // 现场仅 OP055A/B/C
+        String[] subStations = {"A", "B", "C"};
         WorkRecordPanel[] workRecordPanels = new WorkRecordPanel[subStations.length + 1]; // +1 for "所有工位"
 
         // 为每个子工位创建 Tab(OP055 基础工位号)

+ 4 - 4
src/resources/config/config.properties

@@ -5,12 +5,12 @@ mes.line_sn=CZ060
 mes.transfer_enabled=false
 
 # OPC UA Configuration (CNC)
-# 12台CNC设备(西侧6台 + 东侧6台)
+# 现场 3 台 CNC(A/B/C);其余地址保留在历史配置中,不启用
 opcua.user=OPCUA
 opcua.password=OPCUA123
 
-# 所有CNC地址(西侧80.22.10.x + 东侧80.23.10.x)
-opcua.urls=opc.tcp://80.22.10.42:4840,opc.tcp://80.22.10.43:4840,opc.tcp://80.22.10.44:4840,opc.tcp://80.22.10.45:4840,opc.tcp://80.22.10.46:4840,opc.tcp://80.22.10.47:4840,opc.tcp://80.23.10.42:4840,opc.tcp://80.23.10.43:4840,opc.tcp://80.23.10.44:4840,opc.tcp://80.23.10.45:4840,opc.tcp://80.23.10.46:4840,opc.tcp://80.23.10.47:4840
+# 所有CNC地址
+opcua.urls=opc.tcp://80.22.10.42:4840,opc.tcp://80.22.10.43:4840,opc.tcp://80.22.10.44:4840
 
 # 对应的工位号
-opcua.oprnos=OP055A,OP055B,OP055C,OP055D,OP055E,OP055F,OP055G,OP055H,OP055I,OP055J,OP055K,OP055L
+opcua.oprnos=OP055A,OP055B,OP055C