diff --git a/app/src/main/java/com/bonait/bnframework/business/ConfigData.java b/app/src/main/java/com/bonait/bnframework/business/ConfigData.java index f16b0145..d231c647 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ConfigData.java +++ b/app/src/main/java/com/bonait/bnframework/business/ConfigData.java @@ -1081,24 +1081,15 @@ public class ConfigData { */ public void RevertPLCProcess() { try { - List plcaddresses = ConfigName.getInstance().PlcAddress_大炒; - List processTS = ConfigName.getInstance().Process_大炒; - - if (ConfigName.getInstance().versionSelectionEnum.equals("大炒版本")) { - plcaddresses = ConfigName.getInstance().PlcAddress_大炒; - processTS = ConfigName.getInstance().Process_大炒; - } else if (ConfigName.getInstance().versionSelectionEnum.equals("大炒自动投料版本")) { - plcaddresses = ConfigName.getInstance().PlcAddress_大炒自动投料; - processTS = ConfigName.getInstance().Process_大炒自动投料; - } else if (ConfigName.getInstance().versionSelectionEnum.equals("小炒版本")) { - plcaddresses = ConfigName.getInstance().PlcAddress_小炒; - processTS = ConfigName.getInstance().Process_小炒; - } else if (ConfigName.getInstance().versionSelectionEnum.equals("一拖四大炒")) { - plcaddresses = ConfigName.getInstance().PlcAddress_一拖四; - processTS = ConfigName.getInstance().Process_一拖四; - } else if (ConfigName.getInstance().versionSelectionEnum.equals("一拖二大炒")) { - plcaddresses = ConfigName.getInstance().PlcAddress_大炒自动投料; - processTS = ConfigName.getInstance().Process_一拖四; + List plcaddresses = ConfigName.getInstance().PlcAddress_燃气大炒; + List processTS = ConfigName.getInstance().Process_燃气大炒; + + if (ConfigName.getInstance().versionSelectionEnum.equals("燃气自翻炒锅")) { + plcaddresses = ConfigName.getInstance().PlcAddress_燃气大炒; + processTS = ConfigName.getInstance().Process_燃气大炒; + } if (ConfigName.getInstance().versionSelectionEnum.equals("燃气自翻炒锅1")) { + plcaddresses = ConfigName.getInstance().PlcAddress_燃气大炒; + processTS = ConfigName.getInstance().Process_燃气大炒; } //region 恢复PLC diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java index 8c015d8c..57369225 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -72,7 +72,6 @@ public class ExecuteTheRecipe { * 商品是否强制结束 */ public static boolean IsForcedEnd = false; - /** * 当前配方 */ diff --git a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java index cf6a163b..2406fcc8 100644 --- a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java +++ b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java @@ -265,7 +265,7 @@ public class ConfigName { /** * 大炒基础PLC模型 */ - public List PlcAddress_大炒 = new ArrayList() {{ + public List PlcAddress_燃气大炒 = new ArrayList() {{ //硬件设备 初始化 add(new Res_PLCADDRESS("硬件设备", "-------------", 0, 0)); @@ -410,712 +410,15 @@ public class ConfigName { /** * 大炒工序模型 */ - public List Process_大炒 = new ArrayList() {{ - add(new ProcessT("搅拌", Arrays.asList("搅拌速度", "延迟(秒)"))); - add(new ProcessT("位置", Arrays.asList("转动速度", "位置动作", "延迟(秒)"))); - add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); - add(new ProcessT("主料", Arrays.asList("主料名称", "主料重量"))); - add(new ProcessT("液体料", new ArrayList<>())); - add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); + public List Process_燃气大炒 = new ArrayList() {{ + add(new ProcessT("搅拌", Arrays.asList("搅拌速度", "等待(秒)"))); + add(new ProcessT("打火", Arrays.asList("打火动作", "等待(秒)"))); + add(new ProcessT("抽油", Arrays.asList("出料克数", "一环功率", "二环功率", "三环功率", "四环功率", "温度设定", "锅内重量", "热油(秒)"))); + add(new ProcessT("主料", Arrays.asList("主料名称", "一环功率", "二环功率", "三环功率", "四环功率", "温度设定", "锅内重量", "烹饪(秒)"))); + add(new ProcessT("延迟", Arrays.asList("等待(秒)"))); add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); add(new ProcessT("清洗", Arrays.asList("等待(秒)"))); }}; - - /** - * 大炒自动投料基础PLC模型 - */ - public List PlcAddress_大炒自动投料 = new ArrayList() {{ - - //硬件设备 初始化 - add(new Res_PLCADDRESS("硬件设备", "-------------", 0, 0)); - add(new Res_PLCADDRESS("初始化", "M10.0", 1, 1)); - add(new Res_PLCADDRESS("停止", "M10.1", 1, 1)); - add(new Res_PLCADDRESS("复位", "M10.2", 0, 1)); - - //搅拌模型 - add(new Res_PLCADDRESS("模型控制", "-------------", 0, 0)); - add(new Res_PLCADDRESS("搅拌", "M10.3", 0, 1)); - add(new Res_PLCADDRESS("搅拌速度", "VW102", 1, 1)); - - //翻转正转模型 - add(new Res_PLCADDRESS("翻转正转", "M10.4", 0, 1)); - add(new Res_PLCADDRESS("翻转反转", "M10.5", 0, 1)); - add(new Res_PLCADDRESS("转动速度", "VW104", 1, 1)); - - - //加热模型 - add(new Res_PLCADDRESS("加热", "M10.6", 0, 1)); - add(new Res_PLCADDRESS("加热功率", "VW100", 1, 1)); - add(new Res_PLCADDRESS("温控开关", "M17.6", 1, 1)); - add(new Res_PLCADDRESS("暂停开关", "M17.7", 1, 1)); - - //主料 - add(new Res_PLCADDRESS("主料", "M17.4", 0, 1)); - - //抽水放水 - add(new Res_PLCADDRESS("炒锅抽水", "M10.7", 0, 1)); - add(new Res_PLCADDRESS("炒锅放水", "M11.0", 0, 1)); - - - //出菜模型 - add(new Res_PLCADDRESS("出菜", "M11.5", 0, 1)); - - - //位置动作 - add(new Res_PLCADDRESS("原点位", "M11.4", 0, 1)); - add(new Res_PLCADDRESS("倒菜位", "M12.7", 0, 1)); - add(new Res_PLCADDRESS("抽料位", "M11.7", 0, 1)); - add(new Res_PLCADDRESS("清洗位", "M13.0", 0, 1)); - add(new Res_PLCADDRESS("炒菜位1", "M12.0", 0, 1)); - add(new Res_PLCADDRESS("炒菜位2", "M12.1", 0, 1)); - add(new Res_PLCADDRESS("炒菜位3", "M12.2", 0, 1)); - - add(new Res_PLCADDRESS("出餐启动", "M11.5", 0, 1)); - add(new Res_PLCADDRESS("炒锅清洗", "M11.6", 0, 1)); - - //液体料模型 - add(new Res_PLCADDRESS("料仓校准", "-------------", 0, 0)); - add(new Res_PLCADDRESS("校准时间", "VW112", 1, 1)); - add(new Res_PLCADDRESS("料仓1校准开关", "M12.3", 0, 1)); - add(new Res_PLCADDRESS("料仓1校准值", "VW114", 1, 1)); - add(new Res_PLCADDRESS("料仓2校准开关", "M12.4", 0, 1)); - add(new Res_PLCADDRESS("料仓2校准值", "VW116", 1, 1)); - add(new Res_PLCADDRESS("料仓3校准开关", "M12.5", 0, 1)); - add(new Res_PLCADDRESS("料仓3校准值", "VW118", 1, 1)); - add(new Res_PLCADDRESS("料仓4校准开关", "M13.5", 0, 1)); - add(new Res_PLCADDRESS("料仓4校准值", "VW120", 1, 1)); - add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); - - add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); - add(new Res_PLCADDRESS("料仓1需求值", "VW106", 1, 1)); - add(new Res_PLCADDRESS("料仓1下料", "M11.1", 0, 1)); - add(new Res_PLCADDRESS("料仓2需求值", "VW108", 1, 1)); - add(new Res_PLCADDRESS("料仓2下料", "M11.2", 0, 1)); - add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); - add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); - add(new Res_PLCADDRESS("料仓4需求值", "VW122", 1, 1)); - add(new Res_PLCADDRESS("料仓4下料", "M13.4", 0, 1)); - - add(new Res_PLCADDRESS("料仓手动", "-------------", 0, 0)); - add(new Res_PLCADDRESS("料仓1手动开关", "M13.1", 1, 1)); - add(new Res_PLCADDRESS("料仓2手动开关", "M13.2", 1, 1)); - add(new Res_PLCADDRESS("料仓3手动开关", "M13.3", 1, 1)); - add(new Res_PLCADDRESS("料仓4手动开关", "M10.7", 1, 1)); - - //上下限 - add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); - add(new Res_PLCADDRESS("原点位置下限", "VD150", 1, 1)); - add(new Res_PLCADDRESS("原点位置上限", "VD154", 1, 1)); - add(new Res_PLCADDRESS("洗锅位置下限", "VD158", 1, 1)); - add(new Res_PLCADDRESS("洗锅位置上限", "VD162", 1, 1)); - add(new Res_PLCADDRESS("倒菜位置下限", "VD166", 1, 1)); - add(new Res_PLCADDRESS("倒菜位置上限", "VD170", 1, 1)); - add(new Res_PLCADDRESS("抽调料位置下限", "VD174", 1, 1)); - add(new Res_PLCADDRESS("抽调料位置上限", "VD178", 1, 1)); - add(new Res_PLCADDRESS("1#炒制位置下限", "VD182", 1, 1)); - add(new Res_PLCADDRESS("1#炒制位置上限", "VD186", 1, 1)); - add(new Res_PLCADDRESS("2#炒制位置下限", "VD190", 1, 1)); - add(new Res_PLCADDRESS("2#炒制位置上限", "VD194", 1, 1)); - add(new Res_PLCADDRESS("3#炒制位置下限", "VD198", 1, 1)); - add(new Res_PLCADDRESS("3#炒制位置上限", "VD202", 1, 1)); - add(new Res_PLCADDRESS("炒锅工作范围下限", "VD206", 1, 1)); - add(new Res_PLCADDRESS("炒锅工作范围上限", "VD210", 1, 1)); - - //自动投料-平移轴 - add(new Res_PLCADDRESS("平移轴控制", "-------------", 0, 0)); - add(new Res_PLCADDRESS("平移-伺服当前值", "VD220", 1, 1)); - add(new Res_PLCADDRESS("平移-点动速度", "VD224", 1, 1)); - add(new Res_PLCADDRESS("平移-回原点速度", "VD228", 1, 1)); - add(new Res_PLCADDRESS("平移-定位运行速度", "VD232", 1, 1)); - - add(new Res_PLCADDRESS("平移-点动正转", "M14.0", 0, 1)); - add(new Res_PLCADDRESS("平移-点动反转", "M14.1", 0, 1)); - add(new Res_PLCADDRESS("平移-回原点", "M14.2", 0, 1)); - add(new Res_PLCADDRESS("平移-去1号位", "M14.3", 0, 1)); - add(new Res_PLCADDRESS("平移-去2号位", "M14.4", 0, 1)); - add(new Res_PLCADDRESS("平移-去3号位", "M14.5", 0, 1)); - add(new Res_PLCADDRESS("平移-去4号位", "M14.6", 0, 1)); - - add(new Res_PLCADDRESS("平移-1号位置值", "VD236", 1, 1)); - add(new Res_PLCADDRESS("平移-1#位置设定", "M15.0", 0, 1)); - add(new Res_PLCADDRESS("平移-2号位置值", "VD240", 1, 1)); - add(new Res_PLCADDRESS("平移-2#位置设定", "M15.1", 0, 1)); - add(new Res_PLCADDRESS("平移-3号位置值", "VD244", 1, 1)); - add(new Res_PLCADDRESS("平移-3#位置设定", "M15.2", 0, 1)); - add(new Res_PLCADDRESS("平移-4号位置值", "VD248", 1, 1)); - add(new Res_PLCADDRESS("平移-4#位置设定", "M15.3", 0, 1)); - - //自动投料-翻转轴 - add(new Res_PLCADDRESS("翻转轴控制", "-------------", 0, 0)); - add(new Res_PLCADDRESS("翻转-伺服当前值", "VD260", 1, 1)); - add(new Res_PLCADDRESS("翻转-点动速度", "VD264", 1, 1)); - add(new Res_PLCADDRESS("翻转-回原点速度", "VD268", 1, 1)); - add(new Res_PLCADDRESS("翻转-定位运行速度", "VD272", 1, 1)); - - add(new Res_PLCADDRESS("翻转-点动正转", "M16.0", 0, 1)); - add(new Res_PLCADDRESS("翻转-点动反转", "M16.1", 0, 1)); - add(new Res_PLCADDRESS("翻转-回原点", "M16.2", 0, 1)); - add(new Res_PLCADDRESS("翻转-去1号位", "M16.3", 0, 1)); - add(new Res_PLCADDRESS("翻转-去2号位", "M16.4", 0, 1)); - add(new Res_PLCADDRESS("翻转-去3号位", "M16.5", 0, 1)); - add(new Res_PLCADDRESS("翻转-去4号位", "M16.6", 0, 1)); - - add(new Res_PLCADDRESS("翻转-1号位置值", "VD276", 1, 1)); - add(new Res_PLCADDRESS("翻转-1#位置设定", "M17.0", 0, 1)); - add(new Res_PLCADDRESS("翻转-2号位置值", "VD280", 1, 1)); - add(new Res_PLCADDRESS("翻转-2#位置设定", "M17.1", 0, 1)); - add(new Res_PLCADDRESS("翻转-3号位置值", "VD284", 1, 1)); - add(new Res_PLCADDRESS("翻转-3#位置设定", "M17.2", 0, 1)); - add(new Res_PLCADDRESS("翻转-4号位置值", "VD288", 1, 1)); - add(new Res_PLCADDRESS("翻转-4#位置设定", "M17.3", 0, 1)); - add(new Res_PLCADDRESS("倒菜启动", "M17.4", 0, 1)); - add(new Res_PLCADDRESS("磁铁吸合", "M17.5", 0, 1)); - - //反馈信号 - add(new Res_PLCADDRESS("反馈信号", "-------------", 0, 0)); - add(new Res_PLCADDRESS("初始化完成", "M40.0", 1, 0)); - add(new Res_PLCADDRESS("设备急停", "M40.1", 1, 0)); - add(new Res_PLCADDRESS("原点位反馈", "M40.2", 1, 0)); - add(new Res_PLCADDRESS("抽料位反馈", "M40.3", 1, 0)); - add(new Res_PLCADDRESS("炒菜位1反馈", "M40.4", 1, 0)); - add(new Res_PLCADDRESS("炒菜位2反馈", "M40.5", 1, 0)); - add(new Res_PLCADDRESS("炒菜位3反馈", "M40.6", 1, 0)); - add(new Res_PLCADDRESS("倒菜位反馈", "M40.7", 1, 0)); - add(new Res_PLCADDRESS("投料位反馈", "M41.0", 1, 0)); - add(new Res_PLCADDRESS("清洗位反馈", "M41.1", 1, 0)); - add(new Res_PLCADDRESS("料仓1下料完成", "M41.2", 1, 0)); - add(new Res_PLCADDRESS("料仓2下料完成", "M41.3", 1, 0)); - add(new Res_PLCADDRESS("料仓3下料完成", "M41.4", 1, 0)); - add(new Res_PLCADDRESS("料仓4下料完成", "M42.0", 1, 0)); - add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0)); - add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0)); - add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0)); - add(new Res_PLCADDRESS("平移轴在1号位", "M43.0", 1, 0)); - add(new Res_PLCADDRESS("平移轴在2号位", "M43.1", 1, 0)); - add(new Res_PLCADDRESS("平移轴在3号位", "M43.2", 1, 0)); - add(new Res_PLCADDRESS("平移轴在4号位", "M43.3", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在1号位", "M44.0", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在2号位", "M44.1", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0)); - add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0)); - add(new Res_PLCADDRESS("心跳位", "VW1000", 0, 1)); - - - //检测信号 - add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0)); - add(new Res_PLCADDRESS("当前锅底温度", "VD300", 1, 0)); - add(new Res_PLCADDRESS("炒锅搅拌转速", "VD304", 1, 0)); - add(new Res_PLCADDRESS("当前加热档位", "VD308", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前电压", "VD312", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前电流", "VD316", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前功率", "VD320", 1, 0)); - add(new Res_PLCADDRESS("搅拌频率", "VW324", 1, 0)); - add(new Res_PLCADDRESS("搅拌电机电流", "VW326", 1, 0)); - add(new Res_PLCADDRESS("搅拌电机电压", "VW328", 1, 0)); - add(new Res_PLCADDRESS("搅拌变频器温度", "VW330", 1, 0)); - add(new Res_PLCADDRESS("翻转频率", "VW332", 1, 0)); - add(new Res_PLCADDRESS("翻转电机电流", "VW334", 1, 0)); - add(new Res_PLCADDRESS("翻转电机电压", "VW336", 1, 0)); - add(new Res_PLCADDRESS("翻转变频器温度", "VW338", 1, 0)); - add(new Res_PLCADDRESS("编码器当前位值", "VD340", 1, 0)); - - //状态上报 - add(new Res_PLCADDRESS("状态上报", "-------------", 0, 0)); - add(new Res_PLCADDRESS("搅拌电机", "VW350", 1, 0)); - add(new Res_PLCADDRESS("翻转电机", "VW352", 1, 0)); - add(new Res_PLCADDRESS("炒锅", "VW354", 1, 0)); - - }}; - /** - * 大炒自动投料工序模型 - */ - public List Process_大炒自动投料 = new ArrayList() {{ - add(new ProcessT("搅拌", Arrays.asList("搅拌速度", "延迟(秒)"))); - add(new ProcessT("位置", Arrays.asList("转动速度", "位置动作", "延迟(秒)"))); - add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); - add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置", "主料重量", "投料动作","烹饪(秒)"))); - add(new ProcessT("液体料", new ArrayList<>())); - add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); - add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); - add(new ProcessT("清洗", Arrays.asList("等待(秒)"))); - - }}; - /** - * 小炒基础PLC模型 - */ - public List PlcAddress_小炒 = new ArrayList() {{ - - //硬件设备 初始化 - add(new Res_PLCADDRESS("硬件设备", "-------------", 0, 0)); - add(new Res_PLCADDRESS("初始化", "M10.0", 1, 1)); - add(new Res_PLCADDRESS("停止", "M10.1", 1, 1)); - add(new Res_PLCADDRESS("复位", "M10.2", 0, 1)); - - //搅拌模型 - add(new Res_PLCADDRESS("模型控制", "-------------", 0, 0)); - add(new Res_PLCADDRESS("搅拌", "M10.3", 0, 1)); - add(new Res_PLCADDRESS("搅拌速度", "VW102", 1, 1)); - - //翻转正转模型 - add(new Res_PLCADDRESS("翻转正转", "M10.4", 0, 1)); - add(new Res_PLCADDRESS("翻转反转", "M10.5", 0, 1)); - add(new Res_PLCADDRESS("转动速度", "VW104", 1, 1)); - - - //加热模型 - add(new Res_PLCADDRESS("加热", "M10.6", 0, 1)); - add(new Res_PLCADDRESS("加热功率", "VW100", 1, 1)); - add(new Res_PLCADDRESS("温控开关", "M17.6", 1, 1)); - add(new Res_PLCADDRESS("暂停开关", "M17.7", 1, 1)); - - //主料 - add(new Res_PLCADDRESS("主料", "M17.4", 0, 1)); - - //抽水放水 - add(new Res_PLCADDRESS("炒锅抽水", "M10.7", 0, 1)); - add(new Res_PLCADDRESS("炒锅放水", "M11.0", 0, 1)); - - - //出菜模型 - add(new Res_PLCADDRESS("出菜", "M11.5", 0, 1)); - - - //位置动作 - add(new Res_PLCADDRESS("原点位", "M11.4", 0, 1)); - add(new Res_PLCADDRESS("倒菜位", "M12.7", 0, 1)); - add(new Res_PLCADDRESS("抽料位", "M11.7", 0, 1)); - add(new Res_PLCADDRESS("清洗位", "M13.0", 0, 1)); - add(new Res_PLCADDRESS("炒菜位1", "M12.0", 0, 1)); - add(new Res_PLCADDRESS("炒菜位2", "M12.1", 0, 1)); - add(new Res_PLCADDRESS("炒菜位3", "M12.2", 0, 1)); - - add(new Res_PLCADDRESS("出餐启动", "M11.5", 0, 1)); - add(new Res_PLCADDRESS("炒锅清洗", "M11.6", 0, 1)); - - //液体料模型 - add(new Res_PLCADDRESS("料仓校准", "-------------", 0, 0)); - add(new Res_PLCADDRESS("校准时间", "VW112", 1, 1)); - add(new Res_PLCADDRESS("料仓1校准开关", "M12.3", 0, 1)); - add(new Res_PLCADDRESS("料仓1校准值", "VW114", 1, 1)); - add(new Res_PLCADDRESS("料仓2校准开关", "M12.4", 0, 1)); - add(new Res_PLCADDRESS("料仓2校准值", "VW116", 1, 1)); - add(new Res_PLCADDRESS("料仓3校准开关", "M12.5", 0, 1)); - add(new Res_PLCADDRESS("料仓3校准值", "VW118", 1, 1)); - add(new Res_PLCADDRESS("料仓4校准开关", "M13.5", 0, 1)); - add(new Res_PLCADDRESS("料仓4校准值", "VW120", 1, 1)); - add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); - - add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); - add(new Res_PLCADDRESS("料仓1需求值", "VW106", 1, 1)); - add(new Res_PLCADDRESS("料仓1下料", "M11.1", 0, 1)); - add(new Res_PLCADDRESS("料仓2需求值", "VW108", 1, 1)); - add(new Res_PLCADDRESS("料仓2下料", "M11.2", 0, 1)); - add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); - add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); - add(new Res_PLCADDRESS("料仓4需求值", "VW122", 1, 1)); - add(new Res_PLCADDRESS("料仓4下料", "M13.4", 0, 1)); - - add(new Res_PLCADDRESS("料仓手动", "-------------", 0, 0)); - add(new Res_PLCADDRESS("料仓1手动开关", "M13.1", 1, 1)); - add(new Res_PLCADDRESS("料仓2手动开关", "M13.2", 1, 1)); - add(new Res_PLCADDRESS("料仓3手动开关", "M13.3", 1, 1)); - add(new Res_PLCADDRESS("料仓4手动开关", "M10.7", 1, 1)); - - //上下限 - add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); - add(new Res_PLCADDRESS("原点位置下限", "VD150", 1, 1)); - add(new Res_PLCADDRESS("原点位置上限", "VD154", 1, 1)); - add(new Res_PLCADDRESS("洗锅位置下限", "VD158", 1, 1)); - add(new Res_PLCADDRESS("洗锅位置上限", "VD162", 1, 1)); - add(new Res_PLCADDRESS("倒菜位置下限", "VD166", 1, 1)); - add(new Res_PLCADDRESS("倒菜位置上限", "VD170", 1, 1)); - add(new Res_PLCADDRESS("抽调料位置下限", "VD174", 1, 1)); - add(new Res_PLCADDRESS("抽调料位置上限", "VD178", 1, 1)); - add(new Res_PLCADDRESS("1#炒制位置下限", "VD182", 1, 1)); - add(new Res_PLCADDRESS("1#炒制位置上限", "VD186", 1, 1)); - add(new Res_PLCADDRESS("2#炒制位置下限", "VD190", 1, 1)); - add(new Res_PLCADDRESS("2#炒制位置上限", "VD194", 1, 1)); - add(new Res_PLCADDRESS("3#炒制位置下限", "VD198", 1, 1)); - add(new Res_PLCADDRESS("3#炒制位置上限", "VD202", 1, 1)); - add(new Res_PLCADDRESS("炒锅工作范围下限", "VD206", 1, 1)); - add(new Res_PLCADDRESS("炒锅工作范围上限", "VD210", 1, 1)); - - //自动投料-平移轴 - add(new Res_PLCADDRESS("平移轴控制", "-------------", 0, 0)); - add(new Res_PLCADDRESS("平移-伺服当前值", "VD220", 1, 1)); - add(new Res_PLCADDRESS("平移-点动速度", "VD224", 1, 1)); - add(new Res_PLCADDRESS("平移-回原点速度", "VD228", 1, 1)); - add(new Res_PLCADDRESS("平移-定位运行速度", "VD232", 1, 1)); - - add(new Res_PLCADDRESS("平移-点动正转", "M14.0", 0, 1)); - add(new Res_PLCADDRESS("平移-点动反转", "M14.1", 0, 1)); - add(new Res_PLCADDRESS("平移-回原点", "M14.2", 0, 1)); - add(new Res_PLCADDRESS("平移-去1号位", "M14.3", 0, 1)); - add(new Res_PLCADDRESS("平移-去2号位", "M14.4", 0, 1)); - add(new Res_PLCADDRESS("平移-去3号位", "M14.5", 0, 1)); - add(new Res_PLCADDRESS("平移-去4号位", "M14.6", 0, 1)); - - add(new Res_PLCADDRESS("平移-1号位置值", "VD236", 1, 1)); - add(new Res_PLCADDRESS("平移-1#位置设定", "M15.0", 0, 1)); - add(new Res_PLCADDRESS("平移-2号位置值", "VD240", 1, 1)); - add(new Res_PLCADDRESS("平移-2#位置设定", "M15.1", 0, 1)); - add(new Res_PLCADDRESS("平移-3号位置值", "VD244", 1, 1)); - add(new Res_PLCADDRESS("平移-3#位置设定", "M15.2", 0, 1)); - add(new Res_PLCADDRESS("平移-4号位置值", "VD248", 1, 1)); - add(new Res_PLCADDRESS("平移-4#位置设定", "M15.3", 0, 1)); - - //自动投料-翻转轴 - add(new Res_PLCADDRESS("翻转轴控制", "-------------", 0, 0)); - add(new Res_PLCADDRESS("翻转-伺服当前值", "VD260", 1, 1)); - add(new Res_PLCADDRESS("翻转-点动速度", "VD264", 1, 1)); - add(new Res_PLCADDRESS("翻转-回原点速度", "VD268", 1, 1)); - add(new Res_PLCADDRESS("翻转-定位运行速度", "VD272", 1, 1)); - - add(new Res_PLCADDRESS("翻转-点动正转", "M16.0", 0, 1)); - add(new Res_PLCADDRESS("翻转-点动反转", "M16.1", 0, 1)); - add(new Res_PLCADDRESS("翻转-回原点", "M16.2", 0, 1)); - add(new Res_PLCADDRESS("翻转-去1号位", "M16.3", 0, 1)); - add(new Res_PLCADDRESS("翻转-去2号位", "M16.4", 0, 1)); - add(new Res_PLCADDRESS("翻转-去3号位", "M16.5", 0, 1)); - add(new Res_PLCADDRESS("翻转-去4号位", "M16.6", 0, 1)); - - add(new Res_PLCADDRESS("翻转-1号位置值", "VD276", 1, 1)); - add(new Res_PLCADDRESS("翻转-1#位置设定", "M17.0", 0, 1)); - add(new Res_PLCADDRESS("翻转-2号位置值", "VD280", 1, 1)); - add(new Res_PLCADDRESS("翻转-2#位置设定", "M17.1", 0, 1)); - add(new Res_PLCADDRESS("翻转-3号位置值", "VD284", 1, 1)); - add(new Res_PLCADDRESS("翻转-3#位置设定", "M17.2", 0, 1)); - add(new Res_PLCADDRESS("翻转-4号位置值", "VD288", 1, 1)); - add(new Res_PLCADDRESS("翻转-4#位置设定", "M17.3", 0, 1)); - add(new Res_PLCADDRESS("倒菜启动", "M17.4", 0, 1)); - add(new Res_PLCADDRESS("磁铁吸合", "M17.5", 0, 1)); - - //反馈信号 - add(new Res_PLCADDRESS("反馈信号", "-------------", 0, 0)); - add(new Res_PLCADDRESS("初始化完成", "M40.0", 1, 0)); - add(new Res_PLCADDRESS("设备急停", "M40.1", 1, 0)); - add(new Res_PLCADDRESS("原点位反馈", "M40.2", 1, 0)); - add(new Res_PLCADDRESS("抽料位反馈", "M40.3", 1, 0)); - add(new Res_PLCADDRESS("炒菜位1反馈", "M40.4", 1, 0)); - add(new Res_PLCADDRESS("炒菜位2反馈", "M40.5", 1, 0)); - add(new Res_PLCADDRESS("炒菜位3反馈", "M40.6", 1, 0)); - add(new Res_PLCADDRESS("倒菜位反馈", "M40.7", 1, 0)); - add(new Res_PLCADDRESS("投料位反馈", "M41.0", 1, 0)); - add(new Res_PLCADDRESS("清洗位反馈", "M41.1", 1, 0)); - add(new Res_PLCADDRESS("料仓1下料完成", "M41.2", 1, 0)); - add(new Res_PLCADDRESS("料仓2下料完成", "M41.3", 1, 0)); - add(new Res_PLCADDRESS("料仓3下料完成", "M41.4", 1, 0)); - add(new Res_PLCADDRESS("料仓4下料完成", "M42.0", 1, 0)); - add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0)); - add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0)); - add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0)); - add(new Res_PLCADDRESS("平移轴在1号位", "M43.0", 1, 0)); - add(new Res_PLCADDRESS("平移轴在2号位", "M43.1", 1, 0)); - add(new Res_PLCADDRESS("平移轴在3号位", "M43.2", 1, 0)); - add(new Res_PLCADDRESS("平移轴在4号位", "M43.3", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在1号位", "M44.0", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在2号位", "M44.1", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0)); - add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0)); - add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0)); - add(new Res_PLCADDRESS("心跳位", "VW1000", 0, 1)); - - //检测信号 - add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0)); - add(new Res_PLCADDRESS("当前锅底温度", "VD300", 1, 0)); - add(new Res_PLCADDRESS("炒锅搅拌转速", "VD304", 1, 0)); - add(new Res_PLCADDRESS("当前加热档位", "VD308", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前电压", "VD312", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前电流", "VD316", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前功率", "VD320", 1, 0)); - add(new Res_PLCADDRESS("搅拌频率", "VW324", 1, 0)); - add(new Res_PLCADDRESS("搅拌电机电流", "VW326", 1, 0)); - add(new Res_PLCADDRESS("搅拌电机电压", "VW328", 1, 0)); - add(new Res_PLCADDRESS("搅拌变频器温度", "VW330", 1, 0)); - add(new Res_PLCADDRESS("翻转频率", "VW332", 1, 0)); - add(new Res_PLCADDRESS("翻转电机电流", "VW334", 1, 0)); - add(new Res_PLCADDRESS("翻转电机电压", "VW336", 1, 0)); - add(new Res_PLCADDRESS("翻转变频器温度", "VW338", 1, 0)); - add(new Res_PLCADDRESS("编码器当前位值", "VD340", 1, 0)); - - //状态上报 - add(new Res_PLCADDRESS("状态上报", "-------------", 0, 0)); - add(new Res_PLCADDRESS("搅拌电机", "VW350", 1, 0)); - add(new Res_PLCADDRESS("翻转电机", "VW352", 1, 0)); - add(new Res_PLCADDRESS("炒锅", "VW354", 1, 0)); - - }}; - /** - * 小炒工序模型 - */ - public List Process_小炒 = new ArrayList() {{ - add(new ProcessT("搅拌", Arrays.asList("搅拌速度", "延迟(秒)"))); - add(new ProcessT("位置", Arrays.asList("转动速度", "位置动作", "延迟(秒)"))); - add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); - add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置", "主料重量", "投料动作","烹饪(秒)"))); - add(new ProcessT("液体料", new ArrayList<>())); - add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); - add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); - add(new ProcessT("清洗", Arrays.asList("等待(秒)"))); - - }}; - - /** - * 一拖四基础PLC模型 - */ - public List PlcAddress_一拖四 = new ArrayList() {{ - - //硬件设备 初始化 - add(new Res_PLCADDRESS("硬件设备", "-------------", 0, 0)); - add(new Res_PLCADDRESS("初始化", "M10.0", 1, 1)); - add(new Res_PLCADDRESS("停止", "M10.1", 1, 1)); - add(new Res_PLCADDRESS("复位", "M10.2", 0, 1)); - - //搅拌模型 - add(new Res_PLCADDRESS("模型控制", "-------------", 0, 0)); - add(new Res_PLCADDRESS("搅拌", "M10.3", 0, 1)); - add(new Res_PLCADDRESS("搅拌速度", "VW102", 1, 1)); - - //翻转正转模型 - add(new Res_PLCADDRESS("翻转正转", "M10.4", 0, 1)); - add(new Res_PLCADDRESS("翻转反转", "M10.5", 0, 1)); - add(new Res_PLCADDRESS("转动速度", "VW104", 1, 1)); - - - //加热模型 - add(new Res_PLCADDRESS("加热", "M10.6", 0, 1)); - add(new Res_PLCADDRESS("加热功率", "VW100", 1, 1)); - add(new Res_PLCADDRESS("温控开关", "M17.6", 1, 1)); - add(new Res_PLCADDRESS("暂停开关", "M17.7", 1, 1)); - - //主料 - add(new Res_PLCADDRESS("主料1号位", "M17.4", 0, 1)); - add(new Res_PLCADDRESS("主料2号位", "M19.4", 0, 1)); - - //抽水放水 - add(new Res_PLCADDRESS("炒锅抽水", "M10.7", 0, 1)); - add(new Res_PLCADDRESS("炒锅放水", "M11.0", 0, 1)); - - - //出菜模型 - add(new Res_PLCADDRESS("出菜", "M11.5", 0, 1)); - - - //位置动作 - add(new Res_PLCADDRESS("原点位", "M11.4", 0, 1)); - add(new Res_PLCADDRESS("倒菜位", "M12.7", 0, 1)); - add(new Res_PLCADDRESS("抽料位", "M11.7", 0, 1)); - add(new Res_PLCADDRESS("清洗位", "M13.0", 0, 1)); - add(new Res_PLCADDRESS("炒菜位1", "M12.0", 0, 1)); - add(new Res_PLCADDRESS("炒菜位2", "M12.1", 0, 1)); - add(new Res_PLCADDRESS("炒菜位3", "M12.2", 0, 1)); - - add(new Res_PLCADDRESS("出餐启动", "M11.5", 0, 1)); - add(new Res_PLCADDRESS("炒锅清洗", "M11.6", 0, 1)); - - //液体料模型 - add(new Res_PLCADDRESS("料仓校准", "-------------", 0, 0)); - add(new Res_PLCADDRESS("校准时间", "VW112", 1, 1)); - add(new Res_PLCADDRESS("料仓1校准开关", "M12.3", 0, 1)); - add(new Res_PLCADDRESS("料仓1校准值", "VW114", 1, 1)); - add(new Res_PLCADDRESS("料仓2校准开关", "M12.4", 0, 1)); - add(new Res_PLCADDRESS("料仓2校准值", "VW116", 1, 1)); - add(new Res_PLCADDRESS("料仓3校准开关", "M12.5", 0, 1)); - add(new Res_PLCADDRESS("料仓3校准值", "VW118", 1, 1)); - add(new Res_PLCADDRESS("料仓4校准开关", "M13.5", 0, 1)); - add(new Res_PLCADDRESS("料仓4校准值", "VW120", 1, 1)); - add(new Res_PLCADDRESS("开始校正", "M12.6", 0, 1)); - - add(new Res_PLCADDRESS("料仓自动", "-------------", 0, 0)); - add(new Res_PLCADDRESS("料仓1需求值", "VW106", 1, 1)); - add(new Res_PLCADDRESS("料仓1下料", "M11.1", 0, 1)); - add(new Res_PLCADDRESS("料仓2需求值", "VW108", 1, 1)); - add(new Res_PLCADDRESS("料仓2下料", "M11.2", 0, 1)); - add(new Res_PLCADDRESS("料仓3需求值", "VW110", 1, 1)); - add(new Res_PLCADDRESS("料仓3下料", "M11.3", 0, 1)); - add(new Res_PLCADDRESS("料仓4需求值", "VW122", 1, 1)); - add(new Res_PLCADDRESS("料仓4下料", "M13.4", 0, 1)); - - add(new Res_PLCADDRESS("料仓手动", "-------------", 0, 0)); - add(new Res_PLCADDRESS("料仓1手动开关", "M13.1", 1, 1)); - add(new Res_PLCADDRESS("料仓2手动开关", "M13.2", 1, 1)); - add(new Res_PLCADDRESS("料仓3手动开关", "M13.3", 1, 1)); - add(new Res_PLCADDRESS("料仓4手动开关", "M10.7", 1, 1)); - - //上下限 - add(new Res_PLCADDRESS("位置上下限", "-------------", 0, 0)); - add(new Res_PLCADDRESS("原点位置下限", "VD150", 1, 1)); - add(new Res_PLCADDRESS("原点位置上限", "VD154", 1, 1)); - add(new Res_PLCADDRESS("洗锅位置下限", "VD158", 1, 1)); - add(new Res_PLCADDRESS("洗锅位置上限", "VD162", 1, 1)); - add(new Res_PLCADDRESS("倒菜位置下限", "VD166", 1, 1)); - add(new Res_PLCADDRESS("倒菜位置上限", "VD170", 1, 1)); - add(new Res_PLCADDRESS("抽调料位置下限", "VD174", 1, 1)); - add(new Res_PLCADDRESS("抽调料位置上限", "VD178", 1, 1)); - add(new Res_PLCADDRESS("1#炒制位置下限", "VD182", 1, 1)); - add(new Res_PLCADDRESS("1#炒制位置上限", "VD186", 1, 1)); - add(new Res_PLCADDRESS("2#炒制位置下限", "VD190", 1, 1)); - add(new Res_PLCADDRESS("2#炒制位置上限", "VD194", 1, 1)); - add(new Res_PLCADDRESS("3#炒制位置下限", "VD198", 1, 1)); - add(new Res_PLCADDRESS("3#炒制位置上限", "VD202", 1, 1)); - add(new Res_PLCADDRESS("炒锅工作范围下限", "VD206", 1, 1)); - add(new Res_PLCADDRESS("炒锅工作范围上限", "VD210", 1, 1)); - - //自动投料-平移轴 -// add(new Res_PLCADDRESS("平移轴控制", "-------------", 0, 0)); -// add(new Res_PLCADDRESS("平移-伺服当前值", "VD220", 1, 1)); -// add(new Res_PLCADDRESS("平移-点动速度", "VD224", 1, 1)); -// add(new Res_PLCADDRESS("平移-回原点速度", "VD228", 1, 1)); -// add(new Res_PLCADDRESS("平移-定位运行速度", "VD232", 1, 1)); -// -// add(new Res_PLCADDRESS("平移-点动正转", "M14.0", 0, 1)); -// add(new Res_PLCADDRESS("平移-点动反转", "M14.1", 0, 1)); -// add(new Res_PLCADDRESS("平移-回原点", "M14.2", 0, 1)); -// add(new Res_PLCADDRESS("平移-去1号位", "M14.3", 0, 1)); -// add(new Res_PLCADDRESS("平移-去2号位", "M14.4", 0, 1)); -// add(new Res_PLCADDRESS("平移-去3号位", "M14.5", 0, 1)); -// add(new Res_PLCADDRESS("平移-去4号位", "M14.6", 0, 1)); -// -// add(new Res_PLCADDRESS("平移-1号位置值", "VD236", 1, 1)); -// add(new Res_PLCADDRESS("平移-1#位置设定", "M15.0", 0, 1)); -// add(new Res_PLCADDRESS("平移-2号位置值", "VD240", 1, 1)); -// add(new Res_PLCADDRESS("平移-2#位置设定", "M15.1", 0, 1)); -// add(new Res_PLCADDRESS("平移-3号位置值", "VD244", 1, 1)); -// add(new Res_PLCADDRESS("平移-3#位置设定", "M15.2", 0, 1)); -// add(new Res_PLCADDRESS("平移-4号位置值", "VD248", 1, 1)); -// add(new Res_PLCADDRESS("平移-4#位置设定", "M15.3", 0, 1)); - - //自动投料-翻转轴 - add(new Res_PLCADDRESS("翻转轴控制1", "-------------", 0, 0)); - add(new Res_PLCADDRESS("翻转1-伺服当前值", "VD260", 1, 1)); - add(new Res_PLCADDRESS("翻转1-点动速度", "VD264", 1, 1)); - add(new Res_PLCADDRESS("翻转1-回原点速度", "VD268", 1, 1)); - add(new Res_PLCADDRESS("翻转1-定位运行速度", "VD272", 1, 1)); - - add(new Res_PLCADDRESS("翻转1-点动正转", "M16.0", 0, 1)); - add(new Res_PLCADDRESS("翻转1-点动反转", "M16.1", 0, 1)); - add(new Res_PLCADDRESS("翻转1-回原点", "M16.2", 0, 1)); - add(new Res_PLCADDRESS("翻转1-去1号位", "M16.3", 0, 1)); - add(new Res_PLCADDRESS("翻转1-去2号位", "M16.4", 0, 1)); - add(new Res_PLCADDRESS("翻转1-去3号位", "M16.5", 0, 1)); - add(new Res_PLCADDRESS("翻转1-去4号位", "M16.6", 0, 1)); - - add(new Res_PLCADDRESS("翻转1-1号位置值", "VD276", 1, 1)); - add(new Res_PLCADDRESS("翻转1-1#位置设定", "M17.0", 0, 1)); - add(new Res_PLCADDRESS("翻转1-2号位置值", "VD280", 1, 1)); - add(new Res_PLCADDRESS("翻转1-2#位置设定", "M17.1", 0, 1)); - add(new Res_PLCADDRESS("翻转1-3号位置值", "VD284", 1, 1)); - add(new Res_PLCADDRESS("翻转1-3#位置设定", "M17.2", 0, 1)); - add(new Res_PLCADDRESS("翻转1-4号位置值", "VD288", 1, 1)); - add(new Res_PLCADDRESS("翻转1-4#位置设定", "M17.3", 0, 1)); - add(new Res_PLCADDRESS("倒菜启动1", "M17.4", 0, 1)); - - add(new Res_PLCADDRESS("翻转轴控制2", "-------------", 0, 0)); - add(new Res_PLCADDRESS("翻转2-伺服当前值", "VD2000", 1, 1)); - add(new Res_PLCADDRESS("翻转2-点动速度", "VD2004", 1, 1)); - add(new Res_PLCADDRESS("翻转2-回原点速度", "VD2008", 1, 1)); - add(new Res_PLCADDRESS("翻转2-定位运行速度", "VD2012", 1, 1)); - - add(new Res_PLCADDRESS("翻转2-点动正转", "M18.0", 0, 1)); - add(new Res_PLCADDRESS("翻转2-点动反转", "M18.1", 0, 1)); - add(new Res_PLCADDRESS("翻转2-回原点", "M18.2", 0, 1)); - add(new Res_PLCADDRESS("翻转2-去1号位", "M18.3", 0, 1)); - add(new Res_PLCADDRESS("翻转2-去2号位", "M18.4", 0, 1)); - add(new Res_PLCADDRESS("翻转2-去3号位", "M18.5", 0, 1)); - add(new Res_PLCADDRESS("翻转2-去4号位", "M18.6", 0, 1)); - - add(new Res_PLCADDRESS("翻转2-1号位置值", "VD2016", 1, 1)); - add(new Res_PLCADDRESS("翻转2-1#位置设定", "M19.0", 0, 1)); - add(new Res_PLCADDRESS("翻转2-2号位置值", "VD2020", 1, 1)); - add(new Res_PLCADDRESS("翻转2-2#位置设定", "M19.1", 0, 1)); - add(new Res_PLCADDRESS("翻转2-3号位置值", "VD2024", 1, 1)); - add(new Res_PLCADDRESS("翻转2-3#位置设定", "M19.2", 0, 1)); - add(new Res_PLCADDRESS("翻转2-4号位置值", "VD2028", 1, 1)); - add(new Res_PLCADDRESS("翻转2-4#位置设定", "M19.3", 0, 1)); - add(new Res_PLCADDRESS("倒菜启动2", "M19.4", 0, 1)); - - //反馈信号 - add(new Res_PLCADDRESS("反馈信号", "-------------", 0, 0)); - add(new Res_PLCADDRESS("初始化完成", "M40.0", 1, 0)); - add(new Res_PLCADDRESS("设备急停", "M40.1", 1, 0)); - add(new Res_PLCADDRESS("原点位反馈", "M40.2", 1, 0)); - add(new Res_PLCADDRESS("抽料位反馈", "M40.3", 1, 0)); - add(new Res_PLCADDRESS("炒菜位1反馈", "M40.4", 1, 0)); - add(new Res_PLCADDRESS("炒菜位2反馈", "M40.5", 1, 0)); - add(new Res_PLCADDRESS("炒菜位3反馈", "M40.6", 1, 0)); - add(new Res_PLCADDRESS("倒菜位反馈", "M40.7", 1, 0)); - add(new Res_PLCADDRESS("投料位反馈", "M41.0", 1, 0)); - add(new Res_PLCADDRESS("清洗位反馈", "M41.1", 1, 0)); - add(new Res_PLCADDRESS("料仓1下料完成", "M41.2", 1, 0)); - add(new Res_PLCADDRESS("料仓2下料完成", "M41.3", 1, 0)); - add(new Res_PLCADDRESS("料仓3下料完成", "M41.4", 1, 0)); - add(new Res_PLCADDRESS("料仓4下料完成", "M42.0", 1, 0)); - add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0)); - add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0)); - add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0)); - add(new Res_PLCADDRESS("平移轴在1号位", "M43.0", 1, 0)); - add(new Res_PLCADDRESS("平移轴在2号位", "M43.1", 1, 0)); - add(new Res_PLCADDRESS("平移轴在3号位", "M43.2", 1, 0)); - add(new Res_PLCADDRESS("平移轴在4号位", "M43.3", 1, 0)); - - add(new Res_PLCADDRESS("翻转轴1在1号位", "M44.0", 1, 0)); - add(new Res_PLCADDRESS("翻转轴1在2号位", "M44.1", 1, 0)); - add(new Res_PLCADDRESS("翻转轴1在3号位", "M44.2", 1, 0)); - add(new Res_PLCADDRESS("翻转轴1在4号位", "M44.3", 1, 0)); - add(new Res_PLCADDRESS("翻转轴1允许机器人放盒取盒", "M44.4", 1, 0)); - add(new Res_PLCADDRESS("1号位倒菜完成", "M44.7", 1, 0)); - - - add(new Res_PLCADDRESS("翻转轴2在1号位", "M45.0", 1, 0)); - add(new Res_PLCADDRESS("翻转轴2在2号位", "M45.1", 1, 0)); - add(new Res_PLCADDRESS("翻转轴2在3号位", "M45.2", 1, 0)); - add(new Res_PLCADDRESS("翻转轴2在4号位", "M45.3", 1, 0)); - add(new Res_PLCADDRESS("翻转轴2允许机器人放盒取盒", "M45.4", 1, 0)); - add(new Res_PLCADDRESS("2号位倒菜完成", "M45.7", 1, 0)); - - add(new Res_PLCADDRESS("心跳位", "VW1000", 0, 1)); - - //检测信号 - add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0)); - add(new Res_PLCADDRESS("当前锅底温度", "VD300", 1, 0)); - add(new Res_PLCADDRESS("炒锅搅拌转速", "VD304", 1, 0)); - add(new Res_PLCADDRESS("当前加热档位", "VD308", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前电压", "VD312", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前电流", "VD316", 1, 0)); - add(new Res_PLCADDRESS("炒锅当前功率", "VD320", 1, 0)); - add(new Res_PLCADDRESS("搅拌频率", "VW324", 1, 0)); - add(new Res_PLCADDRESS("搅拌电机电流", "VW326", 1, 0)); - add(new Res_PLCADDRESS("搅拌电机电压", "VW328", 1, 0)); - add(new Res_PLCADDRESS("搅拌变频器温度", "VW330", 1, 0)); - add(new Res_PLCADDRESS("翻转频率", "VW332", 1, 0)); - add(new Res_PLCADDRESS("翻转电机电流", "VW334", 1, 0)); - add(new Res_PLCADDRESS("翻转电机电压", "VW336", 1, 0)); - add(new Res_PLCADDRESS("翻转变频器温度", "VW338", 1, 0)); - add(new Res_PLCADDRESS("编码器当前位值", "VD340", 1, 0)); - - //状态上报 - add(new Res_PLCADDRESS("状态上报", "-------------", 0, 0)); - add(new Res_PLCADDRESS("搅拌电机", "VW350", 1, 0)); - add(new Res_PLCADDRESS("翻转电机", "VW352", 1, 0)); - add(new Res_PLCADDRESS("炒锅", "VW354", 1, 0)); - - }}; - /** - * 一拖四工序模型 - */ - public List Process_一拖四 = new ArrayList() {{ - add(new ProcessT("搅拌", Arrays.asList("搅拌速度", "延迟(秒)"))); - add(new ProcessT("位置", Arrays.asList("转动速度", "位置动作", "延迟(秒)"))); - add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); - add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置", "主料重量", "投料动作","烹饪(秒)"))); - add(new ProcessT("辅料", Arrays.asList("辅料名称", "烹饪(秒)"))); - add(new ProcessT("液体料", new ArrayList<>())); - add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); - add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); - add(new ProcessT("清洗", Arrays.asList("等待(秒)"))); - }}; - /** * 主控地址列表 */ @@ -1143,8 +446,6 @@ public class ConfigName { put("商品信息",0); }}; - - /** * 根据名称获取变量 * @@ -1153,19 +454,10 @@ public class ConfigName { */ public String GetProcessTypeVal(String item) { String data = ""; - if (item.equals("搅拌动作")) { - data = "正转反转、一直正转、一直反转"; - } else if (item.equals("位置动作")) { - data = "原点位、出餐启动、倒菜位、抽料位、清洗位、炒菜位1、炒菜位2、炒菜位3"; - } else if (item.equals("投料动作")) { - //data = "投出抖动三次、投出等待三秒、直接投出、手动投料"; + if (item.equals("打火动作")) { + data = "自动打火、手动打火"; + } else if (item.equals("投料动作")) { data = "投出等待三秒、直接投出、手动投料"; - } else if (item.equals("主料位置")) { - data = "1号位、2号位、3号位、4号位"; - } else if (item.equals("正转速度") || item.equals("反转速度") || item.equals("转动速度") || item.equals("搅拌速度")) { - data = "停止、最低、低速、中速、高速、最高、极高"; - } else if (item.equals("加热功率") || item.equals("热锅功率")) { - data = "停止、一档、二档、三档、四档、五档、六档、七档、八档"; } return data; } @@ -1339,11 +631,11 @@ public class ConfigName { /** * 版本信息 */ - public String[] versionSelectionValues = new String[]{"大炒版本", "大炒自动投料版本", "小炒版本","一拖四大炒","一拖二大炒"}; + public String[] versionSelectionValues = new String[]{"燃气自翻炒锅"}; /** * 选配版本信息 */ - public String versionSelectionEnum = "大炒版本"; + public String versionSelectionEnum = "燃气自翻炒锅"; //endregion //region 用户角色 diff --git a/app/src/main/java/com/bonait/bnframework/common/helper/RangeInputFilter.java b/app/src/main/java/com/bonait/bnframework/common/helper/RangeInputFilter.java new file mode 100644 index 00000000..5c6dd506 --- /dev/null +++ b/app/src/main/java/com/bonait/bnframework/common/helper/RangeInputFilter.java @@ -0,0 +1,31 @@ +package com.bonait.bnframework.common.helper; + +import android.text.InputFilter; +import android.text.Spanned; + +public class RangeInputFilter implements InputFilter { + private int min; + private int max; + + public RangeInputFilter(int min, int max) { + this.min = min; + this.max = max; + } + + @Override + public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { + try { + int input = Integer.parseInt(dest.toString() + source.toString()); + if (isInRange(input)) { + return null; + } + } catch (NumberFormatException e) { + return null; + } + return ""; + } + + private boolean isInRange(int value) { + return value >= min && value <= max; + } +} \ No newline at end of file diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java index 620da9a2..f7eb4798 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java @@ -6,6 +6,7 @@ import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.os.Bundle; +import android.text.InputFilter; import android.text.InputType; import android.util.AttributeSet; import android.view.LayoutInflater; @@ -19,6 +20,8 @@ import android.widget.TextView; import com.bonait.bnframework.R; import com.bonait.bnframework.common.base.BaseFragment; +import com.bonait.bnframework.common.helper.RangeInputFilter; +import com.litao.slider.NiftySlider; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -37,6 +40,9 @@ public class fragment_gx extends LinearLayout { EditText edittext; @BindView(R.id.check_PF) CheckBox check; + + @BindView(R.id.nifty_sliderPF) + NiftySlider nifty_slider; private View root; public item_gx model; public fragment_gx(Context context, @Nullable AttributeSet attrs,item_gx mode) { @@ -60,25 +66,51 @@ public class fragment_gx extends LinearLayout { switch (model.datatype) { case 0://数字 - editsp.setVisibility(View.GONE); - edittext.setVisibility(View.VISIBLE); - if(model.IsWL) + if(model.name.contains("速度") || model.name.contains("功率") || model.name.contains("温度")) { - edittext.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL); + edittext.setVisibility(View.GONE); + editsp.setVisibility(View.GONE); + nifty_slider.setVisibility(View.VISIBLE); + if(model.name.contains("速度") ) + { + nifty_slider.setValueTo(50); + }else if(model.name.contains("功率") ) + { + nifty_slider.setValueTo(100); + }else if(model.name.contains("温度") ) + { + nifty_slider.setValueTo(1000); + } }else { - edittext.setInputType(InputType.TYPE_CLASS_NUMBER); + edittext.setVisibility(View.VISIBLE); + editsp.setVisibility(View.GONE); + nifty_slider.setVisibility(View.GONE); + if(model.IsWL) + { + edittext.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL); + }else + { + edittext.setInputType(InputType.TYPE_CLASS_NUMBER); + } + edittext.setText("0".toCharArray(), 0, "0".length()); + if(model.name.contains("锅内重量")) + { + edittext.setFilters(new InputFilter[]{new RangeInputFilter(0, 1000)}); + } } - edittext.setText("0".toCharArray(), 0, "0".length()); + break; case 1://字符串 editsp.setVisibility(View.GONE); + nifty_slider.setVisibility(View.GONE); edittext.setVisibility(View.VISIBLE); edittext.setInputType(InputType.TYPE_CLASS_TEXT); break; case 2://选项 editsp.setVisibility(View.VISIBLE); - edittext.setVisibility(View.VISIBLE); + nifty_slider.setVisibility(View.GONE); + edittext.setVisibility(View.GONE); if(!model.data.isEmpty() && model.data.contains("、")) { String[] res = model.data.split("[、]"); @@ -108,24 +140,31 @@ public class fragment_gx extends LinearLayout { switch (model.datatype) { case 0://数字 - String text= edittext.getText().toString(); - if(text.isEmpty()) + if(model.name.contains("速度") || model.name.contains("功率") || model.name.contains("温度")) { - text="0"; - } - - if(model.IsWL) + ResStu=String.valueOf(nifty_slider.getValue()); + }else { - double val=Double.parseDouble(text); - if(check.isChecked()) + String text= edittext.getText().toString(); + if(text.isEmpty()) { - ResStu=String.format("%.1f", val); + text="0"; + } + + if(model.IsWL) + { + double val=Double.parseDouble(text); + if(check.isChecked()) + { + ResStu=String.format("%.1f", val); + } + }else + { + int val=Integer.parseInt(text); + ResStu=String.valueOf(val); } - }else - { - int val=Integer.parseInt(text); - ResStu=String.valueOf(val); } + break; case 1://字符串 if(model.IsWL) @@ -156,10 +195,17 @@ public class fragment_gx extends LinearLayout { { case 0://数字 case 1://字符串 - edittext.setText(value); - if(model.IsWL) + if(model.name.contains("速度") || model.name.contains("功率") || model.name.contains("温度")) { - check.setChecked(true); + nifty_slider.setValue(Integer.valueOf(value),true); + nifty_slider.setThumbText(value); + }else + { + edittext.setText(value); + if(model.IsWL) + { + check.setChecked(true); + } } break; case 2://选项 diff --git a/app/src/main/res/layout/item/layout/fragment_item_gx.xml b/app/src/main/res/layout/item/layout/fragment_item_gx.xml index e19dea98..5e23ff86 100644 --- a/app/src/main/res/layout/item/layout/fragment_item_gx.xml +++ b/app/src/main/res/layout/item/layout/fragment_item_gx.xml @@ -32,5 +32,27 @@ android:inputType="text" android:maxLines="1" android:padding="3dp" - android:textSize="12dp" /> + android:textSize="12dp" + android:visibility="gone"/> + \ No newline at end of file