Fix Siemens Library
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user