diff --git a/CMS_CORE_Library/Nc.cs b/CMS_CORE_Library/Nc.cs
index e33ee33..11093e9 100644
--- a/CMS_CORE_Library/Nc.cs
+++ b/CMS_CORE_Library/Nc.cs
@@ -1986,7 +1986,7 @@ namespace CMS_CORE_Library
///////////////////////////////////////////////////////////////////
// Demo memory type
/**Demo default memory **/
- Demo = 1000
+ Demo = 10000
};
// NC Memory Type Name
diff --git a/CMS_CORE_Library/S7Net/Nc_S7Net.cs b/CMS_CORE_Library/S7Net/Nc_S7Net.cs
index 0fcbe72..29503d5 100644
--- a/CMS_CORE_Library/S7Net/Nc_S7Net.cs
+++ b/CMS_CORE_Library/S7Net/Nc_S7Net.cs
@@ -91,7 +91,7 @@ namespace CMS_CORE_Library.S7Net
private static DataSvc SelectedProcessSvc;
#endif
- private static ushort SelectedProcess = 0;
+ private static ushort SelectedProcess = 1;
#if false
private static Dictionary MachineAxesPosition = new Dictionary();
@@ -916,7 +916,7 @@ namespace CMS_CORE_Library.S7Net
softKeyStatusMemory.MemType,
softKeyStatusMemory.Address,
softKeyStatusMemory.SubAddress,
- memorySizeToRead / 4,
+ memorySizeToRead / 1, // 4,
ref readValues);
if (cmsError.IsError())
@@ -2702,8 +2702,10 @@ namespace CMS_CORE_Library.S7Net
CmsError cmsError = MEM_RWIntegerList(bWrite, Process, MemType, MemTable, MemIndex, 1, ref ListValue);
if (cmsError.IsError())
return cmsError;
-
- Value = ListValue.First();
+ if (ListValue.Count > 0)
+ {
+ Value = ListValue.First();
+ }
return NO_ERROR;
}
@@ -4254,7 +4256,7 @@ namespace CMS_CORE_Library.S7Net
internal static MEMORY_CELL FUNCTION_ACCESS = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 6, 8);
- internal static MEMORY_CELL PRE_POST_POWER_ON = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2574, 2);
+ internal static MEMORY_CELL PRE_POST_POWER_ON = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 6542, 1);
internal static MEMORY_CELL PRE_POST_POWER_ON_CLICKABLE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2576, 2);
internal static MEMORY_CELL PRE_POST_POWER_ON_ACK = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2578, 2);
internal static MEMORY_CELL PRE_POST_POWER_ON_CLICKED = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2580, 2);
@@ -4274,10 +4276,10 @@ namespace CMS_CORE_Library.S7Net
internal static MEMORY_CELL NC_SOFT_KEYS_ACK = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2618, 4);
internal static MEMORY_CELL NC_SOFT_KEYS_CLICKED = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2622, 4);
- internal static MEMORY_CELL USER_SOFTKEYS_VALUE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2628, 16);
- internal static MEMORY_CELL USER_SOFTKEYS_CLICKABLE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2644, 16);
- internal static MEMORY_CELL USER_SOFT_KEYS_ACK = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2660, 16);
- internal static MEMORY_CELL USER_SOFT_KEYS_CLICKED = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2676, 16);
+ internal static MEMORY_CELL USER_SOFTKEYS_VALUE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 6552, 16);
+ internal static MEMORY_CELL USER_SOFTKEYS_CLICKABLE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 6568, 16);
+ internal static MEMORY_CELL USER_SOFT_KEYS_ACK = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 6584, 16);
+ internal static MEMORY_CELL USER_SOFT_KEYS_CLICKED = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 6616, 16);
internal static MEMORY_CELL ALARMS_STATUS = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 14, 128);
internal static MEMORY_CELL ALARMS_DATA = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 142, 1024);