Commit b925a8ff authored by leon.huang's avatar leon.huang

Fix alarm BUG

parent 7891ea44
......@@ -294,12 +294,12 @@ namespace ModbusDemo.MessageFormat
vInit_Level_Config();
while (true)
{
#region 东中转反馈检测
#region 东中转反馈和液位检测
for (sbyte sbEastTransitPoolIndex = 0; sbEastTransitPoolIndex < AllPond.WestTransitPoolList.Count(); sbEastTransitPoolIndex++)
{
if (AllPond.EastTransitPoolList[sbEastTransitPoolIndex].bHadRefControl == true && AllPond.EastTransitPoolList[sbEastTransitPoolIndex].bHadOpenPumb == true)
{
if (AllPond.EastTransitPoolList[sbEastTransitPoolIndex].dChannelCurrent < OPENCURRENT)
if (AllPond.EastTransitPoolList[sbEastTransitPoolIndex].dChannelCurrent < OPENCURRENT && AllPond.EastTransitPoolList[sbEastTransitPoolIndex].dChannelCurrent != 0)
{
bool[] bControlData;
if (ModualPoll.bGet_channel_Value<bool>(AllPond.EastTransitPoolList[sbEastTransitPoolIndex].byModbusID, out bControlData, "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7") == true)
......@@ -313,29 +313,29 @@ namespace ModbusDemo.MessageFormat
}
if (AllPond.EastTransitPoolList[sbEastTransitPoolIndex].bHadRefControl == true && AllPond.EastTransitPoolList[sbEastTransitPoolIndex].bHadOpenPumb == false)
{
if (AllPond.EastTransitPoolList[sbEastTransitPoolIndex].dChannelCurrent > CLOSECURRENT)
if (AllPond.EastTransitPoolList[sbEastTransitPoolIndex].dChannelCurrent > CLOSECURRENT && AllPond.EastTransitPoolList[sbEastTransitPoolIndex].dChannelCurrent != 0)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.EastTransitPoolList[sbEastTransitPoolIndex].byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelControlError, true, 1, AllPond.EastTransitPoolList[sbEastTransitPoolIndex].strChannelNumber);
}
}
Thread.Sleep(200);
}
//if ( AllPond.cEastTransitPool.cLevel.dCurrentlevel >= AllPond.cEastTransitPool.vSetMaxLevel || AllPond.cEastTransitPool.cLevel.dCurrentlevel <= AllPond.cEastTransitPool.vSetMinLevel)
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cEastTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, true, 1, AllPond.cEastTransitPool.cLevel.strChannelNumber);
//}
//else
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cEastTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cEastTransitPool.cLevel.strChannelNumber);
//}
if (AllPond.cEastTransitPool.cLevel.dCurrentlevel >= AllPond.cEastTransitPool.vSetMaxLevel || AllPond.cEastTransitPool.cLevel.dCurrentlevel <= AllPond.cEastTransitPool.vSetMinLevel)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.cEastTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, true, 1, AllPond.cEastTransitPool.cLevel.strChannelNumber);
}
else
{
ModualAlarm.vSet_Modual_Alarm(AllPond.cEastTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cEastTransitPool.cLevel.strChannelNumber);
}
Thread.Sleep(1000);
#endregion
#region 西中转反馈检测
#region 西中转反馈和液位检测
for (sbyte sbWestTransitPoolIndex = 0; sbWestTransitPoolIndex < AllPond.WestTransitPoolList.Count(); sbWestTransitPoolIndex++)
{
if (AllPond.WestTransitPoolList[sbWestTransitPoolIndex].bHadRefControl == true && AllPond.WestTransitPoolList[sbWestTransitPoolIndex].bHadOpenPumb == true)
{
if (AllPond.WestTransitPoolList[sbWestTransitPoolIndex].dChannelCurrent < OPENCURRENT)
if (AllPond.WestTransitPoolList[sbWestTransitPoolIndex].dChannelCurrent < OPENCURRENT && AllPond.WestTransitPoolList[sbWestTransitPoolIndex].dChannelCurrent != 0)
{
bool[] bControlData;
if (ModualPoll.bGet_channel_Value<bool>(AllPond.WestTransitPoolList[sbWestTransitPoolIndex].byModbusID, out bControlData, "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7") == true)
......@@ -349,21 +349,21 @@ namespace ModbusDemo.MessageFormat
}
if (AllPond.WestTransitPoolList[sbWestTransitPoolIndex].bHadRefControl == true && AllPond.WestTransitPoolList[sbWestTransitPoolIndex].bHadOpenPumb == false)
{
if (AllPond.WestTransitPoolList[sbWestTransitPoolIndex].dChannelCurrent > CLOSECURRENT)
if (AllPond.WestTransitPoolList[sbWestTransitPoolIndex].dChannelCurrent > CLOSECURRENT && AllPond.WestTransitPoolList[sbWestTransitPoolIndex].dChannelCurrent != 0)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.WestTransitPoolList[sbWestTransitPoolIndex].byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelControlError, true, 1, AllPond.WestTransitPoolList[sbWestTransitPoolIndex].strChannelNumber);
}
}
Thread.Sleep(200);
}
//if ( AllPond.cWestTransitPool.cLevel.dCurrentlevel >= AllPond.cWestTransitPool.vSetMaxLevel || AllPond.cWestTransitPool.cLevel.dCurrentlevel <= AllPond.cWestTransitPool.vSetMinLevel)
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cWestTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, true, 1, AllPond.cWestTransitPool.cLevel.strChannelNumber);
//}
//else
//{
// ModualAlarm.vSet_Modual_Alarm(AllPond.cWestTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cWestTransitPool.cLevel.strChannelNumber);
//}
}
if (AllPond.cWestTransitPool.cLevel.dCurrentlevel >= AllPond.cWestTransitPool.vSetMaxLevel || AllPond.cWestTransitPool.cLevel.dCurrentlevel <= AllPond.cWestTransitPool.vSetMinLevel)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.cWestTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, true, 1, AllPond.cWestTransitPool.cLevel.strChannelNumber);
}
else
{
ModualAlarm.vSet_Modual_Alarm(AllPond.cWestTransitPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cWestTransitPool.cLevel.strChannelNumber);
}
Thread.Sleep(1000);
#endregion
......@@ -372,7 +372,7 @@ namespace ModbusDemo.MessageFormat
{
if (AllPond.DesiltingPoolList[sbDesiltingPoolIndex].bHadRefControl == true && AllPond.DesiltingPoolList[sbDesiltingPoolIndex].bHadOpenPumb == true)
{
if (AllPond.DesiltingPoolList[sbDesiltingPoolIndex].dChannelCurrent < OPENCURRENT)
if (AllPond.DesiltingPoolList[sbDesiltingPoolIndex].dChannelCurrent < OPENCURRENT && AllPond.DesiltingPoolList[sbDesiltingPoolIndex].dChannelCurrent != 0)
{
bool[] bControlData;
if (ModualPoll.bGet_channel_Value<bool>(AllPond.DesiltingPoolList[sbDesiltingPoolIndex].byModbusID, out bControlData, "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7") == true)
......@@ -386,7 +386,7 @@ namespace ModbusDemo.MessageFormat
}
if (AllPond.DesiltingPoolList[sbDesiltingPoolIndex].bHadRefControl == true && AllPond.DesiltingPoolList[sbDesiltingPoolIndex].bHadOpenPumb == false)
{
if (AllPond.DesiltingPoolList[sbDesiltingPoolIndex].dChannelCurrent > CLOSECURRENT)
if (AllPond.DesiltingPoolList[sbDesiltingPoolIndex].dChannelCurrent > CLOSECURRENT && AllPond.DesiltingPoolList[sbDesiltingPoolIndex].dChannelCurrent != 0)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.DesiltingPoolList[sbDesiltingPoolIndex].byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelControlError, true, 1, AllPond.DesiltingPoolList[sbDesiltingPoolIndex].strChannelNumber);
}
......@@ -402,13 +402,14 @@ namespace ModbusDemo.MessageFormat
ModualAlarm.vSet_Modual_Alarm(AllPond.cDesiltingPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cDesiltingPool.cLevel.strChannelNumber);
}
Thread.Sleep(1000);
#endregion
#endregion
#region 出料池反馈和液位检测
#if !DEBUG_TEST
for (sbyte sbEastTransitPoolIndex = 0; sbEastTransitPoolIndex < AllPond.DischargePoolList.Count(); sbEastTransitPoolIndex++)
{
if (AllPond.DischargePoolList[sbEastTransitPoolIndex].bHadRefControl == true && AllPond.DischargePoolList[sbEastTransitPoolIndex].bHadOpenPumb == true)
{
if (AllPond.DischargePoolList[sbEastTransitPoolIndex].dChannelCurrent < OPENCURRENT)
if (AllPond.DischargePoolList[sbEastTransitPoolIndex].dChannelCurrent < OPENCURRENT && AllPond.DischargePoolList[sbEastTransitPoolIndex].dChannelCurrent != 0)
{
bool[] bControlData;
if (ModualPoll.bGet_channel_Value<bool>(AllPond.DischargePoolList[sbEastTransitPoolIndex].byModbusID, out bControlData, "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7") == true)
......@@ -422,7 +423,7 @@ namespace ModbusDemo.MessageFormat
}
if (AllPond.DischargePoolList[sbEastTransitPoolIndex].bHadRefControl == true && AllPond.DischargePoolList[sbEastTransitPoolIndex].bHadOpenPumb == false)
{
if (AllPond.DischargePoolList[sbEastTransitPoolIndex].dChannelCurrent > CLOSECURRENT)
if (AllPond.DischargePoolList[sbEastTransitPoolIndex].dChannelCurrent > CLOSECURRENT && AllPond.DischargePoolList[sbEastTransitPoolIndex].dChannelCurrent != 0)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.DischargePoolList[sbEastTransitPoolIndex].byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelControlError, true, 1, AllPond.DischargePoolList[sbEastTransitPoolIndex].strChannelNumber);
}
......@@ -438,13 +439,14 @@ namespace ModbusDemo.MessageFormat
ModualAlarm.vSet_Modual_Alarm(AllPond.cDischargePool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cDischargePool.cLevel.strChannelNumber);
}
Thread.Sleep(1000);
#endregion
#endif
#endregion
#region 匀浆池反馈和液位检测
for (sbyte sbSlurryPoolIndex = 0; sbSlurryPoolIndex < AllPond.SlurryPoolList.Count(); sbSlurryPoolIndex++)
{
if (AllPond.SlurryPoolList[sbSlurryPoolIndex].bHadRefControl == true && AllPond.SlurryPoolList[sbSlurryPoolIndex].bHadOpenPumb == true)
{
if (AllPond.SlurryPoolList[sbSlurryPoolIndex].dChannelCurrent < OPENCURRENT)
if (AllPond.SlurryPoolList[sbSlurryPoolIndex].dChannelCurrent < OPENCURRENT && AllPond.SlurryPoolList[sbSlurryPoolIndex].dChannelCurrent != 0)
{
bool[] bControlData;
if (ModualPoll.bGet_channel_Value<bool>(AllPond.SlurryPoolList[sbSlurryPoolIndex].byModbusID, out bControlData, "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7") == true)
......@@ -458,7 +460,7 @@ namespace ModbusDemo.MessageFormat
}
if (AllPond.SlurryPoolList[sbSlurryPoolIndex].bHadRefControl == true && AllPond.SlurryPoolList[sbSlurryPoolIndex].bHadOpenPumb == false)
{
if (AllPond.SlurryPoolList[sbSlurryPoolIndex].dChannelCurrent > CLOSECURRENT)
if (AllPond.SlurryPoolList[sbSlurryPoolIndex].dChannelCurrent > CLOSECURRENT && AllPond.SlurryPoolList[sbSlurryPoolIndex].dChannelCurrent != 0)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.SlurryPoolList[sbSlurryPoolIndex].byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelControlError, true, 1, AllPond.SlurryPoolList[sbSlurryPoolIndex].strChannelNumber);
}
......@@ -474,13 +476,14 @@ namespace ModbusDemo.MessageFormat
ModualAlarm.vSet_Modual_Alarm(AllPond.cSlurryPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cSlurryPool.cLevel.strChannelNumber);
}
Thread.Sleep(1000);
#endregion
#endregion
#region 八角池反馈和液位检测
#if !DEBUG_TEST
for (sbyte sbOctagonalPoolIndex = 0; sbOctagonalPoolIndex < AllPond.OctagonalPoolList.Count(); sbOctagonalPoolIndex++)
{
if (AllPond.OctagonalPoolList[sbOctagonalPoolIndex].bHadRefControl == true && AllPond.OctagonalPoolList[sbOctagonalPoolIndex].bHadOpenPumb == true)
{
if (AllPond.OctagonalPoolList[sbOctagonalPoolIndex].dChannelCurrent < OPENCURRENT)
if (AllPond.OctagonalPoolList[sbOctagonalPoolIndex].dChannelCurrent < OPENCURRENT && AllPond.OctagonalPoolList[sbOctagonalPoolIndex].dChannelCurrent != 0)
{
bool[] bControlData;
if (ModualPoll.bGet_channel_Value<bool>(AllPond.OctagonalPoolList[sbOctagonalPoolIndex].byModbusID, out bControlData, "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7") == true)
......@@ -494,7 +497,7 @@ namespace ModbusDemo.MessageFormat
}
if (AllPond.OctagonalPoolList[sbOctagonalPoolIndex].bHadRefControl == true && AllPond.OctagonalPoolList[sbOctagonalPoolIndex].bHadOpenPumb == false)
{
if (AllPond.OctagonalPoolList[sbOctagonalPoolIndex].dChannelCurrent > CLOSECURRENT)
if (AllPond.OctagonalPoolList[sbOctagonalPoolIndex].dChannelCurrent > CLOSECURRENT && AllPond.OctagonalPoolList[sbOctagonalPoolIndex].dChannelCurrent != 0)
{
ModualAlarm.vSet_Modual_Alarm(AllPond.OctagonalPoolList[sbOctagonalPoolIndex].byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelControlError, true, 1, AllPond.OctagonalPoolList[sbOctagonalPoolIndex].strChannelNumber);
}
......@@ -509,8 +512,9 @@ namespace ModbusDemo.MessageFormat
{
ModualAlarm.vSet_Modual_Alarm(AllPond.cOctagonalPool.cLevel.byModbusID, (ushort)ModualAlarm.eAlarmCode.ChannelLevelError, false, 1, AllPond.cOctagonalPool.cLevel.strChannelNumber);
}
Thread.Sleep(1000);
#endregion
Thread.Sleep(1000);
#endif
#endregion
}
}
public static bool bOperation_Machine(bool bOpenMachine, byte sbModbusID,bool[] bControlData,bool[] bControlBit,out bool bHadOpenMachine, byte byResModualID,string stResChannel)
......@@ -531,14 +535,16 @@ namespace ModbusDemo.MessageFormat
double[] dConvertData;
bHadOpenMachine = true;
Thread.Sleep(2000);
bControlStatus = ModualPoll.bGet_channel_Value<double>(byResModualID, out dConvertData, stResChannel);
if (dConvertData[0] > OPENCURRENT && bControlStatus == true)
if (ModualPoll.bGet_channel_Value<double>(byResModualID, out dConvertData, stResChannel) == true)
{
bControlStatus = true;
}
else
{
bControlStatus = false;
if (dConvertData[0] > OPENCURRENT && bControlStatus == true)
{
bControlStatus = true;
}
else
{
bControlStatus = false;
}
}
}
else if (bOpenMachine == false && stResChannel != null)
......@@ -546,14 +552,16 @@ namespace ModbusDemo.MessageFormat
double[] dConvertData;
bHadOpenMachine = false;
Thread.Sleep(2000);
bControlStatus = ModualPoll.bGet_channel_Value<double>(byResModualID, out dConvertData, stResChannel);
if (dConvertData[0] < CLOSECURRENT && bControlStatus == true)
{
bControlStatus = true;
}
else
if (ModualPoll.bGet_channel_Value<double>(byResModualID, out dConvertData, stResChannel) == true)
{
bControlStatus = false;
if (dConvertData[0] < CLOSECURRENT && bControlStatus == true)
{
bControlStatus = true;
}
else
{
bControlStatus = false;
}
}
}
else
......@@ -639,7 +647,21 @@ namespace ModbusDemo.MessageFormat
}
public static void vSet_Pool_Alarm_Level(byte byModbusID,double dMaxLevel,double dMinLevel,string strChannelName)
{
if (byModbusID == AllPond.cSlurryPool.cLevel.byModbusID && ((IList<string>)AllPond.cSlurryPool.cLevel.strChannelNumber).Contains(strChannelName) == true)
if (byModbusID == AllPond.cEastTransitPool.cLevel.byModbusID && ((IList<string>)AllPond.cEastTransitPool.cLevel.strChannelNumber).Contains(strChannelName) == true)
{
AllPond.cEastTransitPool.vSetMaxLevel = dMaxLevel;
AllPond.cEastTransitPool.vSetMinLevel = dMinLevel;
pcConfig.WriteConfig("东中转池配置", "报警最高液位", AllPond.cEastTransitPool.vSetMaxLevel.ToString());
pcConfig.WriteConfig("东中转池配置", "报警最低液位", AllPond.cEastTransitPool.vSetMinLevel.ToString());
}
else if (byModbusID == AllPond.cWestTransitPool.cLevel.byModbusID && ((IList<string>)AllPond.cWestTransitPool.cLevel.strChannelNumber).Contains(strChannelName) == true)
{
AllPond.cWestTransitPool.vSetMaxLevel = dMaxLevel;
AllPond.cWestTransitPool.vSetMinLevel = dMinLevel;
pcConfig.WriteConfig("西中转池配置", "报警最高液位", AllPond.cWestTransitPool.vSetMaxLevel.ToString());
pcConfig.WriteConfig("西中转池配置", "报警最低液位", AllPond.cWestTransitPool.vSetMinLevel.ToString());
}
else if (byModbusID == AllPond.cSlurryPool.cLevel.byModbusID && ((IList<string>)AllPond.cSlurryPool.cLevel.strChannelNumber).Contains(strChannelName) == true)
{
AllPond.cSlurryPool.vSetMaxLevel = dMaxLevel;
AllPond.cSlurryPool.vSetMinLevel = dMinLevel;
......@@ -672,6 +694,13 @@ namespace ModbusDemo.MessageFormat
{
if (filConfigFiles.Length == 0)
{
pcConfig.WriteConfig("东中转池配置", "报警最高液位", "8");
pcConfig.WriteConfig("东中转池配置", "报警最低液位", "1");
pcConfig.WriteConfig("西中转池配置", "报警最高液位", "8");
pcConfig.WriteConfig("西中转池配置", "报警最低液位", "1");
pcConfig.WriteConfig("匀浆池配置", "报警最高液位", "8");
pcConfig.WriteConfig("匀浆池配置", "报警最低液位", "1");
......@@ -684,6 +713,12 @@ namespace ModbusDemo.MessageFormat
pcConfig.WriteConfig("出料池配置", "报警最高液位", "8");
pcConfig.WriteConfig("出料池配置", "报警最低液位", "1");
AllPond.cEastTransitPool.vSetMaxLevel = pcConfig.ReadConfig<double>("东中转池配置", "报警最高液位");
AllPond.cEastTransitPool.vSetMinLevel = pcConfig.ReadConfig<double>("东中转池配置", "报警最低液位");
AllPond.cWestTransitPool.vSetMaxLevel = pcConfig.ReadConfig<double>("西中转池配置", "报警最高液位");
AllPond.cWestTransitPool.vSetMinLevel = pcConfig.ReadConfig<double>("西中转池配置", "报警最低液位");
AllPond.cSlurryPool.vSetMaxLevel = pcConfig.ReadConfig<double>("匀浆池配置", "报警最高液位");
AllPond.cSlurryPool.vSetMinLevel = pcConfig.ReadConfig<double>("匀浆池配置", "报警最低液位");
......@@ -698,6 +733,12 @@ namespace ModbusDemo.MessageFormat
}
else
{
AllPond.cEastTransitPool.vSetMaxLevel = pcConfig.ReadConfig<double>("东中转池配置", "报警最高液位");
AllPond.cEastTransitPool.vSetMinLevel = pcConfig.ReadConfig<double>("东中转池配置", "报警最低液位");
AllPond.cWestTransitPool.vSetMaxLevel = pcConfig.ReadConfig<double>("西中转池配置", "报警最高液位");
AllPond.cWestTransitPool.vSetMinLevel = pcConfig.ReadConfig<double>("西中转池配置", "报警最低液位");
AllPond.cSlurryPool.vSetMaxLevel = pcConfig.ReadConfig<double>("匀浆池配置", "报警最高液位");
AllPond.cSlurryPool.vSetMinLevel = pcConfig.ReadConfig<double>("匀浆池配置", "报警最低液位");
......
......@@ -857,7 +857,6 @@ namespace ModbusDemo.Modular
await Form1.Publish(Form1.sAlarmTopic,ModualAlarm.sAgainAlarmJson);
}
}
public static string vRemove_Nodes_Data_String(string strSendAllDataJson)
{
if (listDeleteNodesID.Count() != 0)
......
......@@ -88,7 +88,7 @@ namespace ModbusDemo.application
bCloseOperation = new bool[] { false },
bHadRefControl = false,
byResModbusID = 0xFF,
strResChannelNumber = "d0"
strResChannelNumber = null
};
private static ModualPool.pcMachine cEastTransitPoolStirrer2 = new ModualPool.pcMachine("EastTransitPoolStirrer_2", cEastTransitPoolStirrer2Base);
......@@ -214,7 +214,7 @@ namespace ModbusDemo.application
bCloseOperation = new bool[] { false },
bHadRefControl = false,
byResModbusID = 0xFF,
strResChannelNumber = "d0"
strResChannelNumber = null
};
private static ModualPool.pcMachine cWestTransitPoolStirrer2 = new ModualPool.pcMachine("WestTransitPoolStirrer_2", cWestTransitPoolStirrer2Base);
......@@ -322,7 +322,7 @@ namespace ModbusDemo.application
private static ModualPool.pcOperation cDesiltingPoolStirrer1Base = new ModualPool.pcOperation
{
byModbusID = 31,
byModbusID = 90,
strOperationNumber = "d4",
strChannelNumber = new string[] { "d4"},
bOpenOperation = new bool[] { true},
......@@ -337,12 +337,12 @@ namespace ModbusDemo.application
{
byModbusID = 90,
strOperationNumber = "d5",
strChannelNumber = new string[] { "d5" },
strChannelNumber = new string[] { "d5" },
bOpenOperation = new bool[] { true },
bCloseOperation = new bool[] { false },
bHadRefControl = false,
byResModbusID = 0xFF,
strResChannelNumber = "d0"
strResChannelNumber = null
};
private static ModualPool.pcMachine cDesiltingPoolStirrer2 = new ModualPool.pcMachine("DesiltingPoolStirrer2", cDesiltingPoolStirrer2Base);
......@@ -519,7 +519,7 @@ namespace ModbusDemo.application
bCloseOperation = new bool[] { false },
bHadRefControl = false,
byResModbusID = 0xFF,
strResChannelNumber = "d0"
strResChannelNumber = null
};
private static ModualPool.pcMachine cOctagonalPoolStirrer1 = new ModualPool.pcMachine("OctagonalPoolStirrer1", cOctagonalPoolStirrer1Base);
......@@ -532,7 +532,7 @@ namespace ModbusDemo.application
bCloseOperation = new bool[] { false },
bHadRefControl = false,
byResModbusID = 0xFF,
strResChannelNumber = "d0"
strResChannelNumber = null
};
private static ModualPool.pcMachine cOctagonalPoolStirrer2 = new ModualPool.pcMachine("OctagonalPoolStirrer2", cOctagonalPoolStirrer2Base);
......@@ -552,7 +552,7 @@ namespace ModbusDemo.application
#endregion
#region 中控柜
private static ModualPool.pcButtonOperation cFeedstockStartButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -560,8 +560,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton1 = new ModualPool.pcButton("FeedstockStartButton1", cFeedstockStartButton1Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton1 = new ModualPool.pcButton("StartButton1", cStartButton1Base);
private static ModualPool.pcButtonOperation cStopButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -569,8 +569,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton1 = new ModualPool.pcButton("FeedstockStopButton1", cFeedstockStopButton1Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton1 = new ModualPool.pcButton("StopButton1", cStopButton1Base);
private static ModualPool.pcButtonOperation cPauseButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -578,8 +578,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton1 = new ModualPool.pcButton("FeedstockPauseButton1", cFeedstockPauseButton1Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton1 = new ModualPool.pcButton("PauseButton1", cPauseButton1Base);
private static ModualPool.pcButtonOperation cHandButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -587,9 +587,9 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton1 = new ModualPool.pcButton("FeedstockHandButton1", cFeedstockHandButton1Base);
private static ModualPool.pcButton cHandButton1 = new ModualPool.pcButton("HandButton1", cHandButton1Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -597,8 +597,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton2 = new ModualPool.pcButton("FeedstockStartButton2", cFeedstockStartButton2Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton2 = new ModualPool.pcButton("StartButton2", cStartButton2Base);
private static ModualPool.pcButtonOperation cStopButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -606,8 +606,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton2 = new ModualPool.pcButton("FeedstockStopButton2", cFeedstockStopButton2Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton2 = new ModualPool.pcButton("StopButton2", cStopButton2Base);
private static ModualPool.pcButtonOperation cPauseButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -615,8 +615,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton2 = new ModualPool.pcButton("FeedstockPauseButton2", cFeedstockPauseButton2Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton2 = new ModualPool.pcButton("PauseButton2", cPauseButton2Base);
private static ModualPool.pcButtonOperation cHandButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -624,9 +624,9 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton2 = new ModualPool.pcButton("FeedstockHandButton2", cFeedstockHandButton2Base);
private static ModualPool.pcButton cHandButton2 = new ModualPool.pcButton("HandButton2", cHandButton2Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -634,8 +634,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton3 = new ModualPool.pcButton("FeedstockStartButton3", cFeedstockStartButton3Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton3 = new ModualPool.pcButton("StartButton3", cStartButton3Base);
private static ModualPool.pcButtonOperation cStopButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -643,8 +643,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton3 = new ModualPool.pcButton("FeedstockStopButton3", cFeedstockStopButton3Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton3 = new ModualPool.pcButton("StopButton3", cStopButton3Base);
private static ModualPool.pcButtonOperation cPauseButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -652,8 +652,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton3 = new ModualPool.pcButton("FeedstockPauseButton3", cFeedstockPauseButton3Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton3 = new ModualPool.pcButton("PauseButton3", cPauseButton3Base);
private static ModualPool.pcButtonOperation cHandButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -661,9 +661,9 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton3 = new ModualPool.pcButton("FeedstockHandButton3", cFeedstockHandButton3Base);
private static ModualPool.pcButton cHandButton3 = new ModualPool.pcButton("HandButton3", cHandButton3Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -671,8 +671,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton4 = new ModualPool.pcButton("FeedstockStartButton4", cFeedstockStartButton4Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton4 = new ModualPool.pcButton("StartButton4", cStartButton4Base);
private static ModualPool.pcButtonOperation cStopButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -680,8 +680,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton4 = new ModualPool.pcButton("FeedstockStopButton4", cFeedstockStopButton4Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton4 = new ModualPool.pcButton("StopButton4", cStopButton4Base);
private static ModualPool.pcButtonOperation cPauseButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -689,9 +689,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton4 = new ModualPool.pcButton("FeedstockPauseButton4", cFeedstockPauseButton4Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton4 = new ModualPool.pcButton("PauseButton4", cPauseButton4Base);
private static ModualPool.pcButtonOperation cHandButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -699,9 +698,9 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton4 = new ModualPool.pcButton("FeedstockHandButton4", cFeedstockHandButton4Base);
private static ModualPool.pcButton cHandButton4 = new ModualPool.pcButton("HandButton4", cHandButton4Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -709,8 +708,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton5 = new ModualPool.pcButton("FeedstockStartButton5", cFeedstockStartButton5Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton5 = new ModualPool.pcButton("StartButton5", cStartButton5Base);
private static ModualPool.pcButtonOperation cStopButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -718,8 +717,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton5 = new ModualPool.pcButton("FeedstockStopButton5", cFeedstockStopButton5Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton5 = new ModualPool.pcButton("StopButton5", cStopButton5Base);
private static ModualPool.pcButtonOperation cPauseButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -727,8 +726,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton5 = new ModualPool.pcButton("FeedstockPauseButton5", cFeedstockPauseButton5Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton5 = new ModualPool.pcButton("PauseButton5", cPauseButton5Base);
private static ModualPool.pcButtonOperation cHandButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -736,9 +735,9 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton5 = new ModualPool.pcButton("FeedstockHandButton5", cFeedstockHandButton5Base);
private static ModualPool.pcButton cHandButton5 = new ModualPool.pcButton("HandButton5", cHandButton5Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -746,8 +745,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton6 = new ModualPool.pcButton("FeedstockStartButton6", cFeedstockStartButton6Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton6 = new ModualPool.pcButton("StartButton6", cStartButton6Base);
private static ModualPool.pcButtonOperation cStopButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -755,8 +754,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton6 = new ModualPool.pcButton("FeedstockStopButton6", cFeedstockStopButton6Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton6 = new ModualPool.pcButton("StopButton6", cStopButton6Base);
private static ModualPool.pcButtonOperation cPauseButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -764,8 +763,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton6 = new ModualPool.pcButton("FeedstockPauseButton6", cFeedstockPauseButton6Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton6 = new ModualPool.pcButton("PauseButton6", cPauseButton6Base);
private static ModualPool.pcButtonOperation cHandButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -773,9 +772,9 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton6 = new ModualPool.pcButton("FeedstockHandButton6", cFeedstockHandButton6Base);
private static ModualPool.pcButton cHandButton6 = new ModualPool.pcButton("HandButton6", cHandButton6Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -783,8 +782,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton7 = new ModualPool.pcButton("FeedstockStartButton7", cFeedstockStartButton7Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton7 = new ModualPool.pcButton("StartButton7", cStartButton7Base);
private static ModualPool.pcButtonOperation cStopButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -792,8 +791,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton7 = new ModualPool.pcButton("FeedstockStopButton7", cFeedstockStopButton7Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton7 = new ModualPool.pcButton("StopButton7", cStopButton7Base);
private static ModualPool.pcButtonOperation cPauseButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -801,8 +800,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton7 = new ModualPool.pcButton("FeedstockPauseButton7", cFeedstockPauseButton7Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton7 = new ModualPool.pcButton("PauseButton7", cPauseButton7Base);
private static ModualPool.pcButtonOperation cHandButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -810,9 +809,9 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton7 = new ModualPool.pcButton("FeedstockHandButton7", cFeedstockHandButton7Base);
private static ModualPool.pcButton cHandButton7 = new ModualPool.pcButton("HandButton7", cHandButton7Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -820,8 +819,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton8 = new ModualPool.pcButton("FeedstockStartButton8", cFeedstockStartButton8Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton8 = new ModualPool.pcButton("StartButton8", cStartButton8Base);
private static ModualPool.pcButtonOperation cStopButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -829,8 +828,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton8 = new ModualPool.pcButton("FeedstockStopButton8", cFeedstockStopButton8Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton8 = new ModualPool.pcButton("StopButton8", cStopButton8Base);
private static ModualPool.pcButtonOperation cPauseButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -838,8 +837,8 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton8 = new ModualPool.pcButton("FeedstockPauseButton8", cFeedstockPauseButton8Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton8 = new ModualPool.pcButton("PauseButton8", cPauseButton8Base);
private static ModualPool.pcButtonOperation cHandButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 16,
strOperationNumber = "d0",
......@@ -847,41 +846,41 @@ namespace ModbusDemo.application
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton8 = new ModualPool.pcButton("FeedstockHandButton8", cFeedstockHandButton8Base);
private static ModualPool.pcButton cHandButton8 = new ModualPool.pcButton("HandButton8", cHandButton8Base);
public static class cCentralControlRoom
{
public static ModualPool.pcButton cStartButton1 { get => cFeedstockStartButton1; set => cFeedstockStartButton1 = value; }
public static ModualPool.pcButton cStopButton1 { get => cFeedstockStopButton1; set => cFeedstockStopButton1 = value; }
public static ModualPool.pcButton cPauseButton1 { get => cFeedstockPauseButton1; set => cFeedstockPauseButton1 = value; }
public static ModualPool.pcButton cHandButton1 { get => cFeedstockHandButton1; set => cFeedstockHandButton2 = value; }
public static ModualPool.pcButton cStartButton2 { get => cFeedstockStartButton2; set => cFeedstockStartButton2 = value; }
public static ModualPool.pcButton cStopButton2 { get => cFeedstockStopButton2; set => cFeedstockStopButton2 = value; }
public static ModualPool.pcButton cPauseButton2 { get => cFeedstockPauseButton2; set => cFeedstockPauseButton2 = value; }
public static ModualPool.pcButton cHandButton2 { get => cFeedstockHandButton2; set => cFeedstockHandButton2 = value; }
public static ModualPool.pcButton cStartButton3 { get => cFeedstockStartButton3; set => cFeedstockStartButton3 = value; }
public static ModualPool.pcButton cStopButton3 { get => cFeedstockStopButton3; set => cFeedstockStopButton3 = value; }
public static ModualPool.pcButton cPauseButton3 { get => cFeedstockPauseButton3; set => cFeedstockPauseButton3 = value; }
public static ModualPool.pcButton cHandButton3 { get => cFeedstockHandButton3; set => cFeedstockHandButton3 = value; }
public static ModualPool.pcButton cStartButton4 { get => cFeedstockStartButton4; set => cFeedstockStartButton4 = value; }
public static ModualPool.pcButton cStopButton4 { get => cFeedstockStopButton4; set => cFeedstockStopButton4 = value; }
public static ModualPool.pcButton cPauseButton4 { get => cFeedstockPauseButton4; set => cFeedstockPauseButton4 = value; }
public static ModualPool.pcButton cHandButton4 { get => cFeedstockHandButton4; set => cFeedstockHandButton5 = value; }
public static ModualPool.pcButton cStartButton5 { get => cFeedstockStartButton5; set => cFeedstockStartButton5 = value; }
public static ModualPool.pcButton cStopButton5 { get => cFeedstockStopButton5; set => cFeedstockStopButton5 = value; }
public static ModualPool.pcButton cPauseButton5 { get => cFeedstockPauseButton5; set => cFeedstockPauseButton5 = value; }
public static ModualPool.pcButton cHandButton5 { get => cFeedstockHandButton5; set => cFeedstockHandButton5 = value; }
public static ModualPool.pcButton cStartButton6 { get => cFeedstockStartButton6; set => cFeedstockStartButton6 = value; }
public static ModualPool.pcButton cStopButton6 { get => cFeedstockStopButton6; set => cFeedstockStopButton6 = value; }
public static ModualPool.pcButton cPauseButton6 { get => cFeedstockPauseButton6; set => cFeedstockPauseButton6 = value; }
public static ModualPool.pcButton cHandButton6 { get => cFeedstockHandButton6; set => cFeedstockHandButton6 = value; }
public static ModualPool.pcButton cStartButton7 { get => cFeedstockStartButton7; set => cFeedstockStartButton7 = value; }
public static ModualPool.pcButton cStopButton7 { get => cFeedstockStopButton7; set => cFeedstockStopButton7 = value; }
public static ModualPool.pcButton cPauseButton7 { get => cFeedstockPauseButton7; set => cFeedstockPauseButton7 = value; }
public static ModualPool.pcButton cHandButton7 { get => cFeedstockHandButton7; set => cFeedstockHandButton7 = value; }
public static ModualPool.pcButton cStartButton8 { get => cFeedstockStartButton8; set => cFeedstockStartButton8 = value; }
public static ModualPool.pcButton cStopButton8 { get => cFeedstockStopButton8; set => cFeedstockStopButton8 = value; }
public static ModualPool.pcButton cPauseButton8 { get => cFeedstockPauseButton8; set => cFeedstockPauseButton8 = value; }
public static ModualPool.pcButton cHandButton8 { get => cFeedstockHandButton8; set => cFeedstockHandButton8 = value; }
public static ModualPool.pcButton cStartButton1 { get => cStartButton1; set => cStartButton1 = value; }
public static ModualPool.pcButton cStopButton1 { get => cStopButton1; set => cStopButton1 = value; }
public static ModualPool.pcButton cPauseButton1 { get => cPauseButton1; set => cPauseButton1 = value; }
public static ModualPool.pcButton cHandButton1 { get => cHandButton1; set => cHandButton1 = value; }
public static ModualPool.pcButton cStartButton2 { get => cStartButton2; set => cStartButton2 = value; }
public static ModualPool.pcButton cStopButton2 { get => cStopButton2; set => cStopButton2 = value; }
public static ModualPool.pcButton cPauseButton2 { get => cPauseButton2; set => cPauseButton2 = value; }
public static ModualPool.pcButton cHandButton2 { get => cHandButton2; set => cHandButton2 = value; }
public static ModualPool.pcButton cStartButton3 { get => cStartButton3; set => cStartButton3 = value; }
public static ModualPool.pcButton cStopButton3 { get => cStopButton3; set => cStopButton3 = value; }
public static ModualPool.pcButton cPauseButton3 { get => cPauseButton3; set => cPauseButton3 = value; }
public static ModualPool.pcButton cHandButton3 { get => cHandButton3; set => cHandButton3 = value; }
public static ModualPool.pcButton cStartButton4 { get => cStartButton4; set => cStartButton4 = value; }
public static ModualPool.pcButton cStopButton4 { get => cStopButton4; set => cStopButton4 = value; }
public static ModualPool.pcButton cPauseButton4 { get => cPauseButton4; set => cPauseButton4 = value; }
public static ModualPool.pcButton cHandButton4 { get => cHandButton4; set => cHandButton4 = value; }
public static ModualPool.pcButton cStartButton5 { get => cStartButton5; set => cStartButton5 = value; }
public static ModualPool.pcButton cStopButton5 { get => cStopButton5; set => cStopButton5 = value; }
public static ModualPool.pcButton cPauseButton5 { get => cPauseButton5; set => cPauseButton5 = value; }
public static ModualPool.pcButton cHandButton5 { get => cHandButton5; set => cHandButton5 = value; }
public static ModualPool.pcButton cStartButton6 { get => cStartButton6; set => cStartButton6 = value; }
public static ModualPool.pcButton cStopButton6 { get => cStopButton6; set => cStopButton6 = value; }
public static ModualPool.pcButton cPauseButton6 { get => cPauseButton6; set => cPauseButton6 = value; }
public static ModualPool.pcButton cHandButton6 { get => cHandButton6; set => cHandButton6 = value; }
public static ModualPool.pcButton cStartButton7 { get => cStartButton7; set => cStartButton7 = value; }
public static ModualPool.pcButton cStopButton7 { get => cStopButton7; set => cStopButton7 = value; }
public static ModualPool.pcButton cPauseButton7 { get => cPauseButton7; set => cPauseButton7 = value; }
public static ModualPool.pcButton cHandButton7 { get => cHandButton7; set => cHandButton7 = value; }
public static ModualPool.pcButton cStartButton8 { get => cStartButton8; set => cStartButton8 = value; }
public static ModualPool.pcButton cStopButton8 { get => cStopButton8; set => cStopButton8 = value; }
public static ModualPool.pcButton cPauseButton8 { get => cPauseButton8; set => cPauseButton8 = value; }
public static ModualPool.pcButton cHandButton8 { get => cHandButton8; set => cHandButton8 = value; }
}
#endregion
}
......@@ -1428,336 +1427,335 @@ namespace ModbusDemo.application
}
#endregion
#region 中控柜
private static ModualPool.pcButtonOperation cFeedstockStartButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 47,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton1 = new ModualPool.pcButton("FeedstockStartButton1", cFeedstockStartButton1Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton1 = new ModualPool.pcButton("StartButton1", cStartButton1Base);
private static ModualPool.pcButtonOperation cStopButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 47,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton1 = new ModualPool.pcButton("FeedstockStopButton1", cFeedstockStopButton1Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton1 = new ModualPool.pcButton("StopButton1", cStopButton1Base);
private static ModualPool.pcButtonOperation cPauseButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 44,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton1 = new ModualPool.pcButton("FeedstockPauseButton1", cFeedstockPauseButton1Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton1Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton1 = new ModualPool.pcButton("PauseButton1", cPauseButton1Base);
private static ModualPool.pcButtonOperation cHandButton1Base = new ModualPool.pcButtonOperation
{
byModbusID = 44,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton1 = new ModualPool.pcButton("FeedstockHandButton1", cFeedstockHandButton1Base);
private static ModualPool.pcButton cHandButton1 = new ModualPool.pcButton("HandButton1", cHandButton1Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 30,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton2 = new ModualPool.pcButton("FeedstockStartButton2", cFeedstockStartButton2Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton2 = new ModualPool.pcButton("StartButton2", cStartButton2Base);
private static ModualPool.pcButtonOperation cStopButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 30,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton2 = new ModualPool.pcButton("FeedstockStopButton2", cFeedstockStopButton2Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton2 = new ModualPool.pcButton("StopButton2", cStopButton2Base);
private static ModualPool.pcButtonOperation cPauseButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 22,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton2 = new ModualPool.pcButton("FeedstockPauseButton2", cFeedstockPauseButton2Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton2Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton2 = new ModualPool.pcButton("PauseButton2", cPauseButton2Base);
private static ModualPool.pcButtonOperation cHandButton2Base = new ModualPool.pcButtonOperation
{
byModbusID = 22,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton2 = new ModualPool.pcButton("FeedstockHandButton2", cFeedstockHandButton2Base);
private static ModualPool.pcButton cHandButton2 = new ModualPool.pcButton("HandButton2", cHandButton2Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 43,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton3 = new ModualPool.pcButton("FeedstockStartButton3", cFeedstockStartButton3Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton3 = new ModualPool.pcButton("StartButton3", cStartButton3Base);
private static ModualPool.pcButtonOperation cStopButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 43,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton3 = new ModualPool.pcButton("FeedstockStopButton3", cFeedstockStopButton3Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton3 = new ModualPool.pcButton("StopButton3", cStopButton3Base);
private static ModualPool.pcButtonOperation cPauseButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 36,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton3 = new ModualPool.pcButton("FeedstockPauseButton3", cFeedstockPauseButton3Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton3Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton3 = new ModualPool.pcButton("PauseButton3", cPauseButton3Base);
private static ModualPool.pcButtonOperation cHandButton3Base = new ModualPool.pcButtonOperation
{
byModbusID = 36,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton3 = new ModualPool.pcButton("FeedstockHandButton3", cFeedstockHandButton3Base);
private static ModualPool.pcButton cHandButton3 = new ModualPool.pcButton("HandButton3", cHandButton3Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 42,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton4 = new ModualPool.pcButton("FeedstockStartButton4", cFeedstockStartButton4Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton4 = new ModualPool.pcButton("StartButton4", cStartButton4Base);
private static ModualPool.pcButtonOperation cStopButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 42,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton4 = new ModualPool.pcButton("FeedstockStopButton4", cFeedstockStopButton4Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton4 = new ModualPool.pcButton("StopButton4", cStopButton4Base);
private static ModualPool.pcButtonOperation cPauseButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 40,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton4 = new ModualPool.pcButton("FeedstockPauseButton4", cFeedstockPauseButton4Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton4Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton4 = new ModualPool.pcButton("PauseButton4", cPauseButton4Base);
private static ModualPool.pcButtonOperation cHandButton4Base = new ModualPool.pcButtonOperation
{
byModbusID = 40,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton4 = new ModualPool.pcButton("FeedstockHandButton4", cFeedstockHandButton4Base);
private static ModualPool.pcButton cHandButton4 = new ModualPool.pcButton("HandButton4", cHandButton4Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 48,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton5 = new ModualPool.pcButton("FeedstockStartButton5", cFeedstockStartButton5Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton5 = new ModualPool.pcButton("StartButton5", cStartButton5Base);
private static ModualPool.pcButtonOperation cStopButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 48,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton5 = new ModualPool.pcButton("FeedstockStopButton5", cFeedstockStopButton5Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton5 = new ModualPool.pcButton("StopButton5", cStopButton5Base);
private static ModualPool.pcButtonOperation cPauseButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 32,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton5 = new ModualPool.pcButton("FeedstockPauseButton5", cFeedstockPauseButton5Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton5Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton5 = new ModualPool.pcButton("PauseButton5", cPauseButton5Base);
private static ModualPool.pcButtonOperation cHandButton5Base = new ModualPool.pcButtonOperation
{
byModbusID = 32,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton5 = new ModualPool.pcButton("FeedstockHandButton5", cFeedstockHandButton5Base);
private static ModualPool.pcButton cHandButton5 = new ModualPool.pcButton("HandButton5", cHandButton5Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 54,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton6 = new ModualPool.pcButton("FeedstockStartButton6", cFeedstockStartButton6Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton6 = new ModualPool.pcButton("StartButton6", cStartButton6Base);
private static ModualPool.pcButtonOperation cStopButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 54,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton6 = new ModualPool.pcButton("FeedstockStopButton6", cFeedstockStopButton6Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton6 = new ModualPool.pcButton("StopButton6", cStopButton6Base);
private static ModualPool.pcButtonOperation cPauseButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 15,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton6 = new ModualPool.pcButton("FeedstockPauseButton6", cFeedstockPauseButton6Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton6Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton6 = new ModualPool.pcButton("PauseButton6", cPauseButton6Base);
private static ModualPool.pcButtonOperation cHandButton6Base = new ModualPool.pcButtonOperation
{
byModbusID = 15,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton6 = new ModualPool.pcButton("FeedstockHandButton6", cFeedstockHandButton6Base);
private static ModualPool.pcButton cHandButton6 = new ModualPool.pcButton("HandButton6", cHandButton6Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 19,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton7 = new ModualPool.pcButton("FeedstockStartButton7", cFeedstockStartButton7Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton7 = new ModualPool.pcButton("StartButton7", cStartButton7Base);
private static ModualPool.pcButtonOperation cStopButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 19,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton7 = new ModualPool.pcButton("FeedstockStopButton7", cFeedstockStopButton7Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton7 = new ModualPool.pcButton("StopButton7", cStopButton7Base);
private static ModualPool.pcButtonOperation cPauseButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 23,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton7 = new ModualPool.pcButton("FeedstockPauseButton7", cFeedstockPauseButton7Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton7Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton7 = new ModualPool.pcButton("PauseButton7", cPauseButton7Base);
private static ModualPool.pcButtonOperation cHandButton7Base = new ModualPool.pcButtonOperation
{
byModbusID = 23,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton7 = new ModualPool.pcButton("FeedstockHandButton7", cFeedstockHandButton7Base);
private static ModualPool.pcButton cHandButton7 = new ModualPool.pcButton("HandButton7", cHandButton7Base);
private static ModualPool.pcButtonOperation cFeedstockStartButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButtonOperation cStartButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 26,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d4" },
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStartButton8 = new ModualPool.pcButton("FeedstockStartButton8", cFeedstockStartButton8Base);
private static ModualPool.pcButtonOperation cFeedstockStopButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStartButton8 = new ModualPool.pcButton("StartButton8", cStartButton8Base);
private static ModualPool.pcButtonOperation cStopButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 26,
strOperationNumber = "d1",
strChannelNumber = new string[] { "d1", "d3" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockStopButton8 = new ModualPool.pcButton("FeedstockStopButton8", cFeedstockStopButton8Base);
private static ModualPool.pcButtonOperation cFeedstockPauseButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cStopButton8 = new ModualPool.pcButton("StopButton8", cStopButton8Base);
private static ModualPool.pcButtonOperation cPauseButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 9,
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockPauseButton8 = new ModualPool.pcButton("FeedstockPauseButton8", cFeedstockPauseButton8Base);
private static ModualPool.pcButtonOperation cFeedstockHandButton8Base = new ModualPool.pcButtonOperation
private static ModualPool.pcButton cPauseButton8 = new ModualPool.pcButton("PauseButton8", cPauseButton8Base);
private static ModualPool.pcButtonOperation cHandButton8Base = new ModualPool.pcButtonOperation
{
byModbusID = 9,
strOperationNumber = "d3",
strChannelNumber = new string[] { "d3", "d4" },
byModbusID = 16,
strOperationNumber = "d0",
strChannelNumber = new string[] { "d0", "d1" },
bOpenOperation = new bool[] { true, true },
bCloseOperation = new bool[] { false, false }
};
private static ModualPool.pcButton cFeedstockHandButton8 = new ModualPool.pcButton("FeedstockHandButton8", cFeedstockHandButton8Base);
private static ModualPool.pcButton cHandButton8 = new ModualPool.pcButton("HandButton8", cHandButton8Base);
public static class cCentralControlRoom
{
public static ModualPool.pcButton cStartButton1 { get => cFeedstockStartButton1; set => cFeedstockStartButton1 = value; }
public static ModualPool.pcButton cStopButton1 { get => cFeedstockStopButton1; set => cFeedstockStopButton1 = value; }
public static ModualPool.pcButton cPauseButton1 { get => cFeedstockPauseButton1; set => cFeedstockPauseButton1 = value; }
public static ModualPool.pcButton cHandButton1 { get => cFeedstockHandButton1; set => cFeedstockHandButton2 = value; }
public static ModualPool.pcButton cStartButton2 { get => cFeedstockStartButton2; set => cFeedstockStartButton2 = value; }
public static ModualPool.pcButton cStopButton2 { get => cFeedstockStopButton2; set => cFeedstockStopButton2 = value; }
public static ModualPool.pcButton cPauseButton2 { get => cFeedstockPauseButton2; set => cFeedstockPauseButton2 = value; }
public static ModualPool.pcButton cHandButton2 { get => cFeedstockHandButton2; set => cFeedstockHandButton2 = value; }
public static ModualPool.pcButton cStartButton3 { get => cFeedstockStartButton3; set => cFeedstockStartButton3 = value; }
public static ModualPool.pcButton cStopButton3 { get => cFeedstockStopButton3; set => cFeedstockStopButton3 = value; }
public static ModualPool.pcButton cPauseButton3 { get => cFeedstockPauseButton3; set => cFeedstockPauseButton3 = value; }
public static ModualPool.pcButton cHandButton3 { get => cFeedstockHandButton3; set => cFeedstockHandButton3 = value; }
public static ModualPool.pcButton cStartButton4 { get => cFeedstockStartButton4; set => cFeedstockStartButton4 = value; }
public static ModualPool.pcButton cStopButton4 { get => cFeedstockStopButton4; set => cFeedstockStopButton4 = value; }
public static ModualPool.pcButton cPauseButton4 { get => cFeedstockPauseButton4; set => cFeedstockPauseButton4 = value; }
public static ModualPool.pcButton cHandButton4 { get => cFeedstockHandButton4; set => cFeedstockHandButton5 = value; }
public static ModualPool.pcButton cStartButton5 { get => cFeedstockStartButton5; set => cFeedstockStartButton5 = value; }
public static ModualPool.pcButton cStopButton5 { get => cFeedstockStopButton5; set => cFeedstockStopButton5 = value; }
public static ModualPool.pcButton cPauseButton5 { get => cFeedstockPauseButton5; set => cFeedstockPauseButton5 = value; }
public static ModualPool.pcButton cHandButton5 { get => cFeedstockHandButton5; set => cFeedstockHandButton5 = value; }
public static ModualPool.pcButton cStartButton6 { get => cFeedstockStartButton6; set => cFeedstockStartButton6 = value; }
public static ModualPool.pcButton cStopButton6 { get => cFeedstockStopButton6; set => cFeedstockStopButton6 = value; }
public static ModualPool.pcButton cPauseButton6 { get => cFeedstockPauseButton6; set => cFeedstockPauseButton6 = value; }
public static ModualPool.pcButton cHandButton6 { get => cFeedstockHandButton6; set => cFeedstockHandButton6 = value; }
public static ModualPool.pcButton cStartButton7 { get => cFeedstockStartButton7; set => cFeedstockStartButton7 = value; }
public static ModualPool.pcButton cStopButton7 { get => cFeedstockStopButton7; set => cFeedstockStopButton7 = value; }
public static ModualPool.pcButton cPauseButton7 { get => cFeedstockPauseButton7; set => cFeedstockPauseButton7 = value; }
public static ModualPool.pcButton cHandButton7 { get => cFeedstockHandButton7; set => cFeedstockHandButton7 = value; }
public static ModualPool.pcButton cStartButton8 { get => cFeedstockStartButton8; set => cFeedstockStartButton8 = value; }
public static ModualPool.pcButton cStopButton8 { get => cFeedstockStopButton8; set => cFeedstockStopButton8 = value; }
public static ModualPool.pcButton cPauseButton8 { get => cFeedstockPauseButton8; set => cFeedstockPauseButton8 = value; }
public static ModualPool.pcButton cHandButton8 { get => cFeedstockHandButton8; set => cFeedstockHandButton8 = value; }
public static ModualPool.pcButton cStartButton1 { get => cStartButton1; set => cStartButton1 = value; }
public static ModualPool.pcButton cStopButton1 { get => cStopButton1; set => cStopButton1 = value; }
public static ModualPool.pcButton cPauseButton1 { get => cPauseButton1; set => cPauseButton1 = value; }
public static ModualPool.pcButton cHandButton1 { get => cHandButton1; set => cHandButton1 = value; }
public static ModualPool.pcButton cStartButton2 { get => cStartButton2; set => cStartButton2 = value; }
public static ModualPool.pcButton cStopButton2 { get => cStopButton2; set => cStopButton2 = value; }
public static ModualPool.pcButton cPauseButton2 { get => cPauseButton2; set => cPauseButton2 = value; }
public static ModualPool.pcButton cHandButton2 { get => cHandButton2; set => cHandButton2 = value; }
public static ModualPool.pcButton cStartButton3 { get => cStartButton3; set => cStartButton3 = value; }
public static ModualPool.pcButton cStopButton3 { get => cStopButton3; set => cStopButton3 = value; }
public static ModualPool.pcButton cPauseButton3 { get => cPauseButton3; set => cPauseButton3 = value; }
public static ModualPool.pcButton cHandButton3 { get => cHandButton3; set => cHandButton3 = value; }
public static ModualPool.pcButton cStartButton4 { get => cStartButton4; set => cStartButton4 = value; }
public static ModualPool.pcButton cStopButton4 { get => cStopButton4; set => cStopButton4 = value; }
public static ModualPool.pcButton cPauseButton4 { get => cPauseButton4; set => cPauseButton4 = value; }
public static ModualPool.pcButton cHandButton4 { get => cHandButton4; set => cHandButton4 = value; }
public static ModualPool.pcButton cStartButton5 { get => cStartButton5; set => cStartButton5 = value; }
public static ModualPool.pcButton cStopButton5 { get => cStopButton5; set => cStopButton5 = value; }
public static ModualPool.pcButton cPauseButton5 { get => cPauseButton5; set => cPauseButton5 = value; }
public static ModualPool.pcButton cHandButton5 { get => cHandButton5; set => cHandButton5 = value; }
public static ModualPool.pcButton cStartButton6 { get => cStartButton6; set => cStartButton6 = value; }
public static ModualPool.pcButton cStopButton6 { get => cStopButton6; set => cStopButton6 = value; }
public static ModualPool.pcButton cPauseButton6 { get => cPauseButton6; set => cPauseButton6 = value; }
public static ModualPool.pcButton cHandButton6 { get => cHandButton6; set => cHandButton6 = value; }
public static ModualPool.pcButton cStartButton7 { get => cStartButton7; set => cStartButton7 = value; }
public static ModualPool.pcButton cStopButton7 { get => cStopButton7; set => cStopButton7 = value; }
public static ModualPool.pcButton cPauseButton7 { get => cPauseButton7; set => cPauseButton7 = value; }
public static ModualPool.pcButton cHandButton7 { get => cHandButton7; set => cHandButton7 = value; }
public static ModualPool.pcButton cStartButton8 { get => cStartButton8; set => cStartButton8 = value; }
public static ModualPool.pcButton cStopButton8 { get => cStopButton8; set => cStopButton8 = value; }
public static ModualPool.pcButton cPauseButton8 { get => cPauseButton8; set => cPauseButton8 = value; }
public static ModualPool.pcButton cHandButton8 { get => cHandButton8; set => cHandButton8 = value; }
}
#endregion
}
......
......@@ -33,18 +33,19 @@ namespace ModbusDemo.application
public int modularx;
public byte modbusID;
}
public static byte[] EmodbusId = { 90, 39 }; //39 CH0/1 CH2/3 //90 CH0/1 CH2/3
public static byte[] WmodbusId = {31}; //31 CH2/3 CH4/5
public static byte[] WmodbusId = { 31 }; //31 CH2/3 CH4/5
public static byte[] LevelmodbusID = { 13, 13 }; // CH0 CH3
public static bool[] state_ON = { true, true, true, true};
public static bool[] state_OFF = { false, false, false,false};
public static bool[] state_ON = { true, true, true, true };
public static bool[] state_OFF = { false, false, false, false };
public static bool[] Read_state;
public static bool Etimerun = false;
public static bool Wtimerun = false;
......@@ -97,10 +98,10 @@ namespace ModbusDemo.application
}
static double[] MeanValue = new double[10];
public static double Meanfilter(double Value)
{
{
for (int i = 0; i < 10; i++)
{
MeanValue[i] = Value;
MeanValue[i] = Value;
}
Value = MeanValue[0] * 0.1 + MeanValue[5] * 0.3 + MeanValue[9] * 0.6;
return Value;
......@@ -184,7 +185,7 @@ namespace ModbusDemo.application
(ushort)ModualAlarm.eAlarmCode.ChannelCommunError, true, 1,
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7");
}
if (ModbusComm.Modbus_WriteMultipleCoils(EmodbusId[i+1], 16, state_OFF)
if (ModbusComm.Modbus_WriteMultipleCoils(EmodbusId[i + 1], 16, state_OFF)
==
ModbusComm.eModbusErrorCode.MB_EMASTERNOERR
)
......@@ -292,7 +293,7 @@ namespace ModbusDemo.application
//Console.WriteLine(timespan);
}
}
//static bool Run_flag_bit = false;
public static void T_AutoControl()
{
Control usEcontrol = new Control();
......@@ -300,6 +301,7 @@ namespace ModbusDemo.application
Control usWcontrol = new Control();
Control usWcontrolB = new Control();
FileInfo file = new FileInfo(InIHelper.FileName);
//Run_flag_bit = true;
while (true)
{
if (ModualControl.cPoolLevelConfig.Count != 0)
......@@ -325,7 +327,8 @@ namespace ModbusDemo.application
}
if (ModualControl.cPoolLevelConfig[i].byModbusID == LevelmodbusID[0])
if (ModualControl.cPoolLevelConfig[i].byModbusID == LevelmodbusID[0]
&& ModualControl.cPoolLevelConfig[i].stChannelNumber == "d0")
{
usWcontrol.maxLevel = ModualControl.cPoolLevelConfig[i].dUpLevel;
usWcontrol.minLevel = ModualControl.cPoolLevelConfig[i].dDownLevel;
......@@ -338,7 +341,8 @@ namespace ModbusDemo.application
out usWcontrolB
);
}
if (ModualControl.cPoolLevelConfig[i].byModbusID == LevelmodbusID[1])
if (ModualControl.cPoolLevelConfig[i].byModbusID == LevelmodbusID[1]
&& ModualControl.cPoolLevelConfig[i].stChannelNumber == "d3")
{
usEcontrol.maxLevel = ModualControl.cPoolLevelConfig[i].dUpLevel;
usEcontrol.minLevel = ModualControl.cPoolLevelConfig[i].dDownLevel;
......@@ -369,8 +373,8 @@ namespace ModbusDemo.application
ModualPoll.cx18x.sX18xDataStruct[usEcontrol.modularx].dNowConvertData[0];
usWcontrol.realTimeLevel =
ModualPoll.cx18x.sX18xDataStruct[usWcontrol.modularx].dNowConvertData[3];
usEcontrol.Enablation=true;
usWcontrol.Enablation=true;
usEcontrol.Enablation = true;
usWcontrol.Enablation = true;
CriticalValueMonitoring(
ref usEcontrol,
true,
......@@ -385,16 +389,78 @@ namespace ModbusDemo.application
);
Automatic_control(usEcontrolB.status, usWcontrolB.status);
}
//else if (Run_flag_bit == true)
//{
// if (usEcontrolB.status == true)
// {
// }
// if (usWcontrolB.status == true)
// {
// }
//}
else
{
usWcontrol.status = false;
usEcontrol.status = false;
Automatic_control(usEcontrol.status, usWcontrol.status);
}
//Run_flag_bit = false;
}
}
}
/*
* else
{
if (ModbusComm.Modbus_ReadCoilsTask(out Read_state, EmodbusId[i],16,4)
==
ModbusComm.eModbusErrorCode.MB_EMASTERNOERR)
{
ModualAlarm.vSet_Modual_Alarm(EmodbusId[i],
(ushort)ModualAlarm.eAlarmCode.ChannelCommunError, false, 1,
"d0", "d1", "d2", "d3", "d4", "d5");
ModbusComm.Modbus_WriteMultipleCoils(EmodbusId[i], 16, state_OFF);
}
else
{
ModualAlarm.vSet_Modual_Alarm(EmodbusId[i],
(ushort)ModualAlarm.eAlarmCode.ChannelCommunError, true, 1,
"d0", "d1", "d2", "d3", "d4", "d5");
}
if (ModbusComm.Modbus_ReadCoilsTask(out Read_state, EmodbusId[i+1], 16, 4)
==
ModbusComm.eModbusErrorCode.MB_EMASTERNOERR)
{
ModualAlarm.vSet_Modual_Alarm(EmodbusId[i],
(ushort)ModualAlarm.eAlarmCode.ChannelCommunError, false, 1,
"d0", "d1", "d2", "d3", "d4", "d5");
ModbusComm.Modbus_WriteMultipleCoils(EmodbusId[i+1], 16, state_OFF);
}
else
{
ModualAlarm.vSet_Modual_Alarm(EmodbusId[i+1],
(ushort)ModualAlarm.eAlarmCode.ChannelCommunError, false, 1,
"d0", "d1", "d2", "d3", "d4", "d5");
}
}
if (ModbusComm.Modbus_ReadCoilsTask(out Read_state, WmodbusId[i], 18, 4)
==
ModbusComm.eModbusErrorCode.MB_EMASTERNOERR)
{
ModualAlarm.vSet_Modual_Alarm(EmodbusId[i],
(ushort)ModualAlarm.eAlarmCode.ChannelCommunError, false, 1,
"d0", "d1", "d2", "d3", "d4", "d5");
ModbusComm.Modbus_WriteMultipleCoils(WmodbusId[i], 18, state_OFF);
}
else
{
ModualAlarm.vSet_Modual_Alarm(WmodbusId[i],
(ushort)ModualAlarm.eAlarmCode.ChannelCommunError, true, 1,
"d0", "d1", "d2", "d3", "d4", "d5");
}
*/
#else
public class AutoControl
{
......
......@@ -113,14 +113,22 @@ namespace ModbusDemo.application
}
#endregion
#region 沉砂池开映射
else if (byControlID == 39 && strOperationChannelName[0] == "d4")
else if (byControlID == 90 && strOperationChannelName[0] == "d4")
{
bDelege_Operation = AllPond.cDesiltingPool.cStirrer1.bOpen_Machine;
}
else if (byControlID == 39 && strOperationChannelName[0] == "d5")
else if (byControlID == 90 && strOperationChannelName[0] == "d5")
{
bDelege_Operation = AllPond.cDesiltingPool.cStirrer2.bOpen_Machine;
}
else if (byControlID == 39 && strOperationChannelName[0] == "d4")
{
bDelege_Operation = AllPond.cDesiltingPool.cPumb1.bOpen_Machine;
}
else if (byControlID == 39 && strOperationChannelName[0] == "d5")
{
bDelege_Operation = AllPond.cDesiltingPool.cPumb2.bOpen_Machine;
}
#endregion
#region 出料池开映射
#endregion
......@@ -201,14 +209,22 @@ namespace ModbusDemo.application
}
#endregion
#region 沉砂池关映射
else if (byControlID == 39 && strOperationChannelName[0] == "d4")
else if (byControlID == 90 && strOperationChannelName[0] == "d4")
{
bDelege_Operation = AllPond.cDesiltingPool.cStirrer1.bClose_Machine;
}
else if (byControlID == 39 && strOperationChannelName[0] == "d5")
else if (byControlID == 90 && strOperationChannelName[0] == "d5")
{
bDelege_Operation = AllPond.cDesiltingPool.cStirrer2.bClose_Machine;
}
else if (byControlID == 39 && strOperationChannelName[0] == "d4")
{
bDelege_Operation = AllPond.cDesiltingPool.cPumb1.bClose_Machine;
}
else if (byControlID == 39 && strOperationChannelName[0] == "d5")
{
bDelege_Operation = AllPond.cDesiltingPool.cPumb2.bClose_Machine;
}
#endregion
#region 出料池关映射
#endregion
......
......@@ -26,7 +26,7 @@ namespace ModbusDemo
{
public partial class Form1 : Form
{
const bool LOCALDEBUG = false;
const bool LOCALDEBUG = true;
private bool bStart = false;
AutoResetEvent exitEvent;
private int waitTime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment