CanadaMes-ui/src/lang/locales/en-US.json
@@ -375,9 +375,9 @@ "D01手动状态": "D01 Manual Status", "清除ID": "Clear ID", "ID": "ID", "A02ID": "ID", "B01ID": "ID", "B02ID": "ID", "A02ID": "A02ID", "B01ID": "B01ID", "B02ID": "B02ID", "D02手动状态": "D02 Manual Status", "D03手动状态": "D03 Manual Status", "D04手动状态": "D04 Manual Status", CanadaMes-ui/src/layout/index.vue
@@ -258,12 +258,9 @@ this.$forceUpdate(); if(obj.Abort){ if (obj.Abort[0].length > 0) { this.receivedData=obj.Abort[0][0]; @@ -271,6 +268,7 @@ this.dialogFormVisible3 = true; } } this.$forceUpdate(); }.bind(this); //关闭事件 CanadaMes-ui/src/views/Electrical/AutomaticParameterSetting.vue
@@ -64,7 +64,7 @@ v-model="item.value" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" @keyup.enter.native="submitDataToBackend"> @keyup.enter.native="submitDataToBackend($event)"> </el-input> <!-- <el-input v-if="item.type === '0'" @@ -114,6 +114,7 @@ }, methods: { closeSocket () { // 关闭 WebSocket 连接 @@ -155,7 +156,7 @@ const jsonString = JSON.stringify(jsonObject); console.log('提交以下数据到后端:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, initWebSocket () { @@ -181,109 +182,117 @@ }; // 收到消息 let isMouseInInputBox = false; // 标记鼠标是否在输入框内 // let isMouseInInputBox = false; // 标记鼠标是否在输入框内 const inputBox = document.querySelectorAll('.input-box'); inputBox.forEach(box => { box.addEventListener('mouseenter', () => { isMouseInInputBox = true; }); box.addEventListener('mouseleave', () => { isMouseInInputBox = false; }); }); // const inputBox = document.querySelectorAll('.input-box'); // inputBox.forEach(box => { // box.addEventListener('mouseenter', () => { // isMouseInInputBox = true; // }); // box.addEventListener('mouseleave', () => { // isMouseInInputBox = false; // }); // }); socket.onmessage = (msg) => { if (!msg.data) { return; // 如果收到空数据,则直接返回,不执行后续逻辑 } // 添加判断条件:如果光标在输入框内,则不执行后续逻辑 if (document.activeElement.tagName.toLowerCase() === 'input') { return; } let obj = JSON.parse(msg.data); const jsonData2 = this.jsonData; const parms = obj.params; const fanzhuan = obj.fanzhuan; const xiaoche = obj.xiaoche; const dache = obj.dache1; const fanzhuan = obj.fanzhuan; const xiaoche = obj.xiaoche; const dache = obj.dache1; const parms2 = obj.params2; const fanzhuan2 = obj.fanzhuan2; const xiaoche2 = obj.xiaoche2; const parms2 = obj.params2; const fanzhuan2 = obj.fanzhuan2; const xiaoche2 = obj.xiaoche2; if(parms && !isMouseInInputBox){ if(parms){ let index = 0; for (let i = 0; i < jsonData2.length - 1; i++) { let arr = jsonData2[i]; let index = 0; for (let i = 0; i < jsonData2.length - 1; i++) { let arr = jsonData2[i]; for (let j = 0; j < arr.length; j++) { let obj = arr[j]; if (obj.type === '0' && Object.prototype.hasOwnProperty.call(obj, 'value')) { if (Array.isArray(parms) && Array.isArray(parms[0]) && parms[0][index] !== undefined) { obj.value = parms[0][index]; index++; } for (let j = 0; j < arr.length; j++) { let obj = arr[j]; if (obj.type === '0' && Object.prototype.hasOwnProperty.call(obj, 'value')) { if (Array.isArray(parms) && Array.isArray(parms[0]) && parms[0][index] !== undefined) { obj.value = parms[0][index]; index++; } } } if (Array.isArray(fanzhuan) && Array.isArray(fanzhuan[0]) && fanzhuan[0][0] !== undefined) { jsonData2[4][0]['value'] = fanzhuan[0][0]; } if (Array.isArray(xiaoche) && Array.isArray(xiaoche[0]) && xiaoche[0][0] !== undefined) { jsonData2[3][0]['value'] = xiaoche[0][0]; } if (Array.isArray(dache) && Array.isArray(dache[0]) && dache[0][0] !== undefined) { jsonData2[2][0]['value'] = dache[0][0]; } let index2 = 0; for (let i = 5; i < jsonData2.length; i++) { let arr2 = jsonData2[i]; for (let j = 0; j < arr2.length; j++) { let obj2 = arr2[j]; if (obj2.type === '0' && Object.prototype.hasOwnProperty.call(obj2, 'value')) { if (Array.isArray(parms2) && Array.isArray(parms2[0]) && parms2[0][index2] !== undefined) { obj2.value = parms2[0][index2]; index2++; } } } } for (let i = 0; i < jsonData2.length; i++) { let arr = jsonData2[i]; for (let j = 0; j < arr.length; j++) { let obj = arr[j]; if (obj.type === '0' && Object.prototype.hasOwnProperty.call(obj, 'value')) { if (Array.isArray(parms) && Array.isArray(parms[0]) && parms[0][index] !== undefined) { obj.value = parms[0][index]; index++; } } } } if (Array.isArray(fanzhuan2) && Array.isArray(fanzhuan2[0]) && fanzhuan2[0][0] !== undefined) { jsonData2[8][0]['value'] = fanzhuan2[0][0]; } if (Array.isArray(xiaoche2) && Array.isArray(xiaoche2[0]) && xiaoche2[0][0] !== undefined) { jsonData2[9][0]['value'] = xiaoche2[0][0]; } } if (Array.isArray(fanzhuan) && Array.isArray(fanzhuan[0]) && fanzhuan[0][0] !== undefined) { jsonData2[4][0]['value'] = fanzhuan[0][0]; } if (Array.isArray(xiaoche) && Array.isArray(xiaoche[0]) && xiaoche[0][0] !== undefined) { jsonData2[3][0]['value'] = xiaoche[0][0]; } if (Array.isArray(dache) && Array.isArray(dache[0]) && dache[0][0] !== undefined) { jsonData2[2][0]['value'] = dache[0][0]; } let index2 = 0; for (let i = 5; i < jsonData2.length; i++) { let arr2 = jsonData2[i]; for (let j = 0; j < arr2.length; j++) { let obj2 = arr2[j]; if (obj2.type === '0' && Object.prototype.hasOwnProperty.call(obj2, 'value')) { if (Array.isArray(parms2) && Array.isArray(parms2[0]) && parms2[0][index2] !== undefined) { obj2.value = parms2[0][index2]; index2++; } } } } // // 添加判断条件:如果光标在输入框内,则不执行后续逻辑 // if (document.activeElement.tagName.toLowerCase() === 'input') { // return; // } for (let i = 0; i < jsonData2.length; i++) { let arr = jsonData2[i]; for (let j = 0; j < arr.length; j++) { let obj = arr[j]; if (obj.type === '0' && Object.prototype.hasOwnProperty.call(obj, 'value')) { if (Array.isArray(parms) && Array.isArray(parms[0]) && parms[0][index] !== undefined) { obj.value = parms[0][index]; index++; } } } } if (Array.isArray(fanzhuan2) && Array.isArray(fanzhuan2[0]) && fanzhuan2[0][0] !== undefined) { jsonData2[8][0]['value'] = fanzhuan2[0][0]; } if (Array.isArray(xiaoche2) && Array.isArray(xiaoche2[0]) && xiaoche2[0][0] !== undefined) { jsonData2[9][0]['value'] = xiaoche2[0][0]; } } }; // 关闭事件 socket.onclose = function () { console.log("websocket已关闭"); CanadaMes-ui/src/views/Electrical/ManualonePosition.vue
@@ -58,16 +58,16 @@ <el-input style="width:250px;" v-if="item.state != 0 && item.type === '0' && groupIndex === 0 && (itemIndex === 2)" readonly v-model="item.value" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input> <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 0 " v-model="item.value" @keyup.enter.native="A01start" <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 0 " v-model="item.value" @keyup.enter.native="A01start($event)" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input> <el-input style="width: 250px;" v-else-if="(item.state !== 0) && (item.type === '0') && (itemIndex === 2)" v-model="item.value" readonly class="input-box" ></el-input> <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1" v-model="item.value" @keyup.enter.native="A02start" <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1" v-model="item.value" @keyup.enter.native="A02start($event)" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input> <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 2" v-model="item.value" @keyup.enter.native="B01start" <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 2" v-model="item.value" @keyup.enter.native="B01start($event)" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input> <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 3" v-model="item.value" @keyup.enter.native="B02start" <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 3" v-model="item.value" @keyup.enter.native="B02start($event)" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input> <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0'" v-model="item.value" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" ></el-input> @@ -151,7 +151,7 @@ }, A01start(){ A01start(event){ const data = []; @@ -190,9 +190,9 @@ const jsonString = JSON.stringify(jsonObject); console.log('所有Type为0的value:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, A02start(){ A02start(event){ const data = []; for (let i = 1; i < 2; i++) { @@ -223,9 +223,9 @@ const jsonString = JSON.stringify(jsonObject); console.log('所有Type为0的value:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, B01start(){ B01start(event){ const data = []; for (let i = 2; i < 3; i++) { @@ -248,9 +248,9 @@ const jsonString = JSON.stringify(jsonObject); console.log('所有Type为0的value:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, B02start(){ B02start(event){ const data = []; for (let i = 3; i < 4; i++) { @@ -283,7 +283,7 @@ const jsonString = JSON.stringify(jsonObject); console.log('所有Type为0的value:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, submitDataToBackend (currentButtonName) { if (currentButtonName === 'A01启动' || currentButtonName === 'A01 Start') { @@ -440,7 +440,7 @@ } }, @@ -467,21 +467,26 @@ }; // 收到消息 let isMouseInInputBox = false; // 标记鼠标是否在输入框内 // let isMouseInInputBox = false; // 标记鼠标是否在输入框内 const inputBox = document.querySelectorAll('.input-box'); inputBox.forEach(box => { box.addEventListener('mouseenter', () => { isMouseInInputBox = true; }); box.addEventListener('mouseleave', () => { isMouseInInputBox = false; }); }); // const inputBox = document.querySelectorAll('.input-box'); // inputBox.forEach(box => { // box.addEventListener('mouseenter', () => { // isMouseInInputBox = true; // }); // box.addEventListener('mouseleave', () => { // isMouseInInputBox = false; // }); // }); socket.onmessage = (msg) => { if (!msg.data) { return; // 如果收到空数据,则直接返回,不执行后续逻辑 } // 添加判断条件:如果光标在输入框内,则不执行后续逻辑 if (document.activeElement.tagName.toLowerCase() === 'input') { return; } let obj = JSON.parse(msg.data); @@ -489,7 +494,7 @@ const weihuiling = obj.weihuiling; if(obj.zuhe1&& !isMouseInInputBox){ if(obj.zuhe1){ // console.log(obj); CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
@@ -51,11 +51,11 @@ <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1 && (itemIndex === 2)" readonly v-model="item.value" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`"></el-input> <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 0 " v-model="item.value" @keyup.enter.native="A01start" <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 0 " v-model="item.value" @keyup.enter.native="A01start($event)" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`"></el-input> <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1 " v-model="item.value" @keyup.enter.native="A02start" <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1 " v-model="item.value" @keyup.enter.native="A02start($event)" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`"></el-input> @@ -133,7 +133,7 @@ }, A01start(){ A01start(event){ const data = []; for (let i = 0; i < 1; i++) { @@ -155,10 +155,10 @@ const jsonString = JSON.stringify(jsonObject); console.log('所有Type为0的value:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, A02start(){ A02start(event){ const data = []; @@ -180,6 +180,7 @@ const jsonString = JSON.stringify(jsonObject); console.log('所有Type为0的value:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, //提交方法 submitDataToBackend (currentButtonName) { @@ -318,22 +319,27 @@ }; // 收到消息 let isMouseInInputBox = false; // 标记鼠标是否在输入框内 // let isMouseInInputBox = false; // 标记鼠标是否在输入框内 const inputBox = document.querySelectorAll('.input-box'); inputBox.forEach(box => { box.addEventListener('mouseenter', () => { isMouseInInputBox = true; }); box.addEventListener('mouseleave', () => { isMouseInInputBox = false; }); }); // const inputBox = document.querySelectorAll('.input-box'); // inputBox.forEach(box => { // box.addEventListener('mouseenter', () => { // isMouseInInputBox = true; // }); // box.addEventListener('mouseleave', () => { // isMouseInInputBox = false; // }); // }); socket.onmessage = (msg) => { if (!msg.data) { return; // 如果收到空数据,则直接返回,不执行后续逻辑 } if (document.activeElement.tagName.toLowerCase() === 'input') { return; } let obj = JSON.parse(msg.data); // console.log(obj) @@ -343,7 +349,7 @@ if (obj.zuhe1&& !isMouseInInputBox ) { if (obj.zuhe1 ) { // 执行更新逻辑 for (let i = 0; i < 2; i++) { jsonData2[i].forEach((item, index) => { CanadaMes-ui/src/views/Electrical/Parameter2.vue
@@ -186,7 +186,7 @@ <el-input v-if="item.type === '0' && groupIndex==15" v-model="item.value" @keyup.enter.native="timeout" @keyup.enter.native="timeout($event)" style="width: 300px" class="input-box2" ></el-input> @@ -274,7 +274,7 @@ } }, //范围 0-100 timeout(){ timeout(event){ const data3 = []; @@ -306,7 +306,7 @@ // setTimeout(()=> // window.location.reload(),2000 // ) event.target.blur(); // 取消输入框焦点 }, @@ -396,22 +396,25 @@ socket.onopen = function () { console.log("websocket已打开"); }; let isMouseInInputBox = false; // 标记鼠标是否在输入框内 // let isMouseInInputBox = false; // 标记鼠标是否在输入框内 let isUpdated = false; // 定义标志变量 const inputBox = document.querySelectorAll('.input-box2'); inputBox.forEach(box => { box.addEventListener('mouseenter', () => { isMouseInInputBox = true; }); box.addEventListener('mouseleave', () => { isMouseInInputBox = false; }); }); // const inputBox = document.querySelectorAll('.input-box2'); // inputBox.forEach(box => { // box.addEventListener('mouseenter', () => { // isMouseInInputBox = true; // }); // box.addEventListener('mouseleave', () => { // isMouseInInputBox = false; // }); // }); // 收到消息 socket.onmessage = (msg) => { if (!msg.data) { return; // 如果收到空数据,则直接返回,不执行后续逻辑 } if (document.activeElement.tagName.toLowerCase() === 'input') { return; } let obj = JSON.parse(msg.data); @@ -425,7 +428,7 @@ // const inputBox = document.querySelectorAll('.id'); // const target = event.target; if (parms && !isMouseInInputBox) { if (parms ) { //急停按钮 jsonData2[13][0].button.value = obj.jiting[0][0]; jsonData2[14][0].button.value = obj.jiting[0][1]; @@ -505,6 +508,8 @@ } } } this.$forceUpdate(); //扫描枪扫码的ID jsonData2.forEach((item) => { CanadaMes-ui/src/views/Electrical/Positioning1.vue
@@ -137,7 +137,7 @@ v-if="item.type === '0'" v-model="item.value" class="input-box" :oninput="`value=value.replace(/^0|[^0-9]/g,'');if(value<`+item.min+`){value=`+item.value+`}else if(value>`+item.max+`){value=`+item.value+`}`" @keyup.enter.native="submitDataToBackend" @keyup.enter.native="submitDataToBackend($event)" ></el-input> <span v-if="item.unit" :name="item.unit">{{ item.unit }}</span> @@ -180,7 +180,7 @@ this.$set(dataGroup[itemIndex].button, "value", 1); // 点击按钮后将值改为1 }, //提交数据到后端 submitDataToBackend() { submitDataToBackend(event) { const inputData = this.jsonData.map((dataGroup) => { return dataGroup.map((item) => { if (item.type === "0") { @@ -208,6 +208,7 @@ const jsonString = JSON.stringify(jsonObject); console.log('提交以下数据到后端:', jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, initWebSocket() { let viewname = "Positioning1"; @@ -236,21 +237,24 @@ }; // 收到消息 let isMouseInInputBox = false; // 标记鼠标是否在输入框内 // let isMouseInInputBox = false; // 标记鼠标是否在输入框内 const inputBox = document.querySelectorAll('.input-box'); inputBox.forEach(box => { box.addEventListener('mouseenter', () => { isMouseInInputBox = true; }); box.addEventListener('mouseleave', () => { isMouseInInputBox = false; }); }); // const inputBox = document.querySelectorAll('.input-box'); // inputBox.forEach(box => { // box.addEventListener('mouseenter', () => { // isMouseInInputBox = true; // }); // box.addEventListener('mouseleave', () => { // isMouseInInputBox = false; // }); // }); socket.onmessage = (msg) => { if (!msg.data) { return; // 如果收到空数据,则直接返回,不执行后续逻辑 } if (document.activeElement.tagName.toLowerCase() === 'input') { return; } let obj = JSON.parse(msg.data); @@ -258,7 +262,7 @@ const parms = obj.params; if(parms && !isMouseInInputBox){ // 只有在鼠标不在输入框内时才更新数据 if(parms ){ // 只有在鼠标不在输入框内时才更新数据 // console.log(parms) let index = 0; CanadaMes-ui/src/views/Electrical/ServoManualone.vue
@@ -116,7 +116,7 @@ <el-input v-if="item.type === '0' && groupIndex === 0" v-model="item.value" @keyup.enter.native="zuhe1" @keyup.enter.native="zuhe1($event)" class="input-box" :class="{ 'special-class': groupIndex === 0, @@ -127,7 +127,7 @@ <el-input v-else-if="item.type === '0' && groupIndex === 1" v-model="item.value" @keyup.enter.native="zuhe2" @keyup.enter.native="zuhe2($event)" class="input-box" :class="{ 'special-class': groupIndex === 0, @@ -317,7 +317,7 @@ this.$set(dataGroup[itemIndex].button, "value", 1); } }, zuhe1() { zuhe1(event) { const data = []; for (let i = 0; i < 1; i++) { @@ -387,8 +387,9 @@ const jsonString = JSON.stringify(jsonObject); console.log("所有Type为0的value:", jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, zuhe2() { zuhe2(event) { const data2 = []; for (let i = 1; i < 2; i++) { @@ -453,6 +454,7 @@ const jsonString = JSON.stringify(jsonObject); console.log("所有Type为0的value:", jsonString); socket?.send(jsonString); event.target.blur(); // 取消输入框焦点 }, submitDataToBackend(currentButtonName) { const data = []; @@ -682,17 +684,17 @@ console.log("websocket已打开"); }; let isMouseInInputBox = false; // 标记鼠标是否在输入框内 // let isMouseInInputBox = false; // 标记鼠标是否在输入框内 const inputBox = document.querySelectorAll(".input-box"); inputBox.forEach((box) => { box.addEventListener("mouseenter", () => { isMouseInInputBox = true; }); box.addEventListener("mouseleave", () => { isMouseInInputBox = false; }); }); // const inputBox = document.querySelectorAll(".input-box"); // inputBox.forEach((box) => { // box.addEventListener("mouseenter", () => { // isMouseInInputBox = true; // }); // box.addEventListener("mouseleave", () => { // isMouseInInputBox = false; // }); // }); socket.onmessage = (msg) => { if (!msg.data) { @@ -703,8 +705,11 @@ // console.log(obj) const weihuiling = obj.weihuiling; const jsonData2 = this.jsonData; if (document.activeElement.tagName.toLowerCase() === 'input') { return; } if (obj.zuhe1 && !isMouseInInputBox) { if (obj.zuhe1 ) { //启动按钮 // 执行更新逻辑 springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
@@ -49,7 +49,7 @@ List<String> addressList1 = Arrays.asList(config.getProperty("Parameter2.id").split(",")); List<String> paramlist = S7control.getinstance().readStrings(addressList1); // System.out.println("addressList:" + paramlist); //手动状态 List<String> addresses = Arrays.asList(config.getProperty("Parameter2.state").split(",")); @@ -215,7 +215,7 @@ } } } } } // 检查布尔值列表是否为空 if (!sValue.isEmpty()) { @@ -224,6 +224,7 @@ S7control.getinstance().WriteBit(addressList0, sValue); System.out.println("Values " + sValue + " written to PLC at address " + addressList0); } } } } catch (Exception e) { System.err.println("An error occurred while writing bit to PLC: " + e.getMessage()); springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -174,7 +174,10 @@ //终止继续按钮 List<String> niuanaddressList3 = Arrays.asList(config.getProperty("Parameter2.stop").split(",")); List<Boolean> anniuread = S7control.getinstance().readBits(niuanaddressList3); // Boolean[] value4 = { false, false}; // List<Boolean> anniuread = new ArrayList<>(Arrays.asList(value4)); // Boolean[] value5 = { true}; // List<Boolean> resets = new ArrayList<>(Arrays.asList(value5)); short[] anniuparams = new short[anniuread.size()]; for (int i = 0; i < anniuread.size(); i++) { boolean value = anniuread.get(i); @@ -188,7 +191,7 @@ resets2[i] = value ? (short) 1 : (short) 0; } // System.out.println(resets); System.out.println(resets); for (short number : resets2) { if (number == 1) { springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -19,22 +19,22 @@ //new PlcHold().start(); new Plchome().start(); new Plcalarm().start(); new Plcsign().start(); new Plcstate().start(); new PlcPositioning1().start(); new PlcParameter2().start(); new PLCAutomaticParameterSetting().start(); new PlcManualonePosition().start(); new PlcManualonePosition2().start(); new PlcServoManualone().start(); new PLCManualJog().start(); // new Plchome().start(); // // new Plcalarm().start(); // // new Plcsign().start(); // // // new Plcstate().start(); // new PlcPositioning1().start(); // // new PlcParameter2().start(); // // new PLCAutomaticParameterSetting().start(); // new PlcManualonePosition().start(); // new PlcManualonePosition2().start(); // new PlcServoManualone().start(); // new PLCManualJog().start(); } }