| | |
| | | this.storageCageService = storageCageService; |
| | | this.plcParameterObject = new PlcParameterObject(); |
| | | this.plcBitObject = new PlcBitObject(); |
| | | String jsonFilePath = "JsonFile/PlcParameter.json"; |
| | | InitUtil.initword(jsonFilePath); // 初始化 PlcParameterObject |
| | | String jsonFilePath2 = "JsonFile/PlcSign.json"; |
| | | InitUtil.initbit(jsonFilePath2); // 初始化 PlcSign |
| | | // String jsonFilePath = "JsonFile/PlcParameter.json"; |
| | | // InitUtil.initword(jsonFilePath); // 初始化 PlcParameterObject |
| | | // String jsonFilePath2 = "JsonFile/PlcSign.json"; |
| | | // InitUtil.initbit(jsonFilePath2); // 初始化 PlcSign |
| | | |
| | | |
| | | } |
| | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // new short[]{1,1, 1, 1, 1, 1, 2, 33, 2,3, 4, 5} |
| | | // new short[]{0,0, 0, 0, 0, 0, 0, 0, 0, 0} |
| | | |
| | | System.out.println(plcParameterObject.getPlcParameterValues(addresses)); |
| | | jsonObject.append("params", plcParameterObject.getPlcParameterValues(addresses)); |
| | | jsonObject.append("dache1", plcParameterObject.getPlcParameter("A01A02TRAVELPOSVelocityAUTO").getValue()); |
| | | jsonObject.append("xiaoche", plcParameterObject.getPlcParameter("B01B02TRAVELPOSVelocityAUTO").getValue()); |