@ -1,4 +1,5 @@
using Mesnac.Action.ChemicalWeighing.BinManage ;
using Mesnac.Action.ChemicalWeighing.DBHelper ;
using Mesnac.Action.ChemicalWeighing.Entity ;
using Mesnac.Action.ChemicalWeighing.Entity.PptPlan ;
using Mesnac.Action.ChemicalWeighing.Product.XlPlan ;
@ -15,6 +16,10 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
{
public static object sender = null ;
public static event EventHandler AutoDownloadPlan ;
public static event EventHandler OnUpdateXlPlanStateFromPlc ; //更新小料计划
public static event EventHandler OnUpdateRefreshBinEvent ; //料仓预警
public static int execNum = 0 ; //记录未完成任务数量
public static int alarmNum = 0 ; //记录料仓告警数量
#region 自动下传计划列表至小料PLC
/// <summary>
@ -327,8 +332,8 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
planId = item . Plan_Id ;
if ( item . Station = = 0 ) continue ;
set_station_weight = Convert . ToInt32 ( item . Set_Weight * 100 ) ;
set_station_error = Convert . ToInt32 ( item . Set_Error * 100 ) ;
set_station_weight = Convert . ToInt32 ( item . Set_Weight * 100 0 ) ;
set_station_error = Convert . ToInt32 ( item . Set_Error * 100 0 ) ;
if ( ! string . IsNullOrEmpty ( item . Plan_Id ) )
{
@ -337,8 +342,6 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
//BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_RecipeName, new object[] { item.Recipe_Name }); //配方名称
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Batch , new object [ ] { item . Plan_Num } ) ; //设定执行数量
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_Set_Plan_Serial , new object [ ] { item . Plan_Serial } ) ; //计划号
}
switch ( item . Station )
{
@ -520,7 +523,6 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
}
}
BasePlcHelper . Instance . PlcWriteByDataKey ( BasePlcHelper . Instance . plt_plc_Start , new object [ ] { 1 } ) ; //设定启动信号
return true ;
@ -584,7 +586,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read11_PlcState . NowValue . ToInt ( ) = = 1 ) //1工位A
{
int batch = BasePlcHelper . Instance . plt_Station1_Batch . NowValue . ToInt ( ) ; //工位批次
decimal real_Weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station1_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal real_Weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station1_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , real_Weight ) ;
@ -599,7 +601,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read12_PlcState . NowValue . ToInt ( ) = = 1 ) //1工位B
{
int batch = BasePlcHelper . Instance . plt_Station1_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station1_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station1_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -615,7 +617,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read21_PlcState . NowValue . ToInt ( ) = = 1 ) //2工位A
{
int batch = BasePlcHelper . Instance . plt_Station2_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station2_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station2_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -631,7 +633,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read22_PlcState . NowValue . ToInt ( ) = = 1 ) //2工位B
{
int batch = BasePlcHelper . Instance . plt_Station2_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station2_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station2_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -647,7 +649,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read31_PlcState . NowValue . ToInt ( ) = = 1 ) //3工位A
{
int batch = BasePlcHelper . Instance . plt_Station3_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station3_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station3_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -663,7 +665,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read32_PlcState . NowValue . ToInt ( ) = = 1 ) //3工位B
{
int batch = BasePlcHelper . Instance . plt_Station3_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station3_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station3_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -679,7 +681,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read41_PlcState . NowValue . ToInt ( ) = = 1 ) //4工位A
{
int batch = BasePlcHelper . Instance . plt_Station4_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station4_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station4_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -695,7 +697,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read42_PlcState . NowValue . ToInt ( ) = = 1 ) //4工位B
{
int batch = BasePlcHelper . Instance . plt_Station4_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station4_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station4_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -714,7 +716,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
int i = BasePlcHelper . Instance . plt_Station5_Weight . NowValue . ToInt ( ) ;
string i2 = BasePlcHelper . Instance . plt_Station5_Weight . NowValue . ToString ( ) ;
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station5_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station5_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -730,7 +732,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read52_PlcState . NowValue . ToInt ( ) = = 1 ) //5工位B
{
int batch = BasePlcHelper . Instance . plt_Station5_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station5_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station5_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -746,8 +748,8 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read61_PlcState . NowValue . ToInt ( ) = = 1 ) //6工位A
{
int batch = BasePlcHelper . Instance . plt_Station6_Batch . NowValue . ToInt ( ) ; //工位批次
int y = BasePlcHelper . Instance . plt_Station6_Weight . NowValue . ToInt ( ) ;
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station6_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station6_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -763,7 +765,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read62_PlcState . NowValue . ToInt ( ) = = 1 ) //6工位B
{
int batch = BasePlcHelper . Instance . plt_Station6_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station6_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station6_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -779,7 +781,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read71_PlcState . NowValue . ToInt ( ) = = 1 ) //7工位A
{
int batch = BasePlcHelper . Instance . plt_Station7_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station7_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station7_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -795,7 +797,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read72_PlcState . NowValue . ToInt ( ) = = 1 ) //7工位B
{
int batch = BasePlcHelper . Instance . plt_Station7_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station7_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station7_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -811,7 +813,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read81_PlcState . NowValue . ToInt ( ) = = 1 ) //7工位B
{
int batch = BasePlcHelper . Instance . plt_Station8_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station8_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station8_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -827,7 +829,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read82_PlcState . NowValue . ToInt ( ) = = 1 ) //8工位A
{
int batch = BasePlcHelper . Instance . plt_Station8_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station8_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station8_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -843,7 +845,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read91_PlcState . NowValue . ToInt ( ) = = 1 ) //9工位A
{
int batch = BasePlcHelper . Instance . plt_Station9_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station9_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station9_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -859,7 +861,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read92_PlcState . NowValue . ToInt ( ) = = 1 ) //9工位B
{
int batch = BasePlcHelper . Instance . plt_Station9_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station9_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station9_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -875,7 +877,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read101_PlcState . NowValue . ToInt ( ) = = 1 ) //10工位A
{
int batch = BasePlcHelper . Instance . plt_Station10_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station10_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station10_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -891,7 +893,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read102_PlcState . NowValue . ToInt ( ) = = 1 ) //10工位B
{
int batch = BasePlcHelper . Instance . plt_Station10_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station10_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station10_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -909,7 +911,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
string b = BasePlcHelper . Instance . plt_Station11_Batch . NowValue . ToString ( ) ; //工位批次
int batch = Convert . ToInt16 ( b ) ;
int batch2 = Convert . ToInt32 ( b ) ;
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station11_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station11_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -925,7 +927,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read112_PlcState . NowValue . ToInt ( ) = = 1 ) //11工位B
{
int batch = BasePlcHelper . Instance . plt_Station11_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station11_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station11_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -941,11 +943,9 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read121_PlcState . NowValue . ToInt ( ) = = 1 ) //12工位A
{
// int batch = BasePlcHelper.Instance.plt_Station12_Batch.NowValue.ToInt();//工位批次
string b = BasePlcHelper . Instance . plt_Station11_Batch . NowValue . ToString ( ) ; //工位批次
int batch = Convert . ToInt16 ( b ) ;
int batch2 = Convert . ToInt32 ( b ) ;
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station12_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
//int batch = Convert.ToInt16(b);
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station12_Weight . NowValue . ToInt ( ) ) / 1000 ; //实际重量
int batch = BasePlcHelper . Instance . plt_Station12_Batch . NowValue . ToInt ( ) ; //工位批次
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
{
@ -960,7 +960,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read122_PlcState . NowValue . ToInt ( ) = = 1 ) //12工位B
{
int batch = BasePlcHelper . Instance . plt_Station12_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station12_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station12_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -977,7 +977,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
{
int batch = BasePlcHelper . Instance . plt_Station13_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station13_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station13_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -993,7 +993,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read132_PlcState . NowValue . ToInt ( ) = = 1 ) //13工位B
{
int batch = BasePlcHelper . Instance . plt_Station13_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station13_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station13_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -1008,7 +1008,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
{
int batch = BasePlcHelper . Instance . plt_Station14_Batch . NowValue . ToInt ( ) ; //工位批次
var t = BasePlcHelper . Instance . plt_Station14_Weight . NowValue . ToInt ( ) ;
decimal weight = Convert . ToDecimal ( t ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( t ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -1024,7 +1024,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
if ( BasePlcHelper . Instance . plt_Read142_PlcState . NowValue . ToInt ( ) = = 1 ) //14工位B
{
int batch = BasePlcHelper . Instance . plt_Station14_Batch . NowValue . ToInt ( ) ; //工位批次
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station14_Weight . NowValue . ToInt ( ) ) / 100 ; //实际重量
decimal weight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Station14_Weight . NowValue . ToInt ( ) ) / 100 0 ; //实际重量
bool result = SaveToData ( item , batch , weight ) ;
if ( result )
@ -1048,7 +1048,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
{
if ( BasePlcHelper . Instance . plt_Read1Jc . NowValue . ToInt ( ) = = 1 )
{
double tcheckWeight = BasePlcHelper . Instance . plt_TCheck_Weight . NowValue . ToInt ( ) / 100 ; //检量秤重量
double tcheckWeight = BasePlcHelper . Instance . plt_TCheck_Weight . NowValue . ToInt ( ) / 100 0 ; //检量秤重量
int tcheckBatch = BasePlcHelper . Instance . plt_Batch . NowValue . ToInt ( ) ; //当前执行的批次
if ( tcheckBatch = = down . Plan_Num )
{
@ -1414,6 +1414,99 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
# endregion
#region 把PLC的计划状态更新至数据库
/// <summary>
/// 把PLC的计划状态更新至数据库
/// </summary>
public static void UpdateXlPlanStateFromPlc ( )
{
try
{
bool flag = false ;
#region 小料同步计划状态和完成数
#region 触发事件
flag = true ;
if ( flag )
{
IFreeSql _fsql = FreeHelper . Instance ;
string sql = "select * FROM xl_plan where Plan_State=5" ;
var obj = _fsql . Select < xl_plan > ( ) . WithSql ( sql ) . OrderBy ( d = > d . Plan_State ) . ToList ( ) ;
if ( obj . Count ( ) ! = execNum )
{
if ( OnUpdateXlPlanStateFromPlc ! = null )
{
OnUpdateXlPlanStateFromPlc ( sender , System . EventArgs . Empty ) ;
execNum = obj . Count ( ) ;
}
}
}
# endregion
# endregion
}
catch ( Exception ex )
{
ICSharpCode . Core . LoggingService < PlcPlanHelper > . Error ( "把PLC的计划状态更新至数据库异常: " + ex . Message , ex ) ;
}
finally
{
Global . PublicVar . Instance . LocalPlanIsRefresh = false ;
}
}
# endregion
#region 把PLC的计划状态更新至数据库
/// <summary>
/// 把PLC的计划状态更新至数据库
/// </summary>
public static void UpdateBinAlarm ( )
{
try
{
bool flag = false ;
#region 料仓告警
#region 触发事件
flag = true ;
if ( flag )
{
IFreeSql _fsql = FreeHelper . Instance ;
string sql = "select * FROM Pmt_Bin where BinWeight<LimitWeight" ;
var obj = _fsql . Select < Pmt_Bin > ( ) . WithSql ( sql ) . ToList ( ) ;
if ( obj . Count ( ) ! = alarmNum )
{
if ( OnUpdateRefreshBinEvent ! = null )
{
OnUpdateRefreshBinEvent ( sender , System . EventArgs . Empty ) ;
alarmNum = obj . Count ( ) ;
}
}
}
# endregion
# endregion
}
catch ( Exception ex )
{
ICSharpCode . Core . LoggingService < PlcPlanHelper > . Error ( "把PLC的计划状态更新至数据库异常: " + ex . Message , ex ) ;
}
finally
{
Global . PublicVar . Instance . LocalPlanIsRefresh = false ;
}
}
# endregion
# endregion
#region 设定设备参数
@ -1427,9 +1520,9 @@ 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 0 ) ;
set_station_Weight_Low = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Low ) * 100 0 ) ;
set_station_Weight_Advance = Convert . ToInt32 ( Convert . ToDecimal ( item . Station_Weight_Advance ) * 100 0 ) ;
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 ) ;
@ -1765,11 +1858,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
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 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Medium1 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Low1 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Low1 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Low1 . NowValue . ToInt ( ) ) / 100 0 ;
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 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Advance1 . NowValue . ToInt ( ) ) / 100 0 ;
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 ;
@ -1787,11 +1880,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
case 2 :
if ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Medium2 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Medium2 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Medium2 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Low2 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Low2 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Low2 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Advance2 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Advance2 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Weight_Advance2 . NowValue . ToInt ( ) ) / 100 0 ;
var speed2_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Hight2 . NowValue . ToDouble ( ) ) / 10 ;
var speed2_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station1_Speed_Medium2 . NowValue . ToDouble ( ) ) / 10 ;
@ -1808,11 +1901,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 3 :
if ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium3 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium3 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium3 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low3 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low3 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low3 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance3 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance3 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance3 . NowValue . ToInt ( ) ) / 100 0 ;
var speed3_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Hight3 . NowValue . ToDouble ( ) ) / 10 ;
var speed3_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Medium3 . NowValue . ToDouble ( ) ) / 10 ;
@ -1829,11 +1922,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 4 :
if ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium4 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium4 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Medium4 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low4 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low4 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Low4 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance4 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance4 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Weight_Advance4 . NowValue . ToInt ( ) ) / 100 0 ;
var speed4_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Hight4 . NowValue . ToDouble ( ) ) / 10 ;
var speed4_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station2_Speed_Medium4 . NowValue . ToDouble ( ) ) / 10 ;
@ -1850,11 +1943,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 5 :
if ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium5 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium5 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium5 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low5 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low5 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low5 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance5 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance5 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance5 . NowValue . ToInt ( ) ) / 100 0 ;
var speed5_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Hight5 . NowValue . ToDouble ( ) ) / 10 ;
var speed5_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Medium5 . NowValue . ToDouble ( ) ) / 10 ;
@ -1872,11 +1965,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
case 6 :
if ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium6 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium6 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Medium6 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low6 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low6 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Low6 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance6 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance6 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Weight_Advance6 . NowValue . ToInt ( ) ) / 100 0 ;
var speed6_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Hight6 . NowValue . ToDouble ( ) ) / 10 ;
var speed6_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station3_Speed_Medium6 . NowValue . ToDouble ( ) ) / 10 ;
@ -1894,11 +1987,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
case 7 :
if ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium7 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium7 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium7 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low7 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low7 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low7 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance7 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance7 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance7 . NowValue . ToInt ( ) ) / 100 0 ;
var speed7_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Hight7 . NowValue . ToDouble ( ) ) / 10 ;
var speed7_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Medium7 . NowValue . ToDouble ( ) ) / 10 ;
@ -1914,14 +2007,14 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
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 0 ;
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 ) ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Medium8 . NowValue . ToInt ( ) / 100 0 ) ;
if ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low8 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low8 . NowValue . ToInt ( ) / 100 ) ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Low8 . NowValue . ToInt ( ) / 100 0 ) ;
if ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance8 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance8 . NowValue . ToInt ( ) / 100 ) ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Weight_Advance8 . NowValue . ToInt ( ) / 100 0 ) ;
var speed8_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Hight8 . NowValue . ToString ( ) ) / 10 ;
var speed8_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station4_Speed_Medium8 . NowValue . ToString ( ) ) / 10 ;
@ -1938,11 +2031,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 9 :
if ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium9 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium9 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium9 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low9 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low9 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low9 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance9 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance9 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance9 . NowValue . ToInt ( ) ) / 100 0 ;
var speed9_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Hight9 . NowValue . ToDouble ( ) ) / 10 ;
var speed9_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Medium9 . NowValue . ToDouble ( ) ) / 10 ;
@ -1959,11 +2052,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 10 :
if ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium10 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium10 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Medium10 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low10 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low10 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Low10 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance10 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance10 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Weight_Advance10 . NowValue . ToInt ( ) ) / 100 0 ;
var speed10_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Hight10 . NowValue . ToDouble ( ) ) / 10 ;
var speed10_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station5_Speed_Medium10 . NowValue . ToDouble ( ) ) / 10 ;
@ -1980,11 +2073,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 11 :
if ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium11 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium11 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium11 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low11 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low11 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low11 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance11 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance11 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance11 . NowValue . ToInt ( ) ) / 100 0 ;
var speed11_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Hight11 . NowValue . ToDouble ( ) ) / 10 ;
var speed11_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Medium11 . NowValue . ToDouble ( ) ) / 10 ;
@ -2001,11 +2094,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 12 :
if ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium12 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium12 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Medium12 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low12 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low12 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Low12 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance12 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance12 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Weight_Advance12 . NowValue . ToInt ( ) ) / 100 0 ;
var speed12_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Hight12 . NowValue . ToDouble ( ) ) / 10 ;
var speed12_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station6_Speed_Medium12 . NowValue . ToDouble ( ) ) / 10 ;
@ -2022,11 +2115,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 13 :
if ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium13 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium13 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium13 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low13 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low13 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low13 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance13 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance13 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance13 . NowValue . ToInt ( ) ) / 100 0 ;
var speed13_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Hight13 . NowValue . ToDouble ( ) ) / 10 ;
var speed13_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Medium13 . NowValue . ToDouble ( ) ) / 10 ;
@ -2043,11 +2136,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 14 :
if ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium14 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium14 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Medium14 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low14 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low14 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Low14 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance14 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance14 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Weight_Advance14 . NowValue . ToInt ( ) ) / 100 0 ;
var speed14_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Hight14 . NowValue . ToDouble ( ) ) / 10 ;
var speed14_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station7_Speed_Medium14 . NowValue . ToDouble ( ) ) / 10 ;
@ -2064,11 +2157,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 15 :
if ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium15 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium15 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium15 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low15 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low15 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low15 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance15 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance15 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance15 . NowValue . ToInt ( ) ) / 100 0 ;
var speed15_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Hight16 . NowValue . ToDouble ( ) ) / 10 ;
var speed15_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Medium16 . NowValue . ToDouble ( ) ) / 10 ;
@ -2085,11 +2178,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 16 :
if ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium16 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium16 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Medium16 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low16 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low16 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Low16 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance16 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance16 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Weight_Advance16 . NowValue . ToInt ( ) ) / 100 0 ;
var speed16_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Hight16 . NowValue . ToDouble ( ) ) / 10 ;
var speed16_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station8_Speed_Medium16 . NowValue . ToDouble ( ) ) / 10 ;
@ -2106,11 +2199,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 17 :
if ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium17 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium17 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium17 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low17 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low17 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low17 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance17 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance17 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance17 . NowValue . ToInt ( ) ) / 100 0 ;
var speed17_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Hight17 . NowValue . ToDouble ( ) ) / 10 ;
var speed17_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Medium17 . NowValue . ToDouble ( ) ) / 10 ;
@ -2127,11 +2220,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 18 :
if ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium18 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium18 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Medium18 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low18 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low18 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Low18 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance18 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance18 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Weight_Advance18 . NowValue . ToInt ( ) ) / 100 0 ;
var speed18_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Hight18 . NowValue . ToDouble ( ) ) / 10 ;
var speed18_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station9_Speed_Medium18 . NowValue . ToDouble ( ) ) / 10 ;
@ -2148,11 +2241,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 19 :
if ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Medium19 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Medium19 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Medium19 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Low19 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Low19 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Low19 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Advance19 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Advance19 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Advance19 . NowValue . ToInt ( ) ) / 100 0 ;
var speed19_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Speed_Hight19 . NowValue . ToDouble ( ) ) / 10 ;
var speed19_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Speed_Medium19 . NowValue . ToDouble ( ) ) / 10 ;
@ -2169,11 +2262,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 20 :
if ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Medium20 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Medium20 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Medium20 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Low20 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Low20 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Low20 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Advance20 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Advance20 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Weight_Advance20 . NowValue . ToInt ( ) ) / 100 0 ;
var speed20_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Speed_Hight20 . NowValue . ToDouble ( ) ) / 10 ;
var speed20_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station10_Speed_Medium20 . NowValue . ToDouble ( ) ) / 10 ;
@ -2190,11 +2283,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 21 :
if ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Medium21 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Medium21 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Medium21 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Low21 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Low21 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Low21 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Advance21 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Advance21 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Advance21 . NowValue . ToInt ( ) ) / 100 0 ;
var speed21_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Speed_Hight21 . NowValue . ToDouble ( ) ) / 10 ;
var speed21_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Speed_Medium21 . NowValue . ToDouble ( ) ) / 10 ;
@ -2211,11 +2304,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 22 :
if ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Medium22 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Medium22 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Medium22 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Low22 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Low22 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Low22 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Advance22 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Advance22 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Weight_Advance22 . NowValue . ToInt ( ) ) / 100 0 ;
var speed22_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Speed_Hight22 . NowValue . ToDouble ( ) ) / 10 ;
var speed22_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station11_Speed_Medium22 . NowValue . ToDouble ( ) ) / 10 ;
@ -2232,11 +2325,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 23 :
if ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Medium23 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Medium23 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Medium23 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Low23 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Low23 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Low23 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Advance23 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Advance23 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Advance23 . NowValue . ToInt ( ) ) / 100 0 ;
var speed23_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Speed_Hight23 . NowValue . ToDouble ( ) ) / 10 ;
var speed23_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Speed_Medium23 . NowValue . ToDouble ( ) ) / 10 ;
@ -2253,11 +2346,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 24 :
if ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Medium24 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Medium24 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Medium24 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Low24 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Low24 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Low24 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Advance24 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Advance24 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Weight_Advance24 . NowValue . ToInt ( ) ) / 100 0 ;
var speed24_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Speed_Hight24 . NowValue . ToDouble ( ) ) / 10 ;
var speed24_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station12_Speed_Medium24 . NowValue . ToDouble ( ) ) / 10 ;
@ -2274,11 +2367,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 25 :
if ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium25 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium25 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium25 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low25 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low25 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low25 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance25 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance25 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance25 . NowValue . ToInt ( ) ) / 100 0 ;
var speed25_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Hight25 . NowValue . ToDouble ( ) ) / 10 ;
var speed25_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Medium25 . NowValue . ToDouble ( ) ) / 10 ;
@ -2295,11 +2388,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 26 :
if ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium26 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium26 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Medium26 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low26 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low26 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Low26 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance26 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance26 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Weight_Advance26 . NowValue . ToInt ( ) ) / 100 0 ;
var speed26_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Hight26 . NowValue . ToDouble ( ) ) / 10 ;
var speed26_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station13_Speed_Medium26 . NowValue . ToDouble ( ) ) / 10 ;
@ -2316,11 +2409,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 27 :
if ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium27 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium27 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium27 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low27 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low27 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low27 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance27 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance27 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance27 . NowValue . ToInt ( ) ) / 100 0 ;
var speed27_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Hight27 . NowValue . ToDouble ( ) ) / 10 ;
var speed27_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Medium27 . NowValue . ToDouble ( ) ) / 10 ;
@ -2337,11 +2430,11 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
break ;
case 28 :
if ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium28 . NowValue . ToInt ( ) > 0 )
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium28 . NowValue . ToInt ( ) ) / 100 ;
weight_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Medium28 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low28 . NowValue . ToInt ( ) > 0 )
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low28 . NowValue . ToInt ( ) ) / 100 ;
weight_Low = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Low28 . NowValue . ToInt ( ) ) / 100 0 ;
if ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance28 . NowValue . ToInt ( ) > 0 )
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance28 . NowValue . ToInt ( ) ) / 100 ;
weight_Advance = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Weight_Advance28 . NowValue . ToInt ( ) ) / 100 0 ;
var speed28_Hight = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Hight28 . NowValue . ToDouble ( ) ) / 10 ;
var speed28_Medium = Convert . ToDecimal ( BasePlcHelper . Instance . plt_Set_Station14_Speed_Medium28 . NowValue . ToDouble ( ) ) / 10 ;
@ -2794,5 +2887,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
}
}
}
}
}