Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes
# Conflicts:
# Albania_Mes-ui/src/views/home/index.vue
| | |
| | | "Clear":"Clear", |
| | | |
| | | |
| | | "ip":"localhost", |
| | | "ip":"192.168.10.97", |
| | | "systemTitle": "Login System", |
| | | "usernamePlaceholder": "Please enter username", |
| | | "passwordPlaceholder": "Please enter password", |
| | |
| | | "Thickness":"厚度", |
| | | "Clear":"清除", |
| | | |
| | | "ip":"localhost", |
| | | "ip":"192.168.10.97", |
| | | "systemTitle": "登录系统", |
| | | "usernamePlaceholder": "请输入用户名", |
| | | "passwordPlaceholder": "请输入密码", |
| | |
| | | }, |
| | | methods: { |
| | | showdata () { |
| | | console.log(1111); |
| | | console.log(this.jsonData.sign[0].name); |
| | | // console.log(this.record.xyData); |
| | | |
| | | }, |
| | |
| | | this.record.params[0] = obj.sig[0]; |
| | | |
| | | this.record.xyData = this.jsonData.sign; |
| | | console.log(this.jsonData.sign) |
| | | for (let a = 0; a < this.record.xyData.length; a++) { |
| | | this.record.xyData[a].value = this.record.params[0][a]; |
| | | |
| | |
| | | //语言转换 |
| | | replaceChineseWithEnglish () { |
| | | |
| | | const translation = this.$t('Signlang'); |
| | | // const translation = this.$t('Signlang'); |
| | | |
| | | if (translation != null) { |
| | | this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value,unit:item.unit }; }); |
| | | //console.log(translation); |
| | | } |
| | | // if (translation != null) { |
| | | // this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value,unit:item.unit }; }); |
| | | // //console.log(translation); |
| | | // } |
| | | |
| | | } |
| | | } |
| | |
| | | <!--显示--> |
| | | <div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;float: left;"> |
| | | <!--玻璃图 #81b337--> |
| | | <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:'+((1000-(this.LastQueue.glasswidth / 25 * 7))/2)+'px auto;'+ |
| | | 'width:'+ (this.LastQueue.glasswidth / 25 * 7) + 'px;'+ |
| | | 'height:'+ (this.LastQueue.glassheight / 25 * 7) + 'px;'+ |
| | | 'line-height: '+ (this.LastQueue.glassheight / 25 * 7) + 'px;'+ |
| | | 'background-color: '+ (this.LastQueue.state>0?'#4CCCE4':(this.LastQueue.state==0?'#E4CA4C':'#E4CA4C'))+ |
| | | ';text-align: center;'"> |
| | | {{ this.LastQueue.glasswidth!=null?(this.LastQueue.glasswidth+"*"+this.LastQueue.glassheight):"" }} |
| | | <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:'+((720-(this.LastQueue.glassheight / 25 * 7))/2)+'px auto;width:' |
| | | + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: ' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px; background-color: ' |
| | | + (this.LastQueue.state>0?'#4CCCE4':(this.LastQueue.state==0?'#E4CA4C':'#E4CA4C'))+';text-align: center;'"> |
| | | {{ (this.LastQueue.glasswidth+this.LastQueue.glassheight)!=0?(this.LastQueue.glasswidth+"*"+this.LastQueue.glassheight):"" }} |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import org.apache.commons.io.FileUtils; |
| | | |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | public class PlcAlbaniaServo extends Thread { |
| | | private Configuration config; |
| | | |
| | | public PlcAlbaniaServo() throws IOException { |
| | | public PlcAlbaniaServo() throws IOException { |
| | | config = new Configuration("config.properties"); |
| | | } |
| | | |
| | |
| | | // 根据地址读取PCL数据 |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB15.0.0", Plccount); |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount); |
| | | System.out.println(plclist); |
| | | // 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, |
| | |
| | | alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class); |
| | | for (short i = 0; i < array1.length; i++) { |
| | | // 查询对应报警信息结束时间为null的条数 |
| | | if(i==48){ |
| | | short result = alarmMapper.selectnullti(array1[i]); |
| | | System.out.println(result+"-"+array1[i]); |
| | | } |
| | | short result = alarmMapper.selectnullti(array1[i]); |
| | | // 读取到PLC的值为1并且对应报警信息结束时间为null的条数的条数为0 |
| | | //System.out.println(result); |
| | |
| | | |
| | | // 用于存储应用程序的配置信息 |
| | | private Configuration config; |
| | | |
| | | public Plcsign() throws IOException { |
| | | config = new Configuration("config.properties"); |
| | | } |
| | | |
| | | String name = ""; |
| | | Integer count = 0; |
| | | |
| | |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | Thread.sleep(100); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // this.readValue(); |
| | | // String PlcAddress = this.name; |
| | | // Integer Plccount = this.count; |
| | | // System.out.println(PlcAddress); |
| | | |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount); |
| | | // List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 112); |
| | | List<String> addressList21 = Arrays.asList(config.getProperty("PlcIO.State").split(",")); |
| | | List<Boolean> plclist = S7control.getinstance().readBits(addressList21); |
| | | List<String> addressListName = Arrays.asList(config.getProperty("PlcIO.Name").split(",")); |
| | | |
| | | // Boolean[] values = { true, true, true, true, true, false, true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, true, false, true, false, |
| | | // true, false, true, false, true, |
| | | // false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, null, |
| | | // true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, }; |
| | | // List<Boolean> plclist = new ArrayList<>(Arrays.asList(values)); |
| | | |
| | | // System.out.println("急停"+S7control.getinstance().ReadBits("DB10.0.5", 1)); |
| | | |
| | | if (plclist != null) { |
| | | // 将获取的布尔类型转换为整数类型 |
| | | List<Integer> Intlist = new ArrayList<>(); |
| | |
| | | // |
| | | System.out.println("启动完成"); |
| | | |
| | | // new Plcalarm().start(); |
| | | // new PLCAutoMes().start(); |
| | | // new PlcHoldNew().start(); |
| | | new Plchome().start(); |
| | | // new PlcAlbaniaServo().start(); |
| | | // new Plcsign().start(); |
| | | new Plcalarm().start(); |
| | | new PLCAutoMes().start(); |
| | | new PlcHoldNew().start(); |
| | | new Plchome().start(); |
| | | new PlcAlbaniaServo().start(); |
| | | new Plcsign().start(); |
| | | |
| | | |
| | | } |
| | |
| | | #\u6570\u636E\u5E93\u9A71\u52A8 |
| | | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver |
| | | #\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740 |
| | | #spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai |
| | | spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai |
| | | spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai |
| | | #spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai |
| | | #\u6570\u636E\u5E93\u7528\u6237\u540D |
| | | spring.datasource.username=root |
| | | #\u6570\u636E\u5E93\u7528\u6237\u5BC6\u7801 |
| | |
| | | |
| | | #IO状态 |
| | | PlcIO.State=DB10.2.1,DB10.2.2,DB10.2.5,DB10.10.6,DB10.11.1,DB10.11.2,DB10.11.3,DB10.11.4,DB10.11.5,DB10.11.6,DB10.12.1,DB10.12.3,DB10.10.0,DB10.10.2,DB10.10.3,DB10.10.5,DB10.26.6,DB10.30.4,DB10.33.0,DB10.30.5,DB10.33.1,DB10.30.0,DB10.30.1,DB10.30.2,DB10.30.3,DB10.32.4,DB10.32.5,DB10.32.6,DB10.32.7,DB10.32.0,DB10.32.1,DB10.32.2,DB10.32.3,DB10.27.7,DB10.24.6,DB10.38.4,DB10.41.0,DB10.38.5,DB10.41.1,DB10.35.7,DB10.38.0,DB10.38.1,DB10.38.2,DB10.38.3,DB10.40.4,DB10.40.5,DB10.40.6,DB10.40.7,DB10.40.0,DB10.40.1,DB10.40.2,DB10.40.3,DB10.0.0,DB10.0.1,DB10.0.5,DB10.0.2,DB10.0.7,DB10.0.3,DB10.28.0,DB10.36.0,DB10.1.0,DB10.18.2,DB10.18.4,DB10.19.7,DB10.18.3,DB10.18.5,DB10.20.0,DB10.18.6,DB10.19.5,DB10.19.6 |
| | | PLCIO.Name=A01Sr.Low-E,A01Sr.dec,A01Sr.Pos,A02Sr.YZero,A02Sr.YH1,A02Sr.YH2,A02Sr.YH3,A02Sr.YH4,A02Sr.LimitTop,A02Sr.LimiBottom,A02Sr.Check,A02Sr.YDec,A02Sr.Xin,A02Sr.XCheck,A02Sr.XDec,A02Sr.XPos,C01Sr.Zero,C01YV1.Bas1,C01YV1.Work1,C01.YV1.Bas2,C01.YV1.Work2,C01.YV2.Bas1,C01.YV2.Bas2,C01.YV2.Bas3,C01.YV2.Bas4,C01.YV2.Work1,C01.YV2.Work2,C01.YV2.Work3,C01.YV2.Work4,C01.YV.Blow1,C01.YV.Blow2,C01.YV.Blow3,C01.YV.Blow4,C01.SR.Limit1,C02.Sr.Zero,C02.YV1.Bas1,C02.YV1.Work1,C02.YV1.Bas2,C02.YV1.Work2,C02.Sr.limit1,C02.YV2.Bas1,C02.YV2.Bas2,C02.YV2.Bas3,C02.YV2.Bas4,C02.YV2.Work1,C02.YV2.Work2,C02.YV2.Work3,C02.YV2.Work4,C02.YV.Blow1,C02.YV.Blow2,C02.YV.Blow3,C02.YV.Blow4,bStart,bStop,bEstop,bReset,bAuto/Manual,bPause,C01.Sr.Limit2,C02.Sr.Limit2,A01.FootControl,B01.Sr.DecLeft,B01.Sr.PosLeft,B01.Sr.SafetyLeft,B01.Sr.DecRight,B01.Sr.PosRight,B01.Sr.SafetyRight,B01.Sr.TurnZero,B01.Sr.TurnLimitTop,B01.Sr.TurnLimitBottom |
| | | PlcIO.Name=A01Sr.Low-E,A01Sr.dec,A01Sr.Pos,A02Sr.YZero,A02Sr.YH1,A02Sr.YH2,A02Sr.YH3,A02Sr.YH4,A02Sr.LimitTop,A02Sr.LimiBottom,A02Sr.Check,A02Sr.YDec,A02Sr.Xin,A02Sr.XCheck,A02Sr.XDec,A02Sr.XPos,C01Sr.Zero,C01YV1.Bas1,C01YV1.Work1,C01.YV1.Bas2,C01.YV1.Work2,C01.YV2.Bas1,C01.YV2.Bas2,C01.YV2.Bas3,C01.YV2.Bas4,C01.YV2.Work1,C01.YV2.Work2,C01.YV2.Work3,C01.YV2.Work4,C01.YV.Blow1,C01.YV.Blow2,C01.YV.Blow3,C01.YV.Blow4,C01.SR.Limit1,C02.Sr.Zero,C02.YV1.Bas1,C02.YV1.Work1,C02.YV1.Bas2,C02.YV1.Work2,C02.Sr.limit1,C02.YV2.Bas1,C02.YV2.Bas2,C02.YV2.Bas3,C02.YV2.Bas4,C02.YV2.Work1,C02.YV2.Work2,C02.YV2.Work3,C02.YV2.Work4,C02.YV.Blow1,C02.YV.Blow2,C02.YV.Blow3,C02.YV.Blow4,bStart,bStop,bEstop,bReset,bAuto/Manual,bPause,C01.Sr.Limit2,C02.Sr.Limit2,A01.FootControl,B01.Sr.DecLeft,B01.Sr.PosLeft,B01.Sr.SafetyLeft,B01.Sr.DecRight,B01.Sr.PosRight,B01.Sr.SafetyRight,B01.Sr.TurnZero,B01.Sr.TurnLimitTop,B01.Sr.TurnLimitBottom |
| | | |
| | | #A01参数 |
| | | PlcA01.param=DB10.1664,DB10.1668,DB10.1672,DB10.1676,DB10.1680 |