| | |
| | | "address": "DB100.0",
|
| | | "count": 3,
|
| | | "state": 1
|
| | | |
| | | },
|
| | | {
|
| | | "name": "A01定位速度",
|
| | |
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | | "state": 1,
|
| | | "min":0,
|
| | | "max":3000
|
| | | },
|
| | | {
|
| | | "name": "A01当前格子",
|
| | |
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | | |
| | | },
|
| | | {
|
| | | "button": {
|
| | |
| | | "address": "DB100.0",
|
| | | "count": 3,
|
| | | "state": 1
|
| | | |
| | | |
| | | },
|
| | | {
|
| | | "name": "A02定位速度",
|
| | |
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | | "state": 1,
|
| | | "min":0,
|
| | | "max":3000
|
| | | },
|
| | | {
|
| | | "name": "A02当前格子",
|
| | |
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | | |
| | | },
|
| | | {
|
| | | "button": {
|
| | |
| | | "type": "0",
|
| | | "address": "DB100.0",
|
| | | "count": 3,
|
| | | "state": 1
|
| | | "state": 1,
|
| | | "min":1,
|
| | | "max":105
|
| | | },
|
| | | {
|
| | | "name": "B01定位速度",
|
| | |
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | | "state": 1,
|
| | | "min":0,
|
| | | "max":2000
|
| | | },
|
| | | {
|
| | | "name": "B01当前格子",
|
| | |
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | |
|
| | | },
|
| | | {
|
| | | "button": {
|
| | |
| | | [
|
| | | {
|
| | | "name": "B02手动格子",
|
| | | "value": 0,
|
| | | "value": "",
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address": "DB100.0",
|
| | | "count": 3,
|
| | | "state": 1
|
| | | "state": 1,
|
| | | "min":106,
|
| | | "max":210
|
| | | },
|
| | | {
|
| | | "name": "B02定位速度",
|
| | |
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | | "state": 1,
|
| | | "min":0,
|
| | | "max":2000
|
| | | },
|
| | | {
|
| | | "name": "B02当前格子",
|
| | |
| | | "address": "DB100.0",
|
| | | "type": "0",
|
| | | "state": 1
|
| | | |
| | | },
|
| | | {
|
| | | "button": {
|
| | |
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address": "DB100.0",
|
| | | "count": 3
|
| | | "count": 3,
|
| | | "min":0,
|
| | | "max":99
|
| | | },
|
| | | {
|
| | | "name": "A01定位速度",
|
| | | "value": 0,
|
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0"
|
| | | "type": "0",
|
| | | "min":0,
|
| | | "max":99
|
| | | },
|
| | | {
|
| | | "name": "A01翻转实时位置",
|
| | |
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0"
|
| | | |
| | | },
|
| | | {
|
| | | "button": {
|
| | |
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address": "DB100.0",
|
| | | "count": 3
|
| | | "count": 3,
|
| | | "min":0,
|
| | | "max":99
|
| | | },
|
| | | {
|
| | | "name": "A02定位速度",
|
| | | "value": 0,
|
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0"
|
| | | "type": "0",
|
| | | "min":0,
|
| | | "max":99
|
| | | },
|
| | | {
|
| | | "name": "A02翻转实时位置",
|
| | |
| | | "sending": 0,
|
| | | "address": "DB100.0",
|
| | | "type": "0"
|
| | | |
| | | },
|
| | | {
|
| | | "button": {
|
| | |
| | | "sending": 0, |
| | | "type": "0", |
| | | "unit": "mm", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | }], |
| | | [{ |
| | |
| | | "sending": 0, |
| | | "type": "0", |
| | | "unit": "mm", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | }], |
| | | |
| | |
| | | "unit": "mm", |
| | | "value":"0", |
| | | "address":"DB100.48", |
| | | "count":10 |
| | | "count":10, |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "22#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "43#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "64#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "85#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "106#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "127#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "148#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "169#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "190#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | } |
| | | |
| | | |
| | |
| | | "unit": "mm", |
| | | "value":"0", |
| | | "address":"DB100.68", |
| | | "count":10 |
| | | "count":10, |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "22#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "43#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "64#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "85#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "106#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "127#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "148#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "169#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" , |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "190#格地址", |
| | |
| | | "sending": 0, |
| | | "type": "0" , |
| | | "unit": "mm", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | } |
| | | |
| | | |
| | |
| | | "unit": "mm", |
| | | "address":"DB100.0", |
| | | "count":3, |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "22#格地址", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0" |
| | | , |
| | | "value":"0" |
| | | "type": "0", |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "43#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "64#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "85#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | } |
| | | |
| | | |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "127#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "148#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "169#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "190#格地址", |
| | |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "type": "0", |
| | | "value":"0" |
| | | "value":"0", |
| | | "min":0, |
| | | "max":100 |
| | | } |
| | | |
| | | |
| | |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address":"DB100.0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | }, |
| | | { |
| | |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | |
| | | }, |
| | |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | |
| | | }, |
| | |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | |
| | | }, |
| | |
| | | "read": 11, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "存片格子", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "进片ID", |
| | | "read": 9999, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | |
| | | }, |
| | |
| | | "type": "0", |
| | | "address":"DB100.1", |
| | | "count":3, |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "取片格子", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "存片格子", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | }, |
| | | { |
| | | "name": "数量", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | |
| | | }, |
| | |
| | | "read": 8888, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | "value":0, |
| | | "min":0, |
| | | "max":100 |
| | | |
| | | |
| | | }, |
| | |
| | | "A02注电泵": "A02 oil pump",
|
| | | "A01行走伺服回零":"A01 SERVE TRAVEL Home",
|
| | | "A02行走伺服回零":"A02 SERVE TRAVEL Home"
|
| | | }
|
| | | },
|
| | | "A01行走伺服回零":"A01 SERVE TRAVEL Home",
|
| | | "A02行走伺服回零":"A02 SERVE TRAVEL Home"
|
| | |
|
| | |
|
| | |
|
| | |
| | | import VueI18n from 'vue-i18n' |
| | | import zhCN from './lang/locales/zh-CN.json' // 中文语言包 |
| | | import enUS from './lang/locales/en-US.json' // 英文语言包 |
| | | import websocketPlugin from './api/websocketPlugin'; // 引入插件文件 |
| | | // import store from './store' |
| | | |
| | | // import store from './store' |
| | | Vue.use(VueI18n) |
| | | Vue.use(websocketPlugin, { |
| | | ip: 'localhost', // 替换成你的 WebSocket 服务器 IP 地址 |
| | | }); |
| | | |
| | | const i18n = new VueI18n({ |
| | | locale: 'en-US', |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | for (let i = 0; i < jsonData2.length; i++) { |
| | | let arr = jsonData2[i]; |
| | |
| | | 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 (language === 'en-US') { |
| | | this.replaceChineseWithEnglish(); |
| | | } |
| | | // this.$forceUpdate(); |
| | | |
| | | SelectPassword().then(res => { |
| | | this.password = res.data.password; |
| | | console.log(this.password) |
| | | }); |
| | | |
| | | this.load(); |
| | | |
| | | }, |
| | | methods: { |
| | | closeSocket () { |
| | |
| | | this.$set(dataGroup[itemIndex].button, 'value2', 0); |
| | | } |
| | | }, |
| | | load(){ |
| | | |
| | | SelectPassword().then(res => { |
| | | this.password = res.data.password; |
| | | console.log(this.password) |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | console.log(this.jsonData) |
| | | |
| | | |
| | | |
| | | }, |
| | | submitDataToBackend (currentButtonName) { |
| | | |
| | | if (currentButtonName === 'A01 SERVE TRAVEL Home' || currentButtonName === 'A02 SERVE TRAVEL Home' || currentButtonName === 'A01行走伺服回零' || currentButtonName === 'A02行走伺服回零') { |
| | | if (currentButtonName === 'A01 SERVE TRAVEL Home' || currentButtonName === 'A02 SERVE TRAVEL Home' || currentButtonName === 'A01行走伺服回零' || currentButtonName === 'A02行走伺服回零') { |
| | | this.$prompt( |
| | | this.$t('Are you sure to perform this operation?'), |
| | | this.$t('prompt'), |
| | |
| | | socket?.send(jsonString); |
| | | } |
| | | }, |
| | | //根据读取PLC的值,根据名称改变颜色1打开,0关闭 |
| | | // getStatusClass (zhuangtai) { |
| | | // // console.log(zhuangtai); |
| | | // if (zhuangtai === 1) { |
| | | // return "op"; |
| | | // } |
| | | // else { |
| | | // return "dow"; |
| | | // } |
| | | |
| | | // }, |
| | | initWebSocket () { |
| | | let viewname = "ManualJog"; |
| | | |
| | |
| | | socket.onopen = function () { |
| | | console.log("websocket已打开"); |
| | | }; |
| | | |
| | | let isUpdated = false; // 定义标志变量 |
| | | // 收到消息 |
| | | socket.onmessage = (msg) => { |
| | | if (!msg.data) { |
| | |
| | | jsonData2[1][1].button.value = obj.params[0][27]; |
| | | |
| | | |
| | | if (!isUpdated) { |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | for (let j = 0; j < this.jsonData[i].length; j++) { |
| | | this.jsonData[i][j].button.value2 = this.jsonData[i][j].button.value; |
| | | } |
| | | } |
| | | isUpdated = true; // 更新标志变量的值 |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 关闭事件 |
| | | socket.onclose = function () { |
| | | console.log("websocket已关闭"); |
| | |
| | | <span class="name" style="width:300px;">{{ item.name }}</span>
|
| | |
|
| | | <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"></el-input>
|
| | | class="input-box" ></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"
|
| | | class="input-box"></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>
|
| | | class="input-box" ></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"
|
| | | class="input-box"></el-input>
|
| | | class="input-box" ></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"
|
| | | class="input-box"></el-input>
|
| | | class="input-box" ></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"
|
| | | class="input-box"></el-input>
|
| | | class="input-box" ></el-input>
|
| | | <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0'" v-model="item.value"
|
| | | class="input-box"></el-input>
|
| | | class="input-box" ></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="button-row" style="display: flex; justify-content: space-between;">
|
| | |
| | | import data from '../../configuration/Manualoneposition'
|
| | |
|
| | | import ManualonePosition2 from './ManualonePosition2.vue';
|
| | | // import { createWebSocket } from '../../api/websocket.js';
|
| | | let socket;
|
| | | export default {
|
| | | name: "ManualonePosition",
|
| | |
| | |
|
| | | for (let i = 0; i < 1; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | |
| | | return { value: item.value };
|
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | |
|
| | | console.log(values);
|
| | |
|
| | | if (values.length > 0) {
|
| | |
|
| | | let firstValue = values[0];
|
| | | if (!(firstValue >= "1" && firstValue <= "210") && firstValue !== "888" && firstValue !== "1000") {
|
| | | values.shift();
|
| | | this.$message.error("Out of range");
|
| | |
|
| | | return false;
|
| | | }
|
| | | }
|
| | | data.push(values);
|
| | | |
| | | |
| | | }
|
| | | data.push([], [], [],[],[],[]);
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | if (values.length > 0) {
|
| | |
|
| | | let firstValue = values[0];
|
| | | if (!(firstValue >= "1" && firstValue <= "210") && firstValue !== "888" && firstValue !== "1000") {
|
| | | values.shift();
|
| | | this.$message.error("Out of range");
|
| | | return false;
|
| | | }
|
| | | }
|
| | | data.unshift([]);
|
| | | data.push(values);
|
| | | }
|
| | |
| | | <template> |
| | | <div class="app"> |
| | | <div class="app"> |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') |
| | | }}</router-link> |
| | | <!-- <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') |
| | | <router-link |
| | | to="/Electrical/alarm" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Alarm") }}</router-link |
| | | > |
| | | <router-link |
| | | to="/Electrical/State" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("State") }}</router-link |
| | | > |
| | | <!-- <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') |
| | | }}</router-link> --> |
| | | <!-- <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') |
| | | <!-- <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') |
| | | }}</router-link> --> |
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | <router-link |
| | | to="/Electrical/Sign" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Sign") }}</router-link |
| | | > |
| | | <router-link |
| | | to="/Electrical/Servomanual" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Parameter") }}</router-link |
| | | > |
| | | </el-breadcrumb> |
| | | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link |
| | | to="/Electrical/Parameter2" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Automatic State") }}</router-link |
| | | > |
| | | <router-link |
| | | to="/Electrical/ManualJog" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("ManualJog") }}</router-link |
| | | > |
| | | |
| | | <router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Servomanualone') |
| | | }}</router-link> |
| | | <router-link |
| | | to="/Electrical/ManualonePosition" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("ManualonePosition") }}</router-link |
| | | > |
| | | |
| | | <router-link |
| | | to="/Electrical/Servomanualone" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Servomanualone") }}</router-link |
| | | > |
| | | <!-- <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1') |
| | | }}</router-link> --> |
| | | |
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Address parameter settings') |
| | | }}</router-link> |
| | | |
| | | <router-link |
| | | to="/Electrical/Positioning1" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Address parameter settings") }}</router-link |
| | | > |
| | | <!-- <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Positioning2') |
| | | }}</router-link> --> |
| | | |
| | | |
| | | <!-- <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> --> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Speed parameter settings') |
| | | }}</router-link> |
| | | |
| | | <router-link |
| | | to="/Electrical/AutomaticParameterSetting" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Speed parameter settings") }}</router-link |
| | | > |
| | | </el-breadcrumb> |
| | | |
| | | <el-row :gutter="26"> |
| | | <el-col :span="12" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex" style="margin-bottom: -20px;"> |
| | | <el-card class="json-block" style="width:auto;margin-bottom: 10px;"> |
| | | <el-row > |
| | | <el-col v-for="(item, itemIndex) in dataGroup" :key="itemIndex" :span="12"> |
| | | <div class="item-container"> |
| | | <div class="item-row"> |
| | | <span class="name" style='width:230px;'>{{ item.name }}</span> |
| | | |
| | | <el-input v-if="item.type === '0' && groupIndex === 0" v-model="item.value" @keyup.enter.native="zuhe1" class='input-box' :class="{ 'special-class': groupIndex === 0,'special-class2': groupIndex === 1 }" v-show="groupIndex !== 0 && groupIndex !== 1" ></el-input> |
| | | <el-input v-else-if="item.type === '0' && groupIndex === 1" v-model="item.value" @keyup.enter.native="zuhe2" class='input-box' :class="{ 'special-class': groupIndex === 0,'special-class2': groupIndex === 1 }" v-show="groupIndex !== 0 && groupIndex !== 1" ></el-input> |
| | | <el-input v-else-if="item.type === '0' && groupIndex === 2" v-model="item.value" readonly class='input-box' ></el-input> |
| | | <el-input v-else-if="item.type === '0' && groupIndex === 3" v-model="item.value" readonly class='input-box' ></el-input> |
| | | <el-input v-else-if="item.type === '0' && groupIndex === 4" v-model="item.value" readonly class='input-box' ></el-input> |
| | | <el-input v-else-if="item.type === '0' && groupIndex === 5" v-model="item.value" readonly class='input-box' ></el-input> |
| | | <el-input v-else-if="item.type === '0' " v-model="item.value" class='input-box' :class="{ 'special-class': groupIndex === 0,'special-class2': groupIndex === 1 }" v-show="groupIndex !== 0 && groupIndex !== 1" ></el-input> |
| | | <el-col |
| | | :span="12" |
| | | v-for="(dataGroup, groupIndex) in jsonData" |
| | | :key="groupIndex" |
| | | style="margin-bottom: -20px" |
| | | > |
| | | <el-card |
| | | class="json-block" |
| | | style="width: auto; margin-bottom: 10px; height: auto" |
| | | > |
| | | <el-row> |
| | | <el-col |
| | | v-for="(item, itemIndex) in dataGroup" |
| | | :key="itemIndex" |
| | | :span="12" |
| | | > |
| | | <div class="item-container"> |
| | | <div class="item-row"> |
| | | <span class="name" style="width: 230px">{{ item.name }}</span> |
| | | |
| | | <el-input |
| | | v-if="item.type === '0' && groupIndex === 0" |
| | | v-model="item.value" |
| | | @keyup.enter.native="zuhe1" |
| | | class="input-box" |
| | | :class="{ |
| | | 'special-class': groupIndex === 0, |
| | | 'special-class2': groupIndex === 1, |
| | | }" |
| | | v-show="groupIndex !== 0 && groupIndex !== 1" |
| | | ></el-input> |
| | | <el-input |
| | | v-else-if="item.type === '0' && groupIndex === 1" |
| | | v-model="item.value" |
| | | @keyup.enter.native="zuhe2" |
| | | class="input-box" |
| | | :class="{ |
| | | 'special-class': groupIndex === 0, |
| | | 'special-class2': groupIndex === 1, |
| | | }" |
| | | v-show="groupIndex !== 0 && groupIndex !== 1" |
| | | ></el-input> |
| | | <el-input |
| | | v-else-if="item.type === '0' && groupIndex === 2" |
| | | v-model="item.value" |
| | | readonly |
| | | class="input-box" |
| | | ></el-input> |
| | | <el-input |
| | | v-else-if="item.type === '0' && groupIndex === 3" |
| | | v-model="item.value" |
| | | readonly |
| | | class="input-box" |
| | | ></el-input> |
| | | <el-input |
| | | v-else-if="item.type === '0' && groupIndex === 4" |
| | | v-model="item.value" |
| | | readonly |
| | | class="input-box" |
| | | ></el-input> |
| | | <el-input |
| | | v-else-if="item.type === '0' && groupIndex === 5" |
| | | v-model="item.value" |
| | | readonly |
| | | class="input-box" |
| | | ></el-input> |
| | | <el-input |
| | | v-else-if="item.type === '0'" |
| | | v-model="item.value" |
| | | class="input-box" |
| | | :class="{ |
| | | 'special-class': groupIndex === 0, |
| | | 'special-class2': groupIndex === 1, |
| | | }" |
| | | v-show="groupIndex !== 0 && groupIndex !== 1" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div |
| | | class="button-row" |
| | | style="display: flex; justify-content: space-between" |
| | | > |
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex"> |
| | | <el-button |
| | | v-if="item.button && language === 'en-US'" |
| | | :name="item.button.name" |
| | | v-model="item.button.value" |
| | | :class="{ |
| | | 'action-button': true, |
| | | 'error-button': |
| | | item.button.name === 'Fault' && item.button.value === 1, |
| | | 'error-button2': |
| | | item.button.name === 'NotZero' && item.button.value === 0, |
| | | 'error-button3': |
| | | item.button.name === 'Zero' && item.button.value === 1, |
| | | fuwei: |
| | | item.button.name === 'Reset' && item.button.value === 1, |
| | | huiling: |
| | | item.button.name === 'Home' && item.button.value === 1, |
| | | qidong: |
| | | item.button.name === 'A01 Semi-Auto' && |
| | | item.button.value === 1, |
| | | qidong2: |
| | | item.button.name === 'A02 Semi-Auto' && |
| | | item.button.value === 1, |
| | | qidong3: |
| | | item.button.name === 'A01 Semi-Auto Start' && |
| | | item.button.value === 1, |
| | | qidong4: |
| | | item.button.name === 'A02 Semi-Auto Start' && |
| | | item.button.value === 1, |
| | | qidong5: |
| | | item.button.name === 'A02 Semi-Auto' && |
| | | item.button.value === 1, |
| | | jiting: |
| | | item.button.name === 'Abort/ResumeTasks' && |
| | | item.button.value === 1, |
| | | yihuiling: |
| | | item.button.name === 'Zero' && item.button.value === 1, |
| | | }" |
| | | @click=" |
| | | updateButtonValue(dataGroup, itemIndex); |
| | | submitDataToBackend(item.button.name); |
| | | " |
| | | >{{ item.button.name }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="item.button && language === 'zh-CN'" |
| | | :name="item.button.name" |
| | | v-model="item.button.value" |
| | | :class="{ |
| | | 'action-button': true, |
| | | 'error-button': |
| | | item.button.name === '故障' && item.button.value === 1, |
| | | 'error-button3': |
| | | item.button.name === '已回零' && item.button.value === 1, |
| | | 'error-button2': |
| | | item.button.name === '未回零' && item.button.value === 0, |
| | | fuwei: item.button.name === '复位' && item.button.value === 1, |
| | | huiling: |
| | | item.button.name === '回零' && item.button.value === 1, |
| | | qidong: |
| | | item.button.name === 'A01半自动' && item.button.value === 1, |
| | | qidong2: |
| | | item.button.name === 'A02半自动' && item.button.value === 1, |
| | | qidong3: |
| | | item.button.name === 'A01半自动启动' && |
| | | item.button.value === 1, |
| | | qidong4: |
| | | item.button.name === 'A02半自动启动' && |
| | | item.button.value === 1, |
| | | qidong5: |
| | | item.button.name === 'A02半自动' && item.button.value === 1, |
| | | jiting: |
| | | item.button.name === '急停后中止/继续选择' && |
| | | item.button.value === 1, |
| | | yihuiling: |
| | | item.button.name === '已回零' && item.button.value === 1, |
| | | }" |
| | | @click=" |
| | | updateButtonValue(dataGroup, itemIndex); |
| | | submitDataToBackend(item.button.name); |
| | | " |
| | | >{{ item.button.name }}</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="button-row" style="display: flex; justify-content: space-between;"> |
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex"> |
| | | <el-button v-if="item.button && language === 'en-US' " :name="item.button.name" v-model="item.button.value" :class="{'action-button': true, 'error-button': item.button.name === 'Fault' && item.button.value === 1,'error-button2': item.button.name === 'NotZero' && item.button.value === 0,'error-button3': item.button.name === 'Zero' && item.button.value === 1,'fuwei': item.button.name === 'Reset' && item.button.value === 1,'huiling': item.button.name === 'Home' && item.button.value === 1,'qidong': item.button.name === 'A01 Semi-Auto' && item.button.value === 1,'qidong2': item.button.name === 'A02 Semi-Auto' && item.button.value === 1,'qidong3': item.button.name === 'A01 Semi-Auto Start' && item.button.value === 1,'qidong4': item.button.name === 'A02 Semi-Auto Start' && item.button.value === 1,'qidong5': item.button.name === 'A02 Semi-Auto' && item.button.value === 1,'jiting': item.button.name === 'Abort/ResumeTasks' && item.button.value === 1,'yihuiling': item.button.name === 'Zero' && item.button.value === 1}" @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend(item.button.name);">{{ item.button.name }}</el-button> |
| | | <el-button v-if="item.button && language === 'zh-CN' " :name="item.button.name" v-model="item.button.value" :class="{'action-button': true, 'error-button': item.button.name === '故障' && item.button.value === 1,'error-button3': item.button.name === '已回零' && item.button.value === 1,'error-button2': item.button.name === '未回零' && item.button.value === 0,'fuwei': item.button.name === '复位' && item.button.value === 1,'huiling': item.button.name === '回零' && item.button.value === 1,'qidong': item.button.name === 'A01半自动' && item.button.value === 1,'qidong2': item.button.name === 'A02半自动' && item.button.value === 1,'qidong3': item.button.name === 'A01半自动启动' && item.button.value === 1,'qidong4': item.button.name === 'A02半自动启动' && item.button.value === 1,'qidong5': item.button.name === 'A02半自动' && item.button.value === 1,'jiting': item.button.name === '急停后中止/继续选择' && item.button.value === 1,'yihuiling': item.button.name === '已回零' && item.button.value === 1 }" @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend(item.button.name);">{{ item.button.name }}</el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- <el-button @click="submitDataToBackend">提交数据到后端</el-button> --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import LanguageMixin from '../../lang/LanguageMixin' |
| | | import data from '../../configuration/ServoManualone' |
| | | import LanguageMixin from "../../lang/LanguageMixin"; |
| | | import data from "../../configuration/ServoManualone"; |
| | | |
| | | let socket; |
| | | export default { |
| | | export default { |
| | | name: "ServoManualone", |
| | | mixins: [LanguageMixin], |
| | | |
| | | |
| | | data() { |
| | | return { |
| | | jsonData: data , |
| | | language:this.$i18n.locale, |
| | | zhi:"1", |
| | | zhi2:"1" |
| | | jsonData: data, |
| | | language: this.$i18n.locale, |
| | | zhi: "1", |
| | | zhi2: "1", |
| | | // 加载整个data.json文件作为jsonData |
| | | } |
| | | }; |
| | | }, |
| | | |
| | | activated(){ |
| | | |
| | | activated() { |
| | | this.initWebSocket(); |
| | | const language = this.$i18n.locale; |
| | | // console.log(language); |
| | | if (language === 'en-US') { |
| | | this.replaceChineseWithEnglish(); |
| | | } |
| | | this.$forceUpdate(); |
| | | |
| | | |
| | | }, |
| | | // destroyed(){ |
| | | // this.close(); |
| | | // this.$router.go(0); |
| | | // }, |
| | | // console.log(language); |
| | | if (language === "en-US") { |
| | | this.replaceChineseWithEnglish(); |
| | | } |
| | | this.$forceUpdate(); |
| | | }, |
| | | // destroyed(){ |
| | | // this.close(); |
| | | // this.$router.go(0); |
| | | // }, |
| | | methods: { |
| | | closeSocket() { |
| | | // 关闭 WebSocket 连接 |
| | | socket.close(); |
| | | }, |
| | | |
| | | |
| | | |
| | | updateButtonValue(dataGroup, itemIndex) { |
| | | if (dataGroup[itemIndex].button.value === 1) { |
| | | // 如果当前按钮的值是 0,将其设为 1 |
| | | this.$set(dataGroup[itemIndex].button, 'value', 0); |
| | | } else { |
| | | // 否则将其设为 0 |
| | | this.$set(dataGroup[itemIndex].button, 'value', 1); |
| | | } |
| | | }, |
| | | zuhe1(){ |
| | | // 如果当前按钮的值是 0,将其设为 1 |
| | | this.$set(dataGroup[itemIndex].button, "value", 0); |
| | | } else { |
| | | // 否则将其设为 0 |
| | | this.$set(dataGroup[itemIndex].button, "value", 1); |
| | | } |
| | | }, |
| | | zuhe1() { |
| | | const data = []; |
| | | |
| | | const data = []; |
| | | for (let i = 0; i < 1; i++) { |
| | | const inputData = this.jsonData[i] |
| | | .filter((item) => item.type === "0" && item.read !== 9999) |
| | | .map((item) => { |
| | | return { value: item.value }; |
| | | }); |
| | | |
| | | for (let i = 0; i < 1; i++) { |
| | | const inputData = this.jsonData[i].filter(item => item.type === '0' && item.read !== 9999).map(item => { |
| | | return { value: item.value }; |
| | | }); |
| | | const values = inputData.map((item) => item.value); |
| | | |
| | | const values = inputData.map(item => item.value); |
| | | data.push(values); |
| | | } |
| | | |
| | | data.push(values); |
| | | |
| | | } |
| | | data.push([], [], []); |
| | | |
| | | for (let i = 0; i < 1; i++) { |
| | | const inputData = this.jsonData[i] |
| | | .filter((item) => item.type === "0" && item.read == 9999) |
| | | .map((item) => { |
| | | return { value: item.value }; |
| | | }); |
| | | |
| | | data.push([], [], []); |
| | | const values = inputData.map((item) => item.value); |
| | | |
| | | for (let i = 0; i < 1; i++) { |
| | | const inputData = this.jsonData[i].filter(item => item.type === '0' && item.read == 9999).map(item => { |
| | | return { value: item.value }; |
| | | }); |
| | | data.push(values); |
| | | } |
| | | data.push([], [], []); |
| | | |
| | | const values = inputData.map(item => item.value); |
| | | const jsonObject = { data }; |
| | | |
| | | data.push(values); |
| | | |
| | | } |
| | | data.push([], [],[]); |
| | | // 提交数据到后端 |
| | | const jsonString = JSON.stringify(jsonObject); |
| | | console.log("所有Type为0的value:", jsonString); |
| | | socket?.send(jsonString); |
| | | }, |
| | | zuhe2() { |
| | | const data2 = []; |
| | | |
| | | for (let i = 1; i < 2; i++) { |
| | | const inputData = this.jsonData[i] |
| | | .filter((item) => item.type === "0" && item.read !== 8888) |
| | | .map((item) => { |
| | | return { value: item.value }; |
| | | }); |
| | | |
| | | const jsonObject = { data }; |
| | | const values2 = inputData.map((item) => item.value); |
| | | |
| | | // 提交数据到后端 |
| | | const jsonString = JSON.stringify(jsonObject); |
| | | console.log('所有Type为0的value:', jsonString); |
| | | socket?.send(jsonString); |
| | | data2.push(values2); |
| | | } |
| | | data2.unshift([]); |
| | | |
| | | }, |
| | | zuhe2(){ |
| | | data2.push([], [], []); |
| | | |
| | | const data2 = []; |
| | | for (let i = 1; i < 2; i++) { |
| | | const inputData = this.jsonData[i] |
| | | .filter((item) => item.type === "0" && item.read == 8888) |
| | | .map((item) => { |
| | | return { value: item.value }; |
| | | }); |
| | | |
| | | for (let i = 1; i < 2; i++) { |
| | | const inputData = this.jsonData[i].filter(item => item.type === '0' && item.read !== 8888).map(item => { |
| | | return { value: item.value }; |
| | | }); |
| | | const values2 = inputData.map((item) => item.value); |
| | | |
| | | const values2 = inputData.map(item => item.value); |
| | | data2.push(values2); |
| | | data2.push([], [], []); |
| | | } |
| | | |
| | | data2.push(values2); |
| | | const jsonObject = { data: data2 }; |
| | | |
| | | } |
| | | data2.unshift([]); |
| | | // 提交数据到后端 |
| | | const jsonString = JSON.stringify(jsonObject); |
| | | console.log("所有Type为0的value:", jsonString); |
| | | socket?.send(jsonString); |
| | | }, |
| | | submitDataToBackend(currentButtonName) { |
| | | const data = []; |
| | | let jsonObject; |
| | | if (currentButtonName === "故障" || currentButtonName === "Fault") { |
| | | return false; |
| | | } |
| | | |
| | | data2.push([], [],[]); |
| | | if ( |
| | | currentButtonName === "A01半自动启动" || |
| | | currentButtonName === "A01 Semi-Auto Start" |
| | | ) { |
| | | const values = [this.jsonData[0][10].button.value]; |
| | | data.push(values); |
| | | data.unshift([], [], [], [], [], [], [], []); |
| | | jsonObject = { data }; |
| | | } |
| | | |
| | | for (let i = 1; i < 2; i++) { |
| | | const inputData = this.jsonData[i].filter(item => item.type === '0' && item.read == 8888).map(item => { |
| | | return { value: item.value }; |
| | | }); |
| | | if ( |
| | | currentButtonName === "A02半自动启动" || |
| | | currentButtonName === "A02 Semi-Auto Start" |
| | | ) { |
| | | const values2 = [this.jsonData[1][8].button.value]; |
| | | data.push(values2); |
| | | data.unshift([], [], [], [], [], [], [], [], []); |
| | | jsonObject = { data }; |
| | | } |
| | | |
| | | const values2 = inputData.map(item => item.value); |
| | | if (currentButtonName === "复位" || currentButtonName === "Reset") { |
| | | const resetButtonValues = this.jsonData |
| | | .map((item) => |
| | | item.find( |
| | | (subItem) => |
| | | subItem.button && |
| | | ["复位", "Reset"].includes(subItem.button.name) |
| | | ) |
| | | ) |
| | | .filter((value) => value !== null) |
| | | .map((item) => item.button.value); |
| | | |
| | | data2.push(values2); |
| | | data2.push( [],[], []); |
| | | |
| | | } |
| | | data.push(resetButtonValues.flat()); |
| | | data.unshift([], []); |
| | | data.push([], [], [], [], []); |
| | | jsonObject = { data }; |
| | | } |
| | | |
| | | if (currentButtonName === "回零" || currentButtonName === "Home") { |
| | | const data3 = []; |
| | | const resetButtonValues3 = this.jsonData |
| | | .map((item) => { |
| | | const buttonItem3 = item.find( |
| | | (subItem) => |
| | | subItem.button && ["回零", "Home"].includes(subItem.button.name) |
| | | ); |
| | | |
| | | const jsonObject = { data:data2 }; |
| | | return buttonItem3 ? buttonItem3.button.value : null; |
| | | }) |
| | | .filter((value) => value !== null); |
| | | |
| | | // 提交数据到后端 |
| | | const jsonString = JSON.stringify(jsonObject); |
| | | console.log('所有Type为0的value:', jsonString); |
| | | socket?.send(jsonString); |
| | | // 将得到的值添加到 data 数组中 |
| | | data3.push(resetButtonValues3.flat()); |
| | | |
| | | }, |
| | | submitDataToBackend(currentButtonName) { |
| | | const data = []; |
| | | let jsonObject; |
| | | if (currentButtonName === '故障' || currentButtonName === 'Fault') { |
| | | return false; |
| | | // 在 data3 数组前面添加两个空数组 |
| | | data3.unshift([], [], []); |
| | | data3.push([], [], [], []); |
| | | |
| | | } |
| | | // 创建 jsonObject3 对象,并添加 data3 属性 |
| | | jsonObject = { data: data3 }; |
| | | } |
| | | if ( |
| | | currentButtonName === "A01半自动" || |
| | | currentButtonName === "A01 Semi-Auto" |
| | | ) { |
| | | const elements = document.getElementsByClassName("special-class"); |
| | | const data = []; |
| | | |
| | | if (currentButtonName === 'A01半自动启动' || currentButtonName === 'A01 Semi-Auto Start') { |
| | | const values = [this.jsonData[0][10].button.value]; |
| | | data.push(values); |
| | | data.unshift([], [],[],[], [],[],[], []); |
| | | jsonObject = { data }; |
| | | } |
| | | for (let i = 0; i < elements.length; i++) { |
| | | if (elements[i].style.display === "none") { |
| | | elements[i].style.display = ""; // 显示元素 |
| | | this.zhi = 1; |
| | | // if(this.jsonData[0].button.name==='A01半自动' || this.jsonData[0].button.name === 'A01 Semi-Auto'){ |
| | | // this.jsonData[0].button.value=1 |
| | | // } |
| | | |
| | | if (currentButtonName === 'A02半自动启动' || currentButtonName === 'A02 Semi-Auto Start') { |
| | | const values2 = [this.jsonData[1][8].button.value]; |
| | | data.push(values2); |
| | | data.unshift([],[], [],[],[], [],[],[], []); |
| | | jsonObject = { data }; |
| | | } |
| | | |
| | | if (currentButtonName === '复位' || currentButtonName === 'Reset') { |
| | | const resetButtonValues = this.jsonData |
| | | .map(item => item.find(subItem => subItem.button && ['复位', 'Reset'].includes(subItem.button.name))) |
| | | .filter(value => value !== null) |
| | | .map(item => item.button.value); |
| | | |
| | | data.push(resetButtonValues.flat()); |
| | | data.unshift([], []); |
| | | data.push([], [], [], [], []); |
| | | jsonObject = { data }; |
| | | } |
| | | |
| | | if (currentButtonName === '回零' || currentButtonName === 'Home') { |
| | | const data3 = []; |
| | | const resetButtonValues3 = this.jsonData.map(item => { |
| | | const buttonItem3 = item.find(subItem => subItem.button && ['回零', 'Home'].includes(subItem.button.name)); |
| | | |
| | | return buttonItem3 ? buttonItem3.button.value : null; |
| | | }).filter(value => value !== null); |
| | | |
| | | // 将得到的值添加到 data 数组中 |
| | | data3.push(resetButtonValues3.flat()); |
| | | |
| | | // 在 data3 数组前面添加两个空数组 |
| | | data3.unshift([], [], []); |
| | | data3.push([], [], [], []); |
| | | |
| | | // 创建 jsonObject3 对象,并添加 data3 属性 |
| | | jsonObject = { data: data3 }; |
| | | |
| | | |
| | | } |
| | | if (currentButtonName === 'A01半自动' || currentButtonName === 'A01 Semi-Auto' ) { |
| | | const elements = document.getElementsByClassName('special-class'); |
| | | const data = []; |
| | | |
| | | for (let i = 0; i < elements.length; i++) { |
| | | if (elements[i].style.display === 'none') { |
| | | elements[i].style.display = ''; // 显示元素 |
| | | this.zhi=1; |
| | | // if(this.jsonData[0].button.name==='A01半自动' || this.jsonData[0].button.name === 'A01 Semi-Auto'){ |
| | | // this.jsonData[0].button.value=1 |
| | | // } |
| | | |
| | | |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if (obj2.button && (obj2.button.name === "A01半自动" || obj2.button.name === "A01 Semi-Auto")) { |
| | | obj2.button.value = 1; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if ( |
| | | obj2.button && |
| | | (obj2.button.name === "A01半自动" || |
| | | obj2.button.name === "A01 Semi-Auto") |
| | | ) { |
| | | obj2.button.value = 1; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | |
| | | |
| | | } |
| | | }else{ |
| | | elements[i].style.display = 'none'; |
| | | this.zhi=0; |
| | | // if(this.jsonData[0].button.name==='A01半自动' || this.jsonData[0].button.name === 'A01 Semi-Auto'){ |
| | | // this.jsonData[0].button.value=0 |
| | | // } |
| | | } |
| | | } else { |
| | | elements[i].style.display = "none"; |
| | | this.zhi = 0; |
| | | // if(this.jsonData[0].button.name==='A01半自动' || this.jsonData[0].button.name === 'A01 Semi-Auto'){ |
| | | // this.jsonData[0].button.value=0 |
| | | // } |
| | | |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if (obj2.button && (obj2.button.name === "A01半自动" || obj2.button.name === "A01 Semi-Auto")) { |
| | | obj2.button.value = 0; |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if ( |
| | | obj2.button && |
| | | (obj2.button.name === "A01半自动" || |
| | | obj2.button.name === "A01 Semi-Auto") |
| | | ) { |
| | | obj2.button.value = 0; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | data.push([this.zhi]); |
| | | |
| | | data.push([this.zhi]); |
| | | data.unshift([], [], [], [], [], []); |
| | | data.push([]); |
| | | |
| | | data.unshift([],[],[],[],[],[]); |
| | | data.push([]); |
| | | jsonObject = { data }; |
| | | |
| | | // 提交数据到后端 |
| | | } |
| | | |
| | | if ( |
| | | currentButtonName === "A02半自动" || |
| | | currentButtonName === "A02 Semi-Auto" |
| | | ) { |
| | | // 获取所有class为special-class2的元素 |
| | | const elements = document.getElementsByClassName("special-class2"); |
| | | |
| | | |
| | | jsonObject = { data }; |
| | | |
| | | // 提交数据到后端 |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | if (currentButtonName === 'A02半自动' || currentButtonName === 'A02 Semi-Auto' ) { |
| | | // 获取所有class为special-class2的元素 |
| | | const elements = document.getElementsByClassName('special-class2'); |
| | | |
| | | const data = []; |
| | | // 遍历所有元素 |
| | | for (let i = 0; i < elements.length; i++) { |
| | | // 如果元素隐藏 |
| | | if (elements[i].style.display === 'none') { |
| | | // 显示元素 |
| | | elements[i].style.display = ''; // 显示元素 |
| | | this.zhi2=1; |
| | | // 遍历jsonData |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | // 遍历arr |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | // 如果button的name为A02半自动或者A02 Semi-Auto |
| | | if (obj2.button && (obj2.button.name === "A02半自动" || obj2.button.name === "A02 Semi-Auto")) { |
| | | // 设置button的value为1 |
| | | obj2.button.value = 1; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | const data = []; |
| | | // 遍历所有元素 |
| | | for (let i = 0; i < elements.length; i++) { |
| | | // 如果元素隐藏 |
| | | if (elements[i].style.display === "none") { |
| | | // 显示元素 |
| | | elements[i].style.display = ""; // 显示元素 |
| | | this.zhi2 = 1; |
| | | // 遍历jsonData |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | // 遍历arr |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | // 如果button的name为A02半自动或者A02 Semi-Auto |
| | | if ( |
| | | obj2.button && |
| | | (obj2.button.name === "A02半自动" || |
| | | obj2.button.name === "A02 Semi-Auto") |
| | | ) { |
| | | // 设置button的value为1 |
| | | obj2.button.value = 1; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | }else{ |
| | | // 如果元素显示 |
| | | elements[i].style.display = 'none'; |
| | | this.zhi2=0; |
| | | // 遍历jsonData |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | // 遍历arr |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | // 如果button的name为A02半自动或者A02 Semi-Auto |
| | | if (obj2.button && (obj2.button.name === "A02半自动" || obj2.button.name === "A02 Semi-Auto")) { |
| | | // 设置button的value为0 |
| | | obj2.button.value = 0; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | } |
| | | } else { |
| | | // 如果元素显示 |
| | | elements[i].style.display = "none"; |
| | | this.zhi2 = 0; |
| | | // 遍历jsonData |
| | | for (let i = 0; i < this.jsonData.length; i++) { |
| | | let arr = this.jsonData[i]; |
| | | // 遍历arr |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | // 如果button的name为A02半自动或者A02 Semi-Auto |
| | | if ( |
| | | obj2.button && |
| | | (obj2.button.name === "A02半自动" || |
| | | obj2.button.name === "A02 Semi-Auto") |
| | | ) { |
| | | // 设置button的value为0 |
| | | obj2.button.value = 0; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 将zhi2添加到data数组中 |
| | | data.push([this.zhi2]); |
| | | // 将zhi2添加到data数组中 |
| | | data.push([this.zhi2]); |
| | | |
| | | // 将data数组添加到jsonObject中 |
| | | data.unshift([],[],[],[],[],[],[]); |
| | | // 将data数组添加到jsonObject中 |
| | | data.unshift([], [], [], [], [], [], []); |
| | | |
| | | jsonObject = { data }; |
| | | } |
| | | |
| | | jsonObject = { data }; |
| | | const jsonString = JSON.stringify(jsonObject); |
| | | console.log("所有Type为0的value:", jsonString); |
| | | socket?.send(jsonString); |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | const jsonString = JSON.stringify(jsonObject); |
| | | console.log('所有Type为0的value:', jsonString); |
| | | socket?.send(jsonString); |
| | | |
| | | }, |
| | | |
| | | initWebSocket () { |
| | | |
| | | initWebSocket() { |
| | | let viewname = "ServoManualone"; |
| | | |
| | | if (typeof WebSocket === "undefined") { |
| | | console.log("您的浏览器不支持WebSocket"); |
| | | } else { |
| | | |
| | | let socketUrl = "ws://" +this.$t('ip')+ ":8888" + "/springboot-vue3/api/talk/" + viewname; |
| | | let socketUrl = |
| | | "ws://" + |
| | | this.$t("ip") + |
| | | ":8888" + |
| | | "/springboot-vue3/api/talk/" + |
| | | viewname; |
| | | |
| | | if (socket != null) { |
| | | socket.close(); |
| | |
| | | console.log("websocket已打开"); |
| | | }; |
| | | |
| | | |
| | | 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; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | let obj = JSON.parse(msg.data); |
| | | socket.onmessage = (msg) => { |
| | | if (!msg.data) { |
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | let obj = JSON.parse(msg.data); |
| | | |
| | | // console.log(obj) |
| | | const weihuiling = obj.weihuiling; |
| | | const jsonData2 = this.jsonData; |
| | | |
| | | if (obj.zuhe1 && !isMouseInInputBox) { |
| | | //启动按钮 |
| | | |
| | | // 执行更新逻辑 |
| | | for (let i = 0; i < 6; i++) { |
| | | jsonData2[i].forEach((item, index) => { |
| | | if ( |
| | | typeof item.value !== "undefined" && |
| | | typeof obj[`zuhe${i + 1}`][0][index] !== "undefined" && |
| | | item.read !== "9999" && |
| | | item.read !== "8888" |
| | | ) { |
| | | item.value = obj[`zuhe${i + 1}`][0][index]; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // console.log(obj) |
| | | const weihuiling=obj.weihuiling; |
| | | const jsonData2 = this.jsonData; |
| | | //进片id |
| | | jsonData2.forEach((item) => { |
| | | item.forEach((subItem) => { |
| | | if (subItem.read === 9999) { |
| | | subItem.value = obj.jinpianid[0]; |
| | | } |
| | | }); |
| | | }); |
| | | //取片id |
| | | jsonData2.forEach((item) => { |
| | | item.forEach((subItem) => { |
| | | if (subItem.read === 8888) { |
| | | subItem.value = obj.qupianid[0]; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | if (obj.qidong) { |
| | | jsonData2[0][9].button.value = obj.qidong[0][0]; // 第一个子数组中第一个 type=66 的 button |
| | | jsonData2[0][10].button.value = obj.qidong[0][1]; // 第一个子数组中第二个 type=66 的 button |
| | | jsonData2[1][7].button.value = obj.qidong[0][2]; // 第二个子数组中第一个 type=66 的 button |
| | | jsonData2[1][8].button.value = obj.qidong[0][3]; |
| | | //故障更新 |
| | | |
| | | for (let i = 0; i < jsonData2.length; i++) { |
| | | let arr = jsonData2[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if ( |
| | | obj2.button && |
| | | (obj2.button.name === "故障" || obj2.button.name === "Fault") |
| | | ) { |
| | | obj2.button.value = obj.guzhang[0][i]; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 复位更新 |
| | | for (let i = 0; i < jsonData2.length; i++) { |
| | | let arr = jsonData2[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if ( |
| | | obj2.button && |
| | | (obj2.button.name === "复位" || obj2.button.name === "Reset") |
| | | ) { |
| | | obj2.button.value = obj.fuwei[0][i]; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (obj.zuhe1 && !isMouseInInputBox) { |
| | | |
| | | //启动按钮 |
| | | |
| | | //未回零更新 |
| | | |
| | | jsonData2[2][3].button.value = weihuiling[0][0]; |
| | | jsonData2[3][3].button.value = weihuiling[0][1]; |
| | | jsonData2[4][4].button.value = weihuiling[0][2]; |
| | | jsonData2[5][4].button.value = weihuiling[0][3]; |
| | | |
| | | // if(jsonData2[2][3].button.value===1){ |
| | | |
| | | |
| | | // 执行更新逻辑 |
| | | for (let i = 0; i < 6; i++) { |
| | | jsonData2[i].forEach((item, index) => { |
| | | if (typeof item.value !== 'undefined' && typeof obj[`zuhe${i+1}`][0][index] !== 'undefined'&& item.read !== '9999' && item.read !== '8888') { |
| | | item.value = obj[`zuhe${i+1}`][0][index]; |
| | | } |
| | | }); |
| | | } |
| | | // jsonData2[2][3].button.name.replace("未回零","回零") ; |
| | | // } |
| | | |
| | | //进片id |
| | | jsonData2.forEach((item) => { |
| | | item.forEach((subItem) => { |
| | | if (subItem.read === 9999) { |
| | | subItem.value = obj.jinpianid[0]; |
| | | } |
| | | }); |
| | | }); |
| | | //取片id |
| | | jsonData2.forEach((item) => { |
| | | item.forEach((subItem) => { |
| | | if (subItem.read === 8888) { |
| | | subItem.value = obj.qupianid[0]; |
| | | } |
| | | }); |
| | | }); |
| | | // console.log(jsonData2[5][4].button.value) |
| | | if ( |
| | | jsonData2[2][3].button.value === 1 && |
| | | (jsonData2[2][3].button.name === "NotZero" || |
| | | jsonData2[2][3].button.name === "未回零") |
| | | ) { |
| | | jsonData2[2][3].button.name = jsonData2[2][3].button.name.replace( |
| | | "未回零", |
| | | "已回零" |
| | | ); |
| | | jsonData2[2][3].button.name = jsonData2[2][3].button.name.replace( |
| | | "NotZero", |
| | | "Zero" |
| | | ); |
| | | } |
| | | if ( |
| | | jsonData2[3][3].button.value === 1 && |
| | | (jsonData2[3][3].button.name === "NotZero" || |
| | | jsonData2[3][3].button.name === "未回零") |
| | | ) { |
| | | jsonData2[3][3].button.name = jsonData2[3][3].button.name.replace( |
| | | "未回零", |
| | | "已回零" |
| | | ); |
| | | jsonData2[3][3].button.name = jsonData2[3][3].button.name.replace( |
| | | "NotZero", |
| | | "Zero" |
| | | ); |
| | | } |
| | | if ( |
| | | jsonData2[4][4].button.value === 1 && |
| | | (jsonData2[4][4].button.name === "NotZero" || |
| | | jsonData2[4][4].button.name === "未回零") |
| | | ) { |
| | | jsonData2[4][4].button.name = jsonData2[4][4].button.name.replace( |
| | | "未回零", |
| | | "已回零" |
| | | ); |
| | | jsonData2[4][4].button.name = jsonData2[4][4].button.name.replace( |
| | | "NotZero", |
| | | "Zero" |
| | | ); |
| | | } |
| | | if ( |
| | | jsonData2[5][4].button.value === 1 && |
| | | (jsonData2[5][4].button.name === "NotZero" || |
| | | jsonData2[5][4].button.name === "未回零") |
| | | ) { |
| | | jsonData2[5][4].button.name = jsonData2[5][4].button.name.replace( |
| | | "未回零", |
| | | "已回零" |
| | | ); |
| | | jsonData2[5][4].button.name = jsonData2[5][4].button.name.replace( |
| | | "NotZero", |
| | | "Zero" |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | if (obj.qidong){ |
| | | |
| | | |
| | | |
| | | |
| | | jsonData2[0][9].button.value = obj.qidong[0][0]; // 第一个子数组中第一个 type=66 的 button |
| | | jsonData2[0][10].button.value = obj.qidong[0][1]; // 第一个子数组中第二个 type=66 的 button |
| | | jsonData2[1][7].button.value = obj.qidong[0][2]; // 第二个子数组中第一个 type=66 的 button |
| | | jsonData2[1][8].button.value = obj.qidong[0][3]; |
| | | //故障更新 |
| | | |
| | | for (let i = 0; i < jsonData2.length; i++) { |
| | | let arr = jsonData2[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if (obj2.button && (obj2.button.name === "故障" || obj2.button.name === "Fault")) { |
| | | obj2.button.value = obj.guzhang[0][i]; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | // 复位更新 |
| | | for (let i = 0; i < jsonData2.length; i++) { |
| | | let arr = jsonData2[i]; |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj2 = arr[j]; |
| | | if (obj2.button && (obj2.button.name === "复位" || obj2.button.name === "Reset")) { |
| | | obj2.button.value = obj.fuwei[0][i]; |
| | | // console.log(obj2.button.value) |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | //未回零更新 |
| | | |
| | | jsonData2[2][3].button.value = weihuiling[0][0]; |
| | | jsonData2[3][3].button.value = weihuiling[0][1]; |
| | | jsonData2[4][4].button.value = weihuiling[0][2]; |
| | | jsonData2[5][4].button.value = weihuiling[0][3]; |
| | | |
| | | |
| | | // if(jsonData2[2][3].button.value===1){ |
| | | |
| | | // jsonData2[2][3].button.name.replace("未回零","回零") ; |
| | | // } |
| | | |
| | | // console.log(jsonData2[5][4].button.value) |
| | | if(jsonData2[2][3].button.value===1 && (jsonData2[2][3].button.name==="NotZero" ||jsonData2[2][3].button.name==="未回零")){ |
| | | jsonData2[2][3].button.name=jsonData2[2][3].button.name.replace("未回零","已回零") ; |
| | | jsonData2[2][3].button.name=jsonData2[2][3].button.name.replace("NotZero","Zero") ; |
| | | } |
| | | if(jsonData2[3][3].button.value===1 && (jsonData2[3][3].button.name==="NotZero" ||jsonData2[3][3].button.name==="未回零")){ |
| | | jsonData2[3][3].button.name=jsonData2[3][3].button.name.replace("未回零","已回零") ; |
| | | jsonData2[3][3].button.name=jsonData2[3][3].button.name.replace("NotZero","Zero") ; |
| | | } |
| | | if(jsonData2[4][4].button.value===1 && (jsonData2[4][4].button.name==="NotZero" ||jsonData2[4][4].button.name==="未回零")){ |
| | | jsonData2[4][4].button.name=jsonData2[4][4].button.name.replace("未回零","已回零") ; |
| | | jsonData2[4][4].button.name=jsonData2[4][4].button.name.replace("NotZero","Zero") ; |
| | | } |
| | | if(jsonData2[5][4].button.value===1 && (jsonData2[5][4].button.name==="NotZero" ||jsonData2[5][4].button.name==="未回零")){ |
| | | jsonData2[5][4].button.name=jsonData2[5][4].button.name.replace("未回零","已回零") ; |
| | | jsonData2[5][4].button.name=jsonData2[5][4].button.name.replace("NotZero","Zero") ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | if(jsonData2[2][3].button.value===0 && (jsonData2[2][3].button.name==="Zero" ||jsonData2[2][3].button.name==="已回零")){ |
| | | jsonData2[2][3].button.name=jsonData2[2][3].button.name.replace("已回零","未回零") ; |
| | | jsonData2[2][3].button.name=jsonData2[2][3].button.name.replace("Zero","NotZero") ; |
| | | } |
| | | if(jsonData2[3][3].button.value===0 && (jsonData2[3][3].button.name==="Zero" ||jsonData2[3][3].button.name==="已回零")){ |
| | | jsonData2[3][3].button.name=jsonData2[3][3].button.name.replace("已回零","未回零") ; |
| | | jsonData2[3][3].button.name=jsonData2[3][3].button.name.replace("Zero","NotZero") ; |
| | | } |
| | | if(jsonData2[4][4].button.value===0 && (jsonData2[4][4].button.name==="Zero" ||jsonData2[4][4].button.name==="已回零")){ |
| | | jsonData2[4][4].button.name=jsonData2[4][4].button.name.replace("已回零","未回零") ; |
| | | jsonData2[4][4].button.name=jsonData2[4][4].button.name.replace("Zero","NotZero") ; |
| | | } |
| | | if(jsonData2[5][4].button.value===0 && (jsonData2[5][4].button.name==="Zero" ||jsonData2[5][4].button.name==="已回零")){ |
| | | jsonData2[5][4].button.name=jsonData2[5][4].button.name.replace("已回零","未回零") ; |
| | | jsonData2[5][4].button.name=jsonData2[5][4].button.name.replace("Zero","NotZero") ; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | if ( |
| | | jsonData2[2][3].button.value === 0 && |
| | | (jsonData2[2][3].button.name === "Zero" || |
| | | jsonData2[2][3].button.name === "已回零") |
| | | ) { |
| | | jsonData2[2][3].button.name = jsonData2[2][3].button.name.replace( |
| | | "已回零", |
| | | "未回零" |
| | | ); |
| | | jsonData2[2][3].button.name = jsonData2[2][3].button.name.replace( |
| | | "Zero", |
| | | "NotZero" |
| | | ); |
| | | } |
| | | if ( |
| | | jsonData2[3][3].button.value === 0 && |
| | | (jsonData2[3][3].button.name === "Zero" || |
| | | jsonData2[3][3].button.name === "已回零") |
| | | ) { |
| | | jsonData2[3][3].button.name = jsonData2[3][3].button.name.replace( |
| | | "已回零", |
| | | "未回零" |
| | | ); |
| | | jsonData2[3][3].button.name = jsonData2[3][3].button.name.replace( |
| | | "Zero", |
| | | "NotZero" |
| | | ); |
| | | } |
| | | if ( |
| | | jsonData2[4][4].button.value === 0 && |
| | | (jsonData2[4][4].button.name === "Zero" || |
| | | jsonData2[4][4].button.name === "已回零") |
| | | ) { |
| | | jsonData2[4][4].button.name = jsonData2[4][4].button.name.replace( |
| | | "已回零", |
| | | "未回零" |
| | | ); |
| | | jsonData2[4][4].button.name = jsonData2[4][4].button.name.replace( |
| | | "Zero", |
| | | "NotZero" |
| | | ); |
| | | } |
| | | if ( |
| | | jsonData2[5][4].button.value === 0 && |
| | | (jsonData2[5][4].button.name === "Zero" || |
| | | jsonData2[5][4].button.name === "已回零") |
| | | ) { |
| | | jsonData2[5][4].button.name = jsonData2[5][4].button.name.replace( |
| | | "已回零", |
| | | "未回零" |
| | | ); |
| | | jsonData2[5][4].button.name = jsonData2[5][4].button.name.replace( |
| | | "Zero", |
| | | "NotZero" |
| | | ); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | // 关闭事件 |
| | | socket.onclose = function () { |
| | |
| | | socket.onerror = function () { |
| | | console.log("websocket发生了错误"); |
| | | }; |
| | | this.$router.afterEach(function(){ |
| | | this.$router.afterEach(function () { |
| | | socket.close(); |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | }, |
| | | send () { |
| | | |
| | | |
| | | send() { |
| | | socket?.send(JSON.stringify(this.messagepack)); |
| | | }, |
| | | //替换语言 |
| | | replaceChineseWithEnglish() { |
| | | |
| | | |
| | | const nameMap= this.$t('ServoManualone') |
| | | const nameMap = this.$t("ServoManualone"); |
| | | this.jsonData = this.jsonData.map((item) => { |
| | | return item.map((obj) => { |
| | | if (obj.name) { |
| | | const newName = nameMap[obj.name] || obj.name; |
| | | return { ...obj, name: newName }; |
| | | } else if (obj.button && obj.button.name) { |
| | | const newName = nameMap[obj.button.name] || obj.button.name; |
| | | return { ...obj, button: { ...obj.button, name: newName } }; |
| | | } else if (obj.title && obj.title.name) { |
| | | const newName = nameMap[obj.title.name] || obj.title.name; |
| | | return { ...obj, title: { ...obj.title, name: newName } }; |
| | | } else { |
| | | return obj; |
| | | } |
| | | }); |
| | | }); |
| | | return item.map((obj) => { |
| | | if (obj.name) { |
| | | const newName = nameMap[obj.name] || obj.name; |
| | | return { ...obj, name: newName }; |
| | | } else if (obj.button && obj.button.name) { |
| | | const newName = nameMap[obj.button.name] || obj.button.name; |
| | | return { ...obj, button: { ...obj.button, name: newName } }; |
| | | } else if (obj.title && obj.title.name) { |
| | | const newName = nameMap[obj.title.name] || obj.title.name; |
| | | return { ...obj, title: { ...obj.title, name: newName } }; |
| | | } else { |
| | | return obj; |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | // console.log(this.jsonData) |
| | | |
| | | // console.log(this.jsonData) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | html,body{ |
| | | width:100%; |
| | | height:85%; |
| | | |
| | | html, |
| | | body { |
| | | width: 100%; |
| | | height: 85%; |
| | | } |
| | | |
| | | .item-row { |
| | |
| | | .action-button { |
| | | margin-right: 10px; |
| | | background: #66b1ff; |
| | | color: #FFF; |
| | | color: #fff; |
| | | } |
| | | .blue-button { |
| | | background-color: skyblue; |
| | |
| | | background-color: green; |
| | | } |
| | | |
| | | |
| | | .qidong5 { |
| | | background-color: green; |
| | | } |
| | |
| | | .huiling { |
| | | background-color: green; |
| | | } |
| | | .jiting{ |
| | | .jiting { |
| | | background-color: green; |
| | | } |
| | | |
| | | .error-button3{ |
| | | .error-button3 { |
| | | background-color: green; |
| | | |
| | | } |
| | | |
| | | .yihuiling{ |
| | | |
| | | .yihuiling { |
| | | background-color: green; |
| | | } |
| | | </style> |
| | |
| | | public PLCManualJog() throws IOException {
|
| | | config = new Configuration("config.properties");
|
| | | }
|
| | |
|
| | | // Boolean[] values1 = { false, true, true, true, false, false, true, false,
|
| | | // false, true, true, true, false, false,
|
| | | // true, false,false, true, true, true, false, false, true, false,
|
| | | // false, true, false, true };
|
| | | // List<Boolean> arraylist = new ArrayList<>(Arrays.asList(values1));
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | |
| | |
|
| | |
|
| | | List<String> addressList21 = Arrays.asList(config.getProperty("PLCManualJog.button").split(","));
|
| | | List<Boolean> arraylist = S7control.getinstance().readBits(addressList21);
|
| | | List<Boolean> arraylist = S7control.getinstance().readBits(addressList21);
|
| | |
|
| | | // Boolean[] values1 = { false, true, true, true, false, false, true, false,
|
| | | // false, true, true, true, false, false,
|
| | | // true, false,false, true, true, true, false, false, true, false,
|
| | | // false, true, false, true };
|
| | | // List<Boolean> arraylist = new ArrayList<>(Arrays.asList(values1));
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | |
|
| | |
|
| | | if (!bolList.isEmpty()) {
|
| | | S7control.getinstance().WriteBit(addressList21, bolList);
|
| | | S7control.getinstance().WriteBit(addressList21, bolList);
|
| | | // arraylist.clear();
|
| | | // arraylist.addAll(bolList);
|
| | |
|
| | | System.out.println("messageValue:" + bolList + " written to PLC at address " + addressList21);
|
| | | }
|
| | |
|
| | |
| | | // String PlcAddress = this.name; |
| | | // Integer Plccount = this.count; |
| | | |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("DB100.108"); |
| | | addresses.add("DB100.20"); |
| | | addresses.add("DB103.32"); |
| | | |
| | | //B01组合中地址 |
| | | // String b01Address = config.getProperty("B01.address"); |
| | | List<String> addresses = Arrays.asList(config.getProperty("PlcManualonePosition.addresses").split(",")); |
| | | |
| | | List<Short> arraylist = S7control.getinstance().readWords(addresses); |
| | | // System.out.println(arraylist); |
| | | List<String> addresses2 = Arrays.asList(config.getProperty("PlcManualonePosition.addresses2").split(",")); |
| | | |
| | | List<String> addresses2 = new ArrayList<>(); |
| | | addresses2.add("DB100.110"); |
| | | addresses2.add("DB100.176"); |
| | | addresses2.add("DB103.34"); |
| | | List<Short> arraylist2 = S7control.getinstance().readWords(addresses2); |
| | | |
| | | List<String> addresses3 = new ArrayList<>(); |
| | | addresses3.add("DB100.112"); |
| | | addresses3.add("DB100.24"); |
| | | addresses3.add("DB103.36"); |
| | | List<String> addresses3 = Arrays.asList(config.getProperty("PlcManualonePosition.addresses3").split(",")); |
| | | |
| | | List<Short> arraylist3 = S7control.getinstance().readWords(addresses3); |
| | | |
| | | List<String> addresses4 = new ArrayList<>(); |
| | | addresses4.add("DB100.114"); |
| | | addresses4.add("DB100.178"); |
| | | addresses4.add("DB103.40"); |
| | | |
| | | List<String> addresses4 = Arrays.asList(config.getProperty("PlcManualonePosition.addresses4").split(",")); |
| | | |
| | | List<Short> arraylist4 = S7control.getinstance().readWords(addresses4); |
| | | |
| | | |
| | | List<Short> arraylist5 = S7control.getinstance().ReadWord("DB106.0", 1); |
| | | List<Short> arraylist6 = S7control.getinstance().ReadWord("DB106.12", 1); |
| | | List<Short> arraylist7 = S7control.getinstance().ReadWord("DB106.40", 1); |
| | | List<Short> arraylist8 = S7control.getinstance().ReadWord("DB106.50", 1); |
| | | List<String> addresses9 = new ArrayList<>(); |
| | | addresses9.add("DB104.1.2"); |
| | | addresses9.add("DB104.1.3"); |
| | | addresses9.add("DB104.1.6"); |
| | | addresses9.add("DB104.1.7"); |
| | | //故障 |
| | | |
| | | List<String> addresses9 = Arrays.asList(config.getProperty("PlcManualonePosition.fault").split(",")); |
| | | |
| | | List<Boolean> arraylist9 = S7control.getinstance().readBits(addresses9); |
| | | |
| | | List<String> addresses10 = new ArrayList<>(); |
| | | addresses10.add("DB104.9.4"); |
| | | addresses10.add("DB104.9.5"); |
| | | addresses10.add("DB104.9.4"); |
| | | addresses10.add("DB104.9.5"); |
| | | //未回零 |
| | | |
| | | List<String> addresses10 = Arrays.asList(config.getProperty("PlcManualonePosition.Notzero").split(",")); |
| | | |
| | | List<Boolean> arraylist10 = S7control.getinstance().readBits(addresses10); |
| | | |
| | | //A01启动地址 |
| | |
| | | // WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ManualonePosition"); |
| | | if (webserver != null) { |
| | | List<String> messages = webserver.getMessages(); |
| | | List<String> waddresses1 = new ArrayList<>(); |
| | | waddresses1.add("DB100.108"); |
| | | waddresses1.add("DB100.20"); |
| | | waddresses1.add("DB103.32"); |
| | | |
| | | List<String> waddresses2 = new ArrayList<>(); |
| | | waddresses2.add("DB100.110"); |
| | | waddresses2.add("DB100.176"); |
| | | waddresses2.add("DB103.34"); |
| | | |
| | | List<String> waddresses3 = new ArrayList<>(); |
| | | waddresses3.add("DB100.112"); |
| | | waddresses3.add("DB100.24"); |
| | | waddresses3.add("DB103.36"); |
| | | |
| | | List<String> waddresses4 = new ArrayList<>(); |
| | | waddresses4.add("DB100.114"); |
| | | waddresses4.add("DB100.178"); |
| | | waddresses4.add("DB103.40"); |
| | | |
| | | // 故障地址 |
| | | List<String> waddresses5 = new ArrayList<>(); |
| | | // waddresses5.add("DB103.244"); |
| | | // waddresses5.add("DB103.250"); |
| | | waddresses5.add("DB103.252"); |
| | | waddresses5.add("DB103.254"); |
| | | List<String> waddresses5 = Arrays.asList(config.getProperty("PlcManualonePosition.fault2").split(",")); |
| | | |
| | | |
| | | // 复位地址 |
| | | List<String> waddresses6 = new ArrayList<>(); |
| | | waddresses6.add("DB101.4.0"); |
| | | waddresses6.add("DB101.4.3"); |
| | | waddresses6.add("DB101.4.4"); |
| | | waddresses6.add("DB101.4.6"); |
| | | List<String> waddresses6 = Arrays.asList(config.getProperty("PlcManualonePosition.Reset").split(",")); |
| | | |
| | | |
| | | // 回零地址 |
| | | List<String> waddresses7 = new ArrayList<>(); |
| | | List<String> waddresses7 = Arrays.asList(config.getProperty("PlcManualonePosition.Zero").split(",")); |
| | | |
| | | waddresses7.add("DB101.4.5"); |
| | | waddresses7.add("DB101.4.7"); |
| | | |
| | | |
| | | |
| | | // System.out.println(messages.isEmpty()); |
| | |
| | | // System.out.println("lastMessage:" + lastMessage); |
| | | JSONArray messageArray = new JSONArray(lastMessage); |
| | | // 写入A01 |
| | | customS7Control.WriteWordToPLC(messageArray, waddresses1, 0); |
| | | customS7Control.WriteWordToPLC(messageArray, addresses, 0); |
| | | |
| | | |
| | | // 写入A02 |
| | | customS7Control.WriteWordToPLC(messageArray, waddresses2, 1); |
| | | customS7Control.WriteWordToPLC(messageArray, addresses2, 1); |
| | | |
| | | |
| | | // 写入B01 |
| | | customS7Control.WriteWordToPLC(messageArray, waddresses3, 2); |
| | | customS7Control.WriteWordToPLC(messageArray, addresses3, 2); |
| | | |
| | | // 写入B02 |
| | | customS7Control.WriteWordToPLC(messageArray, waddresses4, 3); |
| | | customS7Control.WriteWordToPLC(messageArray, addresses4, 3); |
| | | |
| | | |
| | | // 写入故障地址 |
| | |
| | | // A01下发
|
| | | customS7Control.WriteWordToPLC(messageArray, waddresses1, 0);
|
| | |
|
| | |
|
| | | // A02下发
|
| | | customS7Control.WriteWordToPLC(messageArray, waddresses2, 1);
|
| | |
|
| | |
|
| | | // 写入故障地址
|
| | | customS7Control.WriteWordToPLC(messageArray, waddresses3, 2);
|
| | |
|
| | |
|
| | | // 写入复位地址
|
| | | customS7Control.writeBitToPLC(messageArray, waddresses4, 3);
|
| | |
|
| | |
|
| | | // 写入回零地址
|
| | | customS7Control.writeBitToPLC(messageArray, waddresses5, 4);
|
| | |
| | |
|
| | | public class PlcPositioning1 extends Thread {
|
| | |
|
| | | // 用于存储应用程序的配置信息
|
| | | private Configuration config;
|
| | |
|
| | | // 创建一个自定义的 S7 控制器消息处理器对象
|
| | | MessageHandler customS7Control = new MessageHandler();
|
| | |
|
| | |
|
| | | public PlcPositioning1() throws IOException {
|
| | | config = new Configuration("config.properties");
|
| | | }
|
| | | @Override
|
| | | public void run() {
|
| | | while (this != null) {
|
| | |
| | |
|
| | | // System.out.println(stt);
|
| | | //存片格 出片格读取
|
| | | List<Short> arraylist = S7control.getinstance().ReadWord("DB100.42", 33);
|
| | |
|
| | | String address = config.getProperty("PlcPositioning1.address");
|
| | | List<Short> arraylist = S7control.getinstance().ReadWord(address, 33);
|
| | | // System.out.println(arraylist);
|
| | |
|
| | |
|
| | |
| | | if (webserver != null) {
|
| | | List<String> messages = webserver.getMessages();
|
| | | //存片格 出片格地址
|
| | | String addressList3 = "DB100.42";
|
| | |
|
| | |
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为 short 类型的列表
|
| | |
| | |
|
| | | // 写入存片格 出片格位置设定数据
|
| | | if (!mergedList.isEmpty()) {
|
| | | S7control.getinstance().WriteWord(addressList3, mergedList);
|
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + addressList3);
|
| | | S7control.getinstance().WriteWord(address, mergedList);
|
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + address);
|
| | | }
|
| | |
|
| | | // 清空消息列表
|
| | |
| | | * @return 结果 |
| | | */ |
| | | public List<Short> ReadWord(List<String> address) { |
| | | if (s7PLC==null) |
| | | return null; |
| | | return s7PLC.readInt16(address); |
| | | if (s7PLC == null) |
| | | return null; |
| | | |
| | | try { |
| | | return s7PLC.readInt16(address); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public List<Short> ReadWord(String address, int count) { |
| | | if (s7PLC==null) |
| | | return null; |
| | | if (s7PLC == null) |
| | | return null; |
| | | |
| | | List<String> addresslist = GetAddressList(address, count, 16); |
| | | return s7PLC.readInt16(addresslist); |
| | | try { |
| | | return s7PLC.readInt16(addresslist); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 读取byte结果集 |
| | | * |
| | |
| | | |
| | | |
| | | //读取String |
| | | public List<String> readStrings(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | |
| | | List<String> result = new ArrayList<>(); |
| | | |
| | | for (String address : addressList) { |
| | | public List<String> readStrings(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | List<String> result = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | byte[] bytes = s7PLC.readByte(address, 14); |
| | | // System.out.println(bytes.toString()); |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | // System.out.println(str); |
| | | // if(str == null ){ |
| | | // str = ""; |
| | | // } |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | result.add(str); |
| | | } |
| | | // if ( bytes.toString().contains("@")) { |
| | | // String str = ""; |
| | | // |
| | | // result.add(str); |
| | | // }else{ |
| | | // |
| | | // String str = new String(bytes, StandardCharsets.US_ASCII); |
| | | // result.add(str); |
| | | // } |
| | | // System.out.println(bytes.toString()); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | result.add(null); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | //不连续地址写入Word |
| | | public void WriteWord(List<String> address, List<Short> datas) { |
| | |
| | | S7control.getinstance().WriteByte(addr, bytes); |
| | | } |
| | | |
| | | |
| | | //读取不连续word |
| | | public List<Short> readWords(List<String> addresses) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | |
| | | * @return Boolean结果 |
| | | */ |
| | | public List<Boolean> ReadBits(String address, int count) { |
| | | if (s7PLC==null) |
| | | if (s7PLC == null) |
| | | return null; |
| | | List<String> addresslist = GetAddressList(address, count, 1); |
| | | return s7PLC.readBoolean(addresslist); |
| | | } |
| | | try { |
| | | return s7PLC.readBoolean(addresslist); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | |
| | | // |
| | | System.out.println("启动完成"); |
| | | |
| | | new PlcHold().start(); |
| | | new PlcHold().start(); |
| | | |
| | | new Plchome().start(); |
| | | |
| | |
| | | #waddresses1.add("DB100.38");
|
| | | #waddresses1.add("DB100.40");
|
| | |
|
| | | Auto.shusong=DB100.0,DB100.2,DB100.4,DB100.6,DB100.26,DB100.28,DB100.30,DB100.32,DB100.34,DB100.36,DB100.38,DB100.40 |
| | | Auto.shusong=DB100.0,DB100.2,DB100.4,DB100.6,DB100.26,DB100.28,DB100.30,DB100.32,DB100.34,DB100.36,DB100.38,DB100.40
|
| | |
|
| | |
|
| | | #-----PlcPositioning1-------------------------
|
| | | PlcPositioning1.address=DB100.42
|
| | |
|
| | | #----------------PlcManualonePosition-----
|
| | |
|
| | | PlcManualonePosition.addresses=DB100.108,DB100.20,DB103.32
|
| | |
|
| | | PlcManualonePosition.addresses2=DB100.110,DB100.176,DB103.34
|
| | |
|
| | | PlcManualonePosition.addresses3=DB100.112,DB100.24,DB103.36
|
| | |
|
| | | PlcManualonePosition.addresses4=DB100.114,DB100.178,DB103.40
|
| | |
|
| | |
|
| | | #故障
|
| | | PlcManualonePosition.fault=DB104.1.2,DB104.1.3,DB104.1.6,DB104.1.7
|
| | |
|
| | | #未回零
|
| | | PlcManualonePosition.Notzero=DB104.9.4,DB104.9.5,DB104.9.4,DB104.9.5
|
| | |
|
| | | #故障2
|
| | | PlcManualonePosition.fault2=DB103.252,DB103.254
|
| | |
|
| | | #复位
|
| | | PlcManualonePosition.Reset=DB101.4.0,DB101.4.3,DB101.4.4,DB101.4.6
|
| | | #回零
|
| | | PlcManualonePosition.Zero=DB101.4.5,DB101.4.7
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|