guoyuji
2023-11-30 a136a7f99674969283287ba38aa9bd6199750dd7
gmms/WebContent/mysqlInsert/toPlc.jsp
@@ -1,24 +1,213 @@
<%@page import="builder.Manager"%>
<%@page import="ng.devices.HexUtil"%>
<%@page import="ng.db.sendOptFile"%>
<%
<<<<<<< HEAD
 String zt=request.getParameter("zt");
String peifanhao=request.getParameter("peifanhao");
String changpinghao=request.getParameter("changpinghao");
Manager.sendtoPLC(76,20,4,new byte[]{0,1,0,1},0);
Manager.sendtoPLC(77,20,4,new byte[]{0,1,0,1},0);
=======
String zt=request.getParameter("zt");
String peifanhao=request.getParameter("peifanhao");
String way_of_working=request.getParameter("way_of_working");
String thickness=request.getParameter("thickness");
String glass_type=request.getParameter("glass_type");
String production_type=request.getParameter("production_type");
int zts =Integer.valueOf(zt);
int peifanhaos =Integer.valueOf(peifanhao);
/*  Manager.sendtoPLC(76,20,4,new byte[]{0,1,0,zt},0);
String a=HexUtil.intTo2ByteHex(peifanhaos)+HexUtil.intTo2ByteHex(0);
String as=HexUtil.intTo2ByteHex(peifanhaos)+HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(0);
String b=HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(1);
String bs=HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(1);
String ganghua=HexUtil.intTo2ByteHex(Integer.valueOf(way_of_working))
+HexUtil.intTo2ByteHex(Integer.valueOf(thickness))+HexUtil.intTo2ByteHex(Integer.valueOf(glass_type))
+HexUtil.intTo2ByteHex(Integer.valueOf(production_type));
String ganghuas=HexUtil.intTo2ByteHex(0)
+HexUtil.intTo2ByteHex(0)+HexUtil.intTo2ByteHex(0)
+HexUtil.intTo2ByteHex(0);
/*  Manager.sendtoPLC(76,20,4,new byte[]{0,(byte)(peifanhaos&0xff),0,zt},0);
 Manager.sendtoPLC(77,20,4,new byte[]{0,1,0,zt},0); */
 if(zts==2){
    Manager.sendtoPLC(76,20,4,new byte[]{0,(byte)(peifanhaos&0xff),0,0},0);
 }else if(zts==3){
    Manager.sendtoPLC(76,20,4,new byte[]{0,0,0,0},0);
 }
