Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java
# springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
# springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
| | |
| | | public class ExcelToJsonConverter {
|
| | |
|
| | | public static void main(String[] args) {
|
| | | String excelFilePath = "JsonFile/state.xlsx";
|
| | | String excelFilePath = "src/main/resources/JsonFile/alarm.xlsx";
|
| | | String sheetName = "Sheet1";
|
| | | int addressColumnIndex = 0;
|
| | | int nameColumnIndex = 1;
|
| | |
|
| | | int unitColumnIndex = 2;
|
| | | String outputFilePath = "JsonFile/state.json";
|
| | | //int unitColumnIndex = 2;
|
| | | String outputFilePath = "src/main/resources/JsonFile/PlcAlarm.json";
|
| | |
|
| | | try (Workbook workbook = new HSSFWorkbook(new FileInputStream(excelFilePath))) {
|
| | | try (Workbook workbook = new XSSFWorkbook(new FileInputStream(excelFilePath))) {
|
| | | Sheet sheet = workbook.getSheet(sheetName);
|
| | |
|
| | | List<LinkedHashMap<String, Object>> jsonList = new ArrayList<>();
|
| | |
| | | }
|
| | |
|
| | | int plcAddressLength = 0; // 记录所有 addressLenght 的和
|
| | |
|
| | | int addressIndex = 0; // 自增的地址索引
|
| | | while (rowIterator.hasNext()) {
|
| | | Row row = rowIterator.next();
|
| | |
|
| | | Cell nameCell = row.getCell(nameColumnIndex);
|
| | | Cell addressCell = row.getCell(addressColumnIndex);
|
| | | Cell unitCell = row.getCell(unitColumnIndex);
|
| | | // Cell unitCell = row.getCell(unitColumnIndex);
|
| | |
|
| | | String name = nameCell.getStringCellValue();
|
| | | String address = addressCell.getStringCellValue();
|
| | | String unit = unitCell.getStringCellValue();
|
| | | // String unit = unitCell.getStringCellValue();
|
| | |
|
| | | String addressIndex = extractAddressIndex(address);
|
| | | // String addressIndex = extractAddressIndex(address);
|
| | |
|
| | | LinkedHashMap<String, Object> jsonObject = new LinkedHashMap<>();
|
| | | jsonObject.put("codeId", name);
|
| | |
| | | } else {
|
| | | addressLength = 2;
|
| | | }
|
| | | jsonObject.put("addressLenght", String.valueOf(addressLength));
|
| | | // jsonObject.put("addressLenght", String.valueOf(addressLength));
|
| | |
|
| | | jsonObject.put("unit", unit);
|
| | | //jsonObject.put("unit", unit);
|
| | |
|
| | | plcAddressLength += addressLength;
|
| | |
|
| | | jsonList.add(jsonObject);
|
| | | addressIndex++;
|
| | | }
|
| | |
|
| | | LinkedHashMap<String, Object> resultObject = new LinkedHashMap<>();
|
| | | resultObject.put("plcAddressBegin", "DB100.0");
|
| | | resultObject.put("plcAddressLenght", String.valueOf(plcAddressLength));
|
| | | resultObject.put("dataType", "word");
|
| | | // resultObject.put("dataType", "word");
|
| | | resultObject.put("dataType", "bit");
|
| | | resultObject.put("parameteInfor", jsonList);
|
| | |
|
| | | Gson gson = new Gson();
|
| | |
| | | import java.util.List;
|
| | |
|
| | | public class InitUtil {
|
| | | //初始化word
|
| | | public static PlcParameterObject initword(String jsonFilePath) {
|
| | | try {
|
| | | FileReader fileReader = new FileReader(jsonFilePath);
|
| | |
| | | plcParameterObject.addPlcParameter(plcParameterInfo);
|
| | | }
|
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02};
|
| | | |
| | | // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
|
| | | // plcParameterObject.setPlcParameterList(getplcvlues);
|
| | |
|
| | | return plcParameterObject;
|
| | | } catch (IOException e) {
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | |
|
| | | //初始化bit
|
| | | public static PlcBitObject initbit(String jsonFilePath) {
|
| | | PlcBitObject plcBitObject = new PlcBitObject();
|
| | |
|
| | |
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | //Boolean[] values1 = { false, true, true, true, false, false, true, false,
|
| | | // false, true ,true };
|
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1));
|
| | |
|
| | | // List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength());
|
| | | // plcBitObject.setPlcBitList(getplcvlues);
|
| | | return plcBitObject;
|
| | | }
|
| | |
|
| | |
|
| | | //
|
| | | public static void readAndUpdateBitValues(PlcBitObject plcBitObject) {
|
| | |
|
| | | // Boolean[] values1 = { false, true, true, true, false, false, true, false,
|
| | |
| | | // 用于存储应用程序的配置信息 |
| | | private Configuration config; |
| | | private static InitUtil initUtil; |
| | | // public static PlcParameterObject PlcMesObject; |
| | | // public static PlcParameterObject PlcReadObject; |
| | | // public static PlcParameterObject PlcframeObject; |
| | | |
| | | // 创建一个自定义的 S7 控制器消息处理器对象 |
| | | MessageHandler customS7Control = new MessageHandler(); |
| | | |
| | | // 单例实例 |
| | | private static PLCAutoMes instance; |
| | | private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); |
| | | private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); |
| | | private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); |
| | | private static String PlcParameter = PLCAutomaticParameterSettingReview2.class |
| | | .getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json") |
| | | .getPath(); |
| | | private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json") |
| | | .getPath(); |
| | | private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath(); |
| | | private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | |
| | | // 调用initword方法 |
| | | |
| | | public static PlcParameterObject plcParameterObject = initUtil.initword(PlcParameter); |
| | | public static PlcBitObject plcPlcTest = initUtil.initbit(PlcTest); |
| | | public static PlcBitObject plcBitObject = initUtil.initbit(PlcSign); |
| | | public static PlcParameterObject plcStateObject= initUtil.initword(PlcState); |
| | | public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | public static PlcParameterObject PlcMesObject = initUtil.initword(PlcMes); |
| | | public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead); |
| | | public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe); |
| | | |
| | | // 私有构造函数 |
| | | public PLCAutoMes() throws IOException { |
| | |
| | | return instance; |
| | | } |
| | | |
| | | private static String jsonFilePath = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); |
| | | |
| | | private static String jsonFilePath2 = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); |
| | | // 调用initword方法 |
| | | public static PlcParameterObject PlcMesObject = initUtil.initword(jsonFilePath); |
| | | // 调用initbit方法 |
| | | public static PlcParameterObject PlcReadObject = initUtil.initword(jsonFilePath2); |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | Thread.sleep(100); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // String jsonFilePath3 = |
| | | // PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); |
| | | // System.out.println(jsonFilePath); |
| | | |
| | | // // 调用initbit方法 |
| | | // PlcParameterObject PlcframeObject= initUtil.initword(jsonFilePath3); |
| | | PlcParameterObject PlcReadObjects=PlcReadObject; |
| | | // readAndUpdateWordValues(PlcReadObject); |
| | | // readAndUpdateWordValues(PlcMesObject); |
| | | readAndUpdateWordValues(PlcReadObject); |
| | | readAndUpdateWordValues(PlcMesObject); |
| | | readAndUpdateWordValues(PlcframeObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | |
| | | // readAndUpdateWordValues(plcStateObject); |
| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import static com.example.springboot.component.InitUtil.readAndUpdateBitValues; |
| | |
| | | return instance; |
| | | } |
| | | |
| | | String jsonFilePath = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | String jsonFilePath2 = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json").getPath(); |
| | | String jsonFilePath4 = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json").getPath(); |
| | | //System.out.println(jsonFilePath4); |
| | | // 调用initword方法 |
| | | PlcParameterObject plcParameterObject = initUtil.initword(jsonFilePath); |
| | | PlcParameterObject plcStateObject = initUtil.initword(jsonFilePath4); |
| | | |
| | | // 调用initbit方法 |
| | | PlcBitObject plcBitObject = initUtil.initbit(jsonFilePath2); |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | String jsonFilePath = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | String jsonFilePath2 = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json").getPath(); |
| | | String jsonFilePath4 = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json").getPath(); |
| | | //System.out.println(jsonFilePath4); |
| | | |
| | | // int index3 = plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddressIndex(); |
| | | // System.out.println(index3); |
| | | // System.out.println(plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddress(index3)); |
| | | |
| | | |
| | | // 调用initword方法 |
| | | PlcParameterObject plcParameterObject = initUtil.initword(jsonFilePath); |
| | | PlcParameterObject plcStateObject = initUtil.initword(jsonFilePath4); |
| | | // readAndUpdateBitValues(plcBitObject); |
| | | // readAndUpdateWordValues(plcParameterObject); |
| | | // readAndUpdateWordValues(plcStateObject); |
| | | |
| | | // 调用initbit方法 |
| | | PlcBitObject plcBitObject = initUtil.initbit(jsonFilePath2); |
| | | readAndUpdateBitValues(plcBitObject); |
| | | readAndUpdateWordValues(plcParameterObject); |
| | | readAndUpdateWordValues(plcStateObject); |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("conveyorVelocity(AutoFAST)"); |
| | | addresses.add("A02ID"); |
| | | addresses.add("conveyorVelocity(Manual)"); |
| | | |
| | | |
| | | List<String> address = plcParameterObject.getAddressListByCodeId(addresses); |
| | | System.out.println(address); |
| | | |
| | | // int index = plcParameterObject.getPlcParameter("A01turnAngle1").getAddressIndex(); |
| | | // List<Short> arraylist = S7control.getinstance().ReadWord(plcParameterObject.getPlcParameter("A01turnAngle1").getAddress(index), 8); |
| | | |
| | | |
| | | // List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | // plcBitObject.setPlcBitList(getplcvlues); |
| | | |
| | | // int index = plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddressIndex(); |
| | | // System.out.println(index); |
| | | // plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddress(index); |
| | | // System.out.println(plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddress(index)); |
| | | |
| | | // plcParameterObject.getPlcParameter("A01A02conveyorVelocity(Max)").getAddress(index); |
| | | // |
| | | // S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100); |
| | | // List<String> addresses = new ArrayList<>(); |
| | | // addresses.add("conveyorVelocity(AutoFAST)"); |
| | | // addresses.add("A02ID"); |
| | | //System.out.println(plcParameterObject.getPlcParameterValues(addresses)); |
| | | List<String> addresses2 = new ArrayList<>(); |
| | | addresses2.add("D01.SRdec"); |
| | | addresses2.add("D01.SRinpos"); |
| | | addresses2.add("D05.SRinpos"); |
| | | |
| | | |
| | | |
| | | |
| | | System.out.println(plcBitObject.getPlcBitValues(addresses2)); |
| | | |
| | | int index2 = plcBitObject.getPlcBit("D05.SRinpos").getAddressIndex(); |
| | | System.out.println(index2); |
| | | |
| | | plcBitObject.getPlcBit("D05.SRinpos").getAddress(index2); |
| | | System.out.println(plcBitObject.getPlcBit("D05.SRinpos").getAddress(index2)); |
| | | // List<String> addresses2 = new ArrayList<>(); |
| | | // addresses2.add("D01.SRdec"); |
| | | // addresses2.add("D01.SRinpos"); |
| | | // addresses2.add("D05.SRinpos"); |
| | | // |
| | | // |
| | | // |
| | | // |
| | | // System.out.println(plcBitObject.getPlcBitValues(addresses2)); |
| | | // |
| | | // int index2 = plcBitObject.getPlcBit("D05.SRinpos").getAddressIndex(); |
| | | // System.out.println(index2); |
| | | // |
| | | // plcBitObject.getPlcBit("D05.SRinpos").getAddress(index2); |
| | | // System.out.println(plcBitObject.getPlcBit("D05.SRinpos").getAddress(index2)); |
| | | // |
| | | // |
| | | // List<String> addresses3 = new ArrayList<>(); |
| | |
| | | List<Boolean> arraylist = S7control.getinstance().readBits(addressList21);
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | |
|
| | | short[] params = new short[arraylist.size()];
|
| | |
| | | // System.out.println("messageValue:"+ arraylist );
|
| | | jsonObject.append("params", params);
|
| | |
|
| | | // System.out.println("messageValue:" + arraylist +"messageValue2:" + arraylist2 );
|
| | | // WebSocketServer sendwServer = WebSocketServer.sessionMap.get("ManualJog");
|
| | | // if (sendwServer != null) {
|
| | | // sendwServer.sendMessage(jsonObject.toString());
|
| | | // }
|
| | |
|
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("ManualJog");
|
| | | if (sendwServer != null) {
|
New file |
| | |
| | | package com.example.springboot.component;
|
| | |
|
| | | import cn.hutool.json.JSONObject;
|
| | | import com.example.springboot.entity.device.PlcBitObject;
|
| | | import static com.example.springboot.component.InitUtil.readAndUpdateBitValues;
|
| | | import static com.example.springboot.component.InitUtil.readAndUpdateWordValues;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | public class PLCManualJogReview extends Thread {
|
| | |
|
| | |
|
| | | // 用于存储应用程序的配置信息
|
| | | private Configuration config;
|
| | |
|
| | | private static InitUtil initUtil;
|
| | | // 创建一个自定义的 S7 控制器消息处理器对象
|
| | | MessageHandler customS7Control = new MessageHandler();
|
| | |
|
| | | // 单例实例
|
| | | private static PLCManualJogReview instance;
|
| | |
|
| | |
|
| | |
|
| | | public PLCManualJogReview() throws IOException {
|
| | | config = new Configuration("config.properties");
|
| | | initUtil = new InitUtil();
|
| | | }
|
| | |
|
| | | // 获取单例实例
|
| | | public static synchronized PLCManualJogReview getInstance() throws IOException {
|
| | | if (instance == null) {
|
| | | instance = new PLCManualJogReview();
|
| | | }
|
| | | return instance;
|
| | | }
|
| | | String jsonFilePath = PLCManualJogReview.class.getResource("/JsonFile/PlcTest.json").getPath();
|
| | |
|
| | | PlcBitObject plcTestObject = initUtil.initbit(jsonFilePath);
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | while (this != null) {
|
| | | try {
|
| | | Thread.sleep(500);
|
| | |
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | // List<String> addressList21 = Arrays.asList(config.getProperty("PLCManualJog.button").split(","));
|
| | | // List<Boolean> arraylist = S7control.getinstance().readBits(addressList21);
|
| | |
|
| | |
|
| | | readAndUpdateBitValues(plcTestObject);
|
| | |
|
| | | List<String> codeidlist = Arrays.asList(
|
| | | "D01VFDconveyor", "D02VFDconveyor", "D03VFDconveyor", "D04VFDconveyor",
|
| | | "D05VFDconveyor", "D06VFDconveyor","A01VFDconveyor", "A01VFDconveyorreverse", "A01SERVETRAVEL",
|
| | | "A01SERVETURN", "A01oilpump", "A02VFDconveyor", "A02VFDconveyorreverse",
|
| | | "A02SERVETRAVEL", "A02SERVETURN", "A02oilpump", "B01VFDconveyor", "B01SERVETRAVEL",
|
| | | "B01YVTURN", "B01YVUPDOWN", "B01YVGassing", "B02VFDconveyor", "B02SERVETRAVEL",
|
| | | "B02YVTURN", "B02YVUPDOWN", "B02YVGassing", "A01SERVETRAVELhome", "A02SERVETRAVELhome"
|
| | | );
|
| | |
|
| | |
|
| | |
|
| | | //PLCManualJog.button=DB101.0.0,DB101.0.1,DB101.0.2,DB101.0.3,DB101.0.4,DB101.0.5,DB101.0.6,DB101.3.4,DB101.1.4,DB101.1.2,DB101.5.2,DB101.0.7,DB101.3.5,DB101.1.5,DB101.1.3,DB101.5.3,DB101.1.0,DB101.1.6,DB101.2.6,DB101.2.7,DB101.3.2,DB101.1.1,DB101.1.7,DB101.3.0,DB101.3.1,DB101.3.3,DB101.10.5,DB101.10.6
|
| | |
|
| | | List<String> address = plcTestObject.getAddressListByCodeId(codeidlist);
|
| | | System.out.println(address);
|
| | |
|
| | | //
|
| | | // int index2 = plcTestObject.getPlcBit("B01YVUPDOWN").getAddressIndex();
|
| | | // System.out.println(index2);
|
| | | //
|
| | | // System.out.println(plcTestObject.getPlcBit("B01YVUPDOWN").getAddress(index2));
|
| | | List<Boolean> arraylist = plcTestObject.getPlcBitValues(codeidlist);
|
| | |
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | |
|
| | | short[] params = new short[arraylist.size()];
|
| | | for (int i = 0; i < arraylist.size(); i++) {
|
| | | boolean value = arraylist.get(i);
|
| | | params[i] = value ? (short) 1 : (short) 0;
|
| | | }
|
| | |
|
| | | jsonObject.append("params", params);
|
| | |
|
| | |
|
| | |
|
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("ManualJog");
|
| | | if (sendwServer != null) {
|
| | | for (WebSocketServer webserver : sendwServer) {
|
| | | webserver.sendMessage(jsonObject.toString());
|
| | |
|
| | | // WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ManualJog");
|
| | |
|
| | | if (webserver != null) {
|
| | |
|
| | |
|
| | | List<String> messages = webserver.getMessages();
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为整数类型的列表
|
| | | String lastMessage = messages.get(messages.size() - 1);
|
| | | // System.out.println("messages:" + messages);
|
| | | String[] parts = lastMessage.split(",");
|
| | | List<Integer> messageValues = new ArrayList<>();
|
| | | for (String part : parts) {
|
| | | try {
|
| | | // 使用正则表达式清除非数字字符
|
| | | String cleanedPart = part.replaceAll("[^0-9-]", "");
|
| | | Integer value = Integer.parseInt(cleanedPart.trim());
|
| | | messageValues.add(value);
|
| | | } catch (NumberFormatException e) {
|
| | | // 如果无法解析为整数类型,则忽略该部分
|
| | | // e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | | // 将消息值转换为布尔列表
|
| | | List<Boolean> messageBooleans = new ArrayList<>();
|
| | | for (Integer value : messageValues) {
|
| | | messageBooleans.add(value == 1 ? true : false);
|
| | | }
|
| | | // System.out.println(messageBooleans);
|
| | | List<Boolean> bolList = new ArrayList<>();
|
| | |
|
| | |
|
| | | for (int i = 0; i < 28 && i < messageBooleans.size(); i++) {
|
| | | bolList.add(messageBooleans.get(i));
|
| | | }
|
| | |
|
| | |
|
| | | if (!bolList.isEmpty()) {
|
| | | S7control.getinstance().WriteBit(address, bolList);
|
| | | //
|
| | |
|
| | | System.out.println("messageValue:" + bolList + " written to PLC at address " + address);
|
| | | }
|
| | |
|
| | | webserver.clearMessages();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.example.springboot.service.JdbcConnections; |
| | | import com.example.springboot.service.SpianService; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | | import com.example.springboot.mapper.AlarmMapper; |
| | | import com.example.springboot.mapper.SpianMapper; |
| | | |
| | |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | |
| | | // 出片任务//////////////////////////////// |
| | | List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态 |
| | | List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动 |
| | | |
| | | boolean Plcout = spianService.listbool("DB106.64"); // 出片请求字 |
| | | boolean Plcout2 = spianService.listbool("DB105.18"); // 出片启动 |
| | | //读取DB105区文件 |
| | | PlcParameterObject plcParameterObjects=PLCAutoMes.PlcMesObject; |
| | | //读106 |
| | | PlcParameterObject plcParameterObjects2=PLCAutoMes.PlcReadObject; |
| | | // List<String> addresses105 = new ArrayList<>(); |
| | | // addresses105.add("OutRequest");// 出片请求字 |
| | | // List<String> addresses106 = new ArrayList<>(); |
| | | // addresses106.add("OutActivate");// 出片启动 |
| | | |
| | | String OutActivate=plcParameterObjects2.getPlcParameter("OutActivate").getValue(); |
| | | |
| | | // 出片任务 |
| | | boolean Plcout = spianService.listbool("DB106.64"); |
| | | boolean Plcout2 = spianService.listbool("DB105.18"); |
| | | |
| | | if (Plcout == false&&Plcout2==true) { |
| | | S7control.getinstance().WriteWord("DB105.18", (short) 0);// 出片任务启动改为0 |
| | | System.out.println("关闭出片启动" + LocalDateTime.now());// 出片任务发送字改为0 |
| | |
| | | List<Short> datas1List = S7control.getinstance().ReadWord("DB106.24", 1);// 获取prc进片请求数据 |
| | | List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 获取进片车状态 |
| | | List<Short> datas1ListState2 = S7control.getinstance().ReadWord("DB105.16", 1);// 获取进片车任务是否启动 |
| | | |
| | | |
| | | boolean B01backs = spianService.listbool("DB106.60");// b01汇报 |
| | | boolean B02backs = spianService.listbool("DB106.62");// b02汇报 |
New file |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | public class PlcManualonePositionReview extends Thread { |
| | | private Configuration config; |
| | | |
| | | public PlcManualonePositionReview() throws IOException { |
| | | config = new Configuration("config.properties"); |
| | | } |
| | | |
| | | |
| | | // 创建一个自定义的 S7 控制器消息处理器对象 |
| | | MessageHandler customS7Control = new MessageHandler(); |
| | | |
| | | |
| | | public static class PLCBooleanConverter { |
| | | |
| | | public static short[] convertListsToBinaryShortArray(List<Boolean>... lists) { |
| | | // 计算所有列表中元素的总数 |
| | | int totalSize = 0; |
| | | for (List<Boolean> list : lists) { |
| | | totalSize += list.size(); |
| | | } |
| | | |
| | | // 创建一个足够大的数组来存放所有的二进制值 |
| | | short[] binaryShortArray = new short[totalSize]; |
| | | |
| | | // 当前数组填充位置指针 |
| | | int currentIndex = 0; |
| | | |
| | | // 遍历所有的列表 |
| | | for (List<Boolean> list : lists) { |
| | | // 将每个布尔值转换为 0 或 1 并填入数组 |
| | | for (Boolean value : list) { |
| | | binaryShortArray[currentIndex++] = (short) (value ? 1 : 0); |
| | | } |
| | | } |
| | | |
| | | return binaryShortArray; |
| | | } |
| | | } |
| | | |
| | | |
| | | @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; |
| | | |
| | | |
| | | //B01组合中地址 |
| | | // String b01Address = config.getProperty("B01.address"); |
| | | List<String> addresses = Arrays.asList(config.getProperty("PlcManualonePosition.addresses").split(",")); |
| | | |
| | | List<Short> arraylist = S7control.getinstance().readWords(addresses); |
| | | // System.out.println(arraylist); |
| | | List<String> addresses2 = Arrays.asList(config.getProperty("PlcManualonePosition.addresses2").split(",")); |
| | | |
| | | List<Short> arraylist2 = S7control.getinstance().readWords(addresses2); |
| | | |
| | | List<String> addresses3 = Arrays.asList(config.getProperty("PlcManualonePosition.addresses3").split(",")); |
| | | |
| | | List<Short> arraylist3 = S7control.getinstance().readWords(addresses3); |
| | | |
| | | |
| | | List<String> addresses4 = Arrays.asList(config.getProperty("PlcManualonePosition.addresses4").split(",")); |
| | | |
| | | List<Short> arraylist4 = S7control.getinstance().readWords(addresses4); |
| | | |
| | | |
| | | List<Short> arraylist5 = S7control.getinstance().ReadWord("DB106.0", 1); |
| | | List<Short> arraylist6 = S7control.getinstance().ReadWord("DB106.12", 1); |
| | | List<Short> arraylist7 = S7control.getinstance().ReadWord("DB106.40", 1); |
| | | List<Short> arraylist8 = S7control.getinstance().ReadWord("DB106.50", 1); |
| | | //故障 |
| | | |
| | | List<String> addresses9 = Arrays.asList(config.getProperty("PlcManualonePosition.fault").split(",")); |
| | | |
| | | List<Boolean> arraylist9 = S7control.getinstance().readBits(addresses9); |
| | | |
| | | //未回零 |
| | | |
| | | List<String> addresses10 = Arrays.asList(config.getProperty("PlcManualonePosition.Notzero").split(",")); |
| | | |
| | | List<Boolean> arraylist10 = S7control.getinstance().readBits(addresses10); |
| | | |
| | | //A01启动地址 |
| | | List<String> A01start = Arrays.asList(config.getProperty("mlp.A01start")); |
| | | //A02启动地址 |
| | | List<String> A02start = Arrays.asList(config.getProperty("mlp.A02start")); |
| | | |
| | | List<String> B01start = Arrays.asList(config.getProperty("mlp.B01start")); |
| | | |
| | | List<String> B02start = Arrays.asList(config.getProperty("mlp.B02start")); |
| | | |
| | | // 故障地址 |
| | | List<String> waddresses5 = Arrays.asList(config.getProperty("PlcManualonePosition.fault2").split(",")); |
| | | |
| | | |
| | | // 复位地址 |
| | | List<String> waddresses6 = Arrays.asList(config.getProperty("PlcManualonePosition.Reset").split(",")); |
| | | List<Boolean> readreast = S7control.getinstance().readBits(waddresses6); |
| | | short[] reast6 = PLCBooleanConverter.convertListsToBinaryShortArray(readreast); |
| | | |
| | | // 回零地址 |
| | | List<String> waddresses7 = Arrays.asList(config.getProperty("PlcManualonePosition.Zero").split(",")); |
| | | List<Boolean> readhuiling = S7control.getinstance().readBits(waddresses7); |
| | | short[] huiling7 = PLCBooleanConverter.convertListsToBinaryShortArray(readhuiling); |
| | | |
| | | List<Boolean> A01readstart = S7control.getinstance().readBits(A01start); |
| | | List<Boolean> A02readstart = S7control.getinstance().readBits(A02start); |
| | | List<Boolean> B01readstart = S7control.getinstance().readBits(B01start); |
| | | List<Boolean> B02readstart = S7control.getinstance().readBits(B02start); |
| | | |
| | | short[] combinedBinaryShortArray = PLCBooleanConverter.convertListsToBinaryShortArray( |
| | | A01readstart, A02readstart, B01readstart, B02readstart |
| | | ); |
| | | |
| | | // Short[] values1 = { 1, 2, 3 }; |
| | | // List<Short> arraylist = new ArrayList<>(Arrays.asList(values1)); |
| | | // Short[] values2 = { 1, 2, 3 }; |
| | | // List<Short> arraylist2 = new ArrayList<>(Arrays.asList(values2)); |
| | | // Short[] values3 = { 1, 2, 3 }; |
| | | // List<Short> arraylist3 = new ArrayList<>(Arrays.asList(values3)); |
| | | // Short[] values4 = { 1, 2, 3 }; |
| | | // List<Short> arraylist4 = new ArrayList<>(Arrays.asList(values4)); |
| | | // Short[] values5 = { 5 }; |
| | | // List<Short> arraylist5 = new ArrayList<>(Arrays.asList(values5)); |
| | | // Short[] values6 = { 6 }; |
| | | // List<Short> arraylist6 = new ArrayList<>(Arrays.asList(values6)); |
| | | // Short[] values7 = { 7 }; |
| | | // List<Short> arraylist7 = new ArrayList<>(Arrays.asList(values7)); |
| | | // Short[] values8 = { 8 }; |
| | | // List<Short> arraylist8 = new ArrayList<>(Arrays.asList(values8)); |
| | | // Boolean[] values9 = { false, false, true, true }; |
| | | // List<Boolean> arraylist9 = new ArrayList<>(Arrays.asList(values9)); |
| | | short[] params2 = new short[arraylist9.size()]; |
| | | for (int i = 0; i < arraylist9.size(); i++) { |
| | | boolean value = arraylist9.get(i); |
| | | params2[i] = value ? (short) 1 : (short) 0; |
| | | } |
| | | |
| | | // Boolean[] values10 = { false, false, true, true }; |
| | | // List<Boolean> arraylist10 = new ArrayList<>(Arrays.asList(values10)); |
| | | short[] params3 = new short[arraylist10.size()]; |
| | | for (int i = 0; i < arraylist10.size(); i++) { |
| | | boolean value = arraylist10.get(i); |
| | | params3[i] = value ? (short) 1 : (short) 0; |
| | | } |
| | | // List<Short> arraylist9 = S7control.getinstance().readWords(addresses9); |
| | | arraylist5.addAll(arraylist6); |
| | | arraylist5.addAll(arraylist7); |
| | | arraylist5.addAll(arraylist8); |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // System.out.println(arraylist6); |
| | | jsonObject.append("zuhe1", arraylist); |
| | | jsonObject.append("zuhe2", arraylist2); |
| | | jsonObject.append("zuhe3", arraylist3); |
| | | jsonObject.append("zuhe4", arraylist4); |
| | | jsonObject.append("shishi1", arraylist5); |
| | | jsonObject.append("guzhang", params2); |
| | | jsonObject.append("weihuiling", params3); |
| | | jsonObject.append("qidong", combinedBinaryShortArray); |
| | | jsonObject.append("fuwei", reast6); |
| | | jsonObject.append("huiling", huiling7); |
| | | |
| | | // WebSocketServer sendwServer = WebSocketServer.sessionMap.get("ManualonePosition"); |
| | | // if (sendwServer != null) { |
| | | // sendwServer.sendMessage(jsonObject.toString()); |
| | | // } |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("ManualonePosition"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | |
| | | // WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("ManualonePosition"); |
| | | if (webserver != null) { |
| | | List<String> messages = webserver.getMessages(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // System.out.println(messages.isEmpty()); |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | // System.out.println("lastMessage:" + lastMessage); |
| | | JSONArray messageArray = new JSONArray(lastMessage); |
| | | // 写入A01 |
| | | customS7Control.WriteWordToPLC(messageArray, addresses, 0); |
| | | |
| | | // 写入A02 |
| | | customS7Control.WriteWordToPLC(messageArray, addresses2, 1); |
| | | // 写入B01 |
| | | customS7Control.WriteWordToPLC(messageArray, addresses3, 2); |
| | | |
| | | // 写入B02 |
| | | customS7Control.WriteWordToPLC(messageArray, addresses4, 3); |
| | | |
| | | |
| | | // 写入故障地址 |
| | | |
| | | customS7Control.writeBitToPLC(messageArray, waddresses5, 4); |
| | | |
| | | |
| | | // 写入复位地址 |
| | | customS7Control.writeBitToPLC(messageArray, waddresses6, 5); |
| | | |
| | | // 写入回零地址 |
| | | |
| | | customS7Control.writeBitToPLC(messageArray, waddresses7, 6); |
| | | //A01启动 |
| | | customS7Control.writeBitToPLC(messageArray, A01start, 7); |
| | | //A02启动 |
| | | customS7Control.writeBitToPLC(messageArray, A02start, 8); |
| | | //B01启动 |
| | | customS7Control.writeBitToPLC(messageArray, B01start, 9); |
| | | //B02启动 |
| | | customS7Control.writeBitToPLC(messageArray, B02start, 10); |
| | | |
| | | // 清空消息列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.example.springboot.mapper.AlarmMapper; |
| | | |
| | | import java.io.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class PlcalarmReview 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("D:/canadames/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) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | |
| | | // 根据地址读取PCL数据 |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, 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, |
| | | // 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(); |
| | | jsonObject.append("params", plclist); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("alarm"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | |
| | | } |
| | | |
| | | } |
| | | // 将获取的布尔类型转换为整数类型 |
| | | List<Integer> Intlist = new ArrayList<>(); |
| | | for (Boolean value : plclist) { |
| | | Intlist.add(value == true ? 1 : 0); |
| | | |
| | | } |
| | | |
| | | // 将Intlist转换为数组 |
| | | // System.out.println(Intlist); |
| | | // System.out.println(Intlist.toArray().length); |
| | | Integer[] shuzu1 = Intlist.toArray(new Integer[0]); |
| | | |
| | | // 定义的报警内容数组,获取json返回的集合 |
| | | List<String> myCollection; |
| | | myCollection = readValue(); |
| | | String[] array1 = myCollection.toArray(new String[myCollection.size()]); |
| | | // System.out.println(array1.length); |
| | | alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class); |
| | | for (short i = 0; i < array1.length; i++) { |
| | | // 查询对应报警信息结束时间为null的条数 |
| | | short result = alarmMapper.selectnullti(array1[i]); |
| | | // 读取到PLC的值为1并且对应报警信息结束时间为null的条数的条数为0 |
| | | //System.out.println(result); |
| | | if (shuzu1[i] == 1 && result == 0) { |
| | | // 填加一条报警信息,有开始时间 |
| | | alarmMapper.Insertalarm(array1[i]); |
| | | } else if (shuzu1[i] == 0 && result > 0) { |
| | | // 修改该条报警信息的结束时间 |
| | | alarmMapper.updatealarm(array1[i]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | JSONObject jsonObject = new JSONObject();
|
| | | try {
|
| | | Thread.sleep(1000);
|
| | | // 注入mapper
|
| | |
|
| | | PlcParameterObject PlcReadObjects=PLCAutoMes.PlcMesObject;
|
| | | |
| | | // 注入mapper |
| | | homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
|
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
|
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
|
| | |
| | | GlassIdList.add(spianService.queGlassid("DB103.114", 14).toString());
|
| | | jsonObject.append("GlassIdList", GlassIdList);
|
| | |
|
| | | // 读去Plc进片车与出片车位置W
|
| | | // 获取Plc进片车与出片车位置
|
| | | List<String> addressList = new ArrayList<String>();
|
| | | addressList.add("DB106.12");
|
| | | addressList.add("DB106.0");
|
| | |
| | | if (paramlist != null) {
|
| | | jsonObject.append("params", paramlist);
|
| | | }
|
| | | // 获取进片车状态
|
| | | List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
|
| | | 1);// 获取进片车状态
|
| | | if (datas1ListState != null) {
|
| | | boolean exist1 = datas1ListState.contains((short) 0);
|
| | | jsonObject.append("zhuangtai", exist1);
|
| | | }
|
| | | // // 获取进片车状态
|
| | | // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
|
| | | // 1);// 获取进片车状态
|
| | | // if (datas1ListState != null) {
|
| | | // boolean exist1 = datas1ListState.contains((short) 0);
|
| | | // jsonObject.append("zhuangtai", exist1);
|
| | | // }
|
| | |
|
| | | // 获取进片玻璃信息
|
| | | List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1);
|
| | | if (inglassInfo != null) {
|
| | | if (inglassInfo.size() > 0) {
|
| | | jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
|
| | | }
|
| | | }
|
| | | // // 获取进片玻璃信息
|
| | | // List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1);
|
| | | // if (inglassInfo != null) {
|
| | | // if (inglassInfo.size() > 0) {
|
| | | // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
|
| | | // }
|
| | | // }
|
| | | // // 获取铝框idDB106.DBW64,添加到出片队列
|
| | | // String frameno="X21763329601FB";
|
| | | String frameno = spianService.queGlassid("DB103.270", 14).toString();
|
| | |
| | | jsonObject.append("countdown", countdowns);
|
| | | }
|
| | | // jsonObject.append("countdown", true);
|
| | | // 复位完成信号ss
|
| | | // 复位完成信号
|
| | | List<Boolean> resetss = S7control.getinstance().ReadBits("DB103.284", 1);
|
| | | for (Boolean reset : resetss) {
|
| | | jsonObject.append("reset", reset);
|
New file |
| | |
| | | package com.example.springboot.component; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import java.io.IOException; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.example.springboot.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import com.example.springboot.entity.Glass; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.entity.Queue; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.entity.device.PlcBitObject; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | import com.example.springboot.mapper.SpianMapper; |
| | | |
| | | public class PlchomeNew extends Thread { |
| | | |
| | | @Autowired |
| | | private HomeMapper homeMapper; |
| | | private OutSliceServive outSliceServive; |
| | | private SpianMapper spianMapper; |
| | | private SpianService spianService; |
| | | private North_Glass_Buffer1Service north_Glass_Buffer1Service; |
| | | private JdbcConnections dbserve; |
| | | // 出片队列是否允许出片 |
| | | public static Boolean isAllowQueue = true; |
| | | public static Boolean isAllowReordering = true; |
| | | // 出片队列警告 |
| | | public static Boolean isQueueWarning = false; |
| | | // 铝框id |
| | | public static String FrameNo = ""; |
| | | // 是否需要手动确认玻璃 |
| | | public static Boolean isConfirm = false; |
| | | // 待确认的出片队列 |
| | | public static List<north_glass_buffer1> AluminumFrame; |
| | | |
| | | // private Configuration config; |
| | | |
| | | private StorageCageService storageCageService; |
| | | |
| | | public static Boolean FeedState = false; |
| | | |
| | | // public Plchome() throws IOException { |
| | | // config = new Configuration("config.properties"); |
| | | // } |
| | | |
| | | // public static Map b=new HashMap<>(); |
| | | // b.put() |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | Thread.sleep(1000); |
| | | // 注入mapper |
| | | |
| | | homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class); |
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class); |
| | | outSliceServive = WebSocketServer.applicationContext.getBean(OutSliceServive.class); |
| | | north_Glass_Buffer1Service = WebSocketServer.applicationContext |
| | | .getBean(North_Glass_Buffer1Service.class); |
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class); |
| | | dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | |
| | | // 笼子使用情况 |
| | | List<StorageCage> tableData = homeMapper.selectAll(); |
| | | jsonObject.append("tableData", tableData); |
| | | // 格理片笼格子状态 |
| | | List<StorageCage> cagelist1 = homeMapper.selectRack1(); |
| | | List<StorageCage> cagelist2 = homeMapper.selectRack2(); |
| | | List<StorageCage> cagelist3 = homeMapper.selectRack3(); |
| | | List<StorageCage> cagelist4 = homeMapper.selectRack4(); |
| | | jsonObject.append("cagelist1", cagelist1); |
| | | jsonObject.append("cagelist2", cagelist2); |
| | | jsonObject.append("cagelist3", cagelist3); |
| | | jsonObject.append("cagelist4", cagelist4); |
| | | // 进出片任务 |
| | | List<StorageCage> tasklist1 = homeMapper.selectinout(3); |
| | | List<StorageCage> tasklist2 = homeMapper.selectinout(2); |
| | | jsonObject.append("tasklist1", tasklist1); |
| | | jsonObject.append("tasklist2", tasklist2); |
| | | // 查询报警信息 |
| | | List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo(); |
| | | jsonObject.append("alarmmg", alarmmg); |
| | | |
| | | // 伍 获取进是否有待确认的玻璃id |
| | | String queid = spianMapper.Selectqueueid(); |
| | | int state = spianMapper.Selectqueuestate(); |
| | | jsonObject.append("queid", queid); |
| | | jsonObject.append("state", state); |
| | | // 获取扫码位与上片位玻璃信息 |
| | | Queue form2 = homeMapper.GetQueueInfo(2); |
| | | Queue form3 = homeMapper.GetQueueInfo(1); |
| | | if (form2.getglassId() != null && form2.getglassId() != "") { |
| | | jsonObject.append("form2", form2); |
| | | } |
| | | if (form3.getglassId() != null && form3.getglassId() != "") { |
| | | jsonObject.append("form3", form3); |
| | | } |
| | | // 获取出片队列信息 |
| | | List<Out_slice> listoutslice = outSliceServive.SelectProductionqueue(); |
| | | jsonObject.append("listoutslice", listoutslice); |
| | | // 获取当前出片队列出片状态 |
| | | jsonObject.append("isAllowQueue", PlchomeNew.isAllowQueue); |
| | | // 获取出片队列警告状态 |
| | | jsonObject.append("isQueueWarning", PlchomeNew.isQueueWarning); |
| | | // 获取当前出片队列调序状态 |
| | | jsonObject.append("isAllowReordering", PlchomeNew.isAllowReordering); |
| | | // 是否需要人工确认上片玻璃 |
| | | jsonObject.append("isConfirm", isConfirm); |
| | | // 查询当前铝框信息 |
| | | Out_slice CurrentFrame = outSliceServive.SelectCurrentFrame(); |
| | | jsonObject.append("CurrentFrame", CurrentFrame); |
| | | |
| | | // String E01id = new String( S7controlLK.getinstance().ReadByte("DB17.0",16)); |
| | | // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14)); |
| | | |
| | | // public static PlcParameterObject plcParameterObject = initUtil.initword(PlcParameter); |
| | | // public static PlcBitObject plcPlcTest = initUtil.initbit(PlcTest); |
| | | // public static PlcBitObject plcBitObject = initUtil.initbit(PlcSign); |
| | | // public static PlcParameterObject plcStateObject = initUtil.initword(PlcState); |
| | | // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | // public static PlcParameterObject PlcMesObject = initUtil.initword(PlcMes); |
| | | // public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead); |
| | | // public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe); |
| | | |
| | | PlcParameterObject PlcParameter = PLCAutoMes.plcParameterObject;// plc参数地址DB100 |
| | | PlcBitObject PlcTest = PLCAutoMes.plcPlcTest;// plc标识地址DB101 |
| | | PlcBitObject PlcSign = PLCAutoMes.plcBitObject;// plc设备状态地址DB102 |
| | | PlcParameterObject PlcState = PLCAutoMes.plcStateObject;// plc状态地址DB103 |
| | | PlcBitObject PlcAlarm = PLCAutoMes.plcPlcAlarm;// plc报警地址DB104 |
| | | PlcParameterObject MesMission = PLCAutoMes.PlcMesObject;// mes任MES务地址DB105 |
| | | PlcParameterObject PLCMission = PLCAutoMes.PlcReadObject;// plc任务地址DB106 |
| | | PlcParameterObject Plcframe = PLCAutoMes.PlcframeObject;// plc铝框地址DB17 |
| | | |
| | | // if (S7control.getinstance().CheckConnected() == true) { |
| | | |
| | | // 铝框线交互 |
| | | if (S7controlLK.getinstance().CheckConnected() == true) { |
| | | if (CurrentFrame != null) { |
| | | S7controlLK.getinstance().writeStrings(CurrentFrame.getBarCode(), |
| | | Plcframe.getPlcParameter("E01id") |
| | | .getAddress(Plcframe.getPlcParameter("E01id").getAddressIndex())); |
| | | } |
| | | String E01id = S7controlLK.getinstance().readStrings(Plcframe.getPlcParameter("E01id") |
| | | .getAddress(Plcframe.getPlcParameter("E01id").getAddressIndex())); |
| | | String J01id = S7controlLK.getinstance().readStrings(Plcframe.getPlcParameter("J01id") |
| | | .getAddress(Plcframe.getPlcParameter("J01id").getAddressIndex())); |
| | | |
| | | String framerequest = Plcframe.getPlcParameter("J01Quest").getValue(); |
| | | // List<Short> liststates = S7controlLK.getinstance().ReadWord("DB17.38", 1); |
| | | // List<Short> liststate = S7controlLK.getinstance().ReadWord("DB17.20", 1); |
| | | // Short framerequest = liststate.get(0); |
| | | if (framerequest.equals("1")) { |
| | | // 铝框id |
| | | String position; |
| | | try { |
| | | position = dbserve.SelectPositionByFrameBarcode(J01id); |
| | | } catch (SQLException e) { |
| | | // TODO Auto-generated catch block |
| | | position = "0"; |
| | | e.printStackTrace(); |
| | | } |
| | | Short send; |
| | | if (position.equals("0")) { |
| | | send = 0; |
| | | } else { |
| | | send = 1; |
| | | } |
| | | S7controlLK.getinstance().WriteWord(Plcframe.getPlcParameter("J01Quest") |
| | | .getAddress(Plcframe.getPlcParameter("J01Quest").getAddressIndex()), (short) send); |
| | | } |
| | | } |
| | | |
| | | // 获取当前扫码方式 |
| | | // List<Boolean> Scanningmethods = |
| | | // S7control.getinstance().ReadBits("DB101.11.4", 1); |
| | | // if (Scanningmethods != null) { |
| | | // for (Boolean Scanningmethod : Scanningmethods) { |
| | | // jsonObject.append("Scanningmethod", Scanningmethod); |
| | | // } |
| | | // } |
| | | // |
| | | Boolean Scanningmethod = PlcTest.getPlcBit("Scanningmethod").getValue(); |
| | | if (Scanningmethod != null) { |
| | | jsonObject.append("Scanningmethod", Scanningmethod); |
| | | } |
| | | |
| | | // 获取当前扫码枪玻璃id |
| | | String CurrrentGlassId=PlcState.getPlcParameter("Scanningguns").getValue(); |
| | | |
| | | // String CurrrentGlassId = spianService.queGlassid("DB103.256", 14).toString(); |
| | | jsonObject.append("CurrrentGlassId", CurrrentGlassId); |
| | | |
| | | // 获取D01-D06,A01,A02,B01,B02状态 |
| | | // List<Short> DeviceList = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | List<String> DeviceStateList=new ArrayList<String>(); |
| | | DeviceStateList.add("D01.State"); |
| | | DeviceStateList.add("D02.State"); |
| | | DeviceStateList.add("B01.State"); |
| | | DeviceStateList.add("B02.State"); |
| | | DeviceStateList.add("A01.State"); |
| | | DeviceStateList.add("A02.State"); |
| | | DeviceStateList.add("D03.State"); |
| | | DeviceStateList.add("D04.State"); |
| | | DeviceStateList.add("D05.State"); |
| | | DeviceStateList.add("D06.State"); |
| | | List<String> DeviceList=PlcState.getPlcParameterValues(DeviceStateList); |
| | | jsonObject.append("DeviceList", DeviceList); |
| | | |
| | | // 获取D01-D06,A01,A02,B01,B02玻璃id |
| | | List<String> GlassStateList=new ArrayList<String>(); |
| | | GlassStateList.add("D01ID"); |
| | | GlassStateList.add("D02ID"); |
| | | GlassStateList.add("B01ID1"); |
| | | GlassStateList.add("B02ID1"); |
| | | GlassStateList.add("A01ID1"); |
| | | GlassStateList.add("A01ID2"); |
| | | GlassStateList.add("A02ID1"); |
| | | GlassStateList.add("D03ID"); |
| | | GlassStateList.add("D04ID"); |
| | | GlassStateList.add("D05ID"); |
| | | GlassStateList.add("D06ID"); |
| | | List<String> GlassIdList = PlcState.getPlcParameterValues(GlassStateList); |
| | | // List<String> GlassIdList = new ArrayList<String>(); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.44", 14).toString()); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.58", 14).toString()); |
| | | |
| | | // GlassIdList.add(spianService.queGlassid("DB103.184", 14).toString()); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.212", 14).toString()); |
| | | |
| | | // GlassIdList.add(spianService.queGlassid("DB103.128", 14).toString()); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.142", 14).toString()); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.156", 14).toString()); |
| | | |
| | | // GlassIdList.add(spianService.queGlassid("DB103.72", 14).toString()); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.86", 14).toString()); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.100", 14).toString()); |
| | | // GlassIdList.add(spianService.queGlassid("DB103.114", 14).toString()); |
| | | jsonObject.append("GlassIdList", GlassIdList); |
| | | |
| | | // 获取Plc进片车与出片车位置 |
| | | List<String> addressList = new ArrayList<String>(); |
| | | addressList.add("A02Position"); |
| | | addressList.add("A01Position"); |
| | | List<String> paramlist=PLCMission.getPlcParameterValues(addressList); |
| | | // addressList.add("DB106.12"); |
| | | // addressList.add("DB106.0"); |
| | | // List<Short> paramlist = S7control.getinstance().ReadWord(addressList); |
| | | if (paramlist != null) { |
| | | jsonObject.append("params", paramlist); |
| | | } |
| | | // // 获取进片车状态 |
| | | |
| | | // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", |
| | | // 1);// 获取进片车状态 |
| | | // if (datas1ListState != null) { |
| | | // boolean exist1 = datas1ListState.contains((short) 0); |
| | | // jsonObject.append("zhuangtai", exist1); |
| | | // } |
| | | |
| | | // // 获取进片玻璃信息 |
| | | // List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1); |
| | | // if (inglassInfo != null) { |
| | | // if (inglassInfo.size() > 0) { |
| | | // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70); |
| | | // } |
| | | // } |
| | | // // 获取铝框idDB106.DBW64,添加到出片队列 |
| | | // String frameno="X21763329601FB"; |
| | | |
| | | String frameno=PlcState.getPlcParameter("Frameid").getValue();//待电气更新地址表格 |
| | | // String frameno = spianService.queGlassid("DB103.270", 14).toString(); |
| | | if (!frameno.equals(PlchomeNew.FrameNo)) { |
| | | PlchomeNew.FrameNo = frameno; |
| | | try { |
| | | Short num = 0; |
| | | List<north_glass_buffer1> north_glass_buffer1s = north_Glass_Buffer1Service |
| | | .SelectAluminumFrameInfoById(PlchomeNew.FrameNo); |
| | | for (north_glass_buffer1 north_glass_buffer1 : north_glass_buffer1s) { |
| | | if (north_glass_buffer1.getstorageCage() == null) { |
| | | break; |
| | | } |
| | | num++; |
| | | } |
| | | if (num == north_glass_buffer1s.size()) { |
| | | north_Glass_Buffer1Service.AddOutSliceS(PlchomeNew.FrameNo); |
| | | } else { |
| | | PlchomeNew.AluminumFrame = north_glass_buffer1s; |
| | | } |
| | | } catch (SQLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (AluminumFrame != null) { |
| | | jsonObject.append("AluminumFrame", AluminumFrame); |
| | | } |
| | | |
| | | // 复位倒计时 |
| | | // 地址104.9.6 |
| | | Boolean countdown=PlcAlarm.getPlcBit("resetDelay").getValue(); |
| | | jsonObject.append("countdown", countdown); |
| | | // List<Boolean> countdown = S7control.getinstance().ReadBits("DB104.9.6", 1); |
| | | // for (Boolean countdowns : countdown) { |
| | | // jsonObject.append("countdown", countdowns); |
| | | // } |
| | | // jsonObject.append("countdown", true); |
| | | // 复位完成信号 |
| | | String reset=PlcState.getPlcParameter("resetDelay").getValue(); |
| | | jsonObject.append("reset", reset); |
| | | // List<Boolean> resetss = S7control.getinstance().ReadBits("DB103.284", 1); |
| | | // for (Boolean reset : resetss) { |
| | | // jsonObject.append("reset", reset); |
| | | // } |
| | | |
| | | // 是否急停 |
| | | Boolean emergencystop=PlcAlarm.getPlcBit("emergencystopalarm").getValue(); |
| | | jsonObject.append("emergencystop", emergencystop); |
| | | |
| | | // List<Boolean> emergencystops = S7control.getinstance().ReadBits("DB104.5.1", 1); |
| | | // for (Boolean emergencystop : emergencystops) { |
| | | // jsonObject.append("emergencystop", emergencystop); |
| | | // } |
| | | // 获取进片请求状态 |
| | | String D01Request=PLCMission.getPlcParameter("FeedRequest").getValue(); |
| | | |
| | | // List<Short> D01Request = S7control.getinstance().ReadWord("DB106.24", 1); |
| | | Boolean D01RequestState = D01Request.contains("1"); |
| | | jsonObject.append("D01RequestState", D01RequestState); |
| | | |
| | | // 获取进片发送状态 |
| | | String D01respnse=PLCMission.getPlcParameter("A02QuestStartPosition").getValue(); |
| | | // List<Short> D01respnse = S7control.getinstance().ReadWord("DB106.16", 1); |
| | | boolean D01ResponseState = D01respnse.contains("1"); |
| | | // jsonObject.append("D01RequestState", D01RequestState); |
| | | // 自动进片 |
| | | isConfirm = true; |
| | | if (isConfirm == true && form3.getglassId() != null && form3.getglassId() != "") { |
| | | if ((form3.getglassheight() < 380 || form3.getglasswidth() < 390 || form3.getglassheight() > 1810 |
| | | || form3.getglasswidth() > 2760) |
| | | || (form3.getglassheight() < 390 || form3.getglasswidth() < 380 |
| | | || form3.getglassheight() > 2760 || form3.getglasswidth() > 1810)) { |
| | | FeedState = true; |
| | | jsonObject.append("FeedState", FeedState); |
| | | FeedState = false; |
| | | } else { |
| | | if (D01RequestState == true && D01ResponseState != true) { |
| | | storageCageService.InsertQueueGlassId((short) 1, form3); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // } |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | boolean dbconnected = false; |
| | | try { |
| | | dbserve.getConn(); |
| | | dbconnected = true; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | dbconnected = false; |
| | | } |
| | | jsonObject.append("dbconnected", dbconnected); |
| | | // jsonObject.append("params", new short[] { 30, 40, }); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Home"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | |
| | | if (webserver != null) { |
| | | |
| | | List<String> messages = webserver.getMessages(); |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | System.out.println("启动完成"); |
| | | |
| | | // new PlcHold().start(); |
| | | // new PLCAutoMes().start(); |
| | | |
| | | new PLCAutoMes().start(); |
| | | new Plchome().start(); |
| | | |
| | | // new PlcLayout().start(); |
| | | // new Plcalarm().start(); |
| | | new PlcLayout().start(); |
| | | new Plcalarm().start(); |
| | | |
| | | // new Plcsign().start(); |
| | | new Plcsign().start(); |
| | | |
| | | // new Plcstate().start(); |
| | | // new PlcPositioning1().start(); |
| | | new Plcstate().start(); |
| | | new PlcPositioning1().start(); |
| | | |
| | | // new PlcParameter2().start(); |
| | | new PlcParameter2().start(); |
| | | new PLCAutomaticParameterSetting().start(); |
| | | |
| | | // new PLCAutomaticParameterSetting().start(); |
| | | new PlcManualonePosition().start(); |
| | | new PlcManualonePosition2().start(); |
| | | new PlcServoManualone().start(); |
| | | new PLCManualJog().start(); |
| | | new Plclog().start(); |
| | | |
| | | // new PlcManualonePosition().start(); |
| | | // new PlcManualonePosition2().start(); |
| | | // new PlcServoManualone().start(); |
| | | // new PLCManualJog().start(); |
| | | // new Plclog().start(); |
| | | |
| | | // new PlcInteractionState().start(); |
| | | new PlcInteractionState().start(); |
| | | //new PlcParameter1Review().start(); |
| | | // new PLCAutomaticParameterSettingReview().start(); |
| | | //new PLCAutomaticParameterSettingReview2().start(); |
| | | |
| | | // new PLCManualJogReview().start(); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.example.springboot.component.S7control; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class PlcBitInfo { |
| | | |
| | | public PlcBitInfo(String startAddress) { |
| | |
| | | return stringdatas[0]+"."+dbwindex+"."+bitindex; |
| | | } |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | |
| | | |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | } |
| | |
| | | return arrayList; |
| | | } |
| | | |
| | | |
| | | public List<String> getAddressListByCodeId(List<String> codeIdList) { |
| | | List<String> addressList = new ArrayList<>(); |
| | | for (String codeId : codeIdList) { |
| | | for (PlcBitInfo plcBitInfo : plcBitList) { |
| | | if (plcBitInfo.getCodeId().equals(codeId)) { |
| | | int index = plcBitInfo.getAddressIndex(); |
| | | String address = plcBitInfo.getAddress(index); |
| | | if (address != null) { |
| | | addressList.add(address); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return addressList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | |
| | | */ |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | if (stringdatas.length < 2 ) |
| | | int addressLength=this.addressLength; |
| | | if (addressLength < 2 ){ |
| | | return null; |
| | | } |
| | | |
| | | int bitindex = index; |
| | | if (addressLength == 2 ) { |
| | | int wordindex = index; |
| | | |
| | | return stringdatas[0]+"."+bitindex; |
| | | return stringdatas[0] + "." + wordindex; |
| | | } |
| | | if (addressLength == 14 ) { |
| | | int wordindex = index; |
| | | int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex +"-" + newIndex; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public int getPlcAddress() { |
| | |
| | | } |
| | | |
| | | |
| | | public List<String> getAddressListByCodeId(List<String> codeIdList) { |
| | | List<String> addressList = new ArrayList<>(); |
| | | for (String codeId : codeIdList) { |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (plcParameterInfo.getCodeId().equals(codeId)) { |
| | | int index = plcParameterInfo.getAddressIndex(); |
| | | String address = plcParameterInfo.getAddress(index); |
| | | if (address != null) { |
| | | addressList.add(address); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return addressList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | {
|
| | | "plcAddressBegin": "DB104.0.0",
|
| | | "plcAddressLenght": "91",
|
| | | "dataType": "bit",
|
| | | "parameteInfor": [
|
| | | {
|
| | | "codeId": "D01VFDerror",
|
| | | "addressIndex": 0
|
| | | },
|
| | | {
|
| | | "codeId": "D02VFDerror",
|
| | | "addressIndex": 1
|
| | | },
|
| | | {
|
| | | "codeId": "D03VFDerror",
|
| | | "addressIndex": 2
|
| | | },
|
| | | {
|
| | | "codeId": "D04VFDerror",
|
| | | "addressIndex": 3
|
| | | },
|
| | | {
|
| | | "codeId": "D05VFDerror",
|
| | | "addressIndex": 4
|
| | | },
|
| | | {
|
| | | "codeId": "D06VFDerror",
|
| | | "addressIndex": 5
|
| | | },
|
| | | {
|
| | | "codeId": "B01VFDerror",
|
| | | "addressIndex": 6
|
| | | },
|
| | | {
|
| | | "codeId": "B02VFDerror",
|
| | | "addressIndex": 7
|
| | | },
|
| | | {
|
| | | "codeId": "A01VFDerror",
|
| | | "addressIndex": 8
|
| | | },
|
| | | {
|
| | | "codeId": "A02VFDerror",
|
| | | "addressIndex": 9
|
| | | },
|
| | | {
|
| | | "codeId": "A01servoturnerror",
|
| | | "addressIndex": 10
|
| | | },
|
| | | {
|
| | | "codeId": "A02servoturnerror",
|
| | | "addressIndex": 11
|
| | | },
|
| | | {
|
| | | "codeId": "A01servotravelerror",
|
| | | "addressIndex": 12
|
| | | },
|
| | | {
|
| | | "codeId": "A02servotravelerror",
|
| | | "addressIndex": 13
|
| | | },
|
| | | {
|
| | | "codeId": "B01servotravelerror",
|
| | | "addressIndex": 14
|
| | | },
|
| | | {
|
| | | "codeId": "B02servotravelerror",
|
| | | "addressIndex": 15
|
| | | },
|
| | | {
|
| | | "codeId": "D01DECerror",
|
| | | "addressIndex": 16
|
| | | },
|
| | | {
|
| | | "codeId": "D01poserror",
|
| | | "addressIndex": 17
|
| | | },
|
| | | {
|
| | | "codeId": "D02DECerror",
|
| | | "addressIndex": 18
|
| | | },
|
| | | {
|
| | | "codeId": "D02poserror",
|
| | | "addressIndex": 19
|
| | | },
|
| | | {
|
| | | "codeId": "D03DECerror",
|
| | | "addressIndex": 20
|
| | | },
|
| | | {
|
| | | "codeId": "D03poserror",
|
| | | "addressIndex": 21
|
| | | },
|
| | | {
|
| | | "codeId": "D04DECerror",
|
| | | "addressIndex": 22
|
| | | },
|
| | | {
|
| | | "codeId": "D04poserror",
|
| | | "addressIndex": 23
|
| | | },
|
| | | {
|
| | | "codeId": "D05DECerror",
|
| | | "addressIndex": 24
|
| | | },
|
| | | {
|
| | | "codeId": "D05poserror",
|
| | | "addressIndex": 25
|
| | | },
|
| | | {
|
| | | "codeId": "D06DECerror",
|
| | | "addressIndex": 26
|
| | | },
|
| | | {
|
| | | "codeId": "D06poserror",
|
| | | "addressIndex": 27
|
| | | },
|
| | | {
|
| | | "codeId": "A01DECerror",
|
| | | "addressIndex": 28
|
| | | },
|
| | | {
|
| | | "codeId": "A01poserror",
|
| | | "addressIndex": 29
|
| | | },
|
| | | {
|
| | | "codeId": "A02DECerror",
|
| | | "addressIndex": 30
|
| | | },
|
| | | {
|
| | | "codeId": "A02poserror",
|
| | | "addressIndex": 31
|
| | | },
|
| | | {
|
| | | "codeId": "B01INDECerror",
|
| | | "addressIndex": 32
|
| | | },
|
| | | {
|
| | | "codeId": "B01INposerror",
|
| | | "addressIndex": 33
|
| | | },
|
| | | {
|
| | | "codeId": "B01OUTDECerror",
|
| | | "addressIndex": 34
|
| | | },
|
| | | {
|
| | | "codeId": "B01OUTposerror",
|
| | | "addressIndex": 35
|
| | | },
|
| | | {
|
| | | "codeId": "B02INDECerror",
|
| | | "addressIndex": 36
|
| | | },
|
| | | {
|
| | | "codeId": "B02INposerror",
|
| | | "addressIndex": 37
|
| | | },
|
| | | {
|
| | | "codeId": "B02OUTDECerror",
|
| | | "addressIndex": 38
|
| | | },
|
| | | {
|
| | | "codeId": "B02OUTposerror",
|
| | | "addressIndex": 39
|
| | | },
|
| | | {
|
| | | "codeId": "D01Scanglassexceedinglimit",
|
| | | "addressIndex": 40
|
| | | },
|
| | | {
|
| | | "codeId": "emergencystopalarm",
|
| | | "addressIndex": 41
|
| | | },
|
| | | {
|
| | | "codeId": "Moreglassthanknown",
|
| | | "addressIndex": 42
|
| | | },
|
| | | {
|
| | | "codeId": "lessglassthanknown",
|
| | | "addressIndex": 43
|
| | | },
|
| | | {
|
| | | "codeId": "D01conveyortimeoutalarm",
|
| | | "addressIndex": 44
|
| | | },
|
| | | {
|
| | | "codeId": "D02conveyortimeoutalarm",
|
| | | "addressIndex": 45
|
| | | },
|
| | | {
|
| | | "codeId": "D03conveyortimeoutalarm",
|
| | | "addressIndex": 46
|
| | | },
|
| | | {
|
| | | "codeId": "D04conveyortimeoutalarm",
|
| | | "addressIndex": 47
|
| | | },
|
| | | {
|
| | | "codeId": "D05conveyortimeoutalarm",
|
| | | "addressIndex": 48
|
| | | },
|
| | | {
|
| | | "codeId": "D06conveyortimeoutalarm",
|
| | | "addressIndex": 49
|
| | | },
|
| | | {
|
| | | "codeId": "A01conveyortimeoutalarm",
|
| | | "addressIndex": 50
|
| | | },
|
| | | {
|
| | | "codeId": "A02conveyortimeoutalarm",
|
| | | "addressIndex": 51
|
| | | },
|
| | | {
|
| | | "codeId": "B01conveyortimeoutalarm",
|
| | | "addressIndex": 52
|
| | | },
|
| | | {
|
| | | "codeId": "B02conveyortimeoutalarm",
|
| | | "addressIndex": 53
|
| | | },
|
| | | {
|
| | | "codeId": "A01conveyorLeftsafetyalarm",
|
| | | "addressIndex": 54
|
| | | },
|
| | | {
|
| | | "codeId": "A01conveyorrightsafetyalarm",
|
| | | "addressIndex": 55
|
| | | },
|
| | | {
|
| | | "codeId": "A02conveyorLeftsafetyalarm",
|
| | | "addressIndex": 56
|
| | | },
|
| | | {
|
| | | "codeId": "A02conveyorrightsafetyalarm",
|
| | | "addressIndex": 57
|
| | | },
|
| | | {
|
| | | "codeId": "1#buffersafetyalarm",
|
| | | "addressIndex": 58
|
| | | },
|
| | | {
|
| | | "codeId": "2#buffersafetyalarm",
|
| | | "addressIndex": 59
|
| | | },
|
| | | {
|
| | | "codeId": "3#buffersafetyalarm",
|
| | | "addressIndex": 60
|
| | | },
|
| | | {
|
| | | "codeId": "4#buffersafetyalarm",
|
| | | "addressIndex": 61
|
| | | },
|
| | | {
|
| | | "codeId": "A01.SRrightinposerror",
|
| | | "addressIndex": 62
|
| | | },
|
| | | {
|
| | | "codeId": "A02.SRleftinposerror",
|
| | | "addressIndex": 63
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRleftinposerror",
|
| | | "addressIndex": 64
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRleftdecerror",
|
| | | "addressIndex": 65
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRrightdecerror",
|
| | | "addressIndex": 66
|
| | | },
|
| | | {
|
| | | "codeId": "B01.SRrightinposerror",
|
| | | "addressIndex": 67
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRleftinposerror",
|
| | | "addressIndex": 68
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRleftdecerror",
|
| | | "addressIndex": 69
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRrightdecerror",
|
| | | "addressIndex": 70
|
| | | },
|
| | | {
|
| | | "codeId": "B02.SRrightinposerror",
|
| | | "addressIndex": 71
|
| | | },
|
| | | {
|
| | | "codeId": "A01servoturnhomed",
|
| | | "addressIndex": 72
|
| | | },
|
| | | {
|
| | | "codeId": "A02servoturnhomed",
|
| | | "addressIndex": 73
|
| | | },
|
| | | {
|
| | | "codeId": "A01servotravelhomed",
|
| | | "addressIndex": 74
|
| | | },
|
| | | {
|
| | | "codeId": "A02servotravelhomed",
|
| | | "addressIndex": 75
|
| | | },
|
| | | {
|
| | | "codeId": "B01servotravelhomed",
|
| | | "addressIndex": 76
|
| | | },
|
| | | {
|
| | | "codeId": "B02servotravelhomed",
|
| | | "addressIndex": 77
|
| | | },
|
| | | {
|
| | | "codeId": "resetDelay",
|
| | | "addressIndex": 78
|
| | | },
|
| | | {
|
| | | "codeId": "A01travelNegativelimit",
|
| | | "addressIndex": 79
|
| | | },
|
| | | {
|
| | | "codeId": "A01travelPositivelimit",
|
| | | "addressIndex": 80
|
| | | },
|
| | | {
|
| | | "codeId": "A01turnuplimit",
|
| | | "addressIndex": 81
|
| | | },
|
| | | {
|
| | | "codeId": "A01turndownlimit",
|
| | | "addressIndex": 82
|
| | | },
|
| | | {
|
| | | "codeId": "A02travelNegativelimit",
|
| | | "addressIndex": 83
|
| | | },
|
| | | {
|
| | | "codeId": "A02travelPositivelimit",
|
| | | "addressIndex": 84
|
| | | },
|
| | | {
|
| | | "codeId": "A02turnuplimit",
|
| | | "addressIndex": 85
|
| | | },
|
| | | {
|
| | | "codeId": "A02turndownlimit",
|
| | | "addressIndex": 86
|
| | | },
|
| | | {
|
| | | "codeId": "B01travelNegativelimit",
|
| | | "addressIndex": 87
|
| | | },
|
| | | {
|
| | | "codeId": "B01travelPositivelimit",
|
| | | "addressIndex": 88
|
| | | },
|
| | | {
|
| | | "codeId": "B02travelNegativelimit",
|
| | | "addressIndex": 89
|
| | | },
|
| | | {
|
| | | "codeId": "B02travelPositivelimit",
|
| | | "addressIndex": 90
|
| | | }
|
| | | ]
|
| | | } |
| | |
| | | { |
| | | "plcAddressBegin":"DB102.0.0", |
| | | "plcAddressLenght":"11", |
| | | "dataType":"bit", |
| | | "parameteInfor":[ |
| | | "plcAddressBegin": "DB102.0.0", |
| | | "plcAddressLenght": "112", |
| | | "dataType": "bit", |
| | | "parameteInfor": [ |
| | | { |
| | | "codeId": "D01.SRdec", |
| | | "addressIndex":"0" |
| | | "addressIndex": 0 |
| | | }, |
| | | { |
| | | "codeId": "D01.SRinpos", |
| | | "addressIndex":"1" |
| | | "addressIndex": 1 |
| | | }, |
| | | { |
| | | "codeId": "conveyorVelocity(Manual)", |
| | | "addressIndex":"2" |
| | | "codeId": "D02.SRdec", |
| | | "addressIndex": 2 |
| | | }, |
| | | { |
| | | "codeId": "A01A02TURNJOGVelocity", |
| | | "addressIndex":"3" |
| | | "codeId": "D02.SRinpos", |
| | | "addressIndex": 3 |
| | | }, |
| | | { |
| | | "codeId": "A01A02TRAVELJOGVelocity", |
| | | "addressIndex":"4" |
| | | "codeId": "D03.SRinto", |
| | | "addressIndex": 4 |
| | | }, |
| | | { |
| | | "codeId": "B01B02TRAVELJOGVelocity", |
| | | "addressIndex":"5" |
| | | "codeId": "D03.SRdec", |
| | | "addressIndex": 5 |
| | | }, |
| | | { |
| | | "codeId": "A01A02TURNPOSVelocityAUTO", |
| | | "addressIndex":"7" |
| | | "codeId": "D03.SRinpos", |
| | | "addressIndex": 6 |
| | | }, |
| | | { |
| | | "codeId": "A01A02TURNPOSVelocitymanual", |
| | | "addressIndex":"8" |
| | | "codeId": "D04.SRdec", |
| | | "addressIndex": 7 |
| | | }, |
| | | { |
| | | "codeId": "A01A02TRAVELPOSVelocityAUTO", |
| | | "addressIndex":"9" |
| | | "codeId": "D04.SRinpos", |
| | | "addressIndex": 8 |
| | | }, |
| | | { |
| | | "codeId": "D05.SRdec", |
| | | "addressIndex": 9 |
| | | }, |
| | | { |
| | | "codeId": "D05.SRinpos", |
| | | "addressIndex":"10" |
| | | "addressIndex": 10 |
| | | }, |
| | | { |
| | | "codeId": "D06.SRdec", |
| | | "addressIndex": 11 |
| | | }, |
| | | { |
| | | "codeId": "D06.SRinpos", |
| | | "addressIndex": 12 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRindec", |
| | | "addressIndex": 13 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRininpos", |
| | | "addressIndex": 14 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRoutdec", |
| | | "addressIndex": 15 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRoutinpos", |
| | | "addressIndex": 16 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRturnon", |
| | | "addressIndex": 17 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRturnoff", |
| | | "addressIndex": 18 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRup", |
| | | "addressIndex": 19 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRdown", |
| | | "addressIndex": 20 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRoutdec", |
| | | "addressIndex": 21 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRoutinpos", |
| | | "addressIndex": 22 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRindec", |
| | | "addressIndex": 23 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRininpos", |
| | | "addressIndex": 24 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRturnon", |
| | | "addressIndex": 25 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRturnoff", |
| | | "addressIndex": 26 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRup", |
| | | "addressIndex": 27 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRdown", |
| | | "addressIndex": 28 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRinsafety", |
| | | "addressIndex": 29 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRoutsafety", |
| | | "addressIndex": 30 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRinsafety", |
| | | "addressIndex": 31 |
| | | }, |
| | | { |
| | | "codeId": "SB.start(+)", |
| | | "addressIndex": 32 |
| | | }, |
| | | { |
| | | "codeId": "SB.stop(-)", |
| | | "addressIndex": 33 |
| | | }, |
| | | { |
| | | "codeId": "SB.reset", |
| | | "addressIndex": 34 |
| | | }, |
| | | { |
| | | "codeId": "SB.auto/manul", |
| | | "addressIndex": 35 |
| | | }, |
| | | { |
| | | "codeId": "D01.SB.confirm", |
| | | "addressIndex": 36 |
| | | }, |
| | | { |
| | | "codeId": "SB.emg", |
| | | "addressIndex": 37 |
| | | }, |
| | | { |
| | | "codeId": "D01.SB.start", |
| | | "addressIndex": 38 |
| | | }, |
| | | { |
| | | "codeId": "D06.SB.start", |
| | | "addressIndex": 39 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRoutsafety", |
| | | "addressIndex": 40 |
| | | }, |
| | | { |
| | | "codeId": "SafetyDoor.requset", |
| | | "addressIndex": 41 |
| | | }, |
| | | { |
| | | "codeId": "SafetyDoor.confirm", |
| | | "addressIndex": 42 |
| | | }, |
| | | { |
| | | "codeId": "SafetyDoor.reset", |
| | | "addressIndex": 43 |
| | | }, |
| | | { |
| | | "codeId": "Sspce", |
| | | "addressIndex": 44 |
| | | }, |
| | | { |
| | | "codeId": "Sspce", |
| | | "addressIndex": 45 |
| | | }, |
| | | { |
| | | "codeId": "Sspce", |
| | | "addressIndex": 46 |
| | | }, |
| | | { |
| | | "codeId": "Sspce", |
| | | "addressIndex": 47 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRleftdec", |
| | | "addressIndex": 48 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRleftinpos", |
| | | "addressIndex": 49 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRleftsafety", |
| | | "addressIndex": 50 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRrightdec", |
| | | "addressIndex": 51 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRrightinpos", |
| | | "addressIndex": 52 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRrightsafety", |
| | | "addressIndex": 53 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRturnhome", |
| | | "addressIndex": 54 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRturnup", |
| | | "addressIndex": 55 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRturndown", |
| | | "addressIndex": 56 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRtravelhome", |
| | | "addressIndex": 57 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRtravelleftdec", |
| | | "addressIndex": 58 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRtravelleftlimit", |
| | | "addressIndex": 59 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRtravelrightdec", |
| | | "addressIndex": 60 |
| | | }, |
| | | { |
| | | "codeId": "A01.SRtravelrightlimit", |
| | | "addressIndex": 61 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 62 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 63 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRleftdec", |
| | | "addressIndex": 64 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRleftinpos", |
| | | "addressIndex": 65 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRleftsafety", |
| | | "addressIndex": 66 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRrightdec", |
| | | "addressIndex": 67 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRrightinpos", |
| | | "addressIndex": 68 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRrightsafety", |
| | | "addressIndex": 69 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRturnhome", |
| | | "addressIndex": 70 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRturnup", |
| | | "addressIndex": 71 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRturndown", |
| | | "addressIndex": 72 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRtravelhome", |
| | | "addressIndex": 73 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRtravelleftdec", |
| | | "addressIndex": 74 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRtravelleftlimit", |
| | | "addressIndex": 75 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRtravelrightdec", |
| | | "addressIndex": 76 |
| | | }, |
| | | { |
| | | "codeId": "A02.SRtravelrightlimit", |
| | | "addressIndex": 77 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 78 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 79 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRorigin", |
| | | "addressIndex": 80 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRleftlimit", |
| | | "addressIndex": 81 |
| | | }, |
| | | { |
| | | "codeId": "B01.SRrightlimit", |
| | | "addressIndex": 82 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRorigin", |
| | | "addressIndex": 83 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRleftlimit", |
| | | "addressIndex": 84 |
| | | }, |
| | | { |
| | | "codeId": "B02.SRrightlimit", |
| | | "addressIndex": 85 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 86 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 87 |
| | | }, |
| | | { |
| | | "codeId": "LED.red", |
| | | "addressIndex": 88 |
| | | }, |
| | | { |
| | | "codeId": "LED.green", |
| | | "addressIndex": 89 |
| | | }, |
| | | { |
| | | "codeId": "LED.yellow", |
| | | "addressIndex": 90 |
| | | }, |
| | | { |
| | | "codeId": "D01.LED.green", |
| | | "addressIndex": 91 |
| | | }, |
| | | { |
| | | "codeId": "D06.LED.green", |
| | | "addressIndex": 92 |
| | | }, |
| | | { |
| | | "codeId": "B01.YV.turn", |
| | | "addressIndex": 93 |
| | | }, |
| | | { |
| | | "codeId": "B01.YV.updown", |
| | | "addressIndex": 94 |
| | | }, |
| | | { |
| | | "codeId": "B01.YV.gassing", |
| | | "addressIndex": 95 |
| | | }, |
| | | { |
| | | "codeId": "B02.YV.turn", |
| | | "addressIndex": 96 |
| | | }, |
| | | { |
| | | "codeId": "B02.YV.updown", |
| | | "addressIndex": 97 |
| | | }, |
| | | { |
| | | "codeId": "B02.YV.gassing", |
| | | "addressIndex": 98 |
| | | }, |
| | | { |
| | | "codeId": "SafetyDoor.Led", |
| | | "addressIndex": 99 |
| | | }, |
| | | { |
| | | "codeId": "SafetyDoor.open", |
| | | "addressIndex": 100 |
| | | }, |
| | | { |
| | | "codeId": "D01SB.confirm", |
| | | "addressIndex": 101 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 102 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 103 |
| | | }, |
| | | { |
| | | "codeId": "A01oilPump", |
| | | "addressIndex": 104 |
| | | }, |
| | | { |
| | | "codeId": "A01motorCtr", |
| | | "addressIndex": 105 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 106 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 107 |
| | | }, |
| | | { |
| | | "codeId": "A02oilPump", |
| | | "addressIndex": 108 |
| | | }, |
| | | { |
| | | "codeId": "A02motorCtr", |
| | | "addressIndex": 109 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 110 |
| | | }, |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 111 |
| | | } |
| | | , |
| | | { |
| | | "codeId": "space", |
| | | "addressIndex": 111 |
| | | } |
| | | ] |
| | | } |
| | | } |
| | |
| | | {
|
| | | "plcAddressBegin": "DB103.0",
|
| | | "plcAddressLenght": "256",
|
| | | "plcAddressLenght": "258",
|
| | | "dataType": "word",
|
| | | "parameteInfor": [
|
| | | {
|
| | |
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | }
|
| | |
|
| | | ,
|
| | | {
|
| | | "codeId": "Scanningguns",
|
| | | "addressIndex": "256",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | }
|
| | | ,
|
| | | {
|
| | | "codeId": "Frameid",
|
| | | "addressIndex": "270",
|
| | | "addressLenght": "2",
|
| | | "unit": ""
|
| | | }
|
| | | ]
|
| | | } |
New file |
| | |
| | | {
|
| | | "plcAddressBegin": "DB101.0.0",
|
| | | "plcAddressLenght": "93",
|
| | | "dataType": "bit",
|
| | | "parameteInfor": [
|
| | | {
|
| | | "codeId": "D01VFDconveyor",
|
| | | "addressIndex": 0
|
| | | },
|
| | | {
|
| | | "codeId": "D02VFDconveyor",
|
| | | "addressIndex": 1
|
| | | },
|
| | | {
|
| | | "codeId": "D03VFDconveyor",
|
| | | "addressIndex": 2
|
| | | },
|
| | | {
|
| | | "codeId": "D04VFDconveyor",
|
| | | "addressIndex": 3
|
| | | },
|
| | | {
|
| | | "codeId": "D05VFDconveyor",
|
| | | "addressIndex": 4
|
| | | },
|
| | | {
|
| | | "codeId": "D06VFDconveyor",
|
| | | "addressIndex": 5
|
| | | },
|
| | | {
|
| | | "codeId": "A01VFDconveyor",
|
| | | "addressIndex": 6
|
| | | },
|
| | | {
|
| | | "codeId": "A02VFDconveyor",
|
| | | "addressIndex": 7
|
| | | },
|
| | | {
|
| | | "codeId": "B01VFDconveyor",
|
| | | "addressIndex": 8
|
| | | },
|
| | | {
|
| | | "codeId": "B02VFDconveyor",
|
| | | "addressIndex": 9
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURN",
|
| | | "addressIndex": 10
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURN",
|
| | | "addressIndex": 11
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVEL",
|
| | | "addressIndex": 12
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVEL",
|
| | | "addressIndex": 13
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVEL",
|
| | | "addressIndex": 14
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVEL",
|
| | | "addressIndex": 15
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURNPOS",
|
| | | "addressIndex": 16
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURNPOS",
|
| | | "addressIndex": 17
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVELPOS",
|
| | | "addressIndex": 18
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVELPOS",
|
| | | "addressIndex": 19
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVELPOS",
|
| | | "addressIndex": 20
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVELPOS",
|
| | | "addressIndex": 21
|
| | | },
|
| | | {
|
| | | "codeId": "B01YVTURN",
|
| | | "addressIndex": 22
|
| | | },
|
| | | {
|
| | | "codeId": "B01YVUPDOWN",
|
| | | "addressIndex": 23
|
| | | },
|
| | | {
|
| | | "codeId": "B02YVTURN",
|
| | | "addressIndex": 24
|
| | | },
|
| | | {
|
| | | "codeId": "B02YVUPDOWN",
|
| | | "addressIndex": 25
|
| | | },
|
| | | {
|
| | | "codeId": "B01YVGassing",
|
| | | "addressIndex": 26
|
| | | },
|
| | | {
|
| | | "codeId": "B02YVGassing",
|
| | | "addressIndex": 27
|
| | | },
|
| | | {
|
| | | "codeId": "A01VFDconveyorreverse",
|
| | | "addressIndex": 28
|
| | | },
|
| | | {
|
| | | "codeId": "A02VFDconveyorreverse",
|
| | | "addressIndex": 29
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURNreset",
|
| | | "addressIndex": 30
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETURNhome",
|
| | | "addressIndex": 31
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVELreset",
|
| | | "addressIndex": 32
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURNreset",
|
| | | "addressIndex": 33
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETURNhome",
|
| | | "addressIndex": 34
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVELreset",
|
| | | "addressIndex": 35
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVELreset",
|
| | | "addressIndex": 36
|
| | | },
|
| | | {
|
| | | "codeId": "B01SERVETRAVELhome",
|
| | | "addressIndex": 37
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVELreset",
|
| | | "addressIndex": 38
|
| | | },
|
| | | {
|
| | | "codeId": "B02SERVETRAVELhome",
|
| | | "addressIndex": 39
|
| | | },
|
| | | {
|
| | | "codeId": "Manualstoragestartup",
|
| | | "addressIndex": 40
|
| | | },
|
| | | {
|
| | | "codeId": "Manualoutputstartup",
|
| | | "addressIndex": 41
|
| | | },
|
| | | {
|
| | | "codeId": "A01oilpump",
|
| | | "addressIndex": 42
|
| | | },
|
| | | {
|
| | | "codeId": "A02oilpump",
|
| | | "addressIndex": 43
|
| | | },
|
| | | {
|
| | | "codeId": "A01get1#gridaddress",
|
| | | "addressIndex": 44
|
| | | },
|
| | | {
|
| | | "codeId": "A01get22#gridaddress",
|
| | | "addressIndex": 45
|
| | | },
|
| | | {
|
| | | "codeId": "A01get43#gridaddress",
|
| | | "addressIndex": 46
|
| | | },
|
| | | {
|
| | | "codeId": "A01get64#gridaddress",
|
| | | "addressIndex": 47
|
| | | },
|
| | | {
|
| | | "codeId": "A01get85#gridaddress",
|
| | | "addressIndex": 48
|
| | | },
|
| | | {
|
| | | "codeId": "A01get106#gridaddress",
|
| | | "addressIndex": 49
|
| | | },
|
| | | {
|
| | | "codeId": "A01get127#gridaddress",
|
| | | "addressIndex": 50
|
| | | },
|
| | | {
|
| | | "codeId": "A01get148#gridaddress",
|
| | | "addressIndex": 51
|
| | | },
|
| | | {
|
| | | "codeId": "A01get169#gridaddress",
|
| | | "addressIndex": 52
|
| | | },
|
| | | {
|
| | | "codeId": "A02get190#gridaddress",
|
| | | "addressIndex": 53
|
| | | },
|
| | | {
|
| | | "codeId": "A02get1#gridaddress",
|
| | | "addressIndex": 54
|
| | | },
|
| | | {
|
| | | "codeId": "A02get22#gridaddress",
|
| | | "addressIndex": 55
|
| | | },
|
| | | {
|
| | | "codeId": "A02get43#gridaddress",
|
| | | "addressIndex": 56
|
| | | },
|
| | | {
|
| | | "codeId": "A02get64#gridaddress",
|
| | | "addressIndex": 57
|
| | | },
|
| | | {
|
| | | "codeId": "A02get85#gridaddress",
|
| | | "addressIndex": 58
|
| | | },
|
| | | {
|
| | | "codeId": "A02get106#gridaddress",
|
| | | "addressIndex": 59
|
| | | },
|
| | | {
|
| | | "codeId": "A02get127#gridaddress",
|
| | | "addressIndex": 60
|
| | | },
|
| | | {
|
| | | "codeId": "A02get148#gridaddress",
|
| | | "addressIndex": 61
|
| | | },
|
| | | {
|
| | | "codeId": "A02get169#gridaddress",
|
| | | "addressIndex": 62
|
| | | },
|
| | | {
|
| | | "codeId": "A02get190#gridaddress",
|
| | | "addressIndex": 63
|
| | | },
|
| | | {
|
| | | "codeId": "B01get1#gridaddress",
|
| | | "addressIndex": 64
|
| | | },
|
| | | {
|
| | | "codeId": "B01get22#gridaddress",
|
| | | "addressIndex": 65
|
| | | },
|
| | | {
|
| | | "codeId": "B01get43#gridaddress",
|
| | | "addressIndex": 66
|
| | | },
|
| | | {
|
| | | "codeId": "B01get64#gridaddress",
|
| | | "addressIndex": 67
|
| | | },
|
| | | {
|
| | | "codeId": "B01get85#gridaddress",
|
| | | "addressIndex": 68
|
| | | },
|
| | | {
|
| | | "codeId": "B02get106#gridaddress",
|
| | | "addressIndex": 69
|
| | | },
|
| | | {
|
| | | "codeId": "B02get127#gridaddress",
|
| | | "addressIndex": 70
|
| | | },
|
| | | {
|
| | | "codeId": "B02get148#gridaddress",
|
| | | "addressIndex": 71
|
| | | },
|
| | | {
|
| | | "codeId": "B02get169#gridaddress",
|
| | | "addressIndex": 72
|
| | | },
|
| | | {
|
| | | "codeId": "B02get190#gridaddress",
|
| | | "addressIndex": 73
|
| | | },
|
| | | {
|
| | | "codeId": "D01IDClean",
|
| | | "addressIndex": 74
|
| | | },
|
| | | {
|
| | | "codeId": "D02IDClean",
|
| | | "addressIndex": 75
|
| | | },
|
| | | {
|
| | | "codeId": "D03IDClean",
|
| | | "addressIndex": 76
|
| | | },
|
| | | {
|
| | | "codeId": "D04IDClean",
|
| | | "addressIndex": 77
|
| | | },
|
| | | {
|
| | | "codeId": "D05IDClean",
|
| | | "addressIndex": 78
|
| | | },
|
| | | {
|
| | | "codeId": "D06IDClean",
|
| | | "addressIndex": 79
|
| | | },
|
| | | {
|
| | | "codeId": "A01IDClean",
|
| | | "addressIndex": 80
|
| | | },
|
| | | {
|
| | | "codeId": "A02IDClean",
|
| | | "addressIndex": 81
|
| | | },
|
| | | {
|
| | | "codeId": "B01IDClean",
|
| | | "addressIndex": 82
|
| | | },
|
| | | {
|
| | | "codeId": "B02IDClean",
|
| | | "addressIndex": 83
|
| | | },
|
| | | {
|
| | | "codeId": "abort/resumeTasks",
|
| | | "addressIndex": 84
|
| | | },
|
| | | {
|
| | | "codeId": "A01SERVETRAVELhome",
|
| | | "addressIndex": 85
|
| | | },
|
| | | {
|
| | | "codeId": "A02SERVETRAVELhome",
|
| | | "addressIndex": 86
|
| | | },
|
| | | {
|
| | | "codeId": "A01A02travelHoming",
|
| | | "addressIndex": 87
|
| | | },
|
| | | {
|
| | | "codeId": "A01halfAutoSelect",
|
| | | "addressIndex": 88
|
| | | },
|
| | | {
|
| | | "codeId": "A02halfAutoSelect",
|
| | | "addressIndex": 89
|
| | | },
|
| | | {
|
| | | "codeId": "A02abortTasks",
|
| | | "addressIndex": 90
|
| | | },
|
| | | {
|
| | | "codeId": "emgHMI",
|
| | | "addressIndex": 91
|
| | | },
|
| | | {
|
| | | "codeId": "Scanningmethod",
|
| | | "addressIndex": 92
|
| | | ]
|
| | | } |