Fix S7net x M156 cycle

This commit is contained in:
Samuele Locatelli
2020-09-15 13:04:56 +02:00
parent 4cc08cef26
commit 8f94fe85bc
+2 -2
View File
@@ -1051,7 +1051,7 @@ namespace CMS_CORE_Library.S7Net
byte val = 0;
List<byte> vals = new List<byte>();
CmsError libraryError = MEM_RWByte(R, true, 0, M156_INPUT_NEEDED.MemType, M156_INPUT_NEEDED.Address, M156_INPUT_NEEDED.SubAddress, 0, ref val);
CmsError libraryError = MEM_RWByte(R, false, 0, M156_INPUT_NEEDED.MemType, M156_INPUT_NEEDED.Address, M156_INPUT_NEEDED.SubAddress, 0, ref val);
if (libraryError.IsError())
return libraryError;
@@ -3432,7 +3432,7 @@ namespace CMS_CORE_Library.S7Net
List<double> ListValue = new List<double>() { Value };
//uses the List method with one-element list
CmsError libraryError = MEM_RWDoubleList(bWrite, Process, MemType, MemTable, MemIndex, 1, ref ListValue);
CmsError libraryError = MEM_RWDoubleList(bWrite, Process, MemType, MemTable, MemIndex, 4, ref ListValue);
if (libraryError.IsError())
return libraryError;