Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
| | |
| | | { |
| | | "action": [ |
| | | { |
| | | "name": "D01 VFD conveyor" |
| | | "name": "D01 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02 VFD conveyor" |
| | | "name": "D02 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03 VFD conveyor" |
| | | "name": "D03 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04 VFD conveyor" |
| | | "name": "D04 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05 VFD conveyor" |
| | | "name": "D05 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06 VFD conveyor" |
| | | "name": "D06 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 VFD conveyor" |
| | | "name": "A01 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 VFD conveyor" |
| | | "name": "A02 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 VFD conveyor" |
| | | "name": "B01 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 VFD conveyor" |
| | | "name": "B02 VFD conveyor", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN JOG+" |
| | | "name": "A01 SERVE TURN JOG+", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN JOG-" |
| | | "name": "A02 SERVE TURN JOG-", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TRAVEL JOG+" |
| | | "name": "A01 SERVE TRAVEL JOG+", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TRAVEL JOG-" |
| | | "name": "A02 SERVE TRAVEL JOG-", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL JOG+" |
| | | "name": "B01 SERVE TRAVEL JOG+", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL JOG-" |
| | | "name": "B02 SERVE TRAVEL JOG-", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN POS" |
| | | "name": "A01 SERVE TURN POS", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN POS" |
| | | "name": "A02 SERVE TURN POS", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TRAVEL POS" |
| | | "name": "A01 SERVE TRAVEL POS", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TRAVEL POS" |
| | | "name": "A02 SERVE TRAVEL POS", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL POS" |
| | | "name": "B01 SERVE TRAVEL POS", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL POS" |
| | | "name": "B02 SERVE TRAVEL POS", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 YV TURN" |
| | | "name": "B01 YV TURN", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 YV UP DOWN" |
| | | "name": "B01 YV UP DOWN", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 YV TURN" |
| | | "name": "B02 YV TURN", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 YV UP DOWN" |
| | | "name": "B02 YV UP DOWN", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 YV Gassing", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 YV Gassing", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 VFD conveyor reverse", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 VFD conveyor reverse", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN reset", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TURN home", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 SERVE TRAVEL reset", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN reset", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TURN home", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 SERVE TRAVEL reset", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL reset", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 SERVE TRAVEL home", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL reset", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 SERVE TRAVEL home", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Manual storage startup", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Manual output startup", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 oil pump", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 oil pump", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 1# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 22# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 43# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 64# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 85# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 106# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 127# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 148# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 get 169# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 190# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 1# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 22# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 43# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 64# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 85# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 106# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 127# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 148# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 169# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 get 190# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 get 1# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 get 22# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 get 43# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 get 64# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 get 85# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 get 106# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 get 127# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 get 148# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 get 169# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 get 190# grid address", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 ID Clean", |
| | | "value": 1, |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB2.0.0", |
| | | "count": 26 |
| | | "count": 84 |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | { |
| | | "content": [ |
| | | { |
| | | "name": "D01 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 VFD error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 servo turn error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 servo turn error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 servo travel error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 servo travel error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 servo travel error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 servo travel error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 IN DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 IN pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 OUT DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 OUT pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 IN DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 IN pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 OUT DEC error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 OUT pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01 Scan glass exceeding limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "emergency stop alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "More glass than known", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "less glass than known", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 conveyor timeout alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 conveyor Left safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 conveyor right safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 conveyor Left safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 conveyor right safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "1# buffer safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "2# buffer safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "3# buffer safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "4# buffer safety alarm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR right in pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02.SR left in pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR left in pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR left dec error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR right dec error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR right in pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR left in pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR left dec error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR right dec error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR right in pos error", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB104.DBx0.0", |
| | | "count": 72 |
| | | } |
| | | ] |
| | | } |
New file |
| | |
| | | [ |
| | | [ |
| | | { |
| | | "name": "A01行走高速角度", |
| | | "read": 33, |
| | | "sending": "", |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "value": "" |
| | | }, |
| | | { |
| | | "name": "A01行走低速角度", |
| | | "read": 11, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | }, |
| | | { |
| | | "name": "A01输送接片角度", |
| | | "read": 22, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | }, |
| | | { |
| | | "name": "A01笼子角度", |
| | | "read": 22, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "A02行走高速角度", |
| | | "read": 33, |
| | | "sending": "", |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "value": "" |
| | | }, |
| | | { |
| | | "name": "A02行走低速角度", |
| | | "read": 11, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | }, |
| | | { |
| | | "name": "A02输送接片角度", |
| | | "read": 22, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | }, |
| | | { |
| | | "name": "A02笼子角度", |
| | | "read": 22, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "大车自动速度", |
| | | "read": 100, |
| | | "sending": "", |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "value": "" |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "小车自动速度", |
| | | "read": 11, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "自动翻转速度", |
| | | "read": 33, |
| | | "sending": "", |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "value": "" |
| | | } |
| | | ] |
| | | ] |
New file |
| | |
| | | [ |
| | | [ |
| | | { |
| | | "button": { |
| | | "name": "D01输送", |
| | | "value": 1, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "D02输送", |
| | | "value": 1, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "D03输送", |
| | | "value": 1, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "D04输送", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "D05输送", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "D06输送", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "button": { |
| | | "name": "A01注油泵", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A01翻转", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A01行走点动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A01输送正向", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A01输送反向", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "button": { |
| | | "name": "A02注油泵", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A02翻转", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A02行走点动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A02输送正向", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A02输送反向", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "button": { |
| | | "name": "B01输送", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B01行走点动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B02输送", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B02行走点动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "button": { |
| | | "name": "B01翻转气缸", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B01升降气缸", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B01电磁阀", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B02翻转气缸", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B02升降气缸", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B02电磁阀", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ] |
| | | ] |
New file |
| | |
| | | [ |
| | | [ |
| | | { |
| | | "name": "A01手动格子", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "A01定位速度", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "A01当前格子", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A01启动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "故障", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "复位", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "未回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "A02手动格子", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "A02定位速度", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "A02当前格子", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A02启动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "故障", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "复位", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "未回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "B01手动格子", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "B01定位速度", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "B01当前格子", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B01启动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "故障", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "复位", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "未回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "B02手动格子", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "B02定位速度", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "name": "B02当前格子", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0", |
| | | "state": 1 |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "B02启动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "故障", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "复位", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "未回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "A01实时位置", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "A02实时位置", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "B01实时位置", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "B02实时位置", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3, |
| | | "state": 1 |
| | | } |
| | | ] |
| | | ] |
New file |
| | |
| | | [ |
| | | [ |
| | | { |
| | | "name": "手动位置", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3 |
| | | }, |
| | | { |
| | | "name": "定位速度", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0" |
| | | }, |
| | | { |
| | | "name": "A01翻转实时位置", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0" |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A01翻转启动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "故障", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "复位", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "未回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | "name": "手动位置", |
| | | "read": 33, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "address": "DB100.0", |
| | | "count": 3 |
| | | }, |
| | | { |
| | | "name": "定位速度", |
| | | "read": 11, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0" |
| | | }, |
| | | { |
| | | "name": "A02翻转实时位置", |
| | | "read": 22, |
| | | "sending": 0, |
| | | "address": "DB100.0", |
| | | "type": "0" |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "A02翻转启动", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "故障", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "复位", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 0 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "未回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | }, |
| | | { |
| | | "button": { |
| | | "name": "回零", |
| | | "value": 0, |
| | | "address": "DB10.0", |
| | | "state": 1 |
| | | } |
| | | } |
| | | ] |
| | | ] |
| | |
| | | { |
| | | "para": [ |
| | | { |
| | | "name": "conveyor Velocity(Auto FAST)", |
| | | "read": 33, |
| | | "name": "D01-D06 conveyor Velocity(Auto FAST)", |
| | | "value": 123, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "value":0, |
| | | "value2":0 |
| | | |
| | | |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "conveyor Velocity(Auto SLOW)", |
| | | "read": 11, |
| | | "name": "D01-D06 conveyor Velocity(Auto SLOW)", |
| | | "value": 11, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "value":0, |
| | | "value2":0 |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "conveyor Velocity(Manual)", |
| | | "read": 22, |
| | | "name": "D01-D06 conveyor Velocity(Manual)", |
| | | "value": 22, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "value":0, |
| | | "value2":0 |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN JOG Velocity", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL JOG Velocity", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL JOG Velocity", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN POS Velocity AUTO", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TURN POS Velocity manual", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL POS Velocity AUTO", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 TRAVEL POS Velocity manual", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL POS Velocity AUTO", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 TRAVEL POS Velocity manual", |
| | | "read": 0, |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm/S" |
| | | "unit": "mm/S", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01-D06 conveyor Velocity(Max)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 conveyor Velocity(Max)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 conveyor Velocity(Auto FAST)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 A02 conveyor Velocity(Auto SLOW)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 conveyor Velocity(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 conveyor Velocity(Max)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 conveyor Velocity(Auto FAST)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 conveyor Velocity(Auto SLOW)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 B02 conveyor Velocity(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "m/min", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "grid spacing", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 Splice address setting", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 Splice address setting", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 1# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 22# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 43# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 64# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 85# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 106# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 127# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 148# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 169# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 190# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 1# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 22# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 43# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 64# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 85# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 106# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 127# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 148# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 169# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 190# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 1# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 22# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 43# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 64# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 85# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 106# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 127# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 148# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 169# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 190# grid address", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "mm", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 Target grid(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 Target grid(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 Target grid(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 Target grid(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 turn Target Angle(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 turn Target Angle(Manual)", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 turn Angle1", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 turn Angle2", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 turn Angle3", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 turn Angle4", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 turn Angle1", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 turn Angle2", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 turn Angle3", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 turn Angle4", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "°", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Minimum glass length", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Minimum glass height", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Maximum glass length", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Maximum glass height", |
| | | "value": 0, |
| | | "sending": 0, |
| | | "unit": "", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB100.0", |
| | | "count": 12 |
| | | "count": 72 |
| | | }, |
| | | { |
| | | "name": "DB100.0", |
| | | "count": 12 |
| | | "name": "DB101.0", |
| | | "count": 22 |
| | | }, |
| | | { |
| | | "name": "DB102.0", |
| | | "count": 33 |
| | | } |
| | | ] |
| | | } |
| | |
| | | [
|
| | | [{
|
| | | "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"
|
| | | }
|
| | | |
| | | |
| | | |
| | | ]
|
| | |
|
| | | |
| | | |
| | | ]
|
| | |
|
| | | [ |
| | | [{ |
| | | "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" |
| | | } |
| | | |
| | | |
| | | |
| | | ] |
| | | |
| | | |
| | | |
| | | ] |
| | | |
| | | |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "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"
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | [ |
| | | |
| | | [ |
| | | { |
| | | "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" |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ] |
| | | |
| | | |
| | | ] |
| | | |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "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"
|
| | | }
|
| | | }
|
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | [ |
| | | |
| | | [ |
| | | { |
| | | "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" |
| | | } |
| | | } |
| | | |
| | | ] |
| | | |
| | | |
| | | ] |
| | | |
| | |
| | | { |
| | | "name": "D01.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01.SR in pos", |
| | | "value": "0", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02.SR dec", |
| | | "value": "0", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR into", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SR dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SR in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR turn on", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR turn off", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR up", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR down", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in dec", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in in pos", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR turn on", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR turn off", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR up", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR down", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SB.start(+)", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SB.stop(1)", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SB.reset", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SB.auto/manul", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SB.pause", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SB.emg", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01.SB.start", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06.SB.start", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in safety", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.requset", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.confirm", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.reset", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "LED.red", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "LED.yellow", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01.LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06.LED.green", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.turn", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.up down", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.YV.gassing", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.turn", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.up down", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.YV.gassing", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.led", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.open", |
| | | "value": "1", |
| | | "state": "1" |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR origin", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR left limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR right limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR origin", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR left limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR right limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | ], |
| | | "address": [ |
| | |
| | | { |
| | | "state": [ |
| | | { |
| | | "name": "D01.State" |
| | | "name": "D01.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02.State" |
| | | "name": "D02.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.State" |
| | | "name": "B01.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.State" |
| | | "name": "B02.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.State" |
| | | "name": "A01.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02.State" |
| | | "name": "A02.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "3", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03.State" |
| | | "name": "D03.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04.State" |
| | | "name": "D04.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05.State" |
| | | "name": "D05.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06.State" |
| | | "name": "D06.State", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 tavel Actual Position", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 turn Actual angle", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 tavel Actual Position", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 turn Actual angle", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 tavel Actual Position", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 tavel Actual Position", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 Current Grid", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 Current Grid", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 Current Grid", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 Target Grid", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "2", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 Current Grid", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 Target Grid", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D01 ID", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D02 ID", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D03 ID", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D04 ID", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D05 ID", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "D06 ID", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 ID1", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 ID2", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 ID1", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 ID2", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 ID1", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 ID2", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 ID1", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 ID2", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 conveyor Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 turn servo Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01 travel servo Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 conveyor Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 turn servo Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A02 travel servo Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01 travel servo Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02 travel servo Fault codes", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | ], |
| | | "address": [ |
| | | { |
| | | "name": "DB103.0", |
| | | "count": 10 |
| | | "count": 44 |
| | | } |
| | | ] |
| | | } |
| | |
| | | {
|
| | | |
| | | "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
|
| | | }
|
| | | ]
|
| | | } |
| | | { |
| | | |
| | | "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 |
| | | } |
| | | ] |
| | | } |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "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
|
| | | }
|
| | | |
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | [ |
| | | |
| | | [ |
| | | { |
| | | "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 |
| | | } |
| | | |
| | | |
| | | ] |
| | | |
| | | |
| | | ] |
| | | |
| | |
| | | [
|
| | | |
| | | [
|
| | | {
|
| | | "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
|
| | | |
| | | }
|
| | | |
| | | |
| | | ]
|
| | | |
| | | |
| | | ]
|
| | | [ |
| | | |
| | | [ |
| | | { |
| | | "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": "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": "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 |
| | | |
| | | } |
| | | |
| | | |
| | | ] |
| | | |
| | | ,[ |
| | | { |
| | | "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 |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | ] |
| | | |
| | | ,[ |
| | | { |
| | | "name": "扫描枪扫码的ID", |
| | | "read": 66, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | |
| | | } |
| | | |
| | | |
| | | ] |
| | | ,[ |
| | | { |
| | | "name": "A01当前格子", |
| | | "read": 333, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | |
| | | }, |
| | | { |
| | | "name": "A02所在格子", |
| | | "read": 333, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | |
| | | }, |
| | | { |
| | | "name": "B01所在格子", |
| | | "read": 333, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | |
| | | }, |
| | | { |
| | | "name": "B02所在格子", |
| | | "read": 333, |
| | | "sending": 0, |
| | | "type": "0", |
| | | "value":0 |
| | | |
| | | } |
| | | |
| | | |
| | | ] |
| | | |
| | | |
| | | ] |
| | | |
| | |
| | | "Enter the Frame No":"请输入铝框id",
|
| | | "Manually Infeed Glass":"手动进片",
|
| | | "langparameter": {
|
| | | "conveyor Velocity(Auto FAST)": "皮带输送自动快速",
|
| | | "conveyor Velocity(Auto SLOW)": "皮带输送自动慢速",
|
| | | "conveyor Velocity(Manual)": "皮带输送手动速度",
|
| | | "conveyor Velocity(Auto FAST)": "D01-D06 皮带输送自动快速",
|
| | | "conveyor Velocity(Auto SLOW)": "D01-D06 皮带输送自动慢速",
|
| | | "conveyor Velocity(Manual)": "D01-D06 皮带输送手动速度",
|
| | | "A01 A02 TURN JOG Velocity": "A01 A02 翻转点动速度",
|
| | | "A01 A02 TRAVEL JOG Velocity": "A01 A02 行走点动速度",
|
| | | "B01 B02 TRAVEL JOG Velocity": "B01 B02 行走点动速度",
|
| | |
| | | path: '/home', |
| | | component: () => import('../views/home') |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | |
| | | component: () => import('../views/device/parameter'), |
| | | |
| | | }, |
| | | |
| | | |
| | | { |
| | | path: '/device/alarm', |
| | | component: () => import('../views/device/alarm') |
| | |
| | | path: '/device/iostate', |
| | | component: () => import('../views/device/iostate') |
| | | }, |
| | | |
| | | |
| | | { |
| | | path: '/device/control', |
| | | component: () => import('../views/device/control') |
| | |
| | | path: '/Electrical/Positioning2', |
| | | component: () => import('../views/Electrical/Positioning2') |
| | | }, |
| | | { |
| | | path: '/Electrical/ManualonePosition', |
| | | component: () => import('../views/Electrical/ManualonePosition') |
| | | }, |
| | | { |
| | | path: '/Electrical/ManualonePosition2', |
| | | component: () => import('../views/Electrical/ManualonePosition2') |
| | | }, |
| | | { |
| | | path: '/Electrical/AutomaticParameterSetting', |
| | | component: () => import('../views/Electrical/AutomaticParameterSetting') |
| | | }, |
| | | { |
| | | path: '/Electrical/ManualJog', |
| | | component: () => import('../views/Electrical/ManualJog') |
| | | } |
| | | |
| | | |
| | | |
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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex"> |
| | | <el-card class="json-block" style="width:485px;"> |
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container"> |
| | | <div class="item-row" v-if="item.type === '0'"> |
| | | <span class="name" v-if="item.type === '0'" style="width:150px;">{{ item.name }}</span> |
| | | <el-input style="width:250px;" 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/AutomaticParameterSetting' |
| | | import { throttle } from 'lodash'; |
| | | let socket; |
| | | |
| | | export default { |
| | | name: "AutomaticParameterSetting", |
| | | 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 { name: item.name, value: item.value, address: item.address }; |
| | | } else if (item.button) { |
| | | return { name: item.button.name, value: item.button.value, address: item.button.address }; |
| | | } |
| | | 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 = "AutomaticParameterSetting"; |
| | | |
| | | 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; |
| | | const dache = obj.dache1; |
| | | |
| | | // console.log('parms:', parms); |
| | | // console.log('fanzhuan:', fanzhuan); |
| | | // console.log('xiaoche:', xiaoche); |
| | | // console.log('dache:', dache); |
| | | |
| | | let index = 0; |
| | | for (let i = 0; i < jsonData2.length - 1; i++) { |
| | | let arr = jsonData2[i]; |
| | | |
| | | for (let j = 0; j < arr.length; j++) { |
| | | let obj = arr[j]; |
| | | if (obj.type === '0' && Object.prototype.hasOwnProperty.call(obj, 'value')) { |
| | | if (Array.isArray(parms) && Array.isArray(parms[0]) && parms[0][index] !== undefined) { |
| | | obj.value = parms[0][index]; |
| | | index++; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (Array.isArray(fanzhuan) && Array.isArray(fanzhuan[0]) && fanzhuan[0][0] !== undefined) { |
| | | jsonData2[4][0]['value'] = fanzhuan[0][0]; |
| | | } |
| | | if (Array.isArray(xiaoche) && Array.isArray(xiaoche[0]) && xiaoche[0][0] !== undefined) { |
| | | jsonData2[3][0]['value'] = xiaoche[0][0]; |
| | | } |
| | | if (Array.isArray(dache) && Array.isArray(dache[0]) && dache[0][0] !== undefined) { |
| | | jsonData2[2][0]['value'] = dache[0][0]; |
| | | } |
| | | } |
| | | }, 50); |
| | | |
| | | document.addEventListener('mouseover', handleMouseMove); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 关闭事件 |
| | | socket.onclose = function () { |
| | | console.log("websocket已关闭"); |
| | | }; |
| | | |
| | | // 发生错误事件 |
| | | socket.onerror = function () { |
| | | console.log("websocket发生了错误"); |
| | | }; |
| | | |
| | | |
| | | } |
| | | |
| | | }, |
| | | replaceChineseWithEnglish () { |
| | | const translation = this.$t('AutomaticParameterSetting'); |
| | | 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: 2px; |
| | | /* 调整每个项目之间的间距 */ |
| | | } |
| | | |
| | | .action-button { |
| | | margin-right: 10px; |
| | | 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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="18" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex"> |
| | | <el-card class="json-block" style="width:100%;"> |
| | | |
| | | <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" :class="getStatusClass(item.button.value)" |
| | | class="action-button" @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend();">{{ |
| | | 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/ManualJog' |
| | | |
| | | export default { |
| | | name: "ManualJog", |
| | | mixins: [LanguageMixin], |
| | | data () { |
| | | return { |
| | | jsonData: data // 加载整个data.json文件作为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 { name: item.name, value: item.value, address: item.address }; |
| | | } else if (item.button) { |
| | | return { name: item.button.name, value: item.button.value, address: item.button.address }; |
| | | } |
| | | return null; |
| | | }); |
| | | }); |
| | | |
| | | // 模拟提交数据到后端的操作,实际情况下需要根据你的后端API进行修改 |
| | | console.log('提交以下数据到后端:', inputData); |
| | | |
| | | }, |
| | | //根据读取PLC的值,根据名称改变颜色1打开,0关闭 |
| | | getStatusClass (zhuangtai) { |
| | | |
| | | if (zhuangtai === 1) { |
| | | return "op"; |
| | | } |
| | | else { |
| | | return "dow"; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </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; |
| | | } |
| | | |
| | | .op { |
| | | background-color: #66b1ff; |
| | | } |
| | | |
| | | .dow { |
| | | background-color: #A0A0A0; |
| | | } |
| | | </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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | |
| | | <el-row :gutter="10"> |
| | | <el-col :span="12" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex"> |
| | | <el-card class="json-block" style="width:485px;"> |
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container"> |
| | | <div class="item-row"> |
| | | <span class="name" style="width:100px;">{{ item.name }}</span> |
| | | <el-input style="width:250px;" v-if="item.state != 0 && item.type === '0'" v-model="item.value" |
| | | class="input-box"></el-input> |
| | | </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 && item.button.state != 0" :name="item.button.name" class="action-button" |
| | | @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend();">{{ 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/Manualoneposition' |
| | | export default { |
| | | name: "ManualonePosition", |
| | | mixins: [LanguageMixin], |
| | | data () { |
| | | return { |
| | | jsonData: data, // 加载整个data.json文件作为jsonData |
| | | RenderingCollections: [] |
| | | } |
| | | }, |
| | | 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 { name: item.name, value: item.value, address: item.address }; |
| | | } else if (item.button) { |
| | | return { name: item.button.name, value: item.button.value, address: item.button.address }; |
| | | } |
| | | return null; |
| | | }); |
| | | }); |
| | | |
| | | // 模拟提交数据到后端的操作,实际情况下需要根据你的后端API进行修改 |
| | | console.log('提交以下数据到后端:', inputData); |
| | | |
| | | } |
| | | } |
| | | } |
| | | </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; |
| | | } |
| | | |
| | | .el-card ::v-deep .el-card__body { |
| | | padding: 13px; |
| | | } |
| | | </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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex"> |
| | | <el-card class="json-block" style="width:485px;"> |
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container"> |
| | | <div class="item-row"> |
| | | <span class="name" style="width:100px;">{{ item.name }}</span> |
| | | <el-input style="width:250px;" v-if="item.type === '0'" v-model="item.value" class="input-box"></el-input> |
| | | </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" class="action-button" |
| | | @click="updateButtonValue(dataGroup, itemIndex); submitDataToBackend();">{{ 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/Manualoneposition2' |
| | | |
| | | export default { |
| | | name: "ManualonePosition2", |
| | | mixins: [LanguageMixin], |
| | | data () { |
| | | return { |
| | | jsonData: data // 加载整个data.json文件作为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 { name: item.name, value: item.value, address: item.address }; |
| | | } else if (item.button) { |
| | | return { name: item.button.name, value: item.button.value, address: item.button.address }; |
| | | } |
| | | return null; |
| | | }); |
| | | }); |
| | | |
| | | // 模拟提交数据到后端的操作,实际情况下需要根据你的后端API进行修改 |
| | | console.log('提交以下数据到后端:', inputData); |
| | | |
| | | } |
| | | } |
| | | } |
| | | </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; |
| | | } |
| | | </style> |
| | |
| | | }}</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>Parameter</div>
|
| | |
| | | record: {
|
| | | params: [100, 200, 10, 10, 10, 10],
|
| | | xyData: [
|
| | | { 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" }
|
| | | { name: "conveyor Velocity(Auto FAST)", value: 0, value2: 0, unit: "m/min" },
|
| | | { name: "conveyor Velocity(Auto SLOW)", value: 0, value2: 0, unit: "m/min" },
|
| | | { name: "conveyor Velocity(Manual)", value: 0, value2: 0, unit: "m/min" },
|
| | | { name: "A01 A02 TURN JOG Velocity", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL JOG Velocity", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL JOG Velocity", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TURN POS Velocity AUTO", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TURN POS Velocity manual", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "A01 A02 TRAVEL POS Velocity manual", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0, value2: 0, unit: "mm/S" },
|
| | | { name: "B01 B02 TRAVEL POS Velocity manual", value: 0, value2: 0, unit: "mm/S" }
|
| | | ],
|
| | | canshu: []
|
| | | },
|
| | |
| | | border: 1px solid black;
|
| | | border: none;
|
| | | }
|
| | | .special-class{
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | .in_mc {
|
| | |
|
| | |
| | | <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;
|
| | | }
|
| | | <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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</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> |
| | |
| | | <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;
|
| | | }
|
| | |
|
| | | <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="40"> |
| | | <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; |
| | | // const xiaoche = obj.params[3]; |
| | | |
| | | 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 === '3') { |
| | | obj.button.value = parms[0][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 === '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]; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | jsonData2.forEach((item) => { |
| | | item.forEach((subItem) => { |
| | | if (subItem.read === 66) { |
| | | subItem.value = parms[3][0]; |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | let lastParmsArray = parms[parms.length - 1]; |
| | | |
| | | let lastParmsIndex = 0; |
| | | |
| | | for (let i = 0; i < jsonData2.length; i++) { |
| | | for (let j = 0; j < jsonData2[i].length; j++) { |
| | | if (jsonData2[i][j].read === 333) { |
| | | jsonData2[i][j].value = lastParmsArray[lastParmsIndex]; |
| | | lastParmsIndex++; |
| | | if (lastParmsIndex === lastParmsArray.length) { |
| | | lastParmsIndex = 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 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> |
| | |
| | | <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> |
| | | <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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</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> |
| | |
| | | <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;
|
| | | }
|
| | | <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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</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> |
| | |
| | | <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;
|
| | | }
|
| | |
|
| | |
|
| | | <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> |
| | |
| | | <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> |
| | | <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('ServoManual') |
| | | }}</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> |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('AutomaticParameterSetting') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</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> |
| | |
| | | }}</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>{{ $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-input v-model="item.name" style="width: 280px;" class="in_mc"></el-input>
|
| | | <el-input v-model="item.name" style="width: 100%;" class="in_mc"></el-input>
|
| | |
|
| | | </div>
|
| | |
|
| | |
| | | },
|
| | | //语言转换
|
| | | 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);
|
| | | if (translation != null) {
|
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value }; });
|
| | | //console.log(translation);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | .kuai_sb {
|
| | | text-align: center;
|
| | | width: 25%;
|
| | | width: 15%;
|
| | | margin-bottom: 15px;
|
| | | }
|
| | |
|
| | |
| | | background: #A0A0A0;
|
| | | border: 0.1875em solid white;
|
| | | border-radius: 50%;
|
| | | height: 5em;
|
| | | width: 5em;
|
| | | height: 4em;
|
| | | width: 4em;
|
| | | box-shadow: 0.375em 0.375em 0 0 rgba(214, 214, 214, 0.125);
|
| | | }
|
| | |
|
| | |
| | | }}</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>{{ $t('State') }}</div>
|
| | | <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="messagepack.data">
|
| | |
| | | <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>{{ $t('Alarm') }}</div> |
| | | <div class="block"> |
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 PLCAutomaticParameterSetting 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.120", 8); |
| | | // List<Short> dache1 = S7control.getinstance().ReadWord("DB100.18", 1); |
| | | // List<Short> xiaoche1 = S7control.getinstance().ReadWord("DB100.22", 1); |
| | | // List<Short> fanzhuan1 = S7control.getinstance().ReadWord("DB100.14", 1); |
| | | Short[] values1 = { 1, 2, 3, 4, 5, 6, 7, 8 }; |
| | | List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | Short[] fanzhuan = { 4 }; |
| | | List<Short> fanzhuan1 = new ArrayList<>(Arrays.asList(fanzhuan)); |
| | | Short[] dache = { 5 }; |
| | | List<Short> dache1 = new ArrayList<>(Arrays.asList(dache)); |
| | | Short[] xiaoche = { 6 }; |
| | | 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("dache1", dache1); |
| | | jsonObject.append("xiaoche", xiaoche1); |
| | | jsonObject.append("fanzhuan", fanzhuan1); |
| | | |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("AutomaticParameterSetting"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("AutomaticParameterSetting"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | String addressList1 = "DB100.120"; |
| | | String addressList2 = "DB100.18"; |
| | | String addressList3 = "DB100.22"; |
| | | String addressList4 = "DB100.14"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | // System.out.println("lastMessage:" + lastMessage); |
| | | JSONArray messageArray = new JSONArray(lastMessage); |
| | | |
| | | // 整合第 1 到 2 个数组并去掉 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | System.out.println(messageArray); |
| | | // 写入第一个地址 |
| | | if (messageArray.getJSONArray(2).size() > 0) { |
| | | Object value = messageArray.getJSONArray(2).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 " + addressList2); |
| | | } 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(addressList2, Arrays.asList(sValue)); |
| | | System.out |
| | | .println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList3); |
| | | } 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 " + addressList4); |
| | | } 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 " + addressList1); |
| | | } |
| | | |
| | | // 清空消息列表 |
| | | 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 PlcManualonePosition 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"); |
| | | } |
| | | |
| | | // 读取json文件中地址,并返回该地址集合 |
| | | public List<String> 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); |
| | | // bufferedReader.close(); |
| | | String line = null; |
| | | // 将 bufferedReader 内容一行一行赋值给str |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | str += line; |
| | | } |
| | | |
| | | // 将str字符串格式转为json |
| | | JSONObject jsonObject = new JSONObject(str); |
| | | |
| | | // 获取json中的值 |
| | | JSONArray address = jsonObject.getJSONArray("Manualoneposition"); |
| | | |
| | | String[] result = new String[address.size()]; |
| | | |
| | | List<String> arraylistss = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i < address.size(); i++) { |
| | | JSONObject ress = (JSONObject) address.get(i); |
| | | |
| | | this.name = ress.getStr("name"); |
| | | this.count = ress.getInt("count"); |
| | | ; |
| | | result[i] = name + ',' + count.toString(); |
| | | arraylistss.add(result[i]); |
| | | |
| | | } |
| | | return arraylistss; |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(500); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // this.readValue(); |
| | | List<String> myCollection; |
| | | myCollection = readValue(); |
| | | // System.out.println(myCollection); |
| | | List<Short> arraylist = new ArrayList<>(); |
| | | for (String element : myCollection) { |
| | | String[] parts = element.split(","); |
| | | String PlcAddress = parts[0]; |
| | | String count = parts[1]; |
| | | Integer Plccount = new Integer(count); |
| | | // arraylist = S7control.getinstance().ReadWord(PlcAddress, Plccount); |
| | | System.out.println(PlcAddress); |
| | | } |
| | | |
| | | // List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | // List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | // parameter |
| | | // Short[] values1 = { 1231, 1, 1, 1, 1, 1, 2, 33, 2, 3, 4, 5 }; |
| | | // List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | |
| | | // state |
| | | Short[] values2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| | | List<Short> state = new ArrayList<>(Arrays.asList(values2)); |
| | | |
| | | // action |
| | | 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)); |
| | | |
| | | short[] sholist = new short[paramlist.size()]; |
| | | |
| | | for (int i = 0; i < paramlist.size(); i++) { |
| | | boolean value = paramlist.get(i); |
| | | sholist[i] = value ? (short) 1 : (short) 0; |
| | | } |
| | | |
| | | 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); |
| | | jsonObject.append("action", sholist); |
| | | 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(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | // 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 }; |
| | | Short[] values1 = { 1231, 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)); |
| | | |
| | | 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)); |
| | | |
| | | short[] sholist = new short[paramlist.size()]; |
| | | |
| | | for (int i = 0; i < paramlist.size(); i++) { |
| | | boolean value = paramlist.get(i); |
| | | sholist[i] = value ? (short) 1 : (short) 0; |
| | | } |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5} |
| | |
| | | |
| | | jsonObject.append("params", arraylist); |
| | | jsonObject.append("state", state); |
| | | jsonObject.append("action", sholist); |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | |
| | | // 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)); |
| | | 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)); |
| | | |
| | | |
| | | |
| | |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | // S7control.getinstance().WriteWord(addressList1, Arrays.asList(sValue)); |
| | | S7control.getinstance().WriteWord(addressList1, Arrays.asList(sValue)); |
| | | System.out.println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList1); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | // S7control.getinstance().WriteWord(addressList2, Arrays.asList(sValue)); |
| | | S7control.getinstance().WriteWord(addressList2, Arrays.asList(sValue)); |
| | | System.out.println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList2); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | |
| | | |
| | | // 写入第三个地址 |
| | | if (!mergedList.isEmpty()) { |
| | | // S7control.getinstance().WriteWord(addressList3, mergedList); |
| | | S7control.getinstance().WriteWord(addressList3, mergedList); |
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + addressList3); |
| | | } |
| | | |
| | |
| | | } 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)); |
| | | List<String> addressList1 = new ArrayList<>(); |
| | | addressList1.add("DB103.32~45"); |
| | | addressList1.add("DB103.46~59"); |
| | | addressList1.add("DB103.60~73"); |
| | | addressList1.add("DB103.74~101"); |
| | | addressList1.add("DB103.102~115"); |
| | | addressList1.add("DB103.116~143"); |
| | | addressList1.add("DB103.144~157"); |
| | | addressList1.add("DB103.158~171"); |
| | | addressList1.add("DB103.172~185"); |
| | | addressList1.add("DB103.200~213"); |
| | | addressList1.add("DB103.228~241"); |
| | | List<Boolean> paramlist = S7control.getinstance().readBits(addressList1); |
| | | |
| | | Short[] values2 = { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| | | List<Short> state = new ArrayList<>(Arrays.asList(values2)); |
| | | |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("DB103.0"); |
| | | addresses.add("DB103.2"); |
| | | addresses.add("DB103.12"); |
| | | addresses.add("DB103.14"); |
| | | addresses.add("DB103.16"); |
| | | addresses.add("DB103.18"); |
| | | addresses.add("DB103.8"); |
| | | addresses.add("DB103.10"); |
| | | addresses.add("DB103.4"); |
| | | addresses.add("DB103.6"); |
| | | List<Short> data = S7control.getinstance().readWords(addresses); |
| | | |
| | | |
| | | |
| | | List<Boolean> data2 = S7control.getinstance().ReadBits("DB101.9.2", 10); |
| | | List<String> addressList3 = new ArrayList<>(); |
| | | addressList3.add("DB106.64-DB106.77"); |
| | | List<Boolean> data3 = S7control.getinstance().readBits(addressList3); |
| | | |
| | | List<String> addresses4 = new ArrayList<>(); |
| | | addresses.add("DB106.0"); |
| | | addresses.add("DB106.12"); |
| | | addresses.add("DB106.40"); |
| | | addresses.add("DB106.50"); |
| | | |
| | | List<Short> data4 = S7control.getinstance().readWords(addresses4); |
| | | |
| | | |
| | | // 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}; |
| | | // List<Short> data = new ArrayList<>(Arrays.asList(values1)); |
| | | // Short[] values2 = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
| | | // List<Short> data2 = new ArrayList<>(Arrays.asList(values2)); |
| | | // Short[] values3 = { 11}; |
| | | // List<Short> data3 = new ArrayList<>(Arrays.asList(values3)); |
| | | // Short[] values4 = { 2,2,3,4}; |
| | | // List<Short> data4 = new ArrayList<>(Arrays.asList(values4)); |
| | | |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | short[] params = new short[paramlist.size()]; |
| | |
| | | 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); |
| | | jsonObject.append("params", data2); |
| | | jsonObject.append("params", data); |
| | | jsonObject.append("params", data3); |
| | | jsonObject.append("params", data4); |
| | | |
| | | |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter2"); |
| | | if (sendwServer != null) { |
| | |
| | | |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | |
| | | String addressList = "DB2.0.0"; |
| | | String addressList = "DB101.9.2"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为整数类型的列表 |
| | |
| | | } |
| | | |
| | | // 将布尔列表写入 PLC |
| | | // S7control.getinstance().WriteBit(addressList, messageBooleans); |
| | | S7control.getinstance().WriteBit(addressList, messageBooleans); |
| | | System.out.println("messageValues:" + messageBooleans); |
| | | System.out.println("addressList:" + addressList); |
| | | // 清空消息列表 |
| | |
| | | // 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);
|
| | | List<Short> arraylist = S7control.getinstance().ReadWord("DB100.42", 20);
|
| | |
|
| | | // 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));
|
| | | // 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();
|
| | |
| | | // 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));
|
| | | List<Short> arraylist = S7control.getinstance().ReadWord("DB100.88", 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();
|
| | |
| | | if (webSocketServer != null) {
|
| | | List<String> messages = webSocketServer.getMessages();
|
| | |
|
| | | String addressList3 = "DB100.12";
|
| | | String addressList3 = "DB100.88";
|
| | |
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为 short 类型的列表
|
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 PlcServoManualone 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("ServoManualone"); |
| | | 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; |
| | | |
| | | |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("DB103.25"); |
| | | addresses.add("DB100.144"); |
| | | addresses.add("DB100.148-161"); |
| | | addresses.add("DB100.184"); |
| | | addresses.add("DB100.186"); |
| | | addresses.add("DB100.180"); |
| | | addresses.add("DB100.182"); |
| | | |
| | | List<Short> arraylist = S7control.getinstance().readWords(addresses); |
| | | |
| | | List<String> addresses2 = new ArrayList<>(); |
| | | addresses2.add("DB103.26"); |
| | | addresses2.add("DB100.188"); |
| | | addresses2.add("DB100.190"); |
| | | addresses2.add("DB100.146"); |
| | | addresses2.add("DB100.162-175"); |
| | | List<Short> arraylist2 = S7control.getinstance().readWords(addresses2); |
| | | |
| | | List<String> addresses3 = new ArrayList<>(); |
| | | addresses3.add("DB103.42"); |
| | | List<Short> arraylist3 = S7control.getinstance().readWords(addresses3); |
| | | |
| | | List<String> addresses4 = new ArrayList<>(); |
| | | addresses4.add("DB103.46"); |
| | | List<Short> arraylist4 = S7control.getinstance().readWords(addresses4); |
| | | |
| | | List<Short> arraylist5 = S7control.getinstance().ReadWord("DB103.27", 2); |
| | | List<Short> arraylist6 = S7control.getinstance().ReadWord("DB103.29", 2); |
| | | List<String> addresses7 = new ArrayList<>(); |
| | | addresses7.add("DB104.24"); |
| | | addresses7.add("DB104.26"); |
| | | addresses7.add("DB104.20"); |
| | | addresses7.add("DB104.22"); |
| | | addresses7.add("DB104.28"); |
| | | addresses7.add("DB104.30"); |
| | | List<Short> arraylist7 = S7control.getinstance().readWords(addresses7); |
| | | // List<String> addresses8 = new ArrayList<>(); |
| | | // addresses8.add("DB103.26"); |
| | | // addresses8.add("DB103.26"); |
| | | // addresses8.add("DB103.26"); |
| | | // addresses8.add("DB103.26"); |
| | | // List<Short> arraylist8 = S7control.getinstance().readWords(addresses8); |
| | | |
| | | // Short[] values1 = { 1, 2, 3, 4, 5, 6, 7}; |
| | | // List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | // Short[] values2 = { 1, 2, 3, 4, 5}; |
| | | // List<Short> arraylist2 = new ArrayList<>(Arrays.asList(values2)); |
| | | |
| | | // Short[] values3 = {1}; |
| | | // List<Short> arraylist3 = new ArrayList<>(Arrays.asList(values3)); |
| | | // Short[] values4 = {2}; |
| | | // List<Short> arraylist4 = new ArrayList<>(Arrays.asList(values4)); |
| | | // Short[] values5 = {3,3}; |
| | | // List<Short> arraylist5 = new ArrayList<>(Arrays.asList(values5)); |
| | | // Short[] values6 = { 4,4}; |
| | | // List<Short> arraylist6 = new ArrayList<>(Arrays.asList(values6)); |
| | | // Short[] values7 = { 1,1,1,1,1,1}; |
| | | // List<Short> arraylist7 = new ArrayList<>(Arrays.asList(values7)); |
| | | // Short[] values8 = { 1,1,1,1,1,1}; |
| | | // List<Short> arraylist8 = new ArrayList<>(Arrays.asList(values8)); |
| | | |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | |
| | | jsonObject.append("zuhe1", arraylist); |
| | | jsonObject.append("zuhe2", arraylist2); |
| | | jsonObject.append("zuhe3", arraylist3); |
| | | jsonObject.append("zuhe4", arraylist4); |
| | | jsonObject.append("zuhe5", arraylist5); |
| | | jsonObject.append("zuhe6", arraylist6); |
| | | jsonObject.append("guzhang", arraylist7); |
| | | // jsonObject.append("weihuiling", arraylist8); |
| | | |
| | | |
| | | |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("ServoManualone"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ServoManualone"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | List<String> waddresses1 = new ArrayList<>(); |
| | | waddresses1.add("DB103.25"); |
| | | waddresses1.add("DB100.144"); |
| | | waddresses1.add("DB100.148-161"); |
| | | waddresses1.add("DB100.184"); |
| | | waddresses1.add("DB100.186"); |
| | | waddresses1.add("DB100.180"); |
| | | waddresses1.add("DB100.182"); |
| | | |
| | | List<String> waddresses2 = new ArrayList<>(); |
| | | waddresses2.add("DB103.26"); |
| | | waddresses2.add("DB100.188"); |
| | | waddresses2.add("DB100.190"); |
| | | waddresses2.add("DB100.146"); |
| | | waddresses2.add("DB100.162-175"); |
| | | |
| | | |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | // System.out.println("lastMessage:" + lastMessage); |
| | | JSONArray messageArray = new JSONArray(lastMessage); |
| | | |
| | | |
| | | |
| | | |
| | | // 写入第一个地址 |
| | | if (messageArray.getJSONArray(0).size() > 0) { |
| | | JSONArray jsonArray = messageArray.getJSONArray(0); |
| | | List<Short> sValue = new ArrayList<>(); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | Object value = jsonArray.get(i); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short val = Short.parseShort(cleanedValue.trim()); |
| | | sValue.add(val); |
| | | System.out.println("messageValue:" + Arrays.asList(val) + " added to the list"); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | } |
| | | } |
| | | } |
| | | if (!sValue.isEmpty()) { |
| | | S7control.getinstance().WriteWord(waddresses1, sValue); |
| | | System.out.println("Values " + sValue + " written to PLC at address " + waddresses1); |
| | | } |
| | | } |
| | | |
| | | if (messageArray.getJSONArray(1).size() > 0) { |
| | | JSONArray jsonArray = messageArray.getJSONArray(1); |
| | | List<Short> sValue2 = new ArrayList<>(); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | Object value = jsonArray.get(i); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short val = Short.parseShort(cleanedValue.trim()); |
| | | sValue2.add(val); |
| | | System.out.println("messageValue:" + Arrays.asList(val) + " added to the list"); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | } |
| | | } |
| | | } |
| | | if (!sValue2.isEmpty()) { |
| | | S7control.getinstance().WriteWord(waddresses2, sValue2); |
| | | System.out.println("Values " + sValue2 + " written to PLC at address " + waddresses2); |
| | | } |
| | | } |
| | | |
| | | // 清空消息列表 |
| | | 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 Plcalarm extends Thread { |
| | | private AlarmMapper alarmMapper; |
| | | |
| | | String content = ""; |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | | public List<String> readValue() { |
| | | String str = ""; |
| | | BufferedReader bufferedReader = null; |
| | | FileInputStream fileInputStream; |
| | | try { |
| | | // 从文件中读取字节数据存入 fileInputStream |
| | | fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Alarm.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); |
| | | |
| | | List<String> arraylistss = new ArrayList<>(); |
| | | |
| | | // 获取json中报警信息的值 |
| | | JSONArray AlarmContent = jsonObject.getJSONArray("content"); |
| | | for (int i = 0; i < AlarmContent.size(); i++) { |
| | | JSONObject ress = (JSONObject) AlarmContent.get(i); |
| | | |
| | | this.content = ress.getStr("name"); |
| | | arraylistss.add(content); |
| | | } |
| | | // 获取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"); |
| | | |
| | | } |
| | | |
| | | return arraylistss; |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | |
| | | // 根据地址读取PCL数据 |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.0.0", 40); |
| | | // 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 }; |
| | | // List<Boolean> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, |
| | | // Plccount); |
| | | Boolean[] values = { false, 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)); |
| | | if (plclist != null) { |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | // 将Intlist转换为数组 |
| | | Integer[] shuzu1 = Intlist.toArray(new Integer[0]); |
| | | |
| | | // 定义的报警内容数组 |
| | | String[] shuzu = { |
| | | "D01 VFD error", |
| | | "D02 VFD error", |
| | | "D03 VFD error", |
| | | "D04 VFD error", |
| | | "D05 VFD error", |
| | | "D06 VFD error", |
| | | "B01 VFD error", |
| | | "B02 VFD error", |
| | | "A01 VFD error", |
| | | "A02 VFD error", |
| | | "A01 servo turn error", |
| | | "A02 servo turn error", |
| | | "A01 servo travel error", |
| | | "A02 servo travel error", |
| | | "B01 servo travel error", |
| | | "B02 servo travel error", |
| | | "D01 DEC error", |
| | | "D01 pos error", |
| | | "D02 DEC error", |
| | | "D02 pos error", |
| | | "D03 DEC error", |
| | | "D03 pos error", |
| | | "D04 DEC error", |
| | | "D04 pos error", |
| | | "D05 DEC error", |
| | | "D05 pos error", |
| | | "D06 DEC error", |
| | | "D06 pos error", |
| | | "A01 DEC error", |
| | | "A01 pos error", |
| | | "A02 DEC error", |
| | | "A02 pos error", |
| | | "B01 IN DEC error", |
| | | "B01 IN pos error", |
| | | "B01 OUT DEC error", |
| | | "B01 OUT pos error", |
| | | "B02 IN DEC error", |
| | | "B02 IN pos error", |
| | | "B02 OUT DEC error", |
| | | "B02 OUT pos error", |
| | | }; |
| | | // 定义的报警内容数组,获取json返回的集合 |
| | | List<String> myCollection; |
| | | myCollection = readValue(); |
| | | String[] array1 = myCollection.toArray(new String[myCollection.size()]); |
| | | // System.out.println(myCollection); |
| | | |
| | | alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class); |
| | | for (short i = 0; i < shuzu.length; i++) { |
| | | for (short i = 0; i < array1.length; i++) { |
| | | // 查询对应报警信息结束时间为null的条数 |
| | | short result = alarmMapper.selectnullti(shuzu[i]); |
| | | short result = alarmMapper.selectnullti(array1[i]); |
| | | // 读取到PLC的值为1并且对应报警信息结束时间为null的条数的条数为0 |
| | | if (shuzu1[i] == 1 && result == 0) { |
| | | // 填加一条报警信息,有开始时间 |
| | | alarmMapper.Insertalarm(shuzu[i]); |
| | | alarmMapper.Insertalarm(array1[i]); |
| | | } else if (shuzu1[i] == 0 && result > 0) { |
| | | // 修改该条报警信息的结束时间 |
| | | alarmMapper.updatealarm(shuzu[i]); |
| | | alarmMapper.updatealarm(array1[i]); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param datas word的值 |
| | | */ |
| | | public void WriteWord(List<String> address, List<Short> datas) { |
| | | if (s7PLC==null) |
| | | if (s7PLC == null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | |
| | | MultiAddressWrite addressWrite = new MultiAddressWrite(); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | addressWrite.addInt16(address.get(i), datas.get(i)); |
| | | String addr = address.get(i); |
| | | short data = datas.get(i); |
| | | |
| | | if (addr.contains("-")) { |
| | | // 处理范围地址 |
| | | String[] range = addr.split("-"); |
| | | if (range.length == 2) { |
| | | String startAddr = range[0].trim(); |
| | | String endAddr = range[1].trim(); |
| | | |
| | | int startIndex = Integer.parseInt(startAddr.substring(startAddr.indexOf('.') + 1)); |
| | | int endIndex = Integer.parseInt(endAddr.substring(endAddr.indexOf('.') + 1)); |
| | | |
| | | for (int j = startIndex; j <= endIndex; j++) { |
| | | String currentAddress = startAddr.substring(0, startAddr.indexOf('.') + 1) + j; |
| | | s7PLC.writeInt16(currentAddress, data); // 将数据写入当前地址 |
| | | } |
| | | } |
| | | } else { |
| | | // 处理单个地址 |
| | | s7PLC.writeInt16(addr, data); // 将数据写入单个地址 |
| | | } |
| | | } |
| | | s7PLC.writeMultiData(addressWrite); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | return s7PLC.readBoolean(addresslist); |
| | | } |
| | | |
| | | public List<Boolean> readBits(List<String> addressList) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | |
| | | List<Boolean> result = new ArrayList<>(); |
| | | |
| | | for (String address : addressList) { |
| | | if (address.contains("~")) { |
| | | String[] range = address.split("~"); |
| | | String startAddress = range[0]; |
| | | String endAddress = range[1]; |
| | | |
| | | int startIndex = extractAddressNumber(startAddress); |
| | | int endIndex = extractAddressNumber(endAddress); |
| | | |
| | | String prefix = startAddress.substring(0, startAddress.indexOf(".") + 1); |
| | | |
| | | for (int i = startIndex; i <= endIndex; i++) { |
| | | String newAddress = prefix + i; |
| | | result.add(s7PLC.readBoolean(newAddress)); |
| | | } |
| | | } else { |
| | | result.add(s7PLC.readBoolean(address)); |
| | | } |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | private int extractAddressNumber(String address) { |
| | | String numberStr = address.replaceAll("\\D+", ""); // 使用正则表达式提取数字部分 |
| | | return Integer.parseInt(numberStr); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 从指定的地址开始 连续按bit位读取 |
| | | * |
| | |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.example.springboot.component.PLCAutomaticParameterSetting; |
| | | import com.example.springboot.component.PlcHold; |
| | | import com.example.springboot.component.PlcParameter; |
| | | import com.example.springboot.component.Plcaction; |
| | |
| | | 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) |
| | |
| | | // |
| | | System.out.println("启动完成"); |
| | | |
| | | // new PlcHold().start(); |
| | | // new PlcHold().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(); |
| | | // 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 PLCAutomaticParameterSetting().start(); |
| | | // new PlcServoManualone().start(); |
| | | } |
| | | } |