fi scrittura IO S7Net
This commit is contained in:
@@ -3911,6 +3911,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
List<ushort> rwValuesDO = new List<ushort>();
|
||||
Dictionary<int, bool> newForced = new Dictionary<int, bool>();
|
||||
|
||||
// leggo da PLC valori DO...
|
||||
libraryError = MEM_RWWordList(R, 0, IO_DO_VAL_FOR.MemType, IO_DO_VAL_FOR.Address, IO_DO_VAL_FOR.SubAddress, IO_DO_VAL_FOR.Size, ref rwValuesDO);
|
||||
@@ -3934,6 +3935,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
{
|
||||
rwValuesDO[bank] = (ushort)(((int)rwValuesDO[bank]).SetBitZero(pos));
|
||||
}
|
||||
newForced.Add(item.Key, true);
|
||||
}
|
||||
|
||||
// scrivo!
|
||||
@@ -3941,6 +3943,9 @@ namespace CMS_CORE_Library.S7Net
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
// scrivo forced
|
||||
PLC_W_IO_DO_Reset(newForced);
|
||||
|
||||
return libraryError;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -3974,7 +3979,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
return libraryError;
|
||||
|
||||
// scrivo forced
|
||||
PLC_W_IO_DO_Reset(newForced);
|
||||
PLC_W_IO_AO_Reset(newForced);
|
||||
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user