fix 工位模板驱动
This commit is contained in:
@@ -237,6 +237,7 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
last_task = task;
|
||||
last_container_type = container_type;
|
||||
last_to_command= to_command;
|
||||
last_barcode = barcode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -265,6 +265,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
if (!requireSucess && this.move != 0) {
|
||||
putStorage("3");
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
//半托缓存强制去包装
|
||||
if (!requireSucess && this.move != 0) {
|
||||
@@ -516,7 +517,11 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
||||
this.writing(1);
|
||||
if (this.mode == 6) {
|
||||
this.writing(1);
|
||||
} else {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
this.setRequireSucess(true);
|
||||
}
|
||||
}
|
||||
@@ -559,7 +564,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
if (instruction != null) {
|
||||
instruction_num = Integer.parseInt(instruction.getInstruction_code());
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_command, 1);
|
||||
itemMap.put(to_task, instruction_num);
|
||||
@@ -578,7 +583,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
+ "." + ItemProtocol.item_to_target;
|
||||
String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_to_task;
|
||||
|
||||
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
if (type == 1) {
|
||||
itemMap.put(to_command, command);
|
||||
@@ -597,7 +602,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
public void writing(int command) {
|
||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_to_command;
|
||||
|
||||
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_command, command);
|
||||
try{
|
||||
|
||||
@@ -194,10 +194,10 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
|
||||
if (true) {
|
||||
this.logItemChanged(itemId, accessor_value, value, itemDto);
|
||||
}
|
||||
if(!ObjectUtil.isEmpty(value)){
|
||||
// if(!ObjectUtil.isEmpty(value)){
|
||||
// accessor_value.setValue(itemId, value);
|
||||
// }
|
||||
accessor_value.setValue(itemId, value);
|
||||
}
|
||||
//accessor_value.setValue(itemId, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
@@ -2,7 +2,7 @@ ENV = 'production'
|
||||
|
||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:8010'
|
||||
VUE_APP_BASE_API = 'http://192.168.1.200:8010'
|
||||
#VUE_APP_BASE_API = 'http://127.0.0.1:8010'
|
||||
# 如果接口是 http 形式, wss 需要改为 ws
|
||||
VUE_APP_WS_API = 'ws://127.0.0.1:8010'
|
||||
|
||||
Reference in New Issue
Block a user