@ -74,6 +74,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
# endregion
#region 更新任务状态
/// <summary>
/// 更新任务状态
/// </summary>
@ -100,13 +101,10 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
}
finally { result = true ; }
}
# endregion
}
# endregion
#region 小料
@ -1106,15 +1104,16 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
}
}
#endregion
# endregion
#region 设定设备参数
/// <summary>
/// 设定设备参数
/// </summary>
/// <param name="item"></param>
public static void WriteDeviceParam ( xl_station_sub item )
{
int set_station_Weight_Medium = Convert . ToInt32 ( item . Station_Weight_Medium ) * 100 ;
int set_station_Weight_Medium = Convert . ToInt32 ( item . Station_Weight_Medium ) * 100 ;
int set_station_Weight_Low = Convert . ToInt32 ( item . Station_Weight_Low ) * 100 ;
int set_station_Weight_Advance = Convert . ToInt32 ( item . Station_Weight_Advance ) * 100 ;
@ -1130,7 +1129,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Advance1 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Hight1 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Medium1 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Medium1 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Low1 , new object [ ] { set_station_speed_low } ) ;
break ;
case "2" :
@ -1146,7 +1145,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium3 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low3 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance3 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Hight3 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Medium3 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Low3 , new object [ ] { set_station_speed_low } ) ;
@ -1155,7 +1154,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium4 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low4 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance4 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Hight4 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Medium4 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Low4 , new object [ ] { set_station_speed_low } ) ;
@ -1164,7 +1163,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium5 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low5 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance5 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Hight5 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Medium5 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Low5 , new object [ ] { set_station_speed_low } ) ;
@ -1174,7 +1173,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium6 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low6 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance6 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Hight6 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Medium6 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Low6 , new object [ ] { set_station_speed_low } ) ;
@ -1184,7 +1183,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium7 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low7 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance7 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Hight7 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Medium7 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Low7 , new object [ ] { set_station_speed_low } ) ;
@ -1193,7 +1192,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium8 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low8 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance8 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Hight8 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Medium8 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Low8 , new object [ ] { set_station_speed_low } ) ;
@ -1202,7 +1201,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium9 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low9 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance9 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Hight9 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Medium9 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Low9 , new object [ ] { set_station_speed_low } ) ;
@ -1211,7 +1210,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium10 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low10 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance10 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Hight10 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Medium10 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Low10 , new object [ ] { set_station_speed_low } ) ;
@ -1220,7 +1219,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium11 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low11 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance11 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Hight11 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Medium11 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Low11 , new object [ ] { set_station_speed_low } ) ;
@ -1229,7 +1228,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium12 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low12 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance12 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Hight12 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Medium12 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Low12 , new object [ ] { set_station_speed_low } ) ;
@ -1238,7 +1237,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium13 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low13 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance13 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Hight13 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Medium13 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Low13 , new object [ ] { set_station_speed_low } ) ;
@ -1247,7 +1246,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium14 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low14 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance14 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Hight14 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Medium14 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Low14 , new object [ ] { set_station_speed_low } ) ;
@ -1256,7 +1255,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium15 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low15 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance15 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Hight16 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Medium16 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Low16 , new object [ ] { set_station_speed_low } ) ;
@ -1265,7 +1264,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium16 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low16 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance16 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Hight16 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Medium16 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Low16 , new object [ ] { set_station_speed_low } ) ;
@ -1274,16 +1273,16 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium17 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low17 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance17 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Hight17 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Medium17 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Low17 , new object [ ] { set_station_speed_low } ) ;
break ;
case "18" :
break ;
case "18" :
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium18 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low18 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance18 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Hight18 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Medium18 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Low18 , new object [ ] { set_station_speed_low } ) ;
@ -1346,7 +1345,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium25 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low25 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance25 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Hight25 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Medium25 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Low25 , new object [ ] { set_station_speed_low } ) ;
@ -1355,7 +1354,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium26 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low26 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance26 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Hight26 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Medium26 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Low26 , new object [ ] { set_station_speed_low } ) ;
@ -1364,7 +1363,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium27 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low27 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance27 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Hight27 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Medium27 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Low27 , new object [ ] { set_station_speed_low } ) ;
@ -1373,7 +1372,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium28 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low28 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance28 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Hight28 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Medium28 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Low28 , new object [ ] { set_station_speed_low } ) ;
@ -1382,7 +1381,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Weight_Medium29 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Weight_Low29 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Weight_Advance29 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Speed_Hight29 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Speed_Medium29 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Speed_Low29 , new object [ ] { set_station_speed_low } ) ;
@ -1391,7 +1390,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Weight_Medium30 , new object [ ] { set_station_Weight_Medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Weight_Low30 , new object [ ] { set_station_Weight_Low } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Weight_Advance30 , new object [ ] { set_station_Weight_Advance } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Speed_Hight30 , new object [ ] { set_station_speed_hight } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Speed_Medium30 , new object [ ] { set_station_speed_medium } ) ;
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Station15_Speed_Low30 , new object [ ] { set_station_speed_low } ) ;
@ -1403,6 +1402,9 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
# endregion
# endregion
#region 设定设备参数
/// <summary>
/// 设定设备参数
/// </summary>
@ -1413,11 +1415,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
int set_station_Weight_Low = 0 ;
int set_station_Weight_Advance = 0 ;
set_station_Weight_Medium = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Medium ) * 100 ) ;
set_station_Weight_Low = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Low ) * 100 ) ;
set_station_Weight_Advance = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Advance ) * 100 ) ;
set_station_Weight_Medium = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Medium ) * 100 ) ;
set_station_Weight_Low = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Low ) * 100 ) ;
set_station_Weight_Advance = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Advance ) * 100 ) ;
int set_station_speed_hight = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Speed_Hight ) * 10 ) ;
int set_station_speed_hight = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Speed_Hight ) * 10 ) ;
int set_station_speed_medium = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Speed_Medium ) * 10 ) ;
int set_station_speed_low = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Speed_Low ) * 10 ) ;
int i = 0 ;
@ -1732,6 +1734,9 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( i > 0 ) return true ;
return false ;
}
# endregion
#region 读取设备参数
/// <summary>
/// 读取设备参数
/// </summary>
@ -1739,14 +1744,14 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
public static bool ReadBinParam ( Pmt_Bin item )
{
decimal weight_Medium = 0.000 M ;
decimal weight_Low = 0.000 M ;
decimal weight_Low = 0.000 M ;
decimal weight_Advance = 0.000 M ;
int i = 0 ;
switch ( item . Bin_Serial )
{
case 1 :
if ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Medium1 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Medium1 . NowValue . ToInt ( ) ) / 100 ;
if ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Low1 . NowValue . ToInt ( ) > 0 )
@ -1754,17 +1759,17 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Advance1 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Advance1 . NowValue . ToInt ( ) ) / 100 ;
var speed1_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Hight1 . NowValue . ToString ( ) ) / 10 ;
var speed1_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Hight1 . NowValue . ToString ( ) ) / 10 ;
var speed1_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Medium1 . NowValue . ToString ( ) ) / 10 ;
var speed1_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Low1 . NowValue . ToString ( ) ) / 10 ;
item . Station_Weight_Medium = decimal . Parse ( weight_Medium . ToString ( ) ) ;
item . Station_Weight_Medium = decimal . Parse ( weight_Medium . ToString ( ) ) ;
item . Station_Weight_Low = decimal . Parse ( weight_Low . ToString ( ) ) ;
item . Station_Weight_Advance = decimal . Parse ( weight_Advance . ToString ( ) ) ;
item . Station_Speed_Hight = decimal . Parse ( speed1_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed1_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed1_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 2 :
@ -1786,7 +1791,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed2_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed2_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed2_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 3 :
@ -1807,7 +1812,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed3_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed3_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed3_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 4 :
@ -1828,7 +1833,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed4_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed4_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed4_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 5 :
@ -1849,7 +1854,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed5_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed5_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed5_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 6 :
@ -1871,7 +1876,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed6_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed6_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed6_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 7 :
@ -1893,12 +1898,12 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed7_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed7_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed7_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 8 :
var t = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance8 . NowValue . ToInt ( ) ) / 100 ;
var t = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance8 . NowValue . ToInt ( ) ) / 100 ;
if ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium8 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium8 . NowValue . ToInt ( ) / 100 ) ;
if ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low8 . NowValue . ToInt ( ) > 0 )
@ -1916,7 +1921,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed8_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed8_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed8_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 9 :
@ -1937,7 +1942,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed9_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed9_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed9_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 10 :
@ -1958,7 +1963,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed10_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed10_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed10_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 11 :
@ -1979,7 +1984,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed11_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed11_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed11_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 12 :
@ -2000,7 +2005,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed12_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed12_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed12_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 13 :
@ -2021,7 +2026,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed13_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed13_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed13_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 14 :
@ -2042,7 +2047,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed14_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed14_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed14_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 15 :
@ -2063,7 +2068,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed15_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed15_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed15_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 16 :
@ -2084,7 +2089,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed16_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed16_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed16_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 17 :
@ -2105,7 +2110,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed17_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed17_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed17_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 18 :
@ -2126,7 +2131,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed18_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed18_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed18_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 19 :
@ -2147,7 +2152,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed19_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed19_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed19_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 20 :
@ -2168,7 +2173,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed20_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed20_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed20_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 21 :
@ -2189,7 +2194,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed21_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed21_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed21_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 22 :
@ -2210,7 +2215,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed22_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed22_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed22_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 23 :
@ -2231,7 +2236,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed23_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed23_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed23_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 24 :
@ -2252,7 +2257,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed24_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed24_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed24_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 25 :
@ -2273,7 +2278,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed25_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed25_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed25_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 26 :
@ -2294,7 +2299,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed26_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed26_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed26_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 27 :
@ -2315,7 +2320,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed27_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed27_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed27_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
case 28 :
@ -2336,7 +2341,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
item . Station_Speed_Hight = decimal . Parse ( speed28_Hight . ToString ( ) ) ;
item . Station_Speed_Medium = decimal . Parse ( speed28_Medium . ToString ( ) ) ;
item . Station_Speed_Low = decimal . Parse ( speed28_Low . ToString ( ) ) ;
BinHelper . u pdateBin( item ) ;
BinHelper . U pdateBin( item ) ;
i + + ;
break ;
@ -2348,7 +2353,10 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
return false ;
}
public static bool SaveToData ( Xl_DowLoadPlan item , int batch , decimal real_Weight )
# endregion
#region 存盘数据
public static bool SaveToData ( Xl_DowLoadPlan item , int batch , decimal real_Weight )
{
try
{
@ -2360,7 +2368,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( lrPlan . Plan_Id ! = null )
{
decimal totalWeight = lrPlan . Total_Weight + real_Weight ;
decimal totalError = lrPlan . Total_Error + error ;
decimal totalError = lrPlan . Total_Error + error ;
//保存物料
LR_weigh weigh = new LR_weigh ( ) ;
@ -2411,16 +2419,20 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
weigh . Plan_ID = item . Plan_Id ;
weigh . Recipe_ID = item . Recipe_ID ;
weigh . Bin_Serial = item . Station ;
weigh . Material_ID = item . MaterialID ;
weigh . Material_Name = item . Material_name ;
weigh . Set_Weight = item . Set_Weight ;
weigh . Set_Error = item . Set_Error ;
weigh . Real_Weight = real_Weight ;
weigh . Real_Weight = real_Weight ;
weigh . Real_Error = error ;
addPlan = XlDbHelper . LRAddPlan ( plan ) ;
addWeigh = XlDbHelper . LRAddWeigh ( weigh ) ;
addPlan = XlDbHelper . LRAddPlan ( plan ) ; //报表主表
addWeigh = XlDbHelper . LRAddWeigh ( weigh ) ; //报表物料详细表
//更新料仓数据
var binInfo = BinHelper . GetFristBinInfo ( item . Station ) ;
binInfo . BinWeight = binInfo . BinWeight - real_Weight ;
BinHelper . UpdateBinWeight ( binInfo ) ;
if ( addPlan & & addWeigh )
{
return true ;
@ -2433,11 +2445,12 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
}
catch ( Exception )
{
return false ;
}
}
# endregion
#region 设置配方 PLC点位信息
/// <summary>
/// 设置配方 PLC点位信息