This commit is contained in:
gongxh
2022-05-18 10:15:49 +08:00
parent 099335e6b3
commit 7240b17c1e
10 changed files with 72 additions and 58 deletions

View File

@@ -131,7 +131,7 @@ namespace CleanMachineHMI.FrmUserControl
{
if (PlcOperationHelper.Instance.PlcItemMd_X_List != null && PlcOperationHelper.Instance.PlcItemMd_X_List.Count > 0)
{
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_X_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_X_List.Values.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (PlcItem item in tempLst)
{
@@ -147,7 +147,7 @@ namespace CleanMachineHMI.FrmUserControl
if (PlcOperationHelper.Instance.PlcItemMd_Y_List != null && PlcOperationHelper.Instance.PlcItemMd_Y_List.Count > 0)
{
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_Y_List.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
List<PlcItem> tempLst = PlcOperationHelper.Instance.PlcItemMd_Y_List.Values.OrderBy(x => Convert.ToInt32(x.PlcItemPriAddress)).ToList();
foreach (PlcItem item in tempLst)
{
@@ -162,9 +162,9 @@ namespace CleanMachineHMI.FrmUserControl
}
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_X_List);
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_X_List.Values);
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_Y_List);
Show_X_Y_Status(PlcOperationHelper.Instance.PlcItemMd_Y_List.Values);
}
catch (Exception ex)
{