>>>>>>> 09a05342f4c60c834c3ee17a13529cd91c624f34
    if(zts==2){
       /* Manager.sendtoPLC(6,88,4,a,0);
       Manager.sendtoPLC(45,88,4,a,0);
       Manager.sendtoPLC(46,88,4,a,0);
       Manager.sendtoPLC(47,88,4,a,0);
       Manager.sendtoPLC(48,88,4,a,0);
       Manager.sendtoPLC(49,88,4,a,0);
       Manager.sendtoPLC(50,88,4,a,0);
       Manager.sendtoPLC(51,88,4,a,0);
       Manager.sendtoPLC(52,88,4,a,0);
       Manager.sendtoPLC(53,88,4,a,0); */
       //Manager.dayin(1,changpinghao);
       //掰片机
         Manager.sendtoPLC(5,88,4,a,0);
       //机械手
       //磨边机
       Manager.sendtoPLC(7,6088,4,a,0);
       //倒角机
       Manager.sendtoPLC(9,13360,4,a,0);
       //钻孔机
       Manager.sendtoPLC(11,88,4,a,0);
       Manager.sendtoPLC(31,88,4,a,0);
       Manager.sendtoPLC(32,88,4,a,0);
       Manager.sendtoPLC(33,88,4,a,0);
       //水刀
       Manager.sendtoPLC(12,176,6,as,0);
        Manager.sendtoPLC(34,176,6,as,0);
       Manager.sendtoPLC(35,176,6,as,0);
       Manager.sendtoPLC(36,176,6,as,0);
       //加工中心
       Manager.sendtoPLC(14,88,4,a,0);
       Manager.sendtoPLC(37,88,4,a,0);
       Manager.sendtoPLC(38,88,4,a,0);
       Manager.sendtoPLC(39,88,4,a,0);
       //支线后片台
       Manager.sendtoPLC(13,236,4,a,0);
       //丝印烘干
       Manager.sendtoPLC(19,10088,4,a,0);
       Manager.sendtoPLC(20,10088,4,a,0);
       Manager.sendtoPLC(21,10088,4,a,0);
       Manager.sendtoPLC(22,10088,4,a,0);
       //钢前
       Manager.sendtoPLC(23,88,4,a,0);
       //钢化
       Manager.sendtoPLC(24,26,8,ganghua,0);
       Manager.sendtoPLC(24,2,2,"0001",0);
       //钢后
         Manager.sendtoPLC(25,88,4,a,0);
       //贴膜
       //Manager.sendtoPLC(26,88,4,a,0);
       //Manager.sendtoPLC(76,88,4,a,0);
       //Manager.sendtoPLC(77,88,4,a,0);
       sendOptFile.sendOpt("\\\\192.168.10.25\\optfile/", "file://192.168.20.42/d/optfile/");
    }else if(zts==3){
       /* Manager.sendtoPLC(6,88,4,b,0);
       Manager.sendtoPLC(45,88,4,b,0);
       Manager.sendtoPLC(46,88,4,b,0);
       Manager.sendtoPLC(47,88,4,b,0);
       Manager.sendtoPLC(48,88,4,b,0);
       Manager.sendtoPLC(49,88,4,b,0);
       Manager.sendtoPLC(50,88,4,b,0);
       Manager.sendtoPLC(51,88,4,b,0);
       Manager.sendtoPLC(52,88,4,b,0);
       Manager.sendtoPLC(53,88,4,b,0); */
          //Manager.dayin(2,changpinghao);
      //掰片机
          Manager.sendtoPLC(5,88,4,b,0);
          //机械手
                    //磨边机
          Manager.sendtoPLC(7,6088,4,b,0);
          //倒角机
          Manager.sendtoPLC(9,13360,4,b,0);
          //钻孔机
          Manager.sendtoPLC(11,88,4,b,0);
          Manager.sendtoPLC(31,88,4,b,0);
          Manager.sendtoPLC(32,88,4,b,0);
          Manager.sendtoPLC(33,88,4,b,0);
          //水刀
          Manager.sendtoPLC(12,176,6,bs,0);
          Manager.sendtoPLC(34,176,6,bs,0);
          Manager.sendtoPLC(35,176,6,bs,0);
          Manager.sendtoPLC(36,176,6,bs,0);
          //加工中心
          Manager.sendtoPLC(14,88,4,b,0);
          Manager.sendtoPLC(37,88,4,b,0);
          Manager.sendtoPLC(38,88,4,b,0);
          Manager.sendtoPLC(39,88,4,b,0);
          //支线后片台
          Manager.sendtoPLC(13,236,4,b,0);
          //丝印烘干
          Manager.sendtoPLC(19,10088,4,b,0);
          Manager.sendtoPLC(20,10088,4,b,0);
          Manager.sendtoPLC(21,10088,4,b,0);
          Manager.sendtoPLC(22,10088,4,b,0);
          //钢前
          Manager.sendtoPLC(23,88,4,b,0);
          //钢化
          Manager.sendtoPLC(24,26,8,ganghuas,0);
          Manager.sendtoPLC(24,2,2,"0000",0);
          //钢后
          Manager.sendtoPLC(25,88,4,b,0);
          //贴膜
          /* Manager.sendtoPLC(26,88,4,b,0);
          Manager.sendtoPLC(76,88,4,b,0);
          Manager.sendtoPLC(77,88,4,b,0); */
    } else if(zts==98){
       /* Manager.sendtoPLC(6,88,4,a,0);
       Manager.sendtoPLC(45,88,4,a,0);
       Manager.sendtoPLC(46,88,4,a,0);
       Manager.sendtoPLC(47,88,4,a,0);
       Manager.sendtoPLC(48,88,4,a,0);
       Manager.sendtoPLC(49,88,4,a,0);
       Manager.sendtoPLC(50,88,4,a,0);
       Manager.sendtoPLC(51,88,4,a,0);
       Manager.sendtoPLC(52,88,4,a,0);
       Manager.sendtoPLC(53,88,4,a,0); */
       //掰片机
        Manager.sendtoPLC(5,88,4,a,0);
       //机械手
              //磨边机
       Manager.sendtoPLC(7,6088,4,a,0);
       //倒角机
       Manager.sendtoPLC(9,13400,4,a,0);
       //钻孔机
       Manager.sendtoPLC(11,88,4,a,0);
       Manager.sendtoPLC(31,88,4,a,0);
       Manager.sendtoPLC(32,88,4,a,0);
       Manager.sendtoPLC(33,88,4,a,0);
       //水刀
       Manager.sendtoPLC(12,176,6,as,0);
        Manager.sendtoPLC(34,176,6,as,0);
       Manager.sendtoPLC(35,176,6,as,0);
       Manager.sendtoPLC(36,176,6,as,0);
       //加工中心
       Manager.sendtoPLC(14,88,4,a,0);
       Manager.sendtoPLC(37,88,4,a,0);
       Manager.sendtoPLC(38,88,4,a,0);
       Manager.sendtoPLC(39,88,4,a,0);
       //支线后片台
       Manager.sendtoPLC(13,236,4,a,0);
       //丝印烘干
       Manager.sendtoPLC(19,10088,4,a,0);
       Manager.sendtoPLC(20,10088,4,a,0);
       Manager.sendtoPLC(21,10088,4,a,0);
       Manager.sendtoPLC(22,10088,4,a,0);
       //钢前
       Manager.sendtoPLC(23,88,4,a,0);
       //钢化
       Manager.sendtoPLC(24,26,8,ganghua,0);
       Manager.sendtoPLC(24,2,2,"0001",0);
       //钢后
       Manager.sendtoPLC(25,88,4,a,0);
       //贴膜
     /* Manager.sendtoPLC(26,88,4,a,0);
       Manager.sendtoPLC(76,88,4,a,0);
       Manager.sendtoPLC(77,88,4,a,0);  */
    }
    else if(zts==99){
       Manager.dayin(1,changpinghao);
    }
%>