廖井涛
2023-12-25 edb59164b6742793776aafe42b6559d1a0c4c654
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<%@page import="builder.Manager"%>
<%@page import="ng.devices.HexUtil"%>
<%@page import="ng.db.sendOptFile"%>
<%
 
 String zt=request.getParameter("zt");
String peifanhao=request.getParameter("peifanhao"); 
String changpinghao=request.getParameter("changpinghao"); 
 
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);
 
 
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(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);
     }
     
 
 
 
%>