输送机读取数据初始化
This commit is contained in:
@@ -111,7 +111,13 @@ public class ScheduleThread {
|
||||
ConcurrentHashMap<String, MsgDdj> ddjList = new ConcurrentHashMap<>();
|
||||
List<MsgDdj> msgDdjs = msgDdjService.selectMsgDdjList(new MsgDdj());
|
||||
for (MsgDdj msgDdj : msgDdjs) {
|
||||
ddjList.put("ddj"+msgDdj.getId(), msgDdj);
|
||||
switch (msgDdj.getId()){
|
||||
case 1:
|
||||
msgDdj.setPlcDbReadAddress("DB40.0");
|
||||
case 2:
|
||||
msgDdj.setPlcDbReadAddress("DB41.0");
|
||||
}
|
||||
ddjList.put("ddj" + msgDdj.getId(), msgDdj);
|
||||
}
|
||||
PlcDdjRead plcDdjRead = new PlcDdjRead(ddjList, new PlcConnectInfo("127.0.0.1", 102));
|
||||
Thread plcDdjReadThread = new Thread(plcDdjRead);
|
||||
|
||||
Reference in New Issue
Block a user