refresh standard methods after debug

This commit is contained in:
Samuele Locatelli
2020-05-18 17:55:23 +02:00
parent 1c3dee6468
commit 9d1cddcebf
2 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;FS30D,WIN32</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+13 -3
View File
@@ -60,6 +60,7 @@ namespace CMS_CORE_Library.S7Net
// Global Variables
private static DateTime Last_Static_Read;
private byte S7Language;
private static string Cnc_name;
private static string Cnc_SftVersion;
private static string Cnc_SeriesNum;
@@ -534,7 +535,14 @@ namespace CMS_CORE_Library.S7Net
// Get the NC Language
public override CmsError NC_RLanguage(ref CultureInfo Language)
{
return FUNCTION_NOT_ALLOWED_ERROR;
// Read static data
CmsError cmsError = ReadStaticNCData();
if (cmsError.IsError())
return cmsError;
Language = ConvertToSTEPLanguage(S7Language);
return NO_ERROR;
}
// Set the NC Language
@@ -585,7 +593,8 @@ namespace CMS_CORE_Library.S7Net
// Get the Date-Time of the NC
public override CmsError NC_RDateTime(ref DateTime ActualTime)
{
return FUNCTION_NOT_ALLOWED_ERROR;
ActualTime = DateTime.Now;
return NO_ERROR;
}
// Check if the NC is in running state
@@ -4025,11 +4034,12 @@ namespace CMS_CORE_Library.S7Net
try
{
// completare nuove variabili (matricola macchina, seriale PLC, firmware PLC)
S7Language = 0;
ConfChannelNo = 1;
Last_Static_Read = DateTime.Now;
Cnc_name = $"{currPLC.CPU}";
// FIXME
Cms_MachNumber = ""; // matricola macchina, DB604.DBB6720..6723
Cms_MachNumber = "0000"; // matricola macchina, DB604.DBB6720..6723
Cnc_SftVersion = "SMC000"; // versione SW del firmware PLC/CNC | DB604.DBB6724..6745
Cnc_SeriesNum = "SMC111"; // seriale PLC/CNC | DB604.DBB6746..6763
PlcRirm_SeriesNum = "V.0.0.0"; // seriale PLC/CNC | DB604.DBB6764..6767