Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
| New file |
| | |
| | | { |
| | | "java.configuration.updateBuildConfiguration": "interactive" |
| | | } |
| | |
| | | "js-cookie": "^3.0.1", |
| | | "less": "^3.12.2", |
| | | "less-loader": "^6.2.0", |
| | | "lodash": "^4.17.21", |
| | | "moment": "^2.29.4", |
| | | "vue": "^2.6.11", |
| | | "vue-i18n": "^8.26.5", |
| | |
| | | }, |
| | | "node_modules/lodash": { |
| | | "version": "4.17.21", |
| | | "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.21.tgz?cache=0&sync_timestamp=1613835860585&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.21.tgz", |
| | | "integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=", |
| | | "dev": true |
| | | "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", |
| | | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" |
| | | }, |
| | | "node_modules/lodash.debounce": { |
| | | "version": "4.0.8", |
| | |
| | | }, |
| | | "lodash": { |
| | | "version": "4.17.21", |
| | | "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.21.tgz?cache=0&sync_timestamp=1613835860585&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.21.tgz", |
| | | "integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=", |
| | | "dev": true |
| | | "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", |
| | | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" |
| | | }, |
| | | "lodash.debounce": { |
| | | "version": "4.0.8", |
| | |
| | | "js-cookie": "^3.0.1", |
| | | "less": "^3.12.2", |
| | | "less-loader": "^6.2.0", |
| | | "lodash": "^4.17.21", |
| | | "moment": "^2.29.4", |
| | | "vue": "^2.6.11", |
| | | "vue-i18n": "^8.26.5", |
| New file |
| | |
| | | { |
| | | "action": [ |
| | | { |
| | | "name": "D01 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D02 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D03 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D04 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D05 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "D06 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "A01 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "A02 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "B01 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "B02 VFD conveyor" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN JOG+" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN JOG-" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TRAVEL JOG+" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TRAVEL JOG-" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL JOG+" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL JOG-" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN POS" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN POS" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL POS" |
| | | }, |
| | | { |
| | | "name": "B01 YV TURN" |
| | | }, |
| | | { |
| | | "name": "B01 YV UP DOWN" |
| | | }, |
| | | { |
| | | "name": "B02 YV TURN" |
| | | }, |
| | | { |
| | | "name": "B02 YV UP DOWN" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB2.0.0", |
| | | "count": 26 |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "para": [ |
| | | { |
| | | "name": "conveyor Velocity(Auto FAST)", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "value":0, |
| | | "value2":0 |
| | | |
| | | |
| | | }, |
| | | { |
| | | "name": "conveyor Velocity(Auto SLOW)", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "value":0, |
| | | "value2":0 |
| | | }, |
| | | { |
| | | "name": "conveyor Velocity(Manual)", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "value":0, |
| | | "value2":0 |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN JOG Velocity", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL JOG Velocity", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL JOG Velocity", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN POS Velocity AUTO", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN POS Velocity manual", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL POS Velocity AUTO", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL POS Velocity manual", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL POS Velocity AUTO", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL POS Velocity manual", |
| | | "read": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB100.0", |
| | | "count": 12 |
| | | }, |
| | | { |
| | | "name": "DB100.0", |
| | | "count": 12 |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | [
|
| | | [{
|
| | | "name": "存片接片地址",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | |
| | | }],
|
| | | [{
|
| | | "name": "出片接片地址",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | |
| | | }],
|
| | | [{
|
| | | "name": "格子间距",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | |
| | | }],
|
| | |
|
| | | [
|
| | | {
|
| | | "title": {
|
| | | "name": "存片格位置设定"
|
| | | |
| | | }, "type": "1"
|
| | | |
| | | },
|
| | | {
|
| | | "name": "1#格地址",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0",
|
| | | "address":"DB100.48",
|
| | | "count":10
|
| | | },
|
| | | {
|
| | | "name": "22#格地址",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "43#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "64#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "85#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "106#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "127#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "148#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "169#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "190#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | }
|
| | | |
| | | |
| | | |
| | | ],
|
| | |
|
| | | [
|
| | | {
|
| | | "title": {
|
| | | "name": "出片格位置设定"
|
| | | |
| | | },"type": "1",
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "1#格地址",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0",
|
| | | "address":"DB100.68",
|
| | | "count":10
|
| | | },
|
| | | {
|
| | | "name": "22#格地址",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "43#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "64#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "85#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "106#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "127#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "148#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "169#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "190#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0" ,
|
| | | "value":"0"
|
| | | }
|
| | | |
| | | |
| | | |
| | | ]
|
| | |
|
| | | |
| | | |
| | | ]
|
| | |
|
| | | |
| New file |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "title": {
|
| | | "name": "B01格位置设定"
|
| | | |
| | | }, "type": "1"
|
| | | },
|
| | | {
|
| | | "name": "1#格地址",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.0",
|
| | | "count":3,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "22#格地址",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0"
|
| | | ,
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "43#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "64#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "85#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | }
|
| | | |
| | | |
| | | |
| | | ],
|
| | |
|
| | | [
|
| | | {
|
| | | "title": {
|
| | | "name": "B02位置设定"
|
| | | |
| | | }, "type": "1"
|
| | | },
|
| | | {
|
| | | "name": "106#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "127#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "148#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "169#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | },
|
| | | {
|
| | | "name": "190#格地址",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":"0"
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | |
| New file |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "name": "A01 所在格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.0",
|
| | | "value":0
|
| | | |
| | | },
|
| | | {
|
| | | "name": "数量",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | |
| | | },
|
| | | {
|
| | | "name": "进片ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | |
| | | },
|
| | | {
|
| | | "name": "长度",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | |
| | | },
|
| | | {
|
| | | "name": "高度",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | |
| | | },
|
| | | {
|
| | | "name": "取片格子",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "存片格子",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "故障",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "复位",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "A01半自动",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "半自动启动",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | }
|
| | | ],
|
| | | [
|
| | | {
|
| | | "name": "A02 所在格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.1",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "取片格子",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "存片格子",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "数量",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | |
| | | },
|
| | | {
|
| | | "name": "取片ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | |
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "故障",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "复位",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "A02半自动",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "半自动启动",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | }
|
| | | ],
|
| | | |
| | | [
|
| | | {
|
| | | "name": "A01翻转实时位置",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.2",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | |
| | | |
| | | {
|
| | | "button": {
|
| | | "name": "故障",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "复位",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "未回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | }
|
| | | ],[
|
| | | {
|
| | | "name": "A02翻转实时位置",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.2",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | |
| | | |
| | | {
|
| | | "button": {
|
| | | "name": "故障",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "复位",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "未回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | }
|
| | | ], [
|
| | | {
|
| | | "name": "B01 所在格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.2",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "目标格子",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | |
| | | {
|
| | | "button": {
|
| | | "name": "故障",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "复位",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | } ,{
|
| | | "button": {
|
| | | "name": "未回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | }
|
| | | ],
|
| | | |
| | | [
|
| | | {
|
| | | "name": "B02 所在格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.3",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "目标格子",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | |
| | | {
|
| | | "button": {
|
| | | "name": "故障",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "复位",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | |
|
| | | }
|
| | | } ,{
|
| | | "button": {
|
| | | "name": "未回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "回零",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | }
|
| | | }
|
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | |
| New file |
| | |
| | | { |
| | | "sign": [ |
| | | { |
| | | "name": "D01.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D01.SR in pos", |
| | | "value": "0", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D02.SR dec", |
| | | "value": "0", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D02.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR into", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D04.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D04.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D05.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D05.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR turn on", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR turn off", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR up", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR turn on", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR turn off", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR up", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.start(+)", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.stop(1)", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.reset", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.auto/manul", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.pause", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SB.emg", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D01.SB.start", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SB.start", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.requset", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.confirm", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.reset", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "LED.red", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "LED.yellow", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D01.LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "D06.LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.turn", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.up down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.gassing", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.turn", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.up down", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.gassing", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.led", |
| | | "value": "1", |
| | | "state": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.open", |
| | | "value": "1", |
| | | "state": "1" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB102.0.0", |
| | | "count": 58 |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "state": [ |
| | | { |
| | | "name": "D01.State" |
| | | }, |
| | | { |
| | | "name": "D02.State" |
| | | }, |
| | | { |
| | | "name": "B01.State" |
| | | }, |
| | | { |
| | | "name": "B02.State" |
| | | }, |
| | | { |
| | | "name": "A01.State" |
| | | }, |
| | | { |
| | | "name": "A02.State" |
| | | }, |
| | | { |
| | | "name": "D03.State" |
| | | }, |
| | | { |
| | | "name": "D04.State" |
| | | }, |
| | | { |
| | | "name": "D05.State" |
| | | }, |
| | | { |
| | | "name": "D06.State" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB103.0", |
| | | "count": 10 |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | {
|
| | | |
| | | "parameter1": [
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "type":"w",
|
| | | "count": 12
|
| | | },
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "type":"x",
|
| | | "count": 12
|
| | | }
|
| | | ],
|
| | | "parameter2": [
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12,
|
| | | "type": 0
|
| | | },
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12,
|
| | | "type": 1
|
| | | }
|
| | | ],
|
| | | "Positioning1": [
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12
|
| | | },
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12
|
| | | }
|
| | | ],
|
| | | "Positioning2": [
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12
|
| | | },
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12
|
| | | }
|
| | | ],
|
| | | "ServoManualone": [
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12
|
| | | },
|
| | | {
|
| | | "name": "DB100.0",
|
| | | "count": 12
|
| | | }
|
| | | ]
|
| | | } |
| New file |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "title": {
|
| | | "name": "D01~D06输送"
|
| | | |
| | | }
|
| | | },
|
| | | {
|
| | | "name": "最高速度",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.0",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "高速线速度",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "低速线速度",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "手动速度",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | }
|
| | | |
| | | |
| | | ],
|
| | |
|
| | | [
|
| | | {
|
| | | "title": {
|
| | | "name": "A01~A02输送"
|
| | | |
| | | }
|
| | | },
|
| | | {
|
| | | "name": "最高速度",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.0",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "高速线速度",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "低速线速度",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "手动速度",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | }
|
| | | |
| | | |
| | | ],[
|
| | | {
|
| | | "title": {
|
| | | "name": "B01~B02输送"
|
| | | |
| | | }
|
| | | },
|
| | | {
|
| | | "name": "最高速度",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.0",
|
| | | "count":3,
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "高速线速度",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "低速线速度",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | },
|
| | | {
|
| | | "name": "手动速度",
|
| | | "read": 22,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | }
|
| | | |
| | | |
| | | ]
|
| | | ,[
|
| | | |
| | | {
|
| | | "name": "翻转点动速度",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "address":"DB100.0",
|
| | | "count":3,
|
| | | "value":0
|
| | | }
|
| | |
|
| | |
|
| | | ],
|
| | | [
|
| | | |
| | |
|
| | | {
|
| | | "name": "小车点动速度",
|
| | | "read": 11,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | }
|
| | | |
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | |
| New file |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "button": {
|
| | | "name": "D03手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }]
|
| | | ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "D04手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | ]
|
| | | ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "D05手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | ]
|
| | | ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "D06手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | |
|
| | | ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "A02手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | | ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "B01手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ] ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "B02手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | | |
| | | ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "D01手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | | ,[
|
| | | {
|
| | | "button": {
|
| | | "name": "D02手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ],[
|
| | | {
|
| | | "button": {
|
| | | "name": "A01手动状态",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "4"
|
| | | },
|
| | | {
|
| | | "button": {
|
| | | "name": "清除ID",
|
| | | "value":0,
|
| | | "address":"DB10.0"
|
| | | },"type": "3"
|
| | | },
|
| | | {
|
| | | "name": "ID1",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | },
|
| | | {
|
| | | "name": "ID2",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | | |
| | | ,[
|
| | | {
|
| | | "name": "扫描枪扫码的ID",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | | ,[
|
| | | {
|
| | | "name": "A01当前格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | },
|
| | | {
|
| | | "name": "A02所在格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | },
|
| | | {
|
| | | "name": "B01所在格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | },
|
| | | {
|
| | | "name": "B02所在格子",
|
| | | "read": 33,
|
| | | "sending": 0,
|
| | | "type": "0",
|
| | | "value":0
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | |
| | |
| | | "langResetButton": "重置",
|
| | | "langCancelButton": "取消",
|
| | | "langRegisterSuccessMessage": "注册成功",
|
| | |
|
| | | "添加用户成功":"添加用户成功",
|
| | | "添加用户成功": "添加用户成功",
|
| | | "confirmResetPassword": "确认重置密码为默认值吗?",
|
| | | |
| | | "confirm": "确定",
|
| | | "cancel": "取消",
|
| | | "passwordResetSuccess": "密码已重置为默认值",
|
| | |
| | | "addUserSuccess": "添加用户成功",
|
| | | "editUserSuccess": "修改用户成功",
|
| | | "effective": "有效",
|
| | | "invalid": "无效",
|
| | |
|
| | | "addSuccessMessage": "添加成功",
|
| | | "deleteConfirmMessage": "确定要删除该权限吗?",
|
| | |
|
| | | "confirmButtonText": "确定",
|
| | | "cancelButtonText": "取消",
|
| | | "deleteSuccessMessage": "删除成功",
|
| | | "deleteCancelledMessage": "已取消删除操作",
|
| | |
|
| | |
|
| | |
|
| | | "Enter the glass lD":"输入玻璃id",
|
| | | "Infeed barcodid":"手动上片",
|
| | | "Enter the order number":"输入订单号",
|
| | | "Exit the glass by order number":"按订单出片",
|
| | | "Please confirm the glass information":"请确认玻璃信息",
|
| | | "Please confirm the Ordering Information":"请确认订单信息",
|
| | | "Alarm Information":"报警信息",
|
| | | "Cage Details":"理片笼详情",
|
| | | "order":"订单",
|
| | | "length":"长",
|
| | | "width":"宽",
|
| | | "Operate":"操作",
|
| | | "end task":"完成任务",
|
| | | "cancel":"取消",
|
| | | "confirm":"确认",
|
| | | "number":"数量",
|
| | | "Outfeed Barcodid":"出片玻璃id",
|
| | | "Infeed Barcodid":"进片玻璃id",
|
| | | "The Cage number being used":"笼子",
|
| | | "The Slot number being used":"格子",
|
| | | "Order Nmuber":"订单编号",
|
| | | "List Number":"列表编号",
|
| | | "Box Number":"箱子编号",
|
| | | "Length and Width":"尺寸",
|
| | | "id":"id",
|
| | | "content":"内容",
|
| | | "timeon":"报警时间",
|
| | | "endTime":"结束时间",
|
| | |
|
| | | "The Cage number":"笼子",
|
| | | "The Side":"内外侧",
|
| | | "The Slot Number":"格子",
|
| | | "Barcodid":"玻璃id",
|
| | | "Order Number":"订单",
|
| | | "delete":"删除",
|
| | | "out":"出片",
|
| | |
|
| | | "Operation successful":"操作成功",
|
| | | "Operation canceled":"操作取消",
|
| | | "There is no such order":"没有此订单的玻璃",
|
| | | "There are currently tasks":"当前有任务",
|
| | | "There is no such glass":"没有此玻璃",
|
| | | "There is no such grid":"没有空闲格子",
|
| | | "No delete allowed":"不能删除",
|
| | | "No out allowed":"不能出片",
|
| | | "Are you sure to perform this operation ?":"确定执行此操作?",
|
| | | "prompt":"提示",
|
| | | "Yes":"是",
|
| | | "No":"否",
|
| | | "invalid": "无效",
|
| | | "addSuccessMessage": "添加成功",
|
| | | "deleteConfirmMessage": "确定要删除该权限吗?",
|
| | | "confirmButtonText": "确定",
|
| | | "cancelButtonText": "取消",
|
| | | "deleteSuccessMessage": "删除成功",
|
| | | "deleteCancelledMessage": "已取消删除操作",
|
| | | "Enter the glass lD": "输入玻璃id",
|
| | | "Infeed barcodid": "手动上片",
|
| | | "Enter the order number": "输入订单号",
|
| | | "Exit the glass by order number": "按订单出片",
|
| | | "Please confirm the glass information": "请确认玻璃信息",
|
| | | "Please confirm the Ordering Information": "请确认订单信息",
|
| | | "Alarm Information": "报警信息",
|
| | | "Cage Details": "理片笼详情",
|
| | | "order": "订单",
|
| | | "length": "长",
|
| | | "width": "宽",
|
| | | "Operate": "操作",
|
| | | "end task": "完成任务",
|
| | | "cancel": "取消",
|
| | | "confirm": "确认",
|
| | | "number": "数量",
|
| | | "Outfeed Barcodid": "出片玻璃id",
|
| | | "Infeed Barcodid": "进片玻璃id",
|
| | | "The Cage number being used": "笼子",
|
| | | "The Slot number being used": "格子",
|
| | | "Order Nmuber": "订单编号",
|
| | | "List Number": "列表编号",
|
| | | "Box Number": "箱子编号",
|
| | | "Length and Width": "尺寸",
|
| | | "id": "id",
|
| | | "content": "内容",
|
| | | "timeon": "报警时间",
|
| | | "endTime": "结束时间",
|
| | | "The Cage number": "笼子",
|
| | | "The Side": "内外侧",
|
| | | "The Slot Number": "格子",
|
| | | "Barcodid": "玻璃id",
|
| | | "Order Number": "订单",
|
| | | "delete": "删除",
|
| | | "out": "出片",
|
| | | "Operation successful": "操作成功",
|
| | | "Operation canceled": "操作取消",
|
| | | "There is no such order": "没有此订单的玻璃",
|
| | | "There are currently tasks": "当前有任务",
|
| | | "There is no such glass": "没有此玻璃",
|
| | | "There is no such grid": "没有空闲格子",
|
| | | "No delete allowed": "不能删除",
|
| | | "No out allowed": "不能出片",
|
| | | "Are you sure to perform this operation ?": "确定执行此操作?",
|
| | | "prompt": "提示",
|
| | | "Yes": "是",
|
| | | "No": "否",
|
| | | "today": "今天",
|
| | | "yesterday": "昨天",
|
| | | "week": "一周前",
|
| | |
| | | "alacontent": "报警内容",
|
| | | "time-on": "开始时间",
|
| | | "End-Time": "结束时间",
|
| | |
|
| | | "Please enter the password":"请输入密码",
|
| | | "Password error":"密码错误",
|
| | | "DataBase Connection failed":"数据库连接失败",
|
| | | "Distribute parameters":"下发参数",
|
| | | "The glass size is not within the range":"玻璃尺寸不在范围内",
|
| | | "increase":"添加",
|
| | | "Enable":"启用",
|
| | | "Disable":"禁用",
|
| | | "Usage":"使用率",
|
| | | "Space (Pieces)":"空间(片数)",
|
| | | "This glass is already in the cage":"笼子里已有此玻璃",
|
| | | "Enter the Order lD":"请输入订单id",
|
| | | "OrderInfo":"订单信息",
|
| | | "Query":"查询",
|
| | | "permission update":"权限编辑",
|
| | | "query was successful":"查询成功",
|
| | | "Scan Code Point":"扫码位",
|
| | | "Upper film position":"上片位",
|
| | | "Glass Information":"玻璃信息",
|
| | | "current Information":"当前信息",
|
| | | "Modify Information":"修改信息",
|
| | | "Clear Current":"清除当前",
|
| | | "Confirm Modification":"确认修改",
|
| | | "The glass ID already exists in the loading queue":"上片队列已存在此玻璃id",
|
| | | "This glass ID already exists in the sorting cage":"理片笼内已存在此玻璃id"
|
| | |
|
| | | "Please enter the password": "请输入密码",
|
| | | "Password error": "密码错误",
|
| | | "DataBase Connection failed": "数据库连接失败",
|
| | | "Distribute parameters": "下发参数",
|
| | | "The glass size is not within the range": "玻璃尺寸不在范围内",
|
| | | "increase": "添加",
|
| | | "Enable": "启用",
|
| | | "Disable": "禁用",
|
| | | "Usage": "使用率",
|
| | | "Space (Pieces)": "空间(片数)",
|
| | | "This glass is already in the cage": "笼子里已有此玻璃",
|
| | | "Enter the Order lD": "请输入订单id",
|
| | | "OrderInfo": "订单信息",
|
| | | "Query": "查询",
|
| | | "permission update": "权限编辑",
|
| | | "query was successful": "查询成功",
|
| | | "Scan Code Point": "扫码位",
|
| | | "Upper film position": "上片位",
|
| | | "Glass Information": "玻璃信息",
|
| | | "current Information": "当前信息",
|
| | | "Modify Information": "修改信息",
|
| | | "Clear Current": "清除当前",
|
| | | "Confirm Modification": "确认修改",
|
| | | "The glass ID already exists in the loading queue": "上片队列已存在此玻璃id",
|
| | | "This glass ID already exists in the sorting cage": "理片笼内已存在此玻璃id",
|
| | | "langparameter": {
|
| | | "conveyor Velocity(Auto FAST)": "皮带输送自动快速",
|
| | | "conveyor Velocity(Auto SLOW)": "皮带输送自动慢速",
|
| | | "conveyor Velocity(Manual)": "皮带输送手动速度",
|
| | | "A01 A02 TURN JOG Velocity": "A01 A02 翻转点动速度",
|
| | | "A01 A02 TRAVEL JOG Velocity": "A01 A02 行走点动速度",
|
| | | "B01 B02 TRAVEL JOG Velocity": "B01 B02 行走点动速度",
|
| | | "A01 A02 TURN POS Velocity AUTO": "A01 A02 翻转自动定位速度",
|
| | | "A01 A02 TURN POS Velocity manual": "A01 A02 翻转手动定位速度",
|
| | | "A01 A02 TRAVEL POS Velocity AUTO": "A01 A02 行走自动定位速度",
|
| | | "A01 A02 TRAVEL POS Velocity manual": "A01 A02 行走手动定位速度",
|
| | | "B01 B02 TRAVEL POS Velocity AUTO": "B01 B02 行走自动定位速度",
|
| | | "B01 B02 TRAVEL POS Velocity manual": "B01 B02 行走手动定位速度"
|
| | | },
|
| | | "langActions": {
|
| | | "D01 VFD conveyor": "D01 输送变频",
|
| | | "D02 VFD conveyor": "D02 输送变频",
|
| | | "D03 VFD conveyor": "D03 输送变频",
|
| | | "D04 VFD conveyor": "D04 输送变频",
|
| | | "D05 VFD conveyor": "D05 输送变频",
|
| | | "D06 VFD conveyor": "D06 输送变频",
|
| | | "A01 VFD conveyor": "A01 输送变频",
|
| | | "A02 VFD conveyor": "A02 输送变频",
|
| | | "B01 VFD conveyor": "B01 输送变频",
|
| | | "B02 VFD conveyor": "B02 输送变频",
|
| | | "A01 SERVE TURN JOG+": "A01 翻转伺服点动",
|
| | | "A02 SERVE TURN JOG-": "A02 翻转伺服点动",
|
| | | "A01 SERVE TRAVEL JOG+": "A01 行走伺服点动",
|
| | | "A02 SERVE TRAVEL JOG-": "A02 行走伺服点动",
|
| | | "B01 SERVE TRAVEL JOG+": "B01 行走伺服点动",
|
| | | "B02 SERVE TRAVEL JOG-": "B02 行走伺服点动",
|
| | | "A01 SERVE TURN POS": "A01 翻转伺服定位",
|
| | | "A02 SERVE TURN POS": "A02 翻转伺服定位",
|
| | | "A01 SERVE TRAVEL POS": "A01 行走伺服定位",
|
| | | "A02 SERVE TRAVEL POS": "A02 行走伺服定位",
|
| | | "B01 SERVE TRAVEL POS": "B01 行走伺服定位",
|
| | | "B02 SERVE TRAVEL POS": "B02 行走伺服定位",
|
| | | "B01 YV TURN": "B01 抬起电磁阀",
|
| | | "B01 YV UP DOWN": "B01 上升下降电磁阀",
|
| | | "B02 YV TURN": "B02 抬起电磁阀",
|
| | | "B02 YV UP DOWN": "B02 上升下降电磁阀"
|
| | | },
|
| | | "Signlang": {
|
| | | "D01.SR dec": "D01.减速传感器",
|
| | | "D01.SR in pos": "D01.到位传感器",
|
| | | "D02.SR dec": "D02.减速传感器",
|
| | | "D02.SR in pos": "D02.到位传感器",
|
| | | "D03.SR into": "D03.进片传感器",
|
| | | "D03.SR dec": "D03.减速传感器",
|
| | | "D03.SR in pos": "D03.到位传感器",
|
| | | "D04.SR dec": "D04.减速传感器",
|
| | | "D04.SR in pos": "D04.到位传感器",
|
| | | "D05.SR dec": "D05.减速传感器",
|
| | | "D05.SR in pos": "D05.到位传感器",
|
| | | "D06.SR dec": "D06.减速传感器",
|
| | | "D06.SR in pos": "D06.到位传感器",
|
| | | "B01.SR out dec": "B01.出片减速传感器",
|
| | | "B01.SR out in pos": "B01.出片到位传感器",
|
| | | "B01.SR in dec": "B01.进片减速传感器",
|
| | | "B01.SR in in pos": "B01.进片到位传感器",
|
| | | "B01.SR turn on": "B01.翻转上到位传感器",
|
| | | "B01.SR turn off": "B01.翻转下到位传感器",
|
| | | "B01.SR up": "B01.上升到位传感器",
|
| | | "B01.SR down": "B01.下降到位传感器",
|
| | | "B02.SR out dec": "B02.出片减速传感器",
|
| | | "B02.SR out in pos": "B02.出片到位传感器",
|
| | | "B02.SR in dec": "B02.进片减速传感器",
|
| | | "B02.SR in in pos": "B02.进片到位传感器",
|
| | | "B02.SR turn on": "B02.翻转上到位传感器",
|
| | | "B02.SR turn off": "B02.翻转下到位传感器",
|
| | | "B02.SR up": "B02.上升到位传感器",
|
| | | "B02.SR down": "B02.下降到位传感器",
|
| | | "B01.SR out safety": "B01.出片安全传感器",
|
| | | "B01.SR in safety": "B01.进片安全传感器",
|
| | | "B02.SR out safety": "B02.出片安全传感器",
|
| | | "SB.start(+)": "SB.启动(+)按钮",
|
| | | "SB.stop(1)": "SB.停止(-)按钮",
|
| | | "SB.reset": "SB.复位按钮",
|
| | | "SB.auto/manul": "SB.手/自切换按钮",
|
| | | "SB.pause": "SB.暂停按钮",
|
| | | "SB.emg": "SB.急停按钮",
|
| | | "D01.SB.start": "D01.启动",
|
| | | "D06.SB.start": "D06.启动",
|
| | | "B02.SR in safety": "B02.进片安全传感器",
|
| | | "SAFETYDOOR.requset": "安全门请求进入",
|
| | | "SAFETYDOOR.confirm": "安全门确认",
|
| | | "SAFETYDOOR.reset": "安全门复位",
|
| | | "LED.red": "三色灯红",
|
| | | "LED.green": "三色灯绿",
|
| | | "LED.yellow": "三色灯黄",
|
| | | "D01.LED.green": "D01.绿灯",
|
| | | "D06.LED.green": "D06.绿灯",
|
| | | "B01.YV.turn": "B01.电磁阀翻转",
|
| | | "B01.YV.up down": "B01.电磁阀上升下降",
|
| | | "B01.YV.gassing": "B01.电磁阀吹气",
|
| | | "B02.YV.turn": "B02.电磁阀翻转",
|
| | | "B02.YV.up down": "B02.电磁阀上升下降",
|
| | | "B02.YV.gassing": "B02.电磁阀吹气",
|
| | | "SAFETYDOOR.led": "安全门状态灯",
|
| | | "SAFETYDOOR.open": "安全门打开"
|
| | | },
|
| | | "Statelang": {
|
| | | "D01.State": "D01.状态",
|
| | | "D02.State": "D02.状态",
|
| | | "B01.State": "B01.状态",
|
| | | "B02.State": "B02.状态",
|
| | | "A01.State": "A01.状态",
|
| | | "A02.State": "A02.状态",
|
| | | "D03.State": "D03.状态",
|
| | | "D04.State": "D04.状态",
|
| | | "D05.State": "D05.状态",
|
| | | "D06.State": "D06.状态"
|
| | | }
|
| | | } |
| | |
| | | path: '/Electrical/alarm', |
| | | component: () => import('../views/Electrical/alarm') |
| | | }, |
| | | { |
| | | path: '/Electrical/Servomanual', |
| | | component: () => import('../views/Electrical/Servomanual') |
| | | }, |
| | | { |
| | | path: '/Electrical/ServoManualone', |
| | | component: () => import('../views/Electrical/ServoManualone') |
| | | }, |
| | | { |
| | | path: '/Electrical/Parameter1', |
| | | component: () => import('../views/Electrical/Parameter1') |
| | | }, |
| | | { |
| | | path: '/Electrical/Parameter2', |
| | | component: () => import('../views/Electrical/Parameter2') |
| | | }, |
| | | { |
| | | path: '/Electrical/Positioning1', |
| | | component: () => import('../views/Electrical/Positioning1') |
| | | }, |
| | | { |
| | | path: '/Electrical/Positioning2', |
| | | component: () => import('../views/Electrical/Positioning2') |
| | | }, |
| | | |
| | | |
| | | |
| | |
| | | <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> |
| | | <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/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> |
| | | <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('Servo Manual') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | |
| | | <div>Action</div> |
| | | <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="{ messagepack }"> |
| | | <!-- <div class="kuai_div" v-for="item in record.xyData" :key="item.value"> |
| | |
| | | <el-input v-model="item.name" style="width: 240px;" class="in_mc" readonly></el-input> |
| | | <el-switch v-model="item.value" active-value="1" inactive-value="0" @change="send()"></el-switch> |
| | | </div> |
| | | |
| | | |
| | | </el-form> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script > |
| | | <script > |
| | | import LanguageMixin from '../../lang/LanguageMixin' |
| | | import data from '../../configuration/Action' |
| | | let socket; |
| | | export default { |
| | | name: "Action", |
| | | mixins: [LanguageMixin], |
| | | data () { |
| | | return { |
| | | jsonData: data, |
| | | activeButton: '', |
| | | record: { |
| | | params: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | this.init(); |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | setActiveButton(buttonName) { |
| | | this.activeButton = buttonName; |
| | | }, |
| | | |
| | | setActiveButton (buttonName) { |
| | | this.activeButton = buttonName; |
| | | }, |
| | | init () { |
| | | let viewname = "action"; |
| | | |
| | |
| | | }; |
| | | // 浏览器端收消息,获得从服务端发送过来的文本消息 |
| | | socket.onmessage = (msg) => { |
| | | //console.log("收到数据====" + msg.data); |
| | | if (!msg.data) { |
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | |
| | | let obj = JSON.parse(msg.data); |
| | | if (obj.params ){ |
| | | this.record.params[0] = obj.params[0]; |
| | | |
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) { |
| | | if (!this.record.xyData[a]) { |
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a].toString() }; |
| | | } else { |
| | | if (obj.params) { |
| | | this.record.params[0] = obj.params[0]; |
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) { |
| | | this.record.xyData[a].name = this.jsonData.action[a].name; |
| | | this.record.xyData[a].value = this.record.params[0][a].toString(); |
| | | } |
| | | const language = this.$i18n.locale; |
| | | if (language === 'en-US') { |
| | | this.replaceChineseWithEnglish(); |
| | | } else { |
| | | this.localizedRoles = [...this.record.xyData]; |
| | | } |
| | | } |
| | | } |
| | | // console.log(this.record.xyData); |
| | | this.$forceUpdate(); |
| | | this.replaceChineseWithEnglish(); |
| | | }; |
| | | |
| | | //关闭事件 |
| | |
| | | this.messagepack.data = this.record.xyData.map(item => parseInt(item.value)); // 转换为整数数组 |
| | | //console.log(this.messagepack); |
| | | socket?.send(JSON.stringify(this.messagepack)); |
| | | } |
| | | }, |
| | | //语言转换 |
| | | replaceChineseWithEnglish () { |
| | | const translation = this.$t('langActions'); |
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value }; }); |
| | | console.log(translation); |
| | | }, |
| | | |
| | | } |
| | | |
| | |
| | | .el-input__inner { |
| | | border: none; |
| | | } |
| | | |
| | | .blue-button { |
| | | background-color: skyblue; |
| | | } |
| | |
| | | <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>
|
| | | <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/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>
|
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <div>Parameter</div>
|
| | |
|
| | | <el-form label-width="100px" style="display: flex; flex-wrap: wrap;" :model="messagepack.data">
|
| | | <div id="btn_div">
|
| | | <el-button type="primary" @click="send()" id="xiafa" :disabled="isButtonDisabled">{{ $t('Distribute parameters') }}</el-button>
|
| | | <el-button type="primary" @click="send()" id="xiafa" :disabled="isButtonDisabled">{{ $t('Distribute parameters')
|
| | | }}</el-button>
|
| | |
|
| | | </div>
|
| | | <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
|
| | | <el-input style="width: 280px; border:none;" class="in_mc" v-model="item.name" readonly></el-input>
|
| | | |
| | | <span style="margin-right: 5px; width: 50px;">{{ item.value }}</span>
|
| | | <span style="margin-right: 5px; font-size: 14px;color: red;">|</span>
|
| | | <input v-model="item.value2" type="number" style="width: 43px; margin-right: 5px; margin-top: 5px; font-size: 16px;">
|
| | |
|
| | | <span style="margin-right: 5px; width: 50px;">{{ item.value }}</span>
|
| | | <span style="margin-right: 5px; font-size: 14px;color: red;">|</span>
|
| | | <input v-model="item.value2" type="number"
|
| | | style="width: 43px; margin-right: 5px; margin-top: 5px; font-size: 16px;">
|
| | | <span style="margin-right: 5px; width: 50px;">{{ item.unit }}</span>
|
| | |
|
| | | </div>
|
| | | </el-form>
|
| | |
|
| | | <div>
|
| | | |
| | | </div>
|
| | | </div>
|
| | |
|
| | |
|
| | | |
| | | </div>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script> |
| | | <script>
|
| | |
|
| | | let socket;
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/Parameter'
|
| | | export default {
|
| | | name: "Parameter",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | jsonData: data,
|
| | | dialogVisible: true,
|
| | | password: '',
|
| | | activeButton: '',
|
| | | record: {
|
| | | params: [100, 200, 10, 10, 10, 10],
|
| | | xyData: [
|
| | | { name: "conveyor Velocity(Auto FAST)", value: 0, value2: 0 },
|
| | | { name: "conveyor Velocity(Auto SLOW)", value: 0, value2: 0 },
|
| | | { name: "conveyor Velocity(Manual)", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity manual", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity manual", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity manual", value: 0, value2: 0 }
|
| | | { name: "conveyor Velocity(Auto FAST)", value: 0, value2: 1, unit: "m/min" },
|
| | | { name: "conveyor Velocity(Auto SLOW)", value: 0, value2: 1, unit: "m/min" },
|
| | | { name: "conveyor Velocity(Manual)", value: 0, value2: 1, unit: "m/min" },
|
| | | { name: "A01 A02 TURN JOG Velocity", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL JOG Velocity", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL JOG Velocity", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "A01 A02 TURN POS Velocity AUTO", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "A01 A02 TURN POS Velocity manual", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL POS Velocity manual", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0, value2: 1, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL POS Velocity manual", value: 0, value2: 1, unit: "mm/S" }
|
| | | ],
|
| | | canshu: []
|
| | | },
|
| | |
| | |
|
| | | created () {
|
| | | this.initWebSocket();
|
| | | this.isButtonDisabled = true; |
| | | this.isButtonDisabled = true;
|
| | |
|
| | | },
|
| | | methods: {
|
| | | |
| | | |
| | | |
| | | setActiveButton(buttonName) {
|
| | | showdata () {
|
| | | console.log(1111);
|
| | | console.log(this.jsonData.para[0].name);
|
| | | // console.log(this.record.xyData);
|
| | |
|
| | | },
|
| | |
|
| | |
|
| | | setActiveButton (buttonName) {
|
| | | this.activeButton = buttonName;
|
| | | },
|
| | | initWebSocket () {
|
| | |
| | | let obj = JSON.parse(msg.data);
|
| | |
|
| | |
|
| | | if (obj.params && obj.state){
|
| | | if (obj.params && obj.state) {
|
| | |
|
| | |
|
| | | |
| | |
|
| | | this.record.params[0] = obj.params[0];
|
| | | this.record.state = obj.state[0];
|
| | | if (obj.state && obj.state.length > 0) {
|
| | | let isButtonDisabled = this.record.state.includes(1);
|
| | | this.isButtonDisabled = isButtonDisabled;
|
| | |
|
| | | |
| | | // 判断state中是否存在1
|
| | | //console.log(isButtonDisabled)
|
| | | // 将判断结果保存到变量isButtonDisabled中
|
| | | this.record.params[0] = obj.params[0];
|
| | | this.record.state = obj.state[0];
|
| | | if (obj.state && obj.state.length > 0) {
|
| | | let isButtonDisabled = this.record.state.includes(1);
|
| | | this.isButtonDisabled = isButtonDisabled;
|
| | |
|
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | | } else {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | |
|
| | | // 判断state中是否存在1
|
| | | //console.log(isButtonDisabled)
|
| | | // 将判断结果保存到变量isButtonDisabled中
|
| | |
|
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) {
|
| | | // this.record.xyData[a] =
|
| | | // {
|
| | | // name: this.jsonData.para[a].name,
|
| | | // value: this.jsonData.para[a].read,
|
| | | // value2: this.jsonData.para[a].sending,
|
| | | // unit: this.jsonData.para[a].unit
|
| | | // };
|
| | |
|
| | | // if (!this.xyData[a]) {
|
| | | this.record.xyData[a] =
|
| | | {
|
| | | name: this.jsonData.para[a].name,
|
| | | value: this.record.params[0][a],
|
| | | unit: this.jsonData.para[a].unit
|
| | | };
|
| | | }
|
| | | // else {
|
| | | // this.xyData[a].value = this.record.params[0][a];
|
| | | // }
|
| | | // }
|
| | | const language = this.$i18n.locale;
|
| | | if (language === 'en-US') {
|
| | | this.replaceChineseWithEnglish();
|
| | | } else {
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //console.log(this.record.xyData);
|
| | | this.$forceUpdate();
|
| | | this.replaceChineseWithEnglish();
|
| | | };
|
| | |
|
| | | // 关闭事件
|
| | |
| | | },
|
| | | handleChange (index, value) {
|
| | | this.record.xyData[index].value = value;
|
| | | }
|
| | | },
|
| | | //语言转换
|
| | | replaceChineseWithEnglish () {
|
| | | const translation = this.$t('langparameter');
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value, unit: item.unit }; });
|
| | | //console.log(translation);
|
| | | },
|
| | | }
|
| | | };
|
| | | </script>
|
| | |
| | |
|
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | #btn_div {
|
| | | width: 100%;
|
| | | }
|
| New file |
| | |
| | | <template>
|
| | | <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>
|
| | | <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('Servo Manual')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | <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/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter2')
|
| | | }}</router-link> |
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning1')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning2')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <el-row :gutter="18" class="card">
|
| | | <el-col :span="7" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex">
|
| | | <el-card class="json-block">
|
| | | <div class="button-row" style="display: flex; justify-content: space-between;">
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex">
|
| | | <span v-if="item.title" :name="item.title.name" class="action-button" >{{ item.title.name }}</span>
|
| | | </div>
|
| | | </div>
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container">
|
| | | <div class="item-row">
|
| | | <span class="name" style="width:250px;">{{ item.name }}</span>
|
| | | <el-input v-if="item.type === '0'" v-model="item.value" class="input-box" @keyup.enter.native="submitDataToBackend"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | |
| | | </el-card>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <!-- <el-button @click="submitDataToBackend">提交数据到后端</el-button> -->
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/parameter1'
|
| | | import { throttle } from 'lodash';
|
| | | let socket;
|
| | | export default {
|
| | | name: "Parameter1",
|
| | | mixins: [LanguageMixin],
|
| | | data() {
|
| | | return {
|
| | | jsonData: data // 加载整个data.json文件作为jsonData
|
| | | }
|
| | | }, created () {
|
| | | this.initWebSocket();
|
| | | // console.log('jsonData:', this.jsonData); |
| | |
|
| | | },
|
| | | methods: {
|
| | | updateButtonValue(dataGroup, itemIndex) {
|
| | | this.$set(dataGroup[itemIndex].button, 'value', 1); // 点击按钮后将值改为1
|
| | | },
|
| | | submitDataToBackend() {
|
| | | const inputData = this.jsonData.map(dataGroup => {
|
| | | return dataGroup.map(item => {
|
| | | if (item.type === '0') {
|
| | | return { value: parseInt(item.value) };
|
| | | } else if (item.button) {
|
| | | return { value: parseInt(item.button.value) };
|
| | | }
|
| | | return null;
|
| | | });
|
| | | });
|
| | |
|
| | | // 将inputData转换为整数数组
|
| | | const integerArray = inputData.map(dataGroup => {
|
| | | return dataGroup.map(item => {
|
| | | if (item !== null) {
|
| | | return item.value;
|
| | | }
|
| | | return null;
|
| | | });
|
| | | });
|
| | | // 构建JSON对象
|
| | | const jsonObject = { data: integerArray };
|
| | | |
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('提交以下数据到后端:', jsonString);
|
| | | socket?.send(jsonString);
|
| | | },
|
| | | initWebSocket () {
|
| | | |
| | | let viewname = "Parameter1";
|
| | |
|
| | | if (typeof WebSocket === "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | |
|
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | |
|
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | |
|
| | | // 打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | };
|
| | |
|
| | | // 收到消息
|
| | | socket.onmessage = (msg) => {
|
| | | if (!msg.data) {
|
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑
|
| | | }
|
| | |
|
| | | let obj = JSON.parse(msg.data);
|
| | | const jsonData2 = this.jsonData;
|
| | |
|
| | | const handleMouseMove = throttle(function(event) {
|
| | | const inputBox = document.querySelectorAll('.el-card__body');
|
| | | const target = event.target;
|
| | | if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
|
| | | const parms = obj.params;
|
| | | const fanzhuan = obj.fanzhuan;
|
| | | const xiaoche = obj.xiaoche;
|
| | | |
| | | // console.log('parms:', parms);
|
| | | // console.log('fanzhuan:', fanzhuan);
|
| | | // console.log('xiaoche:', xiaoche);
|
| | | |
| | | let index = 0;
|
| | | 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(fanzhuan) && Array.isArray(fanzhuan[0]) && fanzhuan[0][0] !== undefined) {
|
| | | jsonData2[3][0]['value'] = fanzhuan[0][0];
|
| | | }
|
| | | if (Array.isArray(xiaoche) && Array.isArray(xiaoche[0]) && xiaoche[0][0] !== undefined) {
|
| | | jsonData2[4][0]['value'] = xiaoche[0][0];
|
| | | }
|
| | | }
|
| | | }, 200);
|
| | |
|
| | | document.addEventListener('mouseover', handleMouseMove);
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | // 关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | |
|
| | | // 发生错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | };
|
| | | |
| | |
|
| | | }
|
| | | |
| | | },
|
| | | replaceChineseWithEnglish () {
|
| | | const translation = this.$t('Parameter1');
|
| | | this.jsonData = this.jsonData.map(item => { return { name: translation[item.name] || item.name, value: item.value }; });
|
| | | // console.log(translation);
|
| | | },
|
| | | send () {
|
| | | |
| | | |
| | | socket?.send(JSON.stringify(this.messagepack));
|
| | | },
|
| | |
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
|
| | | <style scoped>
|
| | | .item-row {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | margin-bottom: 5px; /* 调整每个项目之间的间距 */
|
| | | }
|
| | |
|
| | | .action-button {
|
| | | margin-right: 30px;
|
| | | background: #66b1ff;
|
| | | color: #FFF;
|
| | | }
|
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | | </style> |
| New file |
| | |
| | | <template>
|
| | | <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>
|
| | | <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('Servo Manual')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | <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/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter2')
|
| | | }}</router-link> |
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning1')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning2')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | | |
| | | <el-row :gutter="20">
|
| | | <el-col :span="6" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex">
|
| | | <el-card class="json-block" style="width:260px;">
|
| | | <div class="button-row" style="display: flex; justify-content: space-between;">
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex">
|
| | | <span v-if="item.title" :name="item.title.name" class="action-button" >{{ item.title.name }}</span>
|
| | | </div>
|
| | | </div>
|
| | |
|
| | | <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" :name="item.button.name" v-model="item.button.value" class="action-button"
|
| | | @click="updateButtonValue(dataGroup, itemIndex);submitDataToBackend(item.button.name)"
|
| | | :class="{ 'green-button': item.button.value === 0 && item.button.name !== '清除ID','red-button': item.button.value === 1 && item.button.name !== '清除ID' }">{{ item.button.name }}</el-button>
|
| | | </div>
|
| | | </div>
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container">
|
| | | <div class="item-row">
|
| | |
|
| | | <span class="name" style="width:150px;">{{ item.name }}</span>
|
| | | <el-input v-if="item.type === '0'" v-model="item.value" readonly="readonly" style="width:150px;" class="input-box"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | |
| | | </el-card>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <!-- <el-button @click="submitDataToBackend">提交数据到后端</el-button> -->
|
| | | </div>
|
| | | </template>
|
| | | |
| | | <script>
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/parameter2'
|
| | | let socket;
|
| | | export default {
|
| | | name: "Parameter2",
|
| | | mixins: [LanguageMixin],
|
| | | data() {
|
| | | return {
|
| | | jsonData: data ,
|
| | |
|
| | | // 加载整个data.json文件作为jsonData
|
| | | }
|
| | | },
|
| | | created () {
|
| | | this.initWebSocket();
|
| | | // console.log('jsonData:', this.jsonData); |
| | |
|
| | | },
|
| | | methods: {
|
| | | updateButtonValue(dataGroup, itemIndex) {
|
| | | // 将当前按钮的值设为1
|
| | |
|
| | | this.$set(dataGroup[itemIndex].button, 'value', 1);
|
| | | |
| | |
|
| | | // 将其他按钮的值全部设为0
|
| | |
|
| | | },
|
| | | submitDataToBackend(currentButtonName) {
|
| | | if (currentButtonName === '清除ID') {
|
| | | const inputData = this.jsonData.map(dataGroup => {
|
| | | return dataGroup.map(item => {
|
| | | if (item.type === '3') {
|
| | | return { value: item.button.value };
|
| | | } |
| | | return null;
|
| | | });
|
| | | });
|
| | |
|
| | | const values = inputData.flat().filter(item => item !== null).map(item => item.value);
|
| | |
|
| | | const jsonObject = { data: values };
|
| | | |
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('Type为3的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | | }
|
| | | },
|
| | | initWebSocket () {
|
| | | |
| | | let viewname = "Parameter2";
|
| | |
|
| | | if (typeof WebSocket === "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | |
|
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | |
|
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | |
|
| | | // 打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | };
|
| | |
|
| | | // 收到消息
|
| | | socket.onmessage = (msg) => {
|
| | | if (!msg.data) {
|
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑
|
| | | }
|
| | |
|
| | | let obj = JSON.parse(msg.data);
|
| | | |
| | | const jsonData2 = this.jsonData;
|
| | | |
| | | // 如果鼠标不在输入框内,更新输入框的值
|
| | | // this.submitDataToBackend()
|
| | | const parms = obj.params;
|
| | | // console.log(parms);
|
| | |
|
| | | 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') {
|
| | | obj.value = parms[1][i];
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
|
| | | 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 === '4') {
|
| | | obj.button.value = parms[2][i];
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
|
| | | 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 === '3') {
|
| | | obj.button.value = parms[0][i];
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
|
| | | // console.log(jsonData2);
|
| | |
|
| | | |
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | // 关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | |
|
| | | // 发生错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | };
|
| | |
|
| | | }
|
| | | },
|
| | | send () {
|
| | | |
| | | |
| | | socket?.send(JSON.stringify(this.messagepack));
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | </script>
|
| | | |
| | | <style scoped>
|
| | | .item-row {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | margin-bottom: 5px; /* 调整每个项目之间的间距 */
|
| | | }
|
| | | |
| | | .action-button {
|
| | | margin-right: 30px;
|
| | | background: #66b1ff;
|
| | | color: #FFF;
|
| | | }
|
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | |
|
| | | .green-button {
|
| | | background-color: green;
|
| | | }
|
| | |
|
| | | .red-button{
|
| | | background-color: red;
|
| | | }
|
| | |
|
| | | </style> |
| New file |
| | |
| | | <template>
|
| | | <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>
|
| | | <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('Servo Manual')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | <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/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter2')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning1')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning2')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | | |
| | | <el-row :gutter="18" class='card'>
|
| | | <el-col :span="7" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex" >
|
| | | <el-card class="json-block">
|
| | | <div class="button-row" style="display: flex; justify-content: space-between;">
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex">
|
| | | <span v-if="item.title" :name="item.title.name" class="action-button" >{{ item.title.name }}</span>
|
| | | </div>
|
| | | </div>
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container">
|
| | | <div class="item-row">
|
| | | <span class="name" style="width:250px;">{{ item.name }}</span>
|
| | | <el-input v-if="item.type === '0'" v-model="item.value" class="input-box"></el-input>
|
| | | |
| | |
|
| | | |
| | | <el-button v-if="item.type === '0' && item.name !== '格子间距' && item.name !== '出片接片地址' && item.name !== '存片接片地址'" class="input-box" @click="submitDataToBackend();">取地址</el-button>
|
| | | </div>
|
| | | </div>
|
| | | |
| | | </el-card>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <!-- <el-button @click="submitDataToBackend">提交数据到后端</el-button> -->
|
| | | </div>
|
| | | </template>
|
| | | |
| | | <script>
|
| | | let socket;
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/Positioning1'
|
| | | |
| | | export default {
|
| | | name: "Positioning1",
|
| | | mixins: [LanguageMixin],
|
| | | data() {
|
| | | return {
|
| | | jsonData: data // 加载整个data.json文件作为jsonData
|
| | | }
|
| | | },
|
| | | created () {
|
| | | this.initWebSocket();
|
| | | // console.log('jsonData:', this.jsonData); |
| | |
|
| | | },
|
| | | methods: {
|
| | | updateButtonValue(dataGroup, itemIndex) {
|
| | | this.$set(dataGroup[itemIndex].button, 'value', 1); // 点击按钮后将值改为1
|
| | | },
|
| | | submitDataToBackend() {
|
| | | const inputData = this.jsonData.map(dataGroup => {
|
| | | return dataGroup.map(item => {
|
| | | if (item.type === '0') {
|
| | | return { value: parseInt(item.value) };
|
| | | } else if (item.button) {
|
| | | return { value: parseInt(item.title.value) };
|
| | | }
|
| | | return null;
|
| | | });
|
| | | });
|
| | |
|
| | | // 将inputData转换为整数数组
|
| | | const integerArray = inputData.map(dataGroup => {
|
| | | return dataGroup.map(item => {
|
| | | if (item !== null) {
|
| | | return item.value;
|
| | | }
|
| | | return null;
|
| | | });
|
| | | });
|
| | | // 构建JSON对象
|
| | | const jsonObject = { data: integerArray };
|
| | | |
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | // console.log('提交以下数据到后端:', jsonString);
|
| | | socket?.send(jsonString);
|
| | | },
|
| | | initWebSocket () {
|
| | | |
| | | let viewname = "Positioning1";
|
| | |
|
| | | if (typeof WebSocket === "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | |
|
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | |
|
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | |
|
| | | // 打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | };
|
| | |
|
| | | // 收到消息
|
| | | socket.onmessage = (msg) => {
|
| | | if (!msg.data) {
|
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑
|
| | | }
|
| | |
|
| | | let obj = JSON.parse(msg.data);
|
| | | const jsonData2 = this.jsonData;
|
| | | document.addEventListener('mouseover', function(event) {
|
| | | const inputBox = document.querySelectorAll('.el-card__body');
|
| | | const target = event.target;
|
| | | if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
|
| | | // 如果鼠标不在输入框内,更新输入框的值
|
| | | // this.submitDataToBackend()
|
| | | const parms = obj.params;
|
| | | |
| | |
|
| | |
|
| | | let index = 0;
|
| | | 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')) {
|
| | | obj.value = parms[0][index];
|
| | | index++;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | // console.log(jsonData2);
|
| | |
|
| | | }
|
| | | });
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | // 关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | |
|
| | | // 发生错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | };
|
| | |
|
| | | }
|
| | | },
|
| | | send () {
|
| | | |
| | | |
| | | socket?.send(JSON.stringify(this.messagepack));
|
| | | },
|
| | |
|
| | | }
|
| | | }
|
| | | </script>
|
| | | |
| | | <style scoped>
|
| | | .item-row {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | margin-bottom: 5px; /* 调整每个项目之间的间距 */
|
| | | }
|
| | | |
| | | .action-button {
|
| | | margin-right: 30px;
|
| | | background: #66b1ff;
|
| | | color: #FFF;
|
| | | }
|
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | | </style> |
| New file |
| | |
| | | <template>
|
| | | <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>
|
| | | <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('Servo Manual')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | <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/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter2')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning1')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning2')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <el-row :gutter="18" class='card'>
|
| | | <el-col :span="7" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex" >
|
| | | <el-card class="json-block">
|
| | | <div class="button-row" style="display: flex; justify-content: space-between;">
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex">
|
| | | <span v-if="item.title" :name="item.title.name" class="action-button" >{{ item.title.name }}</span>
|
| | | </div>
|
| | | </div>
|
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container">
|
| | | <div class="item-row">
|
| | | <span class="name" style="width:250px;">{{ item.name }}</span>
|
| | | <el-input v-if="item.type === '0'" v-model="item.value" class="input-box"></el-input>
|
| | | <el-button v-if="item.type === '0'" class="input-box" @click="submitDataToBackend();">取地址</el-button>
|
| | | </div>
|
| | | </div>
|
| | | |
| | | </el-card>
|
| | | </el-col>
|
| | | </el-row>
|
| | | <!-- <el-button @click="submitDataToBackend">提交数据到后端</el-button> -->
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | let socket;
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/Positioning2'
|
| | |
|
| | | export default {
|
| | | name: "Positioning2",
|
| | | mixins: [LanguageMixin],
|
| | | data() {
|
| | | return {
|
| | | jsonData: data // 加载整个data.json文件作为jsonData
|
| | | }
|
| | | },
|
| | | created () {
|
| | | this.initWebSocket();
|
| | | // console.log('jsonData:', this.jsonData); |
| | |
|
| | | },
|
| | | methods: {
|
| | | updateButtonValue(dataGroup, itemIndex) {
|
| | | this.$set(dataGroup[itemIndex].button, 'value', 1); // 点击按钮后将值改为1
|
| | | },
|
| | | submitDataToBackend() {
|
| | | const inputData = this.jsonData.map(dataGroup => {
|
| | | return dataGroup.map(item => {
|
| | | if (item.type === '0') {
|
| | | return { value: parseInt(item.value) };
|
| | | } else if (item.button) {
|
| | | return { value: parseInt(item.title.value) };
|
| | | }
|
| | | return null;
|
| | | });
|
| | | });
|
| | |
|
| | | // 将inputData转换为整数数组
|
| | | const integerArray = inputData.map(dataGroup => {
|
| | | return dataGroup.map(item => {
|
| | | if (item !== null) {
|
| | | return item.value;
|
| | | }
|
| | | return null;
|
| | | });
|
| | | });
|
| | | // 构建JSON对象
|
| | | const jsonObject = { data: integerArray };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | // console.log('提交以下数据到后端:', jsonString);
|
| | | socket?.send(jsonString);
|
| | | },
|
| | | initWebSocket () {
|
| | |
|
| | | let viewname = "Positioning2";
|
| | |
|
| | | if (typeof WebSocket === "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | |
|
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | |
|
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | |
|
| | | // 打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | };
|
| | |
|
| | | // 收到消息
|
| | | socket.onmessage = (msg) => {
|
| | | if (!msg.data) {
|
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑
|
| | | }
|
| | |
|
| | | let obj = JSON.parse(msg.data);
|
| | | const jsonData2 = this.jsonData;
|
| | | document.addEventListener('mouseover', function(event) {
|
| | | const inputBox = document.querySelectorAll('.el-card__body');
|
| | | const target = event.target;
|
| | | if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
|
| | | // 如果鼠标不在输入框内,更新输入框的值
|
| | | // this.submitDataToBackend()
|
| | | const parms = obj.params;
|
| | | |
| | | |
| | | let index = 0;
|
| | | 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')) {
|
| | | obj.value = parms[0][index];
|
| | | index++;
|
| | | }
|
| | | }
|
| | | }
|
| | | // console.log(jsonData2);
|
| | |
|
| | | }
|
| | | });
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | // 关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | |
|
| | | // 发生错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | };
|
| | |
|
| | | }
|
| | | },
|
| | | send () {
|
| | | |
| | | |
| | | socket?.send(JSON.stringify(this.messagepack));
|
| | | },
|
| | |
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
|
| | | <style scoped>
|
| | | .item-row {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | margin-bottom: 5px; /* 调整每个项目之间的间距 */
|
| | | }
|
| | |
|
| | | .action-button {
|
| | | margin-right: 30px;
|
| | | background: #66b1ff;
|
| | | color: #FFF;
|
| | | }
|
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | | </style> |
| New file |
| | |
| | | <template>
|
| | | <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>
|
| | | <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('Servo Manual')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | |
| | | <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/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter2')
|
| | | }}</router-link> |
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning1')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning2')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | <el-row :gutter="26">
|
| | | <el-col :span="12" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex">
|
| | | <el-card class="json-block" style="width: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'" 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" :name="item.button.name" v-model="item.button.value" :class="{'action-button': true, 'error-button': 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-button @click="submitDataToBackend">提交数据到后端</el-button> -->
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/ServoManualone'
|
| | | import { throttle } from 'lodash';
|
| | | let socket;
|
| | | export default {
|
| | | name: "ServoManualone",
|
| | | mixins: [LanguageMixin],
|
| | | data() {
|
| | | return {
|
| | | jsonData: data ,
|
| | |
|
| | | // 加载整个data.json文件作为jsonData
|
| | | }
|
| | | },
|
| | | created () {
|
| | | this.initWebSocket();
|
| | | // console.log('jsonData:', this.jsonData); |
| | |
|
| | | },
|
| | | methods: {
|
| | | updateButtonValue(dataGroup, itemIndex) {
|
| | | // 将当前按钮的值设为1
|
| | |
|
| | | this.$set(dataGroup[itemIndex].button, 'value', 1);
|
| | | |
| | | |
| | |
|
| | | },
|
| | | submitDataToBackend(currentButtonName) {
|
| | | if (currentButtonName === '半自动启动') {
|
| | | const data = [];
|
| | |
|
| | | for (let i = 0; i < 2; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | |
|
| | | data.push(values);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | }
|
| | |
|
| | | if (currentButtonName === '复位') {
|
| | |
|
| | | const data2 = [];
|
| | | const resetButtonValues = this.jsonData.map(item => {
|
| | | const buttonItem = item.find(subItem => subItem.button && subItem.button.name === '复位');
|
| | | return buttonItem ? buttonItem.button.value : null;
|
| | | }).filter(value => value !== null);
|
| | |
|
| | | // 将得到的值添加到 data 数组中
|
| | | data2.push(...resetButtonValues);
|
| | | const jsonObject2 = { data2 };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString2 = JSON.stringify(jsonObject2);
|
| | | console.log('所有Type为0的value:', jsonString2);
|
| | | socket?.send(jsonString2);
|
| | |
|
| | |
|
| | | }
|
| | | if (currentButtonName === 'A01半自动') {
|
| | | const elements = document.getElementsByClassName('special-class');
|
| | | for (let i = 0; i < elements.length; i++) {
|
| | | if (elements[i].style.display === 'none') {
|
| | | elements[i].style.display = ''; // 显示元素
|
| | | } |
| | | }
|
| | | }
|
| | |
|
| | | if (currentButtonName === 'A02半自动') {
|
| | | const elements = document.getElementsByClassName('special-class2');
|
| | | for (let i = 0; i < elements.length; i++) {
|
| | | if (elements[i].style.display === 'none') {
|
| | | elements[i].style.display = ''; // 显示元素
|
| | | } |
| | | }
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | |
| | | },
|
| | |
|
| | |
|
| | | initWebSocket () {
|
| | | |
| | | let viewname = "ServoManualone";
|
| | |
|
| | | if (typeof WebSocket === "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | |
|
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | |
|
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | |
|
| | | // 打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | };
|
| | |
|
| | | // 收到消息
|
| | | socket.onmessage = (msg) => {
|
| | | if (!msg.data) {
|
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑
|
| | | }
|
| | |
|
| | | let obj = JSON.parse(msg.data);
|
| | | // console.log(obj)
|
| | | const jsonData2 = this.jsonData;
|
| | |
|
| | | const handleMouseMove = throttle(function(event) {
|
| | | const inputBox = document.querySelectorAll('.el-card__body');
|
| | | const target = event.target;
|
| | | if (inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
|
| | | // 执行更新逻辑
|
| | | 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.value = obj[`zuhe${i+1}`][0][index];
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | // 遍历guzhang数组
|
| | | for (let i = 0; i < obj.guzhang[0].length; i++) {
|
| | | const guzhangValue = obj.guzhang[0][i];
|
| | | |
| | | // 查找jsonData2中带有"button"的对象,并且name等于"故障"
|
| | | for (let j = 0; j < jsonData2.length; j++) {
|
| | | const section = jsonData2[j];
|
| | | |
| | | for (let k = 0; k < section.length; k++) {
|
| | | const item = section[k];
|
| | | |
| | | if (item.button && item.button.name === "故障") {
|
| | | // 更新value属性
|
| | | item.button.value = guzhangValue;
|
| | | break;
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | | }, 200);
|
| | |
|
| | | document.addEventListener('mouseover', handleMouseMove);
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | // 关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | |
|
| | | // 发生错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | };
|
| | |
|
| | | }
|
| | | },
|
| | | send () {
|
| | | |
| | | |
| | | socket?.send(JSON.stringify(this.messagepack));
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
|
| | | <style scoped>
|
| | |
|
| | |
|
| | | .item-row {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | margin-bottom: 2px; /* 调整每个项目之间的间距 */
|
| | | }
|
| | |
|
| | | .action-button {
|
| | | margin-right: 10px;
|
| | | background: #66b1ff;
|
| | | color: #FFF;
|
| | | }
|
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | | .error-button {
|
| | | background-color: red;
|
| | | }
|
| | |
|
| | |
|
| | | </style> |
| New file |
| | |
| | | <template>
|
| | | <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>
|
| | | <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('Servo Manual')
|
| | | }}</router-link>
|
| | | |
| | | </el-breadcrumb>
|
| | |
|
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | |
| | | <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/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter2')
|
| | | }}</router-link> |
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning1')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ $t('Positioning2')
|
| | | }}</router-link>
|
| | | </el-breadcrumb>
|
| | |
|
| | | |
| | | </div >
|
| | |
|
| | |
|
| | | </template>
|
| | | <script>
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/ServoManualone'
|
| | |
|
| | | export default {
|
| | | name: "Servomanual",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | jsonData: data // 加载整个data.json文件作为jsonData
|
| | | }
|
| | | },
|
| | | created() {
|
| | | // 通过路由跳转到/Electrical/Servomanualone页面
|
| | | this.$router.push('/Electrical/Servomanualone');
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
|
| | | <style scoped>
|
| | | .item-row {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | margin-bottom: 10px; /* 调整每个项目之间的间距 */
|
| | | }
|
| | |
|
| | |
|
| | | .action-button {
|
| | | margin-right: 60px; /* 调整按钮之间的间距 */
|
| | | }
|
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | | </style> |
| | |
| | | <!--面包屑导航区域-->
|
| | | <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>
|
| | | <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/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>
|
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
|
| | | }}</router-link>
|
| | |
|
| | | |
| | |
|
| | | </el-breadcrumb>
|
| | | <div>{{ $t('Sign') }}</div>
|
| | | <div style="padding-right: 30px;display: flex;flex-wrap: wrap;" class="neir">
|
| | | <div class="kuai_sb" v-for="item in record.xyData" :key="item.name">
|
| | | <el-col class="deng" :class="getStatusClass(item.value)">
|
| | | </el-col>
|
| | | <el-col class="deng" :class="getStatusClass(item.value)"></el-col>
|
| | | <el-input v-model="item.name" style="width: 280px;" class="in_mc"></el-input>
|
| | |
|
| | | </div>
|
| | |
| | |
|
| | | <script >
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/Sign'
|
| | | let socket;
|
| | | export default {
|
| | | name: "Sign",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | jsonData: data,
|
| | | activeButton: '',
|
| | | record: {
|
| | | //定义数组,并添加默认值
|
| | | params: [1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
|
| | | 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,],
|
| | | xyData: [
|
| | | { name: 'D01.SR dec', value: 1 },
|
| | | { name: "D01.SR in pos", value: 1 },
|
| | | { name: "D02.SR dec", value: 1 },
|
| | | { name: "D02.SR in pos", value: 1 },
|
| | | { name: "D03.SR into", value: 1 },
|
| | | { name: "D03.SR dec", value: 1 },
|
| | | { name: 'D03.SR in pos', value: 1 },
|
| | | { name: "D04.SR dec", value: 1 },
|
| | | { name: "D04.SR in pos", value: 1 },
|
| | | { name: "D05.SR dec", value: 1 },
|
| | | { name: "D05.SR in pos", value: 1 },
|
| | | { name: "D06.SR dec", value: 1 },
|
| | | { name: 'D06.SR in pos', value: 1 },
|
| | | { name: "B01.SR out dec", value: 1 },
|
| | | { name: "B01.SR out in pos", value: 1 },
|
| | | { name: "B01.SR in dec", value: 1 },
|
| | | { name: "B01.SR in in pos", value: 1 },
|
| | | { name: "B01.SR turn on", value: 1 },
|
| | | { name: 'B01.SR turn off', value: 1 },
|
| | | { name: "B01.SR up", value: 1 },
|
| | | { name: "B01.SR down", value: 1 },
|
| | | { name: "B02.SR out dec", value: 1 },
|
| | | { name: "B02.SR out in pos", value: 1 },
|
| | | { name: "B02.SR in dec", value: 1 },
|
| | | { name: 'B02.SR in in pos', value: 1 },
|
| | | { name: "B02.SR turn on", value: 1 },
|
| | | { name: "B02.SR turn off", value: 1 },
|
| | | { name: "B02.SR up", value: 1 },
|
| | | { name: "B02.SR down", value: 1 },
|
| | | { name: "B01.SR out safety", value: 1 },
|
| | | { name: "B01.SR in safety", value: 1 },
|
| | | { name: "B02.SR out safety", value: 1 },
|
| | | { name: "SB.start(+)", value: 1 },
|
| | | { name: "SB.stop(1)", value: 1 },
|
| | | { name: "SB.reset", value: 1 },
|
| | | { name: "SB.auto/manul", value: 1 },
|
| | | { name: "SB.pause", value: 1 },
|
| | | { name: "SB.emg", value: 1 },
|
| | | { name: "D01.SB.start", value: 1 },
|
| | | { name: "D06.SB.start", value: 1 },
|
| | | { name: "B02.SR in safety", value: 1 },
|
| | | { name: "SAFETYDOOR.requset", value: 1 },
|
| | | { name: "SAFETYDOOR.confirm", value: 1 },
|
| | | { name: "SAFETYDOOR.reset", value: 1 },
|
| | | { name: "LED.red", value: 1 },
|
| | | { name: "LED.green", value: 1 },
|
| | | { name: "LED.yellow", value: 1 },
|
| | | { name: "D01.LED.green", value: 1 },
|
| | | { name: "D06.LED.green", value: 1 },
|
| | | { name: "B01.YV.turn", value: 1 },
|
| | | { name: "B01.YV.up down", value: 1 },
|
| | | { name: "B01.YV.gassing", value: 1 },
|
| | | { name: "B02.YV.turn", value: 1 },
|
| | | { name: "B02.YV.up down", value: 1 },
|
| | | { name: "B02.YV.gassing", value: 1 },
|
| | | { name: "SAFETYDOOR.led", value: 1 },
|
| | | { name: "SAFETYDOOR.open", value: 1 },
|
| | |
|
| | | ],
|
| | | canshu: [
|
| | | 'D01.SR dec',
|
| | | 'D01.SR in pos',
|
| | | 'D02.SR dec',
|
| | | 'D02.SR in pos',
|
| | | 'D03.SR into',
|
| | | 'D03.SR dec',
|
| | | 'D03.SR in pos',
|
| | | 'D04.SR dec',
|
| | | 'D04.SR in pos',
|
| | | 'D05.SR dec',
|
| | | 'D05.SR in pos',
|
| | | 'D06.SR dec',
|
| | | 'D06.SR in pos',
|
| | | 'B01.SR out dec',
|
| | | 'B01.SR out in pos',
|
| | | 'B01.SR in dec',
|
| | | 'B01.SR in in pos',
|
| | | 'B01.SR turn on',
|
| | | 'B01.SR turn off',
|
| | | 'B01.SR up',
|
| | | 'B01.SR down',
|
| | | 'B02.SR out dec',
|
| | | 'B02.SR out in pos',
|
| | | 'B02.SR in dec',
|
| | | 'B02.SR in in pos',
|
| | | 'B02.SR turn on',
|
| | | 'B02.SR turn off',
|
| | | 'B02.SR up',
|
| | | 'B02.SR down',
|
| | | 'LED.red',
|
| | | 'LED.green',
|
| | | 'LED.yellow',
|
| | | ],
|
| | |
|
| | | //定义数组
|
| | | params: [],
|
| | | xyData: [],
|
| | | },
|
| | |
|
| | |
|
| | |
| | | },
|
| | | created () {
|
| | | this.init();
|
| | | //this.showdata();
|
| | | },
|
| | | methods: {
|
| | | showdata () {
|
| | | console.log(1111);
|
| | | console.log(this.jsonData.sign[0].name);
|
| | | // console.log(this.record.xyData);
|
| | |
|
| | | },
|
| | |
|
| | | onButtonClick () {
|
| | | this.isButtonClicked = true; // 将按钮颜色设置为蓝色
|
| | | setTimeout(() => {
|
| | |
| | | },
|
| | | //根据读取PLC的值,根据名称改变颜色
|
| | | getStatusClass (zhuangtai) {
|
| | | // console.log(this.record.xyData);
|
| | | if (zhuangtai === 0) {
|
| | | return "op";
|
| | | }
|
| | |
| | | //console.log("收到数据====" + msg.data);
|
| | | let obj = JSON.parse(msg.data);
|
| | | this.record.params[0] = obj.sig[0];
|
| | | for (let a = 0; a < this.record.params[0].length; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | |
|
| | | } else {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | | this.record.xyData = this.jsonData.sign;
|
| | |
|
| | | }
|
| | |
|
| | | for (let a = 0; a < this.record.xyData.length; a++) {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | |
|
| | | }
|
| | |
|
| | | this.record.xyData = this.jsonData.sign.filter(item => {
|
| | | return item.state != 0;
|
| | | }
|
| | |
|
| | | );
|
| | |
|
| | |
|
| | | const language = this.$i18n.locale;
|
| | | if (language === 'en-US') {
|
| | | this.replaceChineseWithEnglish();
|
| | | } else {
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | | }
|
| | | this.$forceUpdate();
|
| | | this.replaceChineseWithEnglish();
|
| | |
|
| | | }.bind(this);
|
| | | //关闭事件
|
| | |
| | | }
|
| | | }
|
| | | },
|
| | | //语言转换
|
| | | replaceChineseWithEnglish () {
|
| | | const translation = this.$t('Signlang');
|
| | |
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value }; });
|
| | | //console.log(translation);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | .blue-button {
|
| | | background-color: skyblue;
|
| | | }
|
| | |
|
| | | .dark-theme {
|
| | | display: none;
|
| | | }
|
| | | </style> |
| | |
| | |
|
| | | </el-breadcrumb>
|
| | | <div>{{ $t('State') }}</div>
|
| | |
|
| | |
|
| | | <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="messagepack.data">
|
| | |
|
| | | <div class="kuai_div" v-for="item in this.record.xyData" :key="item.name">
|
| | | <el-input style="width: 60%;" class="in_mc" v-model="item.name" readonly></el-input>
|
| | | <el-input v-model="item.value" readonly="readonly" style="width: 90px;"></el-input>
|
| | | </div>
|
| | |
|
| | |
|
| | |
|
| | | </el-form>
|
| | |
|
| | |
| | |
|
| | | <script >
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | import data from '../../configuration/State'
|
| | | let socket;
|
| | | export default {
|
| | | name: "State",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | jsonData: data,
|
| | | activeButton: '',
|
| | | record: {
|
| | | params: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1,],
|
| | |
| | | this.record.params[0] = obj.sta[0];
|
| | | //将读取到的PLC的数据,与定义的xyData,组合成新的数组
|
| | | for (let a = 0; a < this.record.params[0].length; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | | } else {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | | }
|
| | |
|
| | | this.record.xyData[a].name = this.jsonData.state[a].name;
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | |
|
| | | }
|
| | | const language = this.$i18n.locale;
|
| | |
| | | } else {
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | | }
|
| | | //console.log(this.localizedRoles);
|
| | | this.$forceUpdate();
|
| | | this.replaceChineseWithEnglish();
|
| | |
|
| | | }.bind(this);
|
| | | //关闭事件
|
| | |
| | | //语言转换
|
| | | replaceChineseWithEnglish () {
|
| | | const translation = this.$t('dvstate');
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: item.name, value: translation[item.value] || item.value }; });
|
| | | console.log(translation);
|
| | | const translation1 = this.$t('Statelang');
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation1[item.name] || item.name, value: translation[item.value] || item.value }; });
|
| | | //console.log(translation);
|
| | | },
|
| | |
|
| | |
|
| New file |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <iframe src="http://localhost:8080/GERP/optimize/optimize/html/youhuacaidan.jsp"></iframe> |
| | | </div> |
| | | </template> |
| | | |
| | | <style> |
| | | .container { |
| | | position: fixed; |
| | | |
| | | left: 5; |
| | | |
| | | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | iframe { |
| | | width: 96%; |
| | | height: 99%; |
| | | } |
| | | </style> |
| | |
| | | <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
|
| | | <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
|
| | | <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
|
| | | <el-table-column prop="lengthWidth" :label="$t('Length and Width')"></el-table-column>
|
| | | <el-table-column :width="230" prop="lengthWidth" :label="$t('Length(inch) and Width(inch)')"></el-table-column>
|
| | | <el-table-column :label="$t('Operate')">
|
| | | <template slot-scope='scope'>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
| | |
| | | <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
|
| | | <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
|
| | | <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
|
| | | <el-table-column prop="lengthWidth" :label="$t('Length and Width')"></el-table-column>
|
| | | <el-table-column :width="230" prop="lengthWidth" :label="$t('Length(inch) and Width(inch)')"></el-table-column>
|
| | | <el-table-column :label="$t('Operate')">
|
| | | <template slot-scope='scope'>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
| | |
| | | <el-form-item :label="$t('order')">
|
| | | <el-input v-model="form.orderId" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('length')">
|
| | | <el-form-item :label="$t('length(inch)')">
|
| | | <el-input v-model="form.height" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('width')">
|
| | | <el-form-item :label="$t('width(inch)')">
|
| | | <el-input v-model="form.width" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('Barcodid')">
|
| | |
| | | <el-table-column :width="100" prop="orderId" :label="$t('Order Number')"></el-table-column>
|
| | | <el-table-column :width="100" prop="list" :label="$t('List Number')"></el-table-column>
|
| | | <el-table-column :width="100" prop="box" :label="$t('Box Number')"></el-table-column>
|
| | | <el-table-column :width="170" prop="lengthWidth" :label="$t('Length and Width')"></el-table-column>
|
| | | <el-table-column :width="170" prop="lengthWidth" :label="$t('Length(inch) and Width(inch)')"></el-table-column>
|
| | | <el-table-column :width="280" :label="$t('Operate')">
|
| | | <template slot-scope='scope'>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
| | |
| | | </properties> |
| | | |
| | | <dependencies> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.7</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-io</groupId> |
| | | <artifactId>commons-io</artifactId> |
| | | <version>2.10.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-web</artifactId> |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.io.UnsupportedEncodingException; |
| | | |
| | | import org.apache.commons.io.FileUtils; |
| | | |
| | | public class PlcParameter extends Thread { |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(500); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5} |
| | | // new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0} |
| | | jsonObject.append("params", arraylist ); |
| | | jsonObject.append("state", state); |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | public static String readFileToString(String filePath) throws IOException { |
| | | File file = new File(filePath); |
| | | return FileUtils.readFileToString(file, "UTF-8"); |
| | | } |
| | | |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Parameter.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | String addressList = "DB100.0"; |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | System.out.println("messages:" + messages); |
| | | String[] parts = lastMessage.split(","); |
| | | List<Short> messageValues = new ArrayList<>(); |
| | | for (String part : parts) { |
| | | try { |
| | | // 使用正则表达式清除非数字字符 |
| | | String cleanedPart = part.replaceAll("[^0-9-]", ""); |
| | | short value = Short.parseShort(cleanedPart.trim()); |
| | | messageValues.add(value); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("address"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | // 将消息值写入 PLC |
| | | S7control.getinstance().WriteWord(addressList, messageValues); |
| | | System.out.println("messageValues:" + messageValues); |
| | | System.out.println("addressList:" + addressList); |
| | | // 清空消息列表 |
| | | webSocketServer.clearMessages(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(500); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | |
| | | // System.out.println(stt); |
| | | // List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | // List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | Short[] values1 = { 1, 1, 1, 1, 1, 1, 2, 33, 2, 3, 4, 5 }; |
| | | List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | |
| | | Short[] values2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| | | List<Short> state = new ArrayList<>(Arrays.asList(values2)); |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5} |
| | | // new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0} |
| | | |
| | | jsonObject.append("params", arraylist); |
| | | jsonObject.append("state", state); |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | |
| | | String addressList = "DB100.0"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | System.out.println("messages:" + messages); |
| | | String[] parts = lastMessage.split(","); |
| | | List<Short> messageValues = new ArrayList<>(); |
| | | for (String part : parts) { |
| | | try { |
| | | // 使用正则表达式清除非数字字符 |
| | | String cleanedPart = part.replaceAll("[^0-9-]", ""); |
| | | short value = Short.parseShort(cleanedPart.trim()); |
| | | messageValues.add(value); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | // 将消息值写入 PLC |
| | | // S7control.getinstance().WriteWord(addressList, messageValues); |
| | | System.out.println("messageValues:" + messageValues); |
| | | System.out.println("addressList:" + addressList); |
| | | // 清空消息列表 |
| | | webSocketServer.clearMessages(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import org.apache.commons.io.FileUtils; |
| | | |
| | | import java.io.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | public class PlcParameter1 extends Thread { |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public static String readFileToString(String filePath) throws IOException { |
| | | File file = new File(filePath); |
| | | return FileUtils.readFileToString(file, "UTF-8"); |
| | | } |
| | | |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/address.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("address"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // this.readValue(); |
| | | // String PlcAddress = this.name; |
| | | // Integer Plccount = this.count; |
| | | |
| | | // System.out.println(stt); |
| | | // List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | // List<Short> fanzhuan1 = S7control.getinstance().ReadWord("DB100.8", 1); |
| | | // List<Short> xiaoche1 = S7control.getinstance().ReadWord("DB100.12", 1); |
| | | Short[] values1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; |
| | | List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | Short[] fanzhuan = { 4 }; |
| | | List<Short> fanzhuan1 = new ArrayList<>(Arrays.asList(fanzhuan)); |
| | | Short[] xiaoche = {5}; |
| | | List<Short> xiaoche1 = new ArrayList<>(Arrays.asList(xiaoche)); |
| | | |
| | | |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5} |
| | | // new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0} |
| | | |
| | | jsonObject.append("params", arraylist); |
| | | jsonObject.append("fanzhuan", fanzhuan1); |
| | | jsonObject.append("xiaoche", xiaoche1); |
| | | |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter1"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter1"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | String addressList1 = "DB100.0"; |
| | | String addressList2 = "DB100.8"; |
| | | String addressList3 = "DB100.12"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | // System.out.println("lastMessage:" + lastMessage); |
| | | JSONArray messageArray = new JSONArray(lastMessage); |
| | | |
| | | // 整合第 1 到 3 个数组并去掉 null 元素 |
| | | List<Short> mergedList = new ArrayList<>(); |
| | | for (int i = 0; i < 3; i++) { |
| | | JSONArray sublist = messageArray.getJSONArray(i); |
| | | for (int j = 0; j < sublist.size(); j++) { |
| | | Object value = sublist.get(j); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | mergedList.add(sValue); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 写入第一个地址 |
| | | if (messageArray.getJSONArray(3).size() > 0) { |
| | | Object value = messageArray.getJSONArray(3).get(0); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | // S7control.getinstance().WriteWord(addressList1, Arrays.asList(sValue)); |
| | | System.out.println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList1); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 写入第二个地址 |
| | | if (messageArray.getJSONArray(4).size() > 0) { |
| | | Object value = messageArray.getJSONArray(4).get(0); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | // S7control.getinstance().WriteWord(addressList2, Arrays.asList(sValue)); |
| | | System.out.println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList2); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 写入第三个地址 |
| | | if (!mergedList.isEmpty()) { |
| | | // S7control.getinstance().WriteWord(addressList3, mergedList); |
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + addressList3); |
| | | } |
| | | |
| | | // 清空消息列表 |
| | | webSocketServer.clearMessages(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import org.apache.commons.io.FileUtils; |
| | | |
| | | import java.io.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | public class PlcParameter2 extends Thread { |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public static String readFileToString(String filePath) throws IOException { |
| | | File file = new File(filePath); |
| | | return FileUtils.readFileToString(file, "UTF-8"); |
| | | } |
| | | |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/address.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("Positioning1"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(500); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // this.readValue(); |
| | | // String PlcAddress = this.name; |
| | | // Integer Plccount = this.count; |
| | | |
| | | // System.out.println(stt); |
| | | // List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | // List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | |
| | | Boolean[] values = { false, true, true, true, true, true, true, true, true, |
| | | true}; |
| | | List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values)); |
| | | Short[] values1 = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
| | | List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | |
| | | Short[] values2 = { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| | | List<Short> state = new ArrayList<>(Arrays.asList(values2)); |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | short[] params = new short[paramlist.size()]; |
| | | for (int i = 0; i < paramlist.size(); i++) { |
| | | boolean value = paramlist.get(i); |
| | | params[i] = value ? (short) 1 : (short) 0; |
| | | } |
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5} |
| | | // new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0} |
| | | jsonObject.append("params", params); |
| | | jsonObject.append("params", arraylist); |
| | | jsonObject.append("params", state); |
| | | |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter2"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter2"); |
| | | if (webSocketServer != null) { |
| | | |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | |
| | | String addressList = "DB2.0.0"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为整数类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | System.out.println("messages:" + messages); |
| | | String[] parts = lastMessage.split(","); |
| | | List<Integer> messageValues = new ArrayList<>(); |
| | | for (String part : parts) { |
| | | try { |
| | | // 使用正则表达式清除非数字字符 |
| | | String cleanedPart = part.replaceAll("[^0-9-]", ""); |
| | | Integer value = Integer.parseInt(cleanedPart.trim()); |
| | | messageValues.add(value); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为整数类型,则忽略该部分 |
| | | // e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | // 将消息值转换为布尔列表 |
| | | List<Boolean> messageBooleans = new ArrayList<>(); |
| | | for (Integer value : messageValues) { |
| | | messageBooleans.add(value == 1 ? true : false); |
| | | } |
| | | |
| | | // 将布尔列表写入 PLC |
| | | // S7control.getinstance().WriteBit(addressList, messageBooleans); |
| | | System.out.println("messageValues:" + messageBooleans); |
| | | System.out.println("addressList:" + addressList); |
| | | // 清空消息列表 |
| | | webSocketServer.clearMessages(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.example.springboot.component;
|
| | |
|
| | | import cn.hutool.json.JSONArray;
|
| | | import cn.hutool.json.JSONObject;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.Arrays;
|
| | | import java.io.BufferedReader;
|
| | | import java.io.File;
|
| | | import java.io.FileInputStream;
|
| | | import java.io.FileNotFoundException;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStreamReader;
|
| | | import java.io.UnsupportedEncodingException;
|
| | |
|
| | | import org.apache.commons.io.FileUtils;
|
| | |
|
| | | public class PlcPositioning1 extends Thread {
|
| | | String name = "";
|
| | | Integer count = 0;
|
| | |
|
| | | public static String readFileToString(String filePath) throws IOException {
|
| | | File file = new File(filePath);
|
| | | return FileUtils.readFileToString(file, "UTF-8");
|
| | | }
|
| | |
|
| | | public void readValue() {
|
| | | String str = "";
|
| | | BufferedReader bufferedReader = null;
|
| | | FileInputStream fileInputStream;
|
| | | try {
|
| | | // 从文件中读取字节数据存入 fileInputStream
|
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/address.json");
|
| | | // 读取 fileInputStream 中字节并将其解码为字符
|
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
|
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader
|
| | | bufferedReader = new BufferedReader(inputStreamReader);
|
| | | String line = null;
|
| | | // 将 bufferedReader 内容一行一行赋值给str
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | str += line;
|
| | | }
|
| | |
|
| | | // 将str字符串格式转为json
|
| | | JSONObject jsonObject = new JSONObject(str);
|
| | |
|
| | | // 获取json中的值
|
| | | JSONArray address = jsonObject.getJSONArray("Positioning1");
|
| | | for (int i = 0; i < address.size(); i++) {
|
| | | JSONObject ress = (JSONObject) address.get(i);
|
| | |
|
| | | this.name = ress.getStr("name");
|
| | | this.count = ress.getInt("count");
|
| | | System.out.println("messageValues:" + this.name);
|
| | | System.out.println("messageValues:" + this.count);
|
| | | }
|
| | |
|
| | | } catch (FileNotFoundException e) {
|
| | | e.printStackTrace();
|
| | | } catch (UnsupportedEncodingException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | while (this != null) {
|
| | | try {
|
| | | Thread.sleep(1000);
|
| | |
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | // this.readValue();
|
| | | // String PlcAddress = this.name;
|
| | | // Integer Plccount = this.count;
|
| | |
|
| | | // System.out.println(stt);
|
| | | // List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12);
|
| | | // List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10);
|
| | | // Short[] 存片 = { 1 };
|
| | | // List<Short> 存片1 = new ArrayList<>(Arrays.asList(存片));
|
| | | // Short[] 接片 = { 1 };
|
| | | // List<Short> 接片1 = new ArrayList<>(Arrays.asList(接片));
|
| | | // Short[] 间距 = { 1 };
|
| | | // List<Short> 间距1 = new ArrayList<>(Arrays.asList(间距));
|
| | | Short[] values1 = {1,1,1, 1,2, 3, 4, 5, 6, 7, 8, 9, 10,11, 12,13,14,15,16,17,18,19,20 };
|
| | | List<Short> arraylist = new ArrayList<>(Arrays.asList(values1));
|
| | |
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | |
|
| | |
|
| | | jsonObject.append("params", arraylist);
|
| | |
|
| | |
|
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Positioning1");
|
| | | if (sendwServer != null) {
|
| | | sendwServer.sendMessage(jsonObject.toString());
|
| | | }
|
| | |
|
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Positioning1");
|
| | | if (webSocketServer != null) {
|
| | | List<String> messages = webSocketServer.getMessages();
|
| | |
|
| | | String addressList3 = "DB100.12";
|
| | |
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为 short 类型的列表
|
| | | String lastMessage = messages.get(messages.size() - 1);
|
| | | // System.out.println("lastMessage:" + lastMessage);
|
| | | JSONArray messageArray = new JSONArray(lastMessage);
|
| | |
|
| | | // 整合第 1 到 3 个数组并去掉 null 元素
|
| | | List<Short> mergedList = new ArrayList<>();
|
| | | for (int i = 0; i < 5; i++) {
|
| | | JSONArray sublist = messageArray.getJSONArray(i);
|
| | | for (int j = 0; j < sublist.size(); j++) {
|
| | | Object value = sublist.get(j);
|
| | | if (value != null && !value.toString().equals("null")) {
|
| | | try {
|
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
|
| | | short sValue = Short.parseShort(cleanedValue.trim());
|
| | | mergedList.add(sValue);
|
| | | } catch (NumberFormatException e) {
|
| | | // 如果无法解析为 short 类型,则忽略该部分
|
| | | System.err.println("Could not parse value: " + value);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | // 写入第yi个地址
|
| | | if (!mergedList.isEmpty()) {
|
| | | // S7control.getinstance().WriteWord(addressList3, mergedList);
|
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + addressList3);
|
| | | }
|
| | |
|
| | | // 清空消息列表
|
| | | webSocketServer.clearMessages();
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | package com.example.springboot.component;
|
| | |
|
| | | import cn.hutool.json.JSONArray;
|
| | | import cn.hutool.json.JSONObject;
|
| | | import org.apache.commons.io.FileUtils;
|
| | |
|
| | | import java.io.*;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | public class PlcPositioning2 extends Thread {
|
| | | String name = "";
|
| | | Integer count = 0;
|
| | |
|
| | | public static String readFileToString(String filePath) throws IOException {
|
| | | File file = new File(filePath);
|
| | | return FileUtils.readFileToString(file, "UTF-8");
|
| | | }
|
| | |
|
| | | public void readValue() {
|
| | | String str = "";
|
| | | BufferedReader bufferedReader = null;
|
| | | FileInputStream fileInputStream;
|
| | | try {
|
| | | // 从文件中读取字节数据存入 fileInputStream
|
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/address.json");
|
| | | // 读取 fileInputStream 中字节并将其解码为字符
|
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
|
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader
|
| | | bufferedReader = new BufferedReader(inputStreamReader);
|
| | | String line = null;
|
| | | // 将 bufferedReader 内容一行一行赋值给str
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | str += line;
|
| | | }
|
| | |
|
| | | // 将str字符串格式转为json
|
| | | JSONObject jsonObject = new JSONObject(str);
|
| | |
|
| | | // 获取json中的值
|
| | | JSONArray address = jsonObject.getJSONArray("Positioning2");
|
| | | for (int i = 0; i < address.size(); i++) {
|
| | | JSONObject ress = (JSONObject) address.get(i);
|
| | |
|
| | | this.name = ress.getStr("name");
|
| | | this.count = ress.getInt("count");
|
| | | System.out.println("messageValues:" + this.name);
|
| | | System.out.println("messageValues:" + this.count);
|
| | | }
|
| | |
|
| | | } catch (FileNotFoundException e) {
|
| | | e.printStackTrace();
|
| | | } catch (UnsupportedEncodingException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | while (this != null) {
|
| | | try {
|
| | | Thread.sleep(1000);
|
| | |
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | // this.readValue();
|
| | | // String PlcAddress = this.name;
|
| | | // Integer Plccount = this.count;
|
| | |
|
| | | // System.out.println(stt);
|
| | | // List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12);
|
| | | // List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10);
|
| | | Short[] values1 = { 1,2, 3, 4, 5 , 11, 12,13,14,15};
|
| | | List<Short> arraylist = new ArrayList<>(Arrays.asList(values1));
|
| | |
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5}
|
| | | // new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0}
|
| | |
|
| | | jsonObject.append("params", arraylist);
|
| | |
|
| | |
|
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Positioning2");
|
| | | if (sendwServer != null) {
|
| | | sendwServer.sendMessage(jsonObject.toString());
|
| | | }
|
| | |
|
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Positioning2");
|
| | | if (webSocketServer != null) {
|
| | | List<String> messages = webSocketServer.getMessages();
|
| | |
|
| | | String addressList3 = "DB100.12";
|
| | |
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为 short 类型的列表
|
| | | String lastMessage = messages.get(messages.size() - 1);
|
| | | // System.out.println("lastMessage:" + lastMessage);
|
| | | JSONArray messageArray = new JSONArray(lastMessage);
|
| | |
|
| | | // 整合第 1 到 3 个数组并去掉 null 元素
|
| | | List<Short> mergedList = new ArrayList<>();
|
| | | for (int i = 0; i < 2; i++) {
|
| | | JSONArray sublist = messageArray.getJSONArray(i);
|
| | | for (int j = 0; j < sublist.size(); j++) {
|
| | | Object value = sublist.get(j);
|
| | | if (value != null && !value.toString().equals("null")) {
|
| | | try {
|
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
|
| | | short sValue = Short.parseShort(cleanedValue.trim());
|
| | | mergedList.add(sValue);
|
| | | } catch (NumberFormatException e) {
|
| | | // 如果无法解析为 short 类型,则忽略该部分
|
| | | System.err.println("Could not parse value: " + value);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | // 写入第yi个地址
|
| | | if (!mergedList.isEmpty()) {
|
| | | // S7control.getinstance().WriteWord(addressList3, mergedList);
|
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + addressList3);
|
| | | }
|
| | |
|
| | | // 清空消息列表
|
| | | webSocketServer.clearMessages();
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | package com.example.springboot.component;
|
| | |
|
| | | import cn.hutool.json.JSONArray;
|
| | | import cn.hutool.json.JSONObject;
|
| | |
|
| | | import java.io.BufferedReader;
|
| | | import java.io.FileInputStream;
|
| | | import java.io.FileNotFoundException;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStreamReader;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | public class Plcaction extends Thread {
|
| | | String name = "";
|
| | | Integer count = 0;
|
| | |
|
| | | public void readValue() {
|
| | | String str = "";
|
| | | BufferedReader bufferedReader = null;
|
| | | FileInputStream fileInputStream;
|
| | | try {
|
| | | // 从文件中读取字节数据存入 fileInputStream
|
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Action.json");
|
| | | // 读取 fileInputStream 中字节并将其解码为字符
|
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
|
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader
|
| | | bufferedReader = new BufferedReader(inputStreamReader);
|
| | | String line = null;
|
| | | // 将 bufferedReader 内容一行一行赋值给str
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | str += line;
|
| | | }
|
| | |
|
| | | // 将str字符串格式转为json
|
| | | JSONObject jsonObject = new JSONObject(str);
|
| | |
|
| | | // 获取json中的值
|
| | | JSONArray address = jsonObject.getJSONArray("address");
|
| | | for (int i = 0; i < address.size(); i++) {
|
| | | JSONObject ress = (JSONObject) address.get(i);
|
| | |
|
| | | this.name = ress.getStr("name");
|
| | | this.count = ress.getInt("count");
|
| | |
|
| | | }
|
| | |
|
| | | } catch (FileNotFoundException e) {
|
| | | e.printStackTrace();
|
| | | } catch (UnsupportedEncodingException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | while (this != null) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
|
| | | ////
|
| | | // JSONObject jsonObject = new JSONObject();
|
| | | // jsonObject.append("params", new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0});
|
| | | // 调用方法,进行赋值
|
| | | this.readValue();
|
| | | String PlcAddress = this.name;
|
| | | Integer Plccount = this.count;
|
| | | // System.out.println(PlcAddress);
|
| | |
|
| | | List<Boolean> paramlist = S7control.getinstance().ReadBits("DB2.0.0", 26);
|
| | | // Boolean[] values = {true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,false, true};
|
| | | // List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values));
|
| | | if (paramlist == null) {
|
| | | // List<Boolean> paramlist = S7control.getinstance().ReadBits("DB2.0.0", 26);
|
| | | Boolean[] values = { false, true, true, true, true, true, true, true, true,
|
| | | true, true, true, true, true, true, true, true, true, true, true, true, true, true,
|
| | | true, false, true };
|
| | | List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values));
|
| | |
|
| | | } else {
|
| | | if (paramlist != null) {
|
| | |
|
| | | short[] params = new short[paramlist.size()];
|
| | |
|
| | | for (int i = 0; i < paramlist.size(); i++) {
|
| | | boolean value = paramlist.get(i);
|
| | | params[i] = value ? (short) 1 : (short) 0;
|
| | | }
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | jsonObject.append("params", params);
|
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("action");
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("action");
|
| | | if (webSocketServer != null) {
|
| | |
|
| | | List<String> messages = webSocketServer.getMessages();
|
| | | List<String> messages = webSocketServer.getMessages();
|
| | |
|
| | | String addressList = "DB2.0.0";
|
| | | String addressList = "DB2.0.0";
|
| | |
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为整数类型的列表
|
| | | String lastMessage = messages.get(messages.size() - 1);
|
| | | System.out.println("messages:" + messages);
|
| | | String[] parts = lastMessage.split(",");
|
| | | List<Integer> messageValues = new ArrayList<>();
|
| | | for (String part : parts) {
|
| | | try {
|
| | | // 使用正则表达式清除非数字字符
|
| | | String cleanedPart = part.replaceAll("[^0-9-]", "");
|
| | | Integer value = Integer.parseInt(cleanedPart.trim());
|
| | | messageValues.add(value);
|
| | | } catch (NumberFormatException e) {
|
| | | // 如果无法解析为整数类型,则忽略该部分
|
| | | e.printStackTrace();
|
| | | }
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为整数类型的列表
|
| | | String lastMessage = messages.get(messages.size() - 1);
|
| | | System.out.println("messages:" + messages);
|
| | | String[] parts = lastMessage.split(",");
|
| | | List<Integer> messageValues = new ArrayList<>();
|
| | | for (String part : parts) {
|
| | | try {
|
| | | // 使用正则表达式清除非数字字符
|
| | | String cleanedPart = part.replaceAll("[^0-9-]", "");
|
| | | Integer value = Integer.parseInt(cleanedPart.trim());
|
| | | messageValues.add(value);
|
| | | } catch (NumberFormatException e) {
|
| | | // 如果无法解析为整数类型,则忽略该部分
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | // 将消息值转换为布尔列表
|
| | | List<Boolean> messageBooleans = new ArrayList<>();
|
| | | for (Integer value : messageValues) {
|
| | | messageBooleans.add(value == 1 ? true : false);
|
| | | }
|
| | | // 将消息值转换为布尔列表
|
| | | List<Boolean> messageBooleans = new ArrayList<>();
|
| | | for (Integer value : messageValues) {
|
| | | messageBooleans.add(value == 1 ? true : false);
|
| | | }
|
| | |
|
| | | // 将布尔列表写入 PLC
|
| | | S7control.getinstance().WriteBit(addressList, messageBooleans);
|
| | | System.out.println("messageValues:" + messageBooleans);
|
| | | System.out.println("addressList:" + addressList);
|
| | | // 将布尔列表写入 PLC
|
| | | S7control.getinstance().WriteBit(addressList, messageBooleans);
|
| | | System.out.println("messageValues:" + messageBooleans);
|
| | | System.out.println("addressList:" + addressList);
|
| | | // 清空消息列表
|
| | | webSocketServer.clearMessages();
|
| | | }
|
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | |
| | | public class Plcsign extends Thread { |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Sign.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("address"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 44); |
| | | List<Boolean> plclist2 = S7control.getinstance().ReadBits("DB102.5.5", 13); |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | // System.out.println(PlcAddress); |
| | | |
| | | // Boolean[] values = { true, false, true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, true, false, true, false, |
| | | // true, false, true, false, true, |
| | | // false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, }; |
| | | // List<Boolean> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 44); |
| | | // List<Boolean> plclist2 = S7control.getinstance().ReadBits("DB102.5.5", 13); |
| | | |
| | | // Boolean[] values2 = { true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, }; |
| | | // List<Boolean> plclist2 = new ArrayList<>(Arrays.asList(values2)); |
| | | Boolean[] values = { true, true, true, true, true, false, true, false, |
| | | true, false, true, false, true, false, |
| | | true, false, true, false, true, false, true, false, true, false, true, false, |
| | | true, false, true, false, true, |
| | | false, true, false, true, false, |
| | | true, false, true, false, true, false, true, false, null, |
| | | true, false, |
| | | true, false, true, false, true, false, |
| | | true, false, true, false, true, }; |
| | | List<Boolean> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | |
| | | // 将plclist2的元素添加到plclist中 |
| | | plclist.addAll(plclist2); |
| | | // System.out.println(plclist); |
| | | if (plclist != null) { |
| | | // 将获取的布尔类型转换为整数类型 |
| | | List<Integer> Intlist = new ArrayList<>(); |
| | | for (Boolean value : plclist) { |
| | | Intlist.add(value == true ? 0 : 1); |
| | | if (value != null) { |
| | | Intlist.add(value == true ? 0 : 1); |
| | | } |
| | | |
| | | } |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | |
| | | public class Plcstate extends Thread { |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public void readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/State.json"); |
| | | // 读取 fileInputStream 中字节并将其解码为字符 |
| | | InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8"); |
| | | // 提高读取效率,在 BufferedReader 内包装 InputStreamReader |
| | | bufferedReader = new BufferedReader(inputStreamReader); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("address"); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | |
| | | } |
| | | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<Short> plclist = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | // Short[] values = { 0, 1, 1, 0, 1, 0, 1, 0, |
| | | // 1, 0, }; |
| | | // List<Short> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | // System.out.println(PlcAddress); |
| | | |
| | | // List<Short> plclist = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | Short[] values = { 0, 1, 1, 0, 1, 0, 1, 0, |
| | | 1, 0, }; |
| | | List<Short> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | if (plclist != null) { |
| | | |
| | | List<String> Intlist = new ArrayList<>(); |
| | |
| | | s7PLC.writeMultiData(addressWrite); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 按指定的地址 写入一个Bit |
| | | * |
| | |
| | | return s7PLC.readInt16(address); |
| | | } |
| | | |
| | | public List<Short> readWords(List<String> addresses) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | |
| | | List<Short> data = new ArrayList<>(); |
| | | |
| | | for (String address : addresses) { |
| | | if (address.contains("-")) { |
| | | String[] range = address.split("-"); |
| | | String startAddress = range[0]; |
| | | String endAddress = range[1]; |
| | | |
| | | if (startAddress.equals(endAddress)) { |
| | | // 单个地址 |
| | | Short value = s7PLC.readInt16(startAddress); |
| | | data.add(value); |
| | | } else { |
| | | // 范围地址 |
| | | int startIndex = getIndexFromAddress(startAddress); |
| | | int endIndex = getIndexFromAddress(endAddress); |
| | | |
| | | for (int i = startIndex; i <= endIndex; i++) { |
| | | String currentAddress = getAddressFromIndex(i); |
| | | Short value = s7PLC.readInt16(currentAddress); |
| | | data.add(value); |
| | | } |
| | | } |
| | | } else { |
| | | // 单个地址 |
| | | Short value = s7PLC.readInt16(address); |
| | | data.add(value); |
| | | } |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | |
| | | private int getIndexFromAddress(String address) { |
| | | |
| | | // 可以解析出地址中的数字部分,并转换为整数 |
| | | return 0; |
| | | } |
| | | |
| | | private String getAddressFromIndex(int index) { |
| | | |
| | | // 整数转换为地址格式的字符串 |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 读取word结果集 |
| | | * |
| | |
| | | import com.example.springboot.component.Plcalarm; |
| | | import com.example.springboot.component.Plcsign; |
| | | import com.example.springboot.component.Plcstate; |
| | | import com.example.springboot.component.PlcPositioning1; |
| | | import com.example.springboot.component.PlcPositioning2; |
| | | import com.example.springboot.component.PlcParameter2; |
| | | import com.example.springboot.component.PlcParameter1; |
| | | import com.example.springboot.component.PlcServoManualone; |
| | | |
| | | @Component |
| | | @Order(1) |
| | |
| | | |
| | | new PlcHold().start(); |
| | | |
| | | new Plcaction().start(); |
| | | |
| | | new Plchome().start(); |
| | | |
| | | new PlcParameter().start(); |
| | | |
| | | new Plcalarm().start(); |
| | | |
| | | new Plcsign().start(); |
| | | |
| | | new Plcstate().start(); |
| | | // new Plcaction().start(); |
| | | // |
| | | // new Plchome().start(); |
| | | // |
| | | // new PlcParameter().start(); |
| | | // |
| | | // new Plcalarm().start(); |
| | | // |
| | | // new Plcsign().start(); |
| | | // |
| | | // new Plcstate().start(); |
| | | new PlcPositioning1().start(); |
| | | new PlcPositioning2().start(); |
| | | new PlcParameter2().start(); |
| | | new PlcParameter1().start(); |
| | | new PlcServoManualone().start(); |
| | | } |
| | | } |
| | |
| | | @RestController |
| | | @RequestMapping("/home") |
| | | public class HomeController { |
| | | @Autowired |
| | | HomeMapper homeMapper; |
| | | @Autowired |
| | | HomeMapper homeMapper; |
| | | |
| | | @Autowired |
| | | HomeService storageRackService; |
| | | @Autowired |
| | | HomeService storageRackService; |
| | | |
| | | @Autowired |
| | | SpianService spianService; |
| | | @Autowired |
| | | SpianService spianService; |
| | | |
| | | @Autowired |
| | | SpianMapper spianMapper; |
| | | |
| | | //查询理片笼使用情况 |
| | | @GetMapping("/load") |
| | | public Result selectAll() { |
| | | List<StorageCage> storageCagelist = homeMapper.selectAll(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", storageCagelist); |
| | | return Result.success(map); |
| | | } |
| | | //查询理片笼玻璃情况 |
| | | @GetMapping("/loads") |
| | | public Result selectRack() { |
| | | List<StorageCage> storageCagelist1 = homeMapper.selectRack1(); |
| | | List<StorageCage> storageCagelist2 = homeMapper.selectRack2(); |
| | | List<StorageCage> storageCagelist3 = homeMapper.selectRack3(); |
| | | List<StorageCage> storageCagelist4 = homeMapper.selectRack4(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list1", storageCagelist1); |
| | | map.put("list2", storageCagelist2); |
| | | map.put("list3", storageCagelist3); |
| | | map.put("list4", storageCagelist4); |
| | | return Result.success(map); |
| | | } |
| | | //查询进/出片任务 |
| | | @GetMapping("/loadinout") |
| | | public Result selectinout(Integer types) { |
| | | List<StorageCage> storageCageinout = homeMapper.selectinout(types); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", storageCageinout); |
| | | return Result.success(map); |
| | | } |
| | | //按订单出片 |
| | | @GetMapping("/InsertOrder") |
| | | public Result InsertOrder(String orderid) { |
| | | short result = homeMapper.SelectOrder(orderid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (result > 0) { |
| | | homeMapper.updateOrder(); |
| | | homeMapper.InsertOrder(orderid); |
| | | map.put("message", "200"); |
| | | } else { |
| | | map.put("message", "500"); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | //根据玻璃id手动上片 |
| | | @GetMapping("/Addglassid") |
| | | public Result Addglassid(String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short taskno = homeMapper.SelectInTask(); |
| | | if (taskno > 0) { |
| | | map.put("message2", "500"); |
| | | } else { |
| | | // 调用伍上片函数 |
| | | short results = spianService.selectAll(glassid); |
| | | if (results == 200) { |
| | | map.put("message2", "200"); |
| | | } else if (results == 300) { |
| | | map.put("message2", "300"); |
| | | } else if (results == 400) { |
| | | map.put("message2", "400"); |
| | | } |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | //手动完成进/出片任务 |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | homeMapper.UpdateTask(types); |
| | | StorageCage glass = homeMapper.SelectGlassInfo(glassid); |
| | | if (types == 0) { |
| | | // spianMapper.UpdataAddCage1(glass.getGlassWidth(),glass.getCage(),glass.getCell()); |
| | | homeMapper.UpdateCageTask1(glassid); |
| | | S7control.getinstance().WriteWord("DB105.14", (short) 0); |
| | | } else { |
| | | @Autowired |
| | | SpianMapper spianMapper; |
| | | |
| | | spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell()); |
| | | homeMapper.UpdateCageTask2(glassid); |
| | | S7control.getinstance().WriteWord("DB105.12", (short) 0); |
| | | } |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | | } |
| | | //查询报警信息 |
| | | @GetMapping("/SelectAlarmmgInfo") |
| | | public Result SelectAlarmmgInfo() { |
| | | List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("alarmmg", alarmmg); |
| | | return Result.success(map); |
| | | } |
| | | //查询理片笼详情 |
| | | @GetMapping("/SelectCageInfo") |
| | | public Result SelectCageInfo(short cage) { |
| | | List<StorageCage> cageinfo = homeMapper.SelectCageInfo(cage); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("cageinfo", cageinfo); |
| | | return Result.success(map); |
| | | } |
| | | //手动删除理片笼玻璃 |
| | | @GetMapping("/DeleteByGlassID") |
| | | public Result DeleteByGlassID(String glassid) { |
| | | StorageCage glassinfor = homeMapper.SelectGlassInfo(glassid); |
| | | spianMapper.UpdataOutCage1(glassinfor.getGlassWidth(), glassinfor.getCage(), glassinfor.getCell()); |
| | | homeMapper.DeleteByGlassID(glassid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | | } |
| | | //根据玻璃id手动出片 |
| | | @GetMapping("/OutByGlassID") |
| | | public Result OutByGlassID(String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用伍上片函数 |
| | | short result = homeMapper.SelectStorageByGlassId(glassid); |
| | | if (result > 0) { |
| | | Short results = spianService.selectout2(glassid); |
| | | if (results == 200) { |
| | | map.put("message2", "200"); |
| | | } else if (results == 300) { |
| | | map.put("message2", "300"); |
| | | } |
| | | }else{ |
| | | map.put("message2", "500"); |
| | | } |
| | | // 查询理片笼使用情况 |
| | | @GetMapping("/load") |
| | | public Result selectAll() { |
| | | List<StorageCage> storageCagelist = homeMapper.selectAll(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", storageCagelist); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | return Result.success(map); |
| | | // 查询理片笼玻璃情况 |
| | | @GetMapping("/loads") |
| | | public Result selectRack() { |
| | | List<StorageCage> storageCagelist1 = homeMapper.selectRack1(); |
| | | List<StorageCage> storageCagelist2 = homeMapper.selectRack2(); |
| | | List<StorageCage> storageCagelist3 = homeMapper.selectRack3(); |
| | | List<StorageCage> storageCagelist4 = homeMapper.selectRack4(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list1", storageCagelist1); |
| | | map.put("list2", storageCagelist2); |
| | | map.put("list3", storageCagelist3); |
| | | map.put("list4", storageCagelist4); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询进/出片任务 |
| | | @GetMapping("/loadinout") |
| | | public Result selectinout(Integer types) { |
| | | List<StorageCage> storageCageinout = homeMapper.selectinout(types); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", storageCageinout); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 按订单出片 |
| | | @GetMapping("/InsertOrder") |
| | | public Result InsertOrder(String orderid) { |
| | | short result = homeMapper.SelectOrder(orderid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (result > 0) { |
| | | homeMapper.updateOrder(); |
| | | homeMapper.InsertOrder(orderid); |
| | | map.put("message", "200"); |
| | | } else { |
| | | map.put("message", "500"); |
| | | } |
| | | //加载小车位置 |
| | | @GetMapping("/Loadcarlist") |
| | | public Result Loadcarlist() { |
| | | List<CarPosition> carlist = homeMapper.Loadcarlist(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("carlist", carlist); |
| | | return Result.success(map); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 根据玻璃id手动上片 |
| | | @GetMapping("/Addglassid") |
| | | public Result Addglassid(String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short taskno = homeMapper.SelectInTask(); |
| | | if (taskno > 0) { |
| | | map.put("message2", "500"); |
| | | } else { |
| | | // 调用伍上片函数 |
| | | short results = spianService.selectAll(glassid); |
| | | if (results == 200) { |
| | | map.put("message2", "200"); |
| | | } else if (results == 300) { |
| | | map.put("message2", "300"); |
| | | } else if (results == 400) { |
| | | map.put("message2", "400"); |
| | | } |
| | | } |
| | | //查询确认密码 |
| | | @GetMapping("/SelectPassword") |
| | | public Result SelectPassword() { |
| | | String pwdct = homeMapper.SelectPassword(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("password", pwdct); |
| | | return Result.success(map); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 手动完成进/出片任务 |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | homeMapper.UpdateTask(types); |
| | | StorageCage glass = homeMapper.SelectGlassInfo(glassid); |
| | | if (types == 0) { |
| | | // spianMapper.UpdataAddCage1(glass.getGlassWidth(),glass.getCage(),glass.getCell()); |
| | | homeMapper.UpdateCageTask1(glassid); |
| | | S7control.getinstance().WriteWord("DB105.14", (short) 0); |
| | | } else { |
| | | |
| | | spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell()); |
| | | homeMapper.UpdateCageTask2(glassid); |
| | | S7control.getinstance().WriteWord("DB105.12", (short) 0); |
| | | } |
| | | //根据玻璃id查询玻璃信息 |
| | | @GetMapping("/SelectGlassByGlassID") |
| | | public Result SelectGlassByGlassID(String glassid) { |
| | | Glass Glass = homeMapper.SelectGlassByGlassID(glassid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("form", Glass); |
| | | return Result.success(map); |
| | | } |
| | | //启用/禁用理片笼格子 |
| | | @GetMapping("/Disabled") |
| | | public Result Disabled(short cage, short cell, short disabled) { |
| | | homeMapper.Disabled(cage, cell, disabled); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | //手动往理片笼添加玻璃 |
| | | @PostMapping("/Inglassid") |
| | | public Result Inglassid(short cage, short cell, short tier, @RequestBody Glass glass) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short result = homeMapper.SelectStorageByGlassId(glass.getGlassId()); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | homeMapper.Inglassid(glass, cage, cell, tier); |
| | | spianMapper.UpdataAddCage1(glass.getGlassWidth(), cage, cell); |
| | | } |
| | | return Result.success(map); |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询报警信息 |
| | | @GetMapping("/SelectAlarmmgInfo") |
| | | public Result SelectAlarmmgInfo() { |
| | | List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("alarmmg", alarmmg); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询理片笼详情 |
| | | @GetMapping("/SelectCageInfo") |
| | | public Result SelectCageInfo(short cage) { |
| | | List<StorageCage> cageinfo = homeMapper.SelectCageInfo(cage); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("cageinfo", cageinfo); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 手动删除理片笼玻璃 |
| | | @GetMapping("/DeleteByGlassID") |
| | | public Result DeleteByGlassID(String glassid) { |
| | | StorageCage glassinfor = homeMapper.SelectGlassInfo(glassid); |
| | | spianMapper.UpdataOutCage1(glassinfor.getGlassWidth(), glassinfor.getCage(), glassinfor.getCell()); |
| | | homeMapper.DeleteByGlassID(glassid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 根据玻璃id手动出片 |
| | | @GetMapping("/OutByGlassID") |
| | | public Result OutByGlassID(String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用伍上片函数 |
| | | short result = homeMapper.SelectStorageByGlassId(glassid); |
| | | if (result > 0) { |
| | | Short results = spianService.selectout2(glassid); |
| | | if (results == 200) { |
| | | map.put("message2", "200"); |
| | | } else if (results == 300) { |
| | | map.put("message2", "300"); |
| | | } |
| | | } else { |
| | | map.put("message2", "500"); |
| | | } |
| | | |
| | | //查询玻璃信息 |
| | | @PostMapping("/SelectGlass") |
| | | public Result SelectGlass(String orderid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Glass> glass=homeMapper.SelectGlass(orderid); |
| | | map.put("glass", glass); |
| | | return Result.success(map); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //手动添加扫码位玻璃 |
| | | @PostMapping("/InsertQueueGlassId") |
| | | public Result InsertQueueGlassId(String glassid,Short id) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short result = homeMapper.SelectStorageByGlassId(glassid); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | }else{ |
| | | homeMapper.InsertQueueGlassId(glassid,id); |
| | | map.put("message", "200"); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //确认扫码位玻璃信息 |
| | | @PostMapping("/UpdateQueueState") |
| | | public Result UpdateQueueState() { |
| | | homeMapper.UpdateQueueState(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | // 加载小车位置 |
| | | @GetMapping("/Loadcarlist") |
| | | public Result Loadcarlist() { |
| | | List<CarPosition> carlist = homeMapper.Loadcarlist(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("carlist", carlist); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //清除上片队列玻璃 |
| | | @PostMapping("/DeleteQueueGlass") |
| | | public Result DeleteQueueGlass(String id) { |
| | | homeMapper.DeleteQueueGlass(id); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | // 查询确认密码 |
| | | @GetMapping("/SelectPassword") |
| | | public Result SelectPassword() { |
| | | String pwdct = homeMapper.SelectPassword(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("password", pwdct); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 根据玻璃id查询玻璃信息 |
| | | @GetMapping("/SelectGlassByGlassID") |
| | | public Result SelectGlassByGlassID(String glassid) { |
| | | Glass Glass = homeMapper.SelectGlassByGlassID(glassid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("form", Glass); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 启用/禁用理片笼格子 |
| | | @GetMapping("/Disabled") |
| | | public Result Disabled(short cage, short cell, short disabled) { |
| | | homeMapper.Disabled(cage, cell, disabled); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 手动往理片笼添加玻璃 |
| | | @PostMapping("/Inglassid") |
| | | public Result Inglassid(short cage, short cell, short tier, @RequestBody Glass glass) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short result = homeMapper.SelectStorageByGlassId(glass.getGlassId()); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | homeMapper.Inglassid(glass, cage, cell, tier); |
| | | spianMapper.UpdataAddCage1(glass.getwidth(), cage, cell); |
| | | } |
| | | |
| | | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询玻璃信息 |
| | | @PostMapping("/SelectGlass") |
| | | public Result SelectGlass(String orderid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Glass> glass = homeMapper.SelectGlass(orderid); |
| | | map.put("glass", glass); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 手动添加扫码位玻璃 |
| | | @PostMapping("/InsertQueueGlassId") |
| | | public Result InsertQueueGlassId(String glassid, Short id) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short result = homeMapper.SelectStorageByGlassId(glassid); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | homeMapper.InsertQueueGlassId(glassid, id); |
| | | map.put("message", "200"); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 确认扫码位玻璃信息 |
| | | @PostMapping("/UpdateQueueState") |
| | | public Result UpdateQueueState() { |
| | | homeMapper.UpdateQueueState(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 清除上片队列玻璃 |
| | | @PostMapping("/DeleteQueueGlass") |
| | | public Result DeleteQueueGlass(String id) { |
| | | homeMapper.DeleteQueueGlass(id); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | public class Glass{ |
| | | private Integer id; |
| | | private String orderId; |
| | | private double width; |
| | | private double height; |
| | | private String glassId; |
| | | |
| | | |
| | | public class Glass { |
| | | private Integer id; |
| | | private String orderId; |
| | | private double width; |
| | | private double height; |
| | | private String glassId; |
| | | |
| | | public Integer id() { |
| | | return id; |
| | | } |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | public Integer id() { |
| | | return id; |
| | | } |
| | | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public double getwidth() { |
| | | return width; |
| | | } |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setHeight(double height) { |
| | | this.height = height; |
| | | } |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public double getHeight() { |
| | | return height; |
| | | } |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public void setWidth(double width) { |
| | | this.width = width; |
| | | } |
| | | public double getwidth() { |
| | | return width; |
| | | } |
| | | |
| | | public String getGlassId() { |
| | | return glassId; |
| | | } |
| | | public void setHeight(double height) { |
| | | this.height = height; |
| | | } |
| | | |
| | | public void setGlassId(String glassId) { |
| | | this.glassId = glassId; |
| | | } |
| | | public double getHeight() { |
| | | return height; |
| | | } |
| | | |
| | | |
| | | |
| | | public void setWidth(double width) { |
| | | this.width = width; |
| | | } |
| | | |
| | | public void getWidth(double width) { |
| | | this.width = width; |
| | | } |
| | | |
| | | public String getGlassId() { |
| | | return glassId; |
| | | } |
| | | |
| | | public void setGlassId(String glassId) { |
| | | this.glassId = glassId; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | |
| | | public class alarmmg { |
| | | private Integer id; |
| | | private String content; |
| | |
| | | |
| | | private String timeons; |
| | | |
| | | // 自增id |
| | | public void setid(Integer id) { |
| | | this.id = id; |
| | | } |
| | |
| | | return id; |
| | | } |
| | | |
| | | // 报警内容 |
| | | public void setontent(String content) { |
| | | this.content = content; |
| | | } |
| | |
| | | return content; |
| | | } |
| | | |
| | | // 报警开始时间 |
| | | public void settimeon(Date timeon) { |
| | | this.timeon = timeon; |
| | | } |
| | |
| | | return timeon; |
| | | } |
| | | |
| | | // 报警结束时间 |
| | | public void setendTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| New file |
| | |
| | | package com.example.springboot.entity; |
| | | |
| | | public class out_slice { |
| | | private int id; |
| | | private String glassId; |
| | | private String barcode; |
| | | private double glasswidth; |
| | | private double glassheight; |
| | | private int state; |
| | | private String time; |
| | | |
| | | private north_glass_buffer1 north_glass_buffer1s; |
| | | |
| | | public void setnorth_glass_buffer1s(north_glass_buffer1 north_glass_buffer1s) { |
| | | this.north_glass_buffer1s = north_glass_buffer1s; |
| | | } |
| | | |
| | | public north_glass_buffer1 getnorth_glass_buffer1s() { |
| | | return north_glass_buffer1s; |
| | | } |
| | | |
| | | public out_slice() { |
| | | } |
| | | |
| | | public out_slice(int ID, String glassId, String barCode, double glasswidth, double glassheight, int state, String time) { |
| | | this.id = ID; |
| | | this.glassId = glassId; |
| | | this.barcode = barCode; |
| | | this.glasswidth = glasswidth; |
| | | this.glassheight = glassheight; |
| | | this.state = state; |
| | | this.time = time; |
| | | } |
| | | |
| | | public int getID() { |
| | | return id; |
| | | } |
| | | |
| | | public String getGlassId() { |
| | | return glassId; |
| | | } |
| | | |
| | | public String getBarCode() { |
| | | return barcode; |
| | | } |
| | | |
| | | public double getGlasswidth() { |
| | | return glasswidth; |
| | | } |
| | | |
| | | public double getGlassheight() { |
| | | return glassheight; |
| | | } |
| | | |
| | | public int getState() { |
| | | return state; |
| | | } |
| | | |
| | | public String getTime() { |
| | | return time; |
| | | } |
| | | |
| | | public void setID(int ID) { |
| | | this.id = ID; |
| | | } |
| | | |
| | | public void setGlassId(String glassId) { |
| | | this.glassId = glassId; |
| | | } |
| | | |
| | | public void setBarCode(String barCode) { |
| | | barcode = barCode; |
| | | } |
| | | |
| | | public void setGlasswidth(double glasswidth) { |
| | | this.glasswidth = glasswidth; |
| | | } |
| | | |
| | | public void setGlassheight(double glassheight) { |
| | | this.glassheight = glassheight; |
| | | } |
| | | |
| | | public void setState(int state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public void setTime(String time) { |
| | | this.time = time; |
| | | } |
| | | } |
| | |
| | | List<StorageCage> selectRack4(); |
| | | |
| | | // 根据任务类型查询当前正在出片,进片的玻璃信息 |
| | | @Select("select *,concat(glasswidth,' x ',glassheight) as lengthwidth from storage_cage where state=#{task_type} limit 1") |
| | | @Select("select a.*,concat(round(a.glasswidth*b.conversionrate,2),' x ',round(a.glassheight*b.conversionrate,2)) as lengthwidth from storage_cage as a,conver as b where a.state=#{task_type} limit 1") |
| | | List<StorageCage> selectinout(@Param("task_type") Integer task_type); |
| | | |
| | | // 查询是否存在此订单 |
| | |
| | | List<alarmmg> SelectAlarmmgInfo(); |
| | | |
| | | //获取理片笼内玻璃信息 |
| | | @Select("select *,concat(round(a.glasswidth*b.Conversionrate,2),' x ',round(a.glassheight*b.Conversionrate,2)) as lengthwidth from storage_cage as a,glass as b ") |
| | | @Select("select *,concat(round(a.glasswidth*b.conversionrate,2),' x ',round(a.glassheight*b.conversionrate,2)) as lengthwidth from storage_cage as a,conver as b ") |
| | | List<StorageCage> SelectCageInfo(short cage); |
| | | |
| | | @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null where glass_id=#{glassid}") |
| | |
| | | StorageCage SelectGlassInfo(String glassid); |
| | | |
| | | //查询玻璃信息 |
| | | // @Select("select * from glass where glassid=#{glassid}") |
| | | @Select("SELECT id,glassid,orderid,\n" + |
| | | " ROUND(width * Conversionrate, 2) AS width,\n" + |
| | | " ROUND(height * Conversionrate, 2) AS height\n" + |
| | | "FROM glass\n" + |
| | | "where glassid=#{glassid};") |
| | | @Select("select * from glass where glassid=#{glassid}") |
| | | Glass SelectGlassByGlassID(String glassid); |
| | | |
| | | //启用/禁用理片笼格子 |