添加plc连接不上时报警,主界面后端推送数据超时提示
| | |
| | | {
|
| | | "Clear":"Clear",
|
| | | "ip":"localhost",
|
| | | "Mes Connection failed":"Mes Connection failed",
|
| | | "Plc1 Connection failed":"Plc1 Connection failed",
|
| | | "Plc2 Connection failed":"Plc2 Connection failed",
|
| | | "Remaining width:":"Remaining width:",
|
| | | "systemTitle": "Login System",
|
| | | "usernamePlaceholder": "Please enter username",
|
| | |
| | | {
|
| | | "Clear":"清除",
|
| | | "ip":"localhost",
|
| | | "Mes Connection failed":"Mes连接失败",
|
| | | "Plc1 Connection failed":"Plc1连接失败",
|
| | | "Plc2 Connection failed":"Plc2连接失败",
|
| | | "Remaining width:":"剩余宽度:",
|
| | | "systemTitle": "登录系统",
|
| | | "usernamePlaceholder": "请输入用户名",
|
| | |
| | | height: 15px;
|
| | | position: absolute;
|
| | | }
|
| | |
|
| | | </style>
|
| | | <template>
|
| | | <el-container>
|
| | |
| | | <div class="box" @click="dialogFormVisible2 = true">
|
| | | <div class="text">
|
| | | <!-- Alarm: -->
|
| | | {{ this.text }}
|
| | | {{ this.text }}{{this.plc1}}{{this.plc2}}
|
| | | <label v-for="item in this.alarm" :key="item['id']">
|
| | | {{ item['content'] }}
|
| | | </label>
|
| | |
| | | count2: 1,
|
| | | loadname: "",
|
| | | form6state:0,
|
| | | StateColor:"green"
|
| | | StateColor:"green",
|
| | | plc1:"",
|
| | | plc2:""
|
| | | };
|
| | | },
|
| | | created() {
|
| | | this.load();
|
| | | // setInterval(() => {
|
| | | // if(this.count1<this.count2){
|
| | | // this.count1=this.count2;
|
| | | // }else{
|
| | | // const now = new Date();
|
| | | // console.log(now);
|
| | | // alert("websocket停止"+now);
|
| | | // }
|
| | | // }, 3000);
|
| | | setInterval(() => {
|
| | | if(this.count1<this.count2){
|
| | | this.count1=this.count2;
|
| | | }else{
|
| | | const now = new Date();
|
| | | console.log(this.count1,this.count2);
|
| | | alert(this.$t('Mes Connection failed')+now);
|
| | | }
|
| | | }, 30000);
|
| | | },
|
| | | activated() {
|
| | | this.init();
|
| | |
| | | // this.car1 = 210 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
|
| | | // this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
|
| | | }
|
| | | if (obj.Plc1 != null) {
|
| | | this.plc1=this.$t('Plc1 Connection failed');
|
| | | }
|
| | | if (obj.Plc2 != null) {
|
| | | this.plc2=this.$t('Plc2 Connection failed');
|
| | | }
|
| | |
|
| | | this.tableData = obj.tableData[0];
|
| | | this.cagelist1 = obj.cagelist1[0];
|
| | |
| | | // String E01id = new String( S7controlLK.getinstance().ReadByte("DB17.0",16));
|
| | | // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14));
|
| | |
|
| | | if (S7control.getinstance().CheckConnected() == true) {
|
| | |
|
| | | // 铝框线交互
|
| | | if (S7controlLK.getinstance().CheckConnected() == true) {
|
| | | // E02玻璃id
|
| | |
| | | // log.info("frameno:" + E01id);
|
| | | List<Short> liststates = S7controlLK.getinstance().ReadWord("DB17.38", 1);
|
| | | // log.info("frameflip:" + liststates);
|
| | | }else{
|
| | | jsonObject.append("Plc2", false);
|
| | | }
|
| | |
|
| | | if (S7control.getinstance().CheckConnected() == true) {
|
| | |
|
| | | |
| | |
|
| | | // 获取当前扫码方式
|
| | | List<Boolean> Scanningmethods = S7control.getinstance().ReadBits("DB101.11.4", 1);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | }else{
|
| | | jsonObject.append("Plc1", false);
|
| | | }
|
| | | jsonObject.append("zhi", zhi);
|
| | |
|