From bcc8e6425aa4ea444be062cdcdf6fc177df14638 Mon Sep 17 00:00:00 2001 From: Lucio Maranta Date: Wed, 21 Mar 2018 09:43:55 +0100 Subject: [PATCH] Fix alarm plc id --- Step/Controllers/WebApi/LanguageController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Step/Controllers/WebApi/LanguageController.cs b/Step/Controllers/WebApi/LanguageController.cs index 7623faaf..8ae68c1b 100644 --- a/Step/Controllers/WebApi/LanguageController.cs +++ b/Step/Controllers/WebApi/LanguageController.cs @@ -89,8 +89,9 @@ namespace Step.Controllers.WebApi Dictionary messages = new Dictionary(); // Read data from CN cmsError = ncHandler.numericalControl.NC_GetTranslatedPlcMessages(language, ref messages); - - for(int i = 0; i < 1024; i++) + + // Id start from 1 + for(int i = 1; i <= 1024; i++) { // Get configurated alarms var tmpAlarmConfig = InitialAlarmsConfig.Where(x => x.PlcId == i).FirstOrDefault();