Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
| | |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out in pos", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in dec", |
| | | "value": "1", |
| | | "state": "1", |
| | |
| | | }, |
| | | { |
| | | "name": "B01.SR in in pos", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out in pos", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR out safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B01.SR in safety", |
| | | "value": "1", |
| | | "state": "1", |
| | |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR out safety", |
| | | "name": "B01.SR out safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SB.pause", |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "B02.SR in safety", |
| | | "name": "B02.SR out safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.requset", |
| | | "name": "SafetyDoor.requset", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.confirm", |
| | | "name": "SafetyDoor.confirm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.reset", |
| | | "name": "SafetyDoor.reset", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Sspace", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Sspce", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Sspce", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "Sspce", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR left dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR left in pos", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR left safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR right dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR right in pos", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR right safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR turn home", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR turn up", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR turn down", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR travel home", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR travel left dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR travel left limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR travel right dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "A01.SR travel right limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR left dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR left in pos", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR left safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR right dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR right in pos", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR right safety", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR turn home", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR turn up", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR turn down", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR travel home", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR travel left dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR travel left limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR travel right dec", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02.SR travel right limit", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "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" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "LED.red", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "LED.green", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "LED.yellow", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "D01.LED.green", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "D06.LED.green", |
| | | "value": "1", |
| | |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "B01.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.turn", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "B02.YV.up down", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "B02.YV.gassing", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | } |
| | | , |
| | | { |
| | | "name": "SAFETYDOOR.led", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "SAFETYDOOR.open", |
| | | "value": "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", |
| | | "name": "SafetyDoor.Led", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "SafetyDoor.open", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "D01 SB.confirm", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A01 oilPump", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A01 motorCtr", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02 oilPump", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "A02 motorCtr", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | , |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | }, |
| | | { |
| | | "name": "space", |
| | | "value": "1", |
| | | "state": "1", |
| | | "type": "1", |
| | | "page": "1" |
| | | } |
| | | |
| | | |
| | | ], |
| | | "address": [ |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | ] |
| | | ], |
| | | [ |
| | | { |
| | | "button": { |
| | | "name": "软急停", |
| | | "value":0, |
| | | "address":"DB10.0", |
| | | "type":"66" |
| | | } |
| | | }] |
| | | |
| | | ] |
| | |
| | | "急停后中止/继续选择": "Abort/ResumeTasks",
|
| | | "A01终止/继续": "A01Abort/ResumeTasks",
|
| | | "A02终止/继续": "A02Abort/ResumeTasks",
|
| | | "存片等待延时": "Storage wait delay"
|
| | | "存片等待延时": "Storage wait delay",
|
| | | "软急停": "emgHMI"
|
| | |
|
| | | },
|
| | | "langPositioning1": {
|
| | |
| | | "D05.SR in pos": "D05.到位传感器",
|
| | | "D06.SR dec": "D06.减速传感器",
|
| | | "D06.SR in pos": "D06.到位传感器",
|
| | | "B01.SR out dec": "B01.出片减速传感器",
|
| | | "B01.SR out in pos": "B01.出片到位传感器",
|
| | | "B01.SR in dec": "B01.进片减速传感器",
|
| | | "B01.SR in in pos": "B01.进片到位传感器",
|
| | | "B01.SR out dec": "B01.出片减速传感器",
|
| | | "B01.SR out in pos": "B01.出片到位传感器",
|
| | | "B01.SR turn on": "B01.翻转上到位传感器",
|
| | | "B01.SR turn off": "B01.翻转下到位传感器",
|
| | | "B01.SR up": "B01.上升到位传感器",
|
| | |
| | | "B02.SR turn off": "B02.翻转下到位传感器",
|
| | | "B02.SR up": "B02.上升到位传感器",
|
| | | "B02.SR down": "B02.下降到位传感器",
|
| | | "B01.SR out safety": "B01.出片安全传感器",
|
| | | "B01.SR in safety": "B01.进片安全传感器",
|
| | | "B02.SR out safety": "B02.出片安全传感器",
|
| | | "B01.SR out safety": "B01.出片安全传感器",
|
| | | "B02.SR in safety": "B02.进片安全传感器",
|
| | | "SB.start(+)": "SB.启动(+)按钮",
|
| | | "SB.stop(1)": "SB.停止(-)按钮",
|
| | | "SB.reset": "SB.复位按钮",
|
| | | "SB.auto/manul": "SB.手/自切换按钮",
|
| | | "SB.pause": "SB.暂停按钮",
|
| | | "D01.SB.confirm": "玻璃信息确认",
|
| | | "SB.emg": "SB.急停按钮",
|
| | | "D01.SB.start": "D01.启动",
|
| | | "D06.SB.start": "D06.启动",
|
| | | "B02.SR in safety": "B02.进片安全传感器",
|
| | | "SAFETYDOOR.requset": "安全门请求进入",
|
| | | "SAFETYDOOR.confirm": "安全门确认",
|
| | | "SAFETYDOOR.reset": "安全门复位",
|
| | | "B02.SR out safety ": "B02.出片安全传感器",
|
| | | "SafetyDoor.requset": "安全门请求进入",
|
| | | "SafetyDoor.confirm": "安全门确认",
|
| | | "SafetyDoor.reset": "安全门复位",
|
| | | "Sspce":"备用",
|
| | | "A01.SR left dec":"A01左键速",
|
| | | "A01.SR left in pos":"A01左到位",
|
| | | "A01.SR left safety":"A01左安全",
|
| | | "A01.SR right dec":"A01右键速",
|
| | | "A01.SR right in pos":"A01右到位",
|
| | | "A01.SR right safety":"A01右安全",
|
| | | "A01.SR turn home":"A01翻转原点",
|
| | | "A01.SR turn up":"A01翻转上极限",
|
| | | "A01.SR turn down":"A01翻转下极限",
|
| | | "A01.SR travel home":"A01行走原点",
|
| | | "A01.SR travel left dec":"A01行走左减速",
|
| | | "A01.SR travel left limit":"A01行走左极限",
|
| | | "A01.SR travel right dec":"A01行走右减速",
|
| | | "A01.SR travel right limit":"A01行走右极限",
|
| | | "A02.SR left dec":"A02左键速",
|
| | | "A02.SR left in pos":"A02左到位",
|
| | | "A02.SR left safety":"A02左安全",
|
| | | "A02.SR right dec":"A02右键速",
|
| | | "A02.SR right in pos":"A02右到位",
|
| | | "A02.SR right safety":"A02右安全",
|
| | | "A02.SR turn home":"A02翻转原点",
|
| | | "A02.SR turn up":"A02翻转上极限",
|
| | | "A02.SR turn down":"A02翻转下极限",
|
| | | "A02.SR travel home":"A02行走原点",
|
| | | "A02.SR travel left dec":"A02行走左减速",
|
| | | "A02.SR travel left limit":"A02行走左极限",
|
| | | "A02.SR travel right dec":"A02行走右减速",
|
| | | "A02.SR travel right limit":"A02行走右极限",
|
| | | "B01.SR origin":"B01.原点",
|
| | | "B01.SR left limit":"B01.左极限",
|
| | | "B01.SR right limit":"B01.右极限",
|
| | | "B02.SR origin":"B02.原点",
|
| | | "B02.SR left limit":"B02.左极限",
|
| | | "B02.SR right limit":"B02.右极限",
|
| | | "LED.red": "三色灯红",
|
| | | "LED.green": "三色灯绿",
|
| | | "LED.yellow": "三色灯黄",
|
| | |
| | | "B02.YV.turn": "B02.电磁阀翻转",
|
| | | "B02.YV.up down": "B02.电磁阀上升下降",
|
| | | "B02.YV.gassing": "B02.电磁阀吹气",
|
| | | "SAFETYDOOR.led": "安全门状态灯",
|
| | | "SAFETYDOOR.open": "安全门打开"
|
| | | "SafetyDoor.Led": "安全门状态灯",
|
| | | "SafetyDoor.open": "安全门打开",
|
| | | "D01 SB.confirm":"玻璃信息确认指示灯",
|
| | | "A01 oilPump":"A01注油泵",
|
| | | "A01 motorCtr":"A01电机控制",
|
| | | "A02 oilPump":"A02注油泵",
|
| | | "A02 motorCtr":"A02电机控制",
|
| | | "space":"备用"
|
| | |
|
| | | },
|
| | | "Statelang": {
|
| | | "D01.State": "D01.状态",
|
| | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | <!-- <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | }}</router-link> --> |
| | | |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | |
| | | <template> |
| | | <div class="app"> |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <!-- <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('Parameter') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | </el-breadcrumb> --> |
| | | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <!-- <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | |
| | | <router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Servomanualone') |
| | | }}</router-link> |
| | | <!-- <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1') |
| | | }}</router-link> --> |
| | | |
| | | |
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Address parameter settings') |
| | | }}</router-link> |
| | | <!-- <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Positioning2') |
| | | }}</router-link> --> |
| | | |
| | | <!-- <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> --> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Speed parameter settings') |
| | | }}</router-link> |
| | | |
| | | </el-breadcrumb> |
| | | </el-breadcrumb> --> |
| | | |
| | | <el-row :gutter="40" > |
| | | <el-col :span="26" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex"> |
| | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State')
|
| | | }}</router-link>
|
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{
|
| | | <!-- <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{
|
| | | $t('ManualJog')
|
| | | }}</router-link>
|
| | | }}</router-link> -->
|
| | |
|
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{
|
| | | $t('ManualonePosition')
|
| | | }}</router-link>
|
| | |
|
| | | <router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{
|
| | | $t('Servomanualone')
|
| | | }}</router-link>
|
| | | <!-- <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1')
|
| | | }}</router-link> -->
|
| | | <router-link v-if="hasPermission" to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">
|
| | | {{ $t('Servomanualone') }}
|
| | | </router-link>
|
| | | |
| | |
|
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{
|
| | | <router-link v-if="hasPermission" to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{
|
| | | $t('Address parameter settings')
|
| | | }}</router-link>
|
| | | <!-- <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{
|
| | | $t('Positioning2')
|
| | | }}</router-link> -->
|
| | | |
| | | <!-- <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{
|
| | | $t('ManualonePosition2')
|
| | | }}</router-link> -->
|
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
|
| | | |
| | | <router-link v-if="hasPermission" to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
|
| | | $t('Speed parameter settings')
|
| | | }}</router-link>
|
| | |
|
| | |
| | | <div class="container">
|
| | |
|
| | | <component :is="embeddedComponent"></component>
|
| | | <component :is="embeddedComponent2"></component>
|
| | | </div>
|
| | |
|
| | | <!-- <el-button @click="submitDataToBackend">提交数据到后端</el-button> -->
|
| | |
| | | import data from '../../configuration/Manualoneposition'
|
| | |
|
| | | import ManualonePosition2 from './ManualonePosition2.vue';
|
| | | import ManualJog from './ManualJog.vue';
|
| | | import {
|
| | | SelectPermissionByUserName, currentUsername
|
| | | } from "../../api/home";
|
| | | // import { createWebSocket } from '../../api/websocket.js';
|
| | | let socket;
|
| | | export default {
|
| | |
| | | jsonData: data,
|
| | | language: this.$i18n.locale,
|
| | | embeddedComponent: ManualonePosition2,
|
| | | embeddedComponent2: ManualJog,
|
| | | hasPermission: false // 默认没有权限
|
| | |
|
| | | // 加载整个data.json文件作为jsonData
|
| | | }
|
| | |
| | | this.replaceChineseWithEnglish();
|
| | | }
|
| | | this.$forceUpdate();
|
| | | currentUsername().then(res => {
|
| | | SelectPermissionByUserName(res.data).then(res => {
|
| | | res.data.permission.forEach(item => {
|
| | | if (item.permissionId == "36" && item.state == 1) {
|
| | | this.hasPermission = true;
|
| | | }
|
| | | |
| | | });
|
| | | });
|
| | |
|
| | | });
|
| | |
|
| | | },
|
| | | methods: {
|
| | |
| | | active-class="blue-button" |
| | | >{{ $t("Automatic State") }}</router-link |
| | | > |
| | | <router-link |
| | | <!-- <router-link |
| | | to="/Electrical/ManualJog" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("ManualJog") }}</router-link |
| | | > |
| | | > --> |
| | | |
| | | <router-link |
| | | to="/Electrical/ManualonePosition" |
| | |
| | | >{{ $t("ManualonePosition") }}</router-link |
| | | > |
| | | |
| | | <router-link |
| | | to="/Electrical/Servomanualone" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Servomanualone") }}</router-link |
| | | > |
| | | <!-- <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1') |
| | | }}</router-link> --> |
| | | |
| | | <router-link |
| | | to="/Electrical/Positioning1" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Address parameter settings") }}</router-link |
| | | > |
| | | <!-- <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Positioning2') |
| | | }}</router-link> --> |
| | | <!-- |
| | | <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> --> |
| | | <router-link |
| | | to="/Electrical/AutomaticParameterSetting" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("Speed parameter settings") }}</router-link |
| | | > |
| | | <router-link v-if="hasPermission" to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button"> |
| | | {{ $t('Servomanualone') }} |
| | | </router-link> |
| | | |
| | | |
| | | <router-link v-if="hasPermission" to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Address parameter settings') |
| | | }}</router-link> |
| | | |
| | | <router-link v-if="hasPermission" to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Speed parameter settings') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | |
| | | <el-row :gutter="40"> |
| | |
| | | <script> |
| | | import LanguageMixin from "../../lang/LanguageMixin"; |
| | | import data from "../../configuration/parameter2"; |
| | | import { |
| | | SelectPermissionByUserName, currentUsername |
| | | } from "../../api/home"; |
| | | // import { throttle } from 'lodash'; |
| | | let socket; |
| | | |
| | |
| | | jsonData: data, |
| | | inputValue: "", |
| | | language: this.$i18n.locale, |
| | | |
| | | |
| | | hasPermission: false // 默认没有权限 |
| | | |
| | | // 加载整个data.json文件作为jsonData |
| | | }; |
| | |
| | | this.replaceChineseWithEnglish(); |
| | | } |
| | | this.$forceUpdate(); |
| | | currentUsername().then(res => { |
| | | SelectPermissionByUserName(res.data).then(res => { |
| | | res.data.permission.forEach(item => { |
| | | if (item.permissionId == "36" && item.state == 1) { |
| | | this.hasPermission = true; |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | |
| | | }); |
| | | }, |
| | | |
| | | computed: {}, |
| | |
| | | const jsonString2 = JSON.stringify(jsonObject2); |
| | | console.log("所有Type为0的value:", jsonString2); |
| | | socket?.send(jsonString2); |
| | | |
| | | // 延迟2秒发送指定内容 |
| | | setTimeout(() => { |
| | | const jsonObject = { data: [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [], []] }; |
| | | const jsonString = JSON.stringify(jsonObject); |
| | | console.log("发送的内容:", jsonString); |
| | | socket?.send(jsonString); |
| | | }, 2000); |
| | | |
| | | } |
| | | |
| | | if ( |
| | |
| | | active-class="blue-button" |
| | | >{{ $t("Automatic State") }}</router-link |
| | | > |
| | | <router-link |
| | | <!-- <router-link |
| | | to="/Electrical/ManualJog" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("ManualJog") }}</router-link |
| | | > |
| | | > --> |
| | | |
| | | <router-link |
| | | to="/Electrical/ManualonePosition" |
| | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | <!-- <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | }}</router-link> --> |
| | | |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | |
| | | active-class="blue-button" |
| | | >{{ $t("Automatic State") }}</router-link |
| | | > |
| | | <router-link |
| | | <!-- <router-link |
| | | to="/Electrical/ManualJog" |
| | | tag="el-button" |
| | | type="text" |
| | | active-class="blue-button" |
| | | >{{ $t("ManualJog") }}</router-link |
| | | > |
| | | > --> |
| | | |
| | | <router-link |
| | | to="/Electrical/ManualonePosition" |
| | |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State') |
| | | }}</router-link> |
| | | <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | <!-- <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualJog') |
| | | }}</router-link> |
| | | }}</router-link> --> |
| | | |
| | | <router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition') |
| | | }}</router-link> |
| | | |
| | | <router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Servomanualone') |
| | | }}</router-link> |
| | | <!-- <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1') |
| | | }}</router-link> --> |
| | | <router-link v-if="hasPermission" to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button"> |
| | | {{ $t('Servomanualone') }} |
| | | </router-link> |
| | | |
| | | |
| | | <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ |
| | | <router-link v-if="hasPermission" to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Address parameter settings') |
| | | }}</router-link> |
| | | <!-- <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Positioning2') |
| | | }}</router-link> --> |
| | | |
| | | <!-- <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('ManualonePosition2') |
| | | }}</router-link> --> |
| | | <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | |
| | | <router-link v-if="hasPermission" to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{ |
| | | $t('Speed parameter settings') |
| | | }}</router-link> |
| | | |
| | |
| | | <script> |
| | | import LanguageMixin from '../../lang/LanguageMixin' |
| | | import data from '../../configuration/ServoManualone' |
| | | import { |
| | | SelectPermissionByUserName, currentUsername |
| | | } from "../../api/home"; |
| | | |
| | | export default { |
| | | name: "Servomanual", |
| | | mixins: [LanguageMixin], |
| | | |
| | | data () { |
| | | return { |
| | | jsonData: data // 加载整个data.json文件作为jsonData |
| | | jsonData: data, |
| | | |
| | | hasPermission: false // 默认没有权限 |
| | | } |
| | | }, |
| | | created () { |
| | | // 通过路由跳转到/Electrical/Servomanualone页面 |
| | | this.$router.push('/Electrical/Servomanualone'); |
| | | this.$router.push('/Electrical/Parameter2'); |
| | | |
| | | currentUsername().then(res => { |
| | | SelectPermissionByUserName(res.data).then(res => { |
| | | res.data.permission.forEach(item => { |
| | | if (item.permissionId == "36" && item.state == 1) { |
| | | this.hasPermission = true; |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | |
| | | }); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | },
|
| | | activated(){
|
| | | this.init();
|
| | |
|
| | | this.record.xyData = this.jsonData.sign;
|
| | | const language = this.$i18n.locale;
|
| | | if (language === 'zh-CN') {
|
| | | this.replaceChineseWithEnglish();
|
| | | } else {
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | showdata () {
|
| | |
| | |
|
| | |
|
| | | const language = this.$i18n.locale;
|
| | | if (language === 'en-US') {
|
| | | if (language === 'zh-CN') {
|
| | | this.replaceChineseWithEnglish();
|
| | | } else {
|
| | | this.localizedRoles = [...this.record.xyData];
|
| | |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | PlcParameterObject plcParameterObject = new PlcParameterObject();//该DB区数据实例 |
| | | |
| | | private void init() { |
| | | private void init() { |
| | | try { |
| | | String jsonfilename= PlcParameter1Review.class.getResource("/JsonFile/PlcParameter.json").getFile(); |
| | | String jsonfilename = PlcParameter1Review.class.getResource("/JsonFile/PlcParameter.json").getFile(); |
| | | FileReader fileReader = new FileReader(jsonfilename); |
| | | BufferedReader bufferedReader = new BufferedReader(fileReader); |
| | | |
| | |
| | | content.append(line); |
| | | } |
| | | |
| | | bufferedReader.close(); |
| | | bufferedReader.close(); |
| | | fileReader.close(); |
| | | |
| | | |
| | | JSONObject jsonfileobj = new JSONObject(content.toString()); |
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor"); |
| | | plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | |
| | | PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例 |
| | | String codeid=parameterObj.getStr("codeId"); |
| | | String codeid = parameterObj.getStr("codeId"); |
| | | plcParameterInfo.setCodeId(codeid); |
| | | plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex"))); |
| | | plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio"))); |
| | | plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght"))); |
| | | plcParameterInfo.setUnit(parameterObj.getStr("unit")); |
| | | plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght"))); |
| | | plcParameterInfo.setUnit(parameterObj.getStr("unit")); |
| | | plcParameterObject.addPlcParameter(plcParameterInfo); |
| | | } |
| | | } |
| | | System.out.println(""); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | byte[] getplcvlues=S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(),plcParameterObject.getPlcAddressLength()); |
| | | byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | plcParameterObject.setPlcParameterList(getplcvlues); |
| | | int index=plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex(); |
| | | S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short)100); |
| | | |
| | | int index = plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex(); |
| | | S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100); |
| | | |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("conveyorVelocity(AutoFAST)"); |
| | | addresses.add("conveyorVelocity(AutoSLOW)"); |
| | | addresses.add("conveyorVelocity(Manual)"); |
| | | addresses.add("A01A02TURNJOGVelocity"); |
| | | addresses.add("A01A02TRAVELJOGVelocity"); |
| | | |
| | | addresses.add("A01A02TRAVELJOGVelocity"); |
| | | |
| | | plcParameterObject.getPlcParameterValues(addresses); |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | |
| | | jsonObject.append("params", plcParameterObject.getPlcParameterValues(addresses)); |
| | | jsonObject.append("fanzhuan", plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getValue()); |
| | | jsonObject.append("xiaoche", plcParameterObject.getPlcParameter("").getValue()); |
| | | |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter1"); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Parameter1"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter1"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | List<String> waddresses1 = new ArrayList<>(); |
| | | waddresses1.add("DB100.0"); |
| | | waddresses1.add("DB100.2"); |
| | | waddresses1.add("DB100.4"); |
| | | waddresses1.add("DB100.6"); |
| | | waddresses1.add("DB100.26"); |
| | | waddresses1.add("DB100.28"); |
| | | waddresses1.add("DB100.30"); |
| | | waddresses1.add("DB100.32"); |
| | | waddresses1.add("DB100.34"); |
| | | waddresses1.add("DB100.36"); |
| | | waddresses1.add("DB100.38"); |
| | | waddresses1.add("DB100.40"); |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | |
| | | String addressList2 = "DB100.8"; |
| | | String addressList3 = "DB100.12"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | // System.out.println("lastMessage:" + lastMessage); |
| | | JSONArray messageArray = new JSONArray(lastMessage); |
| | | if (webserver != null) { |
| | | |
| | | // 整合第 1 到 3 个数组并去掉 null 元素 |
| | | List<Short> mergedList = new ArrayList<>(); |
| | | for (int i = 0; i < 3; i++) { |
| | | JSONArray sublist = messageArray.getJSONArray(i); |
| | | for (int j = 0; j < sublist.size(); j++) { |
| | | Object value = sublist.get(j); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | mergedList.add(sValue); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | List<String> messages = webserver.getMessages(); |
| | | List<String> waddresses1 = new ArrayList<>(); |
| | | waddresses1.add("DB100.0"); |
| | | waddresses1.add("DB100.2"); |
| | | waddresses1.add("DB100.4"); |
| | | waddresses1.add("DB100.6"); |
| | | waddresses1.add("DB100.26"); |
| | | waddresses1.add("DB100.28"); |
| | | waddresses1.add("DB100.30"); |
| | | waddresses1.add("DB100.32"); |
| | | waddresses1.add("DB100.34"); |
| | | waddresses1.add("DB100.36"); |
| | | waddresses1.add("DB100.38"); |
| | | waddresses1.add("DB100.40"); |
| | | |
| | | String addressList2 = "DB100.8"; |
| | | String addressList3 = "DB100.12"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | // System.out.println("lastMessage:" + lastMessage); |
| | | JSONArray messageArray = new JSONArray(lastMessage); |
| | | |
| | | // 整合第 1 到 3 个数组并去掉 null 元素 |
| | | List<Short> mergedList = new ArrayList<>(); |
| | | for (int i = 0; i < 3; i++) { |
| | | JSONArray sublist = messageArray.getJSONArray(i); |
| | | for (int j = 0; j < sublist.size(); j++) { |
| | | Object value = sublist.get(j); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | mergedList.add(sValue); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 写入第一个地址 |
| | | if (messageArray.getJSONArray(3).size() > 0) { |
| | | Object value = messageArray.getJSONArray(3).get(0); |
| | | if (value != null && !value.toString().equals("null")) { |
| | | try { |
| | | String cleanedValue = value.toString().replaceAll("[^0-9-]", ""); |
| | | short sValue = Short.parseShort(cleanedValue.trim()); |
| | | S7control.getinstance().WriteWord(addressList2, Arrays.asList(sValue)); |
| | | System.out |
| | | .println("messageValue:" + Arrays.asList(sValue) + " written to PLC at address " + addressList2); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | System.err.println("Could not parse value: " + value); |
| | | // 写入第一个地址 |
| | | if (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 " + addressList2); |
| | | } 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(addressList3, 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(addressList3, 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 (!mergedList.isEmpty()) { |
| | | S7control.getinstance().WriteWord(waddresses1, mergedList); |
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + waddresses1); |
| | | } |
| | | |
| | | // 清空消息列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | } |
| | | |
| | | // 写入第三个地址 |
| | | if (!mergedList.isEmpty()) { |
| | | S7control.getinstance().WriteWord(waddresses1, mergedList); |
| | | System.out.println("messageValue:" + mergedList + " written to PLC at address " + waddresses1); |
| | | } |
| | | |
| | | // 清空消息列表 |
| | | webSocketServer.clearMessages(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class); |
| | | // id |
| | | List<String> addressList1 = Arrays.asList(config.getProperty("Parameter2.id").split(",")); |
| | | |
| | | List<String> paramlist = S7control.getinstance().readStrings(addressList1); |
| | | // System.out.println(paramlist); |
| | | |
| | | //手动状态 |
| | | List<String> addresses = Arrays.asList(config.getProperty("Parameter2.state").split(",")); |
| | | |
| | | List<Short> data = S7control.getinstance().readWords(addresses); |
| | | |
| | | |
| | | //清除id |
| | | List<String> addressList0 = Arrays.asList(config.getProperty("Parameter2.cleanid").split(",")); |
| | | |
| | | |
| | | // 扫码枪 |
| | | List<Boolean> data2 = S7control.getinstance().readBits(addressList0); |
| | | List<String> addressList3 = Arrays.asList(config.getProperty("Parameter2.scanner").split(",")); |
| | |
| | | List<String> timeout = Arrays.asList(config.getProperty("Parameter2.timeout").split(",")); |
| | | String timeout2 = config.getProperty("Parameter2.timeout"); |
| | | |
| | | |
| | | Long readtimeout = S7control.getinstance().readtime(timeout2); |
| | | List<Boolean> anniuread = S7control.getinstance().readBits(niuanaddressList3); |
| | | |
| | | |
| | | List<String> data3 = S7control.getinstance().readStrings(addressList3); |
| | | // A01 A02 B01 B02 |
| | | |
| | | List<String> addresses4 = Arrays.asList(config.getProperty("Parameter2.Currentcell").split(",")); |
| | | |
| | | |
| | | List<Short> data4 = S7control.getinstance().readWords(addresses4); |
| | | //System.out.println(data); |
| | | // List<Long> TIME2 = Collections.singletonList(S7control.getinstance().readtime("DB100.194")); |
New file |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.example.springboot.service.StorageCageService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.FileReader; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | | import com.example.springboot.entity.device.PlcParameterInfo; |
| | | import org.springframework.core.io.ResourceLoader; |
| | | |
| | | |
| | | public class PlcParameter2Review extends Thread { |
| | | |
| | | @Autowired |
| | | |
| | | StorageCageService storageCageService; |
| | | private ResourceLoader resourceLoader; |
| | | private volatile static PlcParameter2Review instance = null; |
| | | |
| | | private PlcParameter2Review() { |
| | | init(); |
| | | } |
| | | |
| | | // 单例模式 线程安全 |
| | | public static PlcParameter2Review getInstance() { |
| | | if (instance == null) { |
| | | synchronized (PlcParameter1Review.class) { |
| | | if (instance == null) { |
| | | instance = new PlcParameter2Review(); |
| | | } |
| | | } |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | PlcParameterObject plcParameterObject = new PlcParameterObject();//该DB区数据实例 |
| | | |
| | | private void init() { |
| | | try { |
| | | String jsonfilename = PlcParameter1Review.class.getResource("/JsonFile/PlcParameter.json").getFile(); |
| | | FileReader fileReader = new FileReader(jsonfilename); |
| | | BufferedReader bufferedReader = new BufferedReader(fileReader); |
| | | |
| | | StringBuilder content = new StringBuilder(); |
| | | String line; |
| | | |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | content.append(line); |
| | | } |
| | | |
| | | bufferedReader.close(); |
| | | fileReader.close(); |
| | | |
| | | JSONObject jsonfileobj = new JSONObject(content.toString()); |
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor"); |
| | | plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | |
| | | PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例 |
| | | String codeid = parameterObj.getStr("codeId"); |
| | | plcParameterInfo.setCodeId(codeid); |
| | | plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex"))); |
| | | plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio"))); |
| | | plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght"))); |
| | | plcParameterInfo.setUnit(parameterObj.getStr("unit")); |
| | | plcParameterObject.addPlcParameter(plcParameterInfo); |
| | | } |
| | | System.out.println(""); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class); |
| | | |
| | | byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | plcParameterObject.setPlcParameterList(getplcvlues); |
| | | int index = plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex(); |
| | | S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100); |
| | | |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("conveyorVelocity(AutoFAST)"); |
| | | addresses.add("conveyorVelocity(AutoSLOW)"); |
| | | addresses.add("conveyorVelocity(Manual)"); |
| | | addresses.add("A01A02TURNJOGVelocity"); |
| | | addresses.add("A01A02TRAVELJOGVelocity"); |
| | | // id |
| | | // List<String> addressList1 = Arrays.asList(config.getProperty("Parameter2.id").split(",")); |
| | | // List<String> paramlist = S7control.getinstance().readStrings(addressList1); |
| | | // // System.out.println(paramlist); |
| | | // //手动状态 |
| | | // List<String> addresses = Arrays.asList(config.getProperty("Parameter2.state").split(",")); |
| | | // List<Short> data = S7control.getinstance().readWords(addresses); |
| | | // //清除id |
| | | // List<String> addressList0 = Arrays.asList(config.getProperty("Parameter2.cleanid").split(",")); |
| | | // // 扫码枪 |
| | | // List<Boolean> data2 = S7control.getinstance().readBits(addressList0); |
| | | // List<String> addressList3 = Arrays.asList(config.getProperty("Parameter2.scanner").split(",")); |
| | | // |
| | | ////急停按钮 |
| | | // List<String> niuanaddressList3 = Arrays.asList(config.getProperty("Parameter2.stop").split(",")); |
| | | // List<String> timeout = Arrays.asList(config.getProperty("Parameter2.timeout").split(",")); |
| | | // String timeout2 = config.getProperty("Parameter2.timeout"); |
| | | // |
| | | // Long readtimeout = S7control.getinstance().readtime(timeout2); |
| | | // List<Boolean> anniuread = S7control.getinstance().readBits(niuanaddressList3); |
| | | // List<String> data3 = S7control.getinstance().readStrings(addressList3); |
| | | //// A01 A02 B01 B02 |
| | | // List<String> addresses4 = Arrays.asList(config.getProperty("Parameter2.Currentcell").split(",")); |
| | | // List<Short> data4 = S7control.getinstance().readWords(addresses4); |
| | | //System.out.println(data); |
| | | |
| | | |
| | | |
| | | // |
| | | |
| | | |
| | | // |
| | | // String[] values6 = { ".x1 ","x2 ","x3",";;x4","x5","x6","x7","x8","x9","x10","x11"}; |
| | | // List<String> paramlist = new ArrayList<>(Arrays.asList(values6)); |
| | | // Short[] values1 = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
| | | // List<Short> data = new ArrayList<>(Arrays.asList(values1)); |
| | | // Boolean[] value4 = { false, false, false, false, false, false, false, false, false, |
| | | // false}; |
| | | // List<Boolean> data2 = new ArrayList<>(Arrays.asList(value4)); |
| | | // String[] values3 = { ".x11 ","x21 "}; |
| | | // List<String> 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[data2.size()]; |
| | | // for (int i = 0; i < data2.size(); i++) { |
| | | // boolean value = data2.get(i); |
| | | // params[i] = value ? (short) 1 : (short) 0; |
| | | // } |
| | | //// |
| | | // short[] anniuparams = new short[anniuread.size()]; |
| | | // for (int i = 0; i < anniuread.size(); i++) { |
| | | // boolean value = anniuread.get(i); |
| | | // anniuparams[i] = value ? (short) 1 : (short) 0; |
| | | // } |
| | | //boolean转为0 1 |
| | | // short[] params = customS7Control.convertBooleanListToShortArray(data2); |
| | | // short[] anniuparams = customS7Control.convertBooleanListToShortArray(anniuread); |
| | | // JSONObject jsonObject = new JSONObject(); |
| | | // jsonObject.append("params", params); |
| | | // jsonObject.append("params", paramlist); |
| | | // jsonObject.append("params", data); |
| | | // jsonObject.append("params", data3); |
| | | // jsonObject.append("params", data4); |
| | | // jsonObject.append("jiting", anniuparams); |
| | | // jsonObject.append("timeout", readtimeout); |
| | | |
| | | |
| | | // WebSocketServer sendwServer = WebSocketServer.getWebSocketServer("Parameter2"); |
| | | // if (sendwServer != null) { |
| | | // JSONObject jsonObject = new JSONObject(); |
| | | // jsonObject.set("message", "Hello, Parameter2!"); |
| | | // sendwServer.sendMessage(jsonObject.toString()); |
| | | // } |
| | | // HomeController controller = new HomeController(); |
| | | // ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Parameter2"); |
| | | // if (sendwServer != null) { |
| | | // for (WebSocketServer webserver : sendwServer) { |
| | | // |
| | | // webserver.sendMessage(jsonObject.toString()); |
| | | // |
| | | // |
| | | // if (webserver != null) { |
| | | // |
| | | // List<String> messages = webserver.getMessages(); |
| | | // |
| | | // if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | // String lastMessage = messages.get(messages.size() - 1); |
| | | //// System.out.println("lastMessage:" + lastMessage); |
| | | // JSONArray messageArray = new JSONArray(lastMessage); |
| | | // //清除ID |
| | | // // customS7Control.writeBitToPLC(messageArray, addressList0, 0); |
| | | // |
| | | // |
| | | // try { |
| | | // // 检查索引是否有效 |
| | | // if (messageArray.getJSONArray(0).size() > 0) { |
| | | // // 获取消息数组 |
| | | // JSONArray jsonArray = messageArray.getJSONArray(0); |
| | | // // 创建一个布尔值列表 |
| | | // List<Boolean> 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-]", ""); |
| | | // // 解析为布尔值 |
| | | // boolean val = "1".equals(cleanedValue.trim()); |
| | | // // 将布尔值添加到布尔值列表中 |
| | | // sValue.add(val); |
| | | // System.out.println("messageValue: " + Arrays.asList(val) + " added to the list"); |
| | | // |
| | | // |
| | | // } catch (NumberFormatException e) { |
| | | // // 如果无法解析为 boolean 类型,则忽略该部分 |
| | | // System.err.println("Could not parse value: " + value); |
| | | // } |
| | | // } |
| | | // } |
| | | ////完成出片 |
| | | // boolean containsOne = data.stream().anyMatch(number -> number == 1); |
| | | // for (int i = 1; i <= 5; i++) { |
| | | // boolean value = sValue.get(i); |
| | | // String id = paramlist.get(i); |
| | | // //判断是否自动状态 |
| | | // if (!containsOne) { |
| | | // //判断id是否包含数字 |
| | | // if (id.matches(".*\\d.*")) { |
| | | // //判断清楚id是否true |
| | | // if (value) { |
| | | // System.out.println(id); |
| | | // switch (i) { |
| | | // case 1: |
| | | // storageCageService.UpdateTask(2, 0, paramlist.get(i)); |
| | | // break; |
| | | // case 2: |
| | | // case 3: |
| | | // case 4: |
| | | // case 5: |
| | | // storageCageService.UpdateTask(3, 0, paramlist.get(i)); |
| | | // break; |
| | | // default: |
| | | // // 处理索引值不在范围内的情况 |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | // // 检查布尔值列表是否为空 |
| | | // if (!sValue.isEmpty()) { |
| | | // |
| | | // // 调用 S7control.getinstance().WriteBit 方法将布尔值列表写入地址列表 |
| | | // S7control.getinstance().WriteBit(addressList0, sValue); |
| | | // System.out.println("Values " + sValue + " written to PLC at address " + addressList0); |
| | | // } |
| | | // } |
| | | // } |
| | | // } catch (Exception e) { |
| | | // System.err.println("An error occurred while writing bit to PLC: " + e.getMessage()); |
| | | // } |
| | | // |
| | | // |
| | | // //急停 |
| | | //// customS7Control.writeBitToPLC(messageArray, niuanaddressList3, 1); |
| | | // |
| | | // try { |
| | | // // 检查索引是否有效 |
| | | // if (messageArray.getJSONArray(1).size() > 0) { |
| | | // // 获取消息数组 |
| | | // JSONArray jsonArray = messageArray.getJSONArray(1); |
| | | // // 创建一个布尔值列表 |
| | | // List<Boolean> 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-]", ""); |
| | | // // 解析为布尔值 |
| | | // boolean val = "1".equals(cleanedValue.trim()); |
| | | // // 将布尔值添加到布尔值列表中 |
| | | // sValue.add(val); |
| | | // System.out.println("messageValue: " + Arrays.asList(val) + " added to the list"); |
| | | // |
| | | // |
| | | // } catch (NumberFormatException e) { |
| | | // // 如果无法解析为 boolean 类型,则忽略该部分 |
| | | // System.err.println("Could not parse value: " + value); |
| | | // } |
| | | // } |
| | | // } |
| | | //// 终止进片任务 |
| | | // boolean Value1 = sValue.get(0); |
| | | // boolean Value2 = sValue.get(1); |
| | | // |
| | | // if (Value1) { |
| | | // storageCageService.EndTask(0); |
| | | // |
| | | // } |
| | | // if (Value2) { |
| | | // storageCageService.EndTask(1); |
| | | // |
| | | // } |
| | | // // 检查布尔值列表是否为空 |
| | | // if (!sValue.isEmpty()) { |
| | | // |
| | | // // 调用 S7control.getinstance().WriteBit 方法将布尔值列表写入地址列表 |
| | | // S7control.getinstance().WriteBit(niuanaddressList3, sValue); |
| | | // System.out.println("Values " + sValue + " written to PLC at address " + niuanaddressList3); |
| | | // } |
| | | // } |
| | | // } catch (Exception e) { |
| | | // System.err.println("An error occurred while writing bit to PLC: " + e.getMessage()); |
| | | // } |
| | | // |
| | | // |
| | | // //存片等待延迟 |
| | | // customS7Control.Writetime(messageArray, timeout2, 2); |
| | | // |
| | | // |
| | | // // 清空消息列表 |
| | | // webserver.clearMessages(); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | // System.out.println(PlcAddress); |
| | | |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount); |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 64); |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 112); |
| | | |
| | | // Boolean[] values = { true, true, true, true, true, false, true, false, |
| | | // true, false, true, false, true, false, |
| | |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | PlcBitObject plcBitObject = new PlcBitObject();//该DB区数据实例 |
| | | |
| | | private void init() { |
| | | private void init() { |
| | | try { |
| | | String jsonfilename= PlcsignReview.class.getResource("/JsonFile/PlcSign.json").getFile(); |
| | | String jsonfilename = PlcsignReview.class.getResource("/JsonFile/PlcSign.json").getFile(); |
| | | FileReader fileReader = new FileReader(jsonfilename); |
| | | BufferedReader bufferedReader = new BufferedReader(fileReader); |
| | | |
| | |
| | | content.append(line); |
| | | } |
| | | |
| | | bufferedReader.close(); |
| | | bufferedReader.close(); |
| | | fileReader.close(); |
| | | |
| | | |
| | | JSONObject jsonfileobj = new JSONObject(content.toString()); |
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor"); |
| | | plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | |
| | | PlcBitInfo plcBitInfo = new PlcBitInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例 |
| | | String codeid=parameterObj.getStr("codeId"); |
| | | String codeid = parameterObj.getStr("codeId"); |
| | | plcBitInfo.setCodeId(codeid); |
| | | plcBitInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex"))); |
| | | |
| | | |
| | | plcBitObject.addPlcBit(plcBitInfo); |
| | | } |
| | | } |
| | | System.out.println(""); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void run() { |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | List<Boolean> getplcbits=S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(),plcBitObject.getPlcAddressLength()); |
| | | List<Boolean> getplcbits = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | plcBitObject.setPlcBitList(getplcbits); |
| | | // this.readValue(); |
| | | // String PlcAddress = this.name; |
| | |
| | | // System.out.println(PlcAddress); |
| | | |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount); |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 64); |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 64); |
| | | |
| | | // Boolean[] values = { true, true, true, true, true, false, true, false, |
| | | // true, false, true, false, true, false, |
| | |
| | | } |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sig", Intlist); |
| | | WebSocketServer sendwServer3 = WebSocketServer.sessionMap.get("Sign"); |
| | | if (sendwServer3 != null) { |
| | | sendwServer3.sendMessage(jsonObject.toString()); |
| | | } |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Parameter1"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | |
| | | |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | @Select("select ifnull(max(sequence),0)+1 from out_slice ") |
| | | Short SelectMaxSquence(); |
| | | //查询用户权限 |
| | | @Select("select rp.* from role_permission rp inner join user r on rp.role_id=r.role_id and r.username=#{username} and (permission_id=32 or permission_id=33 or permission_id=34 or permission_id=35)") |
| | | @Select("select rp.* from role_permission rp inner join user r on rp.role_id=r.role_id and r.username=#{username} and (permission_id=32 or permission_id=33 or permission_id=34 or permission_id=35 or permission_id=36)") |
| | | List<RolePermission> SelectPermissionByUserName(String username); |
| | | |
| | | //根据玻璃完成出片任务 |
| | |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "conveyorVelocity(AutoSLOW)", |
| | | "addressIndex":"6", |
| | | "codeId": "conveyorVelocity(AutoFAST)", |
| | | "addressIndex":"2", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "conveyorVelocity(Manual)", |
| | | "codeId": "conveyorVelocity(AutoSLOW)", |
| | | "addressIndex":"4", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "A01A02TURNJOGVelocity", |
| | | "codeId": "conveyorVelocity(Manual)", |
| | | "addressIndex":"6", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "A01A02TRAVELJOGVelocity", |
| | | "codeId": "A01A02TURNJOGVelocity", |
| | | "addressIndex":"8", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "B01B02TRAVELJOGVelocity", |
| | | "codeId": "A01A02TRAVELJOGVelocity", |
| | | "addressIndex":"10", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "A01A02TURNPOSVelocityAUTO", |
| | | "codeId": "B01B02TRAVELJOGVelocity", |
| | | "addressIndex":"12", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "A01A02TURNPOSVelocitymanual", |
| | | "codeId": "A01A02TURNPOSVelocityAUTO", |
| | | "addressIndex":"14", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "A01A02TRAVELPOSVelocityAUTO", |
| | | "codeId": "A01TURNPOSVelocitymanual", |
| | | "addressIndex":"16", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "DO1id", |
| | | "codeId": "A01A02TRAVELPOSVelocityAUTO", |
| | | "addressIndex":"18", |
| | | "addressLenght":"14", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | } |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "A01TRAVELPOSVelocitymanual", |
| | | "addressIndex":"20", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "B01B02TRAVELPOSVelocityAUTO", |
| | | "addressIndex":"22", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "B01TRAVELPOSVelocitymanual", |
| | | "addressIndex":"24", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "A01A02conveyorVelocity(Max)", |
| | | "addressIndex":"26", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "A01A02conveyorVelocity(AutoFAST)", |
| | | "addressIndex":"28", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "A01A02conveyorVelocity(AutoSLOW)", |
| | | "addressIndex":"30", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "B01B02conveyorVelocity(Manual)", |
| | | "addressIndex":"32", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "B01B02conveyorVelocity(Max)", |
| | | "addressIndex":"34", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "B01B02conveyorVelocity(AutoFAST)", |
| | | "addressIndex":"36", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "B01B02conveyorVelocity(AutoSLOW)", |
| | | "addressIndex":"38", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "B01B02conveyorVelocity(Manual)", |
| | | "addressIndex":"40", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "gridspacing", |
| | | "addressIndex":"42", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A01Spliceaddresssetting", |
| | | "addressIndex":"44", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A02Spliceaddresssetting", |
| | | "addressIndex":"46", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A011#gridaddress", |
| | | "addressIndex":"48", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0122#gridaddress", |
| | | "addressIndex":"50", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0143#gridaddress", |
| | | "addressIndex":"52", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0164#gridaddress", |
| | | "addressIndex":"54", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0185#gridaddress", |
| | | "addressIndex":"56", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A01106#gridaddress", |
| | | "addressIndex":"58", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A01127#gridaddress", |
| | | "addressIndex":"60", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A01148#gridaddress", |
| | | "addressIndex":"62", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A01169#gridaddress", |
| | | "addressIndex":"64", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A01190#gridaddress", |
| | | "addressIndex":"66", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A021#gridaddress", |
| | | "addressIndex":"68", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0222#gridaddress", |
| | | "addressIndex":"70", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0243#gridaddress", |
| | | "addressIndex":"72", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0264#gridaddress", |
| | | "addressIndex":"74", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0285#gridaddress", |
| | | "addressIndex":"76", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A02106#gridaddress", |
| | | "addressIndex":"78", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A02127#gridaddress", |
| | | "addressIndex":"80", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A02148#gridaddress", |
| | | "addressIndex":"82", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A02169#gridaddress", |
| | | "addressIndex":"84", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A02190#gridaddress", |
| | | "addressIndex":"86", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "B011#gridaddress", |
| | | "addressIndex":"88", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "B0122#gridaddress", |
| | | "addressIndex":"90", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "B0143#gridaddress", |
| | | "addressIndex":"92", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "B0164#gridaddress", |
| | | "addressIndex":"94", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0243#gridaddress", |
| | | "addressIndex":"96", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0243#gridaddress", |
| | | "addressIndex":"98", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0243#gridaddress", |
| | | "addressIndex":"100", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0243#gridaddress", |
| | | "addressIndex":"102", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0243#gridaddress", |
| | | "addressIndex":"104", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | }, |
| | | { |
| | | "codeId": "A0243#gridaddress", |
| | | "addressIndex":"106", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm" |
| | | } |
| | | |
| | | ] |
| | | } |
| | |
| | | #扫码枪
|
| | | Parameter2.scanner=DB103.256,DB103.270
|
| | | #急停
|
| | | Parameter2.stop=DB101.10.4,DB101.11.2
|
| | | Parameter2.stop=DB101.10.4,DB101.11.2,DB101.DBX11.3
|
| | |
|
| | | Parameter2.timeout=DB100.194
|
| | | #当前格子
|