Fix Siemens Library

This commit is contained in:
Lucio Maranta
2018-08-31 13:09:22 +02:00
parent 47e767bf08
commit 5af3799b58
2 changed files with 6 additions and 1 deletions
+6 -1
View File
@@ -507,7 +507,7 @@ public static class ThreadsFunctions
// Get Data from config and PLC
libraryError = ncHandler.GetActiveProgramInfo(out DTOActiveProgramDataModel active);
if (libraryError.errorCode != 0)
if (libraryError.IsError())
ManageLibraryError(libraryError);
else
// Send through signalR
@@ -553,6 +553,9 @@ public static class ThreadsFunctions
{
// Get new data from PLC
libraryError = ncHandler.GetUpdatedToolsData(out Dictionary<int, byte> updatedStatus, out Dictionary<int, uint> updatedLives);
if (libraryError.IsError())
ManageLibraryError(libraryError);
MessageServices.Current.Publish(UPDATE_TOOLS_DATA, null,
new DTONewToolDataModel
{
@@ -599,6 +602,8 @@ public static class ThreadsFunctions
{
// Get new data from PLC
libraryError = ncHandler.GetNcMagazineStatus(out Dictionary<int, bool> status);
if (libraryError.IsError())
ManageLibraryError(libraryError);
MessageServices.Current.Publish(NC_MAGAZINE_IS_ACTIVE, null, status);
}