Browse Source

初始化

jingbo 1 tuần trước cách đây
mục cha
commit
4fb1ee6fb4

+ 12 - 12
src/com/mes/ui/MesClient.java

@@ -590,7 +590,7 @@ public class MesClient extends JFrame {
                     return;
                 }
                 // 允许上料
-                MesClient.s7PLC.writeBoolean("DB503.162.2", true);
+                MesClient.s7PLC.writeBoolean("DB503.216.2", true);
             }
         });
         settingMenu.add(allow_up_material);
@@ -608,7 +608,7 @@ public class MesClient extends JFrame {
                     JOptionPane.showMessageDialog(mesClientFrame, "密码错误", "提示窗口", JOptionPane.INFORMATION_MESSAGE);
                     return;
                 }
-                MesClient.s7PLC.writeBoolean("DB503.162.5", true);
+                MesClient.s7PLC.writeBoolean("DB503.216.5", true);
             }
         });
         settingMenu.add(allow_down_material);
@@ -626,8 +626,8 @@ public class MesClient extends JFrame {
                     JOptionPane.showMessageDialog(mesClientFrame, "密码错误", "提示窗口", JOptionPane.INFORMATION_MESSAGE);
                     return;
                 }
-                MesClient.s7PLC.writeBoolean("DB503.162.2", false);
-                MesClient.s7PLC.writeBoolean("DB503.162.5", false);
+                MesClient.s7PLC.writeBoolean("DB503.216.2", false);
+                MesClient.s7PLC.writeBoolean("DB503.216.5", false);
             }
         });
         settingMenu.add(reset_signal);
@@ -1115,12 +1115,12 @@ public class MesClient extends JFrame {
             public void run() {
                 if (index == 0){
                     String sn ="";
-                    if (MesClient.s7PLC.readBoolean("DB503.162.0") || MesClient.s7PLC.readBoolean("DB503.162.1")){
-                        if (MesClient.s7PLC.readBoolean("DB503.162.0")){
+                    if (MesClient.s7PLC.readBoolean("DB503.216.0") || MesClient.s7PLC.readBoolean("DB503.216.1")){
+                        if (MesClient.s7PLC.readBoolean("DB503.216.0")){
                             sn = MesClient.s7PLC.readString("DB503.270.0");
                             // 赋值给输入框
                             product_sn.setText(sn);
-                        }else if (MesClient.s7PLC.readBoolean("DB503.162.1")){
+                        }else if (MesClient.s7PLC.readBoolean("DB503.216.1")){
                             sn = MesClient.s7PLC.readString("DB503.336.0");
                             // 赋值给输入框
                             product_sn.setText(sn);
@@ -1141,9 +1141,9 @@ public class MesClient extends JFrame {
                     }
                 }else if (index == 2){
                     // 等待上料完成
-                    if(MesClient.s7PLC.readBoolean("DB503.162.3")){
+                    if(MesClient.s7PLC.readBoolean("DB503.216.3")){
                         // 将允许上料清空
-                        MesClient.s7PLC.writeBoolean("DB503.162.2",false);
+                        MesClient.s7PLC.writeBoolean("DB503.216.2",false);
                         // 发送开始做件
                         Boolean reg = DataUtil.startWork(MesClient.nettyClient, MesClient.product_sn.getText(), MesClient.user20);
                         if (!reg){
@@ -1153,7 +1153,7 @@ public class MesClient extends JFrame {
                     }
                 } else if (index == 3) {
                     // 等待完成信号
-                    if (MesClient.s7PLC.readBoolean("DB503.162.4")){
+                    if (MesClient.s7PLC.readBoolean("DB503.216.4")){
                         // 未到数量
                         if (MesClient.cur < MesClient.max){
                             //  菜单显示未拧紧完成
@@ -1168,8 +1168,8 @@ public class MesClient extends JFrame {
                     }
                 } else if (index == 4) {
                     //将允许上料信号及允许下料信号制空
-                    MesClient.s7PLC.writeBoolean("DB503.162.2", false);
-                    MesClient.s7PLC.writeBoolean("DB503.162.5", false);
+                    MesClient.s7PLC.writeBoolean("DB503.216.2", false);
+                    MesClient.s7PLC.writeBoolean("DB503.216.5", false);
                     // 两个输入框制空
                     product_sn.setText("");
                     work_status = 0;

+ 2 - 2
src/com/mes/ui/MesRevice.java

@@ -20,7 +20,7 @@ public class MesRevice {
                 MesClient.status_menu.setForeground(Color.GREEN);
                 MesClient.check_quality_result = true;//质量合格,可以绑定加工
                 MesClient.status_menu.setText("该工件可以加工");
-                MesClient.s7PLC.writeBoolean("DB503.162.2",true);
+                MesClient.s7PLC.writeBoolean("DB503.216.2",true);
                 MesClient.index = 2;
             }else {
                 MesClient.check_quality_result = false;
@@ -105,7 +105,7 @@ public class MesRevice {
 
 
                 // 下料允许
-                MesClient.s7PLC.writeBoolean("DB503.162.5", true);
+                MesClient.s7PLC.writeBoolean("DB503.216.5", true);
                 //菜单提示信息
                 MesClient.setMenuStatus("结果提交成功,请扫下一件",0);
                 MesClient.index = 4;

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

@@ -1,8 +1,8 @@
 # ???
-mes.gw=OP220A
+mes.gw=OP220B
 # ???IP
-mes.server_ip=127.0.0.1
-#mes.server_ip=192.168.20.99
+#mes.server_ip=127.0.0.1
+mes.server_ip=192.168.20.99
 # TCP????
 mes.tcp_port=3000
 # TCP????