| | |
| | | station.put("model", status1[0] ? 1 : 0); |
| | | station.put("busy", status1[1] ? 1 : 0); |
| | | station.put("hasTray", status1[2] ? 1 : 0); |
| | | station.put("inMode", status1[3] ? 1 : 0); |
| | | station.put("outMode", status1[4] ? 1 : 0); |
| | | station.put("allowShuttleTake", status2[5] ? 1 : 0); |
| | | station.put("allowShuttlePut", status2[6] ? 1 : 0); |
| | | station.put("deviceError", status2[7] ? 1 : 0); |
| | |
| | | } else if (commandObj.getInteger("mode") == 10000) { |
| | | //写入输送线数据 |
| | | |
| | | JSONObject commandBody = commandObj.getJSONObject("commandBody"); |
| | | Integer siteId = commandBody.getInteger("siteId"); |
| | | Integer staNo = commandBody.getInteger("staNo"); |
| | | Integer taskNo = commandBody.getInteger("taskNo"); |
| | | String address = commandBody.getString("address"); |
| | | Integer siteId = commandObj.getInteger("siteId"); |
| | | Integer staNo = commandObj.getInteger("staNo"); |
| | | Integer taskNo = commandObj.getInteger("taskNo"); |
| | | String address = commandObj.getString("address"); |
| | | |
| | | short[] array = new short[2]; |
| | | array[0] = staNo.shortValue();//目标站 |
| | |
| | | |
| | | resultData.put("commandData", array); |
| | | |
| | | OperateResult result = siemensS7Net.Write("address", array); |
| | | OperateResult result = siemensS7Net.Write(address, array); |
| | | if (result.IsSuccess) { |
| | | resultData.put("result", "success"); |
| | | } |