| | |
| | | import com.mes.service.PlcParameter; |
| | | import com.mes.utils.HexUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.http.protocol.HTTP; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | |
| | | public Long machineId = 2L; |
| | | public List<Map> sendRecords = new ArrayList<>(); |
| | | |
| | | // public void plcStart1(PlcAgreement plcAgreement,String zuKey) { |
| | | // //逻辑组 :请求组,完成组,其他组 |
| | | // //List<Map<String,String>> map=new ArrayList<>();//逻辑组 |
| | | // Map<String,Map<String,Map<String,String>>> map=new HashMap<>();//请求逻辑组 |
| | | |
| | | // Map<String,Map<String,String>> zuMap=map.get(zuKey); |
| | | // |
| | | // for(String key:map.keySet()){ |
| | | // boolean istrue=false; |
| | | // if(plcAgreement.getPlcParameter(key).getValueString()==map.get(key)){ |
| | | // istrue=true; |
| | | // } |
| | | // map.put(key,plcAgreement.getPlcParameter(key).getValueString()); |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | public void plcStart() { |
| | | Machine machine=machineMapper.selectById(machineId); |
| | | ModbusTcp modbusTcp1 =new ModbusTcp(machine.getIp(),machine.getPort(),"PlcLoad"); |