|
|
@@ -54,7 +54,7 @@ public class DeviceData { |
|
|
|
} |
|
|
|
//----------------------------------------------------------------End 测试 ---------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
//region 初始化 |
|
|
|
public void Init() { |
|
|
|
ThreadManager.Get().StartLong("Plc设备数据监听", true, new IThread() { |
|
|
|
@Override |
|
|
@@ -124,7 +124,17 @@ public class DeviceData { |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
//endregion |
|
|
|
|
|
|
|
//region 完成信号监听 |
|
|
|
|
|
|
|
/** |
|
|
|
* 完成信号监听 |
|
|
|
* |
|
|
|
* @param add 监听地址 |
|
|
|
* @param name 监听 KEY |
|
|
|
* @param callback 执行委托 |
|
|
|
*/ |
|
|
|
private void CompleteListen(String add, String name, IRun callback) { |
|
|
|
ModbusTcpServer.get().ReadBool(add, 1, new IReadCallBack<boolean[]>() { |
|
|
|
@Override |
|
|
@@ -139,8 +149,9 @@ public class DeviceData { |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
//endregion |
|
|
|
|
|
|
|
|
|
|
|
// region 通知接口 |
|
|
|
/** |
|
|
|
* 配料完成通知 |
|
|
|
*/ |
|
|
@@ -160,10 +171,11 @@ public class DeviceData { |
|
|
|
* 去皮完成 |
|
|
|
*/ |
|
|
|
public IRun OnPeelingCompleteNotify; |
|
|
|
//endregion |
|
|
|
|
|
|
|
/** |
|
|
|
* 校准值写入 |
|
|
|
* ,PLC 地址VW100--VW118 |
|
|
|
* PLC 地址VW100--VW118 |
|
|
|
* |
|
|
|
* @param value 需要写入的值 |
|
|
|
* @param ch 需要写入的通道编号,1--10 |
|
|
@@ -407,6 +419,8 @@ public class DeviceData { |
|
|
|
return CleaningComplete; |
|
|
|
} |
|
|
|
|
|
|
|
//region 获取或设置-校准模式 |
|
|
|
|
|
|
|
/** |
|
|
|
* 设置校准模式 |
|
|
|
* |
|
|
@@ -430,6 +444,8 @@ public class DeviceData { |
|
|
|
return CalibrationMode; |
|
|
|
} |
|
|
|
|
|
|
|
//endregion |
|
|
|
|
|
|
|
/** |
|
|
|
* 称当前重量 |
|
|
|
*/ |
|
|
@@ -448,6 +464,8 @@ public class DeviceData { |
|
|
|
return CallCurrentWeight.get(ch); |
|
|
|
} |
|
|
|
|
|
|
|
//region 获取或设置-校准基准时间 |
|
|
|
|
|
|
|
/** |
|
|
|
* 设置校准基准时间 |
|
|
|
* |
|
|
@@ -471,6 +489,10 @@ public class DeviceData { |
|
|
|
return CalibrationReferenceTime; |
|
|
|
} |
|
|
|
|
|
|
|
//endregion |
|
|
|
|
|
|
|
//region 获取或设置-排水时间 |
|
|
|
|
|
|
|
/** |
|
|
|
* 设置排水时间 |
|
|
|
* |
|
|
@@ -494,6 +516,10 @@ public class DeviceData { |
|
|
|
return DrainageTime; |
|
|
|
} |
|
|
|
|
|
|
|
//endregion |
|
|
|
|
|
|
|
//region 获取或设置-清洗剂添加时间 |
|
|
|
|
|
|
|
/** |
|
|
|
* 设置清洗剂添加时间 |
|
|
|
* |
|
|
@@ -517,6 +543,10 @@ public class DeviceData { |
|
|
|
return AddCleaningAgentTime; |
|
|
|
} |
|
|
|
|
|
|
|
//endregion |
|
|
|
|
|
|
|
//region 获取或设置-进水时间 |
|
|
|
|
|
|
|
/** |
|
|
|
* 设置进水时间 |
|
|
|
* |
|
|
@@ -540,6 +570,10 @@ public class DeviceData { |
|
|
|
return InletTime; |
|
|
|
} |
|
|
|
|
|
|
|
//endregion |
|
|
|
|
|
|
|
//region 获取或设置-循环清洗时间 |
|
|
|
|
|
|
|
/** |
|
|
|
* 设置循环清洗时间 |
|
|
|
* |
|
|
@@ -562,6 +596,7 @@ public class DeviceData { |
|
|
|
public short getCyclicCleaningTime() { |
|
|
|
return CyclicCleaningTime; |
|
|
|
} |
|
|
|
//endregion |
|
|
|
|
|
|
|
/** |
|
|
|
* 设置8路称校准砝码重量 |
|
|
|