Added "add tool" siemens feature

This commit is contained in:
Lucio Maranta
2018-05-11 15:28:32 +00:00
parent 0324e82105
commit dafd6bb9d1
5 changed files with 207 additions and 78 deletions
+7 -5
View File
@@ -87,15 +87,17 @@ namespace CMS_CORE_Application
List<MountedToolModel> tools = new List<MountedToolModel>();
SiemensToolModel newTool = new SiemensToolModel()
{
FamilyName = "nuovo nome",
FamilyName = "nuovo nome2",
ChildId = 1,
Id = 6,
MagazinePositionType = 1,
ToolType = 110,
LeftSize = 1,
RightSize = 1,
Rotation = (ROTATION)0,
Cooling1 = false,
Cooling2 = true,
Rotation = ROTATION.CLOCKWHISE,
LifeType = SIEMENS_LIFE_TYPE.COUNT,
Cooling1 = true,
Cooling2 = false,
IsActive = true,
InFixedPlace = true,
IsInhibited = true,
@@ -219,7 +221,7 @@ namespace CMS_CORE_Application
cmsError = N.TOOLS_RConfiguration(ref toolsConfig);
// cmsError = N.TOOLS_WAddEdge(1, ref edge);
// cmsError = N.TOOLS_WUpdateEdge(1, ref newEdge);
cmsError = N.TOOLS_WUpdateTool(newTool);
cmsError = N.TOOLS_RMagazineTools(1, ref magazine);
cmsError = N.TOOLS_RAvailableTools(ref multiTools, ref tools);
cmsError = N.TOOLS_WUpdateMagazineTools(1, newMagazine);
+3 -3
View File
@@ -535,19 +535,19 @@ namespace CMS_CORE_Library
public class MagazineAndToolModel
{
public int Id;
public int PositionId;
public int MagazineId;
public int Type;
}
public class PositionWithMultiToolModel : MagazineAndToolModel
{
public MountedMultiToolModel ShankData;
public MountedMultiToolModel ChildShank;
}
public class PositionWithToolModel : MagazineAndToolModel
{
public MountedToolModel Child;
public MountedToolModel ChildTool;
}
public class MountedMultiToolModel
+4 -4
View File
@@ -2201,10 +2201,10 @@ namespace CMS_CORE.Demo
// Create Tool Model
PositionWithToolModel pos = new PositionWithToolModel()
{
Id = demoPos.Id,
PositionId = demoPos.Id,
Type = demoPos.Type,
MagazineId = magazineId,
Child = new MountedToolModel
ChildTool = new MountedToolModel
{
Id = demoPos.ChildTools.Id,
FamilyName = demoPos.ChildTools.FamilyName,
@@ -2231,10 +2231,10 @@ namespace CMS_CORE.Demo
// Create multi tool model
PositionWithMultiToolModel pos = new PositionWithMultiToolModel()
{
Id = demoPos.Id,
PositionId = demoPos.Id,
Type = demoPos.Type,
MagazineId = magazineId,
ShankData = new MountedMultiToolModel()
ChildShank = new MountedMultiToolModel()
{
Id = demoPos.Shank.Id,
Name = demoPos.Shank.Name,
+192 -65
View File
@@ -36,21 +36,26 @@ namespace CMS_CORE.Siemens
private const int IDMaxChannel = 19999;
// Siemens Path Constants
private const string PathMaxChannelNo = "/Nck/Configuration/maxnumChannels";
private const string MAX_CHANNEL_NO_PATH = "/Nck/Configuration/maxnumChannels";
private const string PathConfChannelNo = "/Nck/Configuration/numChannels";
private const string PathNcType = "/Nck/Configuration/nckType";
private const string PathNcVersion = "/Nck/Configuration/nckVersion";
private const string PathLanguage = "/Nck/Configuration/anLanguageOnHmi";
private const string PathSerialNumber = "/Nck/State/hwProductSerialNrL";
private const string PathNcTime = "/Nck/State/sysTimeBCD";
private const string PathGenericNcMode = "/Bag/State/opMode";
private const string PathGenericNcState = "/Channel/State/chanStatus";
private const string PathIncrJog = "/Channel/GeometricAxis/actIncrVal";
private const string PathAdvancedJog = "/Channel/State/machFunc";
private const string PathRelatPosition = "/Channel/GeometricAxis/actToolBasPosEN";
private const string PathActProgLines = "/Channel/ProgramInfo/actPartProgram";
private const string PathActProgName = "/Channel/ProgramPointer/progName";
private const string CONF_CHANNEL_NO_PATH = "/Nck/Configuration/numChannels";
private const string NC_TYPE_PATH = "/Nck/Configuration/nckType";
private const string NC_VERSION_PATH = "/Nck/Configuration/nckVersion";
private const string LANGUAGE_PATH = "/Nck/Configuration/anLanguageOnHmi";
private const string SERIAL_NO_PATH = "/Nck/State/hwProductSerialNrL";
private const string NC_TIME_PATH = "/Nck/State/sysTimeBCD";
private const string NC_GENERIC_MODE_PATH = "/Bag/State/opMode";
private const string NC_GENERIC_STATE_PATH = "/Channel/State/chanStatus";
private const string JOG_INCR_PATH = "/Channel/GeometricAxis/actIncrVal";
private const string ADVANCED_JOG_PATH = "/Channel/State/machFunc";
private const string RELATIVE_POS_PATH = "/Channel/GeometricAxis/actToolBasPosEN";
private const string ACT_PROG_LINES_PATH = "/Channel/ProgramInfo/actPartProgram";
private const string ACT_PROG_NAME_PATH = "/Channel/ProgramPointer/progName";
// TOOLS
private const string NC_TOOL_FILE_PATH = "//NC/ACT.DIR/TO.DIR/TO_INI.INI";
private const string LOCALE_TOOL_FILE_PATH = "C:\\TO_INI.INI";
// Global Variables
private DateTime Last_Static_Read;
@@ -73,8 +78,12 @@ namespace CMS_CORE.Siemens
private Guid ToolMngmtListGuid = Guid.Empty;
// Magazine config parameters
private int MAX_TOOL_NUMER;
private int MAX_EDGE_PER_TOOL;
private int MAX_EDGES_PER_TOOL;
private int MAX_TOOLS_PER_FAMILY;
private int MAX_MULTITOOLS_NUMBER;
private int MAX_TOOLS_PER_MULTITOOLS;
private Alarm[] SiemensAlarms;
@@ -305,7 +314,7 @@ namespace CMS_CORE.Siemens
DataSvc Data = new DataSvc();
Data.Timeout = TimeoutConn;
Data.PriorityFlag = SlPriority.lowPriority;
Item ReadItem = new Item(PathNcTime);
Item ReadItem = new Item(NC_TIME_PATH);
//Read Data
Data.Read(ReadItem);
@@ -828,9 +837,9 @@ namespace CMS_CORE.Siemens
DataSvc Data = new DataSvc();
Data.Timeout = TimeoutConn;
Data.PriorityFlag = SlPriority.highPriority;
Item ReadItem = new Item(PathGenericNcMode + "[u" + ProcNumber + "]");
Item ReadItemIncr = new Item(PathIncrJog + "[u" + ProcNumber + "]");
Item ReadItemAdv = new Item(PathAdvancedJog + "[u" + ProcNumber + "]");
Item ReadItem = new Item(NC_GENERIC_MODE_PATH + "[u" + ProcNumber + "]");
Item ReadItemIncr = new Item(JOG_INCR_PATH + "[u" + ProcNumber + "]");
Item ReadItemAdv = new Item(ADVANCED_JOG_PATH + "[u" + ProcNumber + "]");
//Read Data
Data.Read(ReadItem);
@@ -863,7 +872,7 @@ namespace CMS_CORE.Siemens
DataSvc Data = new DataSvc();
Data.Timeout = TimeoutConn;
Data.PriorityFlag = SlPriority.highPriority;
Item ReadItem = new Item(PathGenericNcState + "[u" + ProcNumber + "]");
Item ReadItem = new Item(NC_GENERIC_STATE_PATH + "[u" + ProcNumber + "]");
//Read Data
Data.Read(ReadItem);
@@ -895,7 +904,7 @@ namespace CMS_CORE.Siemens
DataSvc Data = new DataSvc();
Data.Timeout = TimeoutConn;
Data.PriorityFlag = SlPriority.highPriority;
Item ReadItem = new Item(PathActProgLines + "[u" + ProcNumber + "]");
Item ReadItem = new Item(ACT_PROG_LINES_PATH + "[u" + ProcNumber + "]");
//Read Data
Data.Read(ReadItem);
@@ -938,7 +947,7 @@ namespace CMS_CORE.Siemens
DataSvc Data = new DataSvc();
Data.Timeout = TimeoutConn;
Data.PriorityFlag = SlPriority.highPriority;
Item ReadItem = new Item(PathActProgName + "[u" + ProcNumber + "]");
Item ReadItem = new Item(ACT_PROG_NAME_PATH + "[u" + ProcNumber + "]");
//Read Data
Data.Read(ReadItem);
@@ -1792,21 +1801,49 @@ namespace CMS_CORE.Siemens
return NO_ERROR;
}
private string[] ReadToolTableFile()
{
// Create a configuration file
FileStream f = new FileStream(LOCALE_TOOL_FILE_PATH, FileMode.Create);
// Read siemens configuration file
FILES_RProgramToFile(NC_TOOL_FILE_PATH, f);
f.Close();
return File.ReadAllLines(LOCALE_TOOL_FILE_PATH);
}
private void PopulateToolTable()
{
DataSvc dataSvc = new DataSvc();
// Read max tool number
Item itemToRead = new Item("/NC/_N_NC_TEA_ACX/$MN_MM_NUM_TOOL");
dataSvc.Read(itemToRead);
MAX_TOOL_NUMER = (int)itemToRead.Value;
string[] toolsStrings = ReadToolTableFile();
Stopwatch sw = new Stopwatch();
sw.Start();
CreateToolsFromFile(toolsStrings);
// Read max edge per tool number
itemToRead = new Item("/NC/_N_NC_TEA_ACX/$MN_MM_MAX_CUTTING_EDGE_PERTOOL");
dataSvc.Read(itemToRead);
MAX_EDGES_PER_TOOL = (int)itemToRead.Value;
Console.WriteLine("TEMPO " + sw.ElapsedMilliseconds);
// Read max tools per family
itemToRead = new Item("/NC/_N_NC_TEA_ACX/$MN_MAXNUM_REPLACEMENT_TOOLS");
dataSvc.Read(itemToRead);
MAX_TOOLS_PER_FAMILY = (int)itemToRead.Value;
// Read max multitools number
itemToRead = new Item("/NC/_N_NC_TEA_ACX/$MN_MM_NUM_MULTITOOL");
dataSvc.Read(itemToRead);
MAX_MULTITOOLS_NUMBER = (int)itemToRead.Value;
// Read max tools per multitools
itemToRead = new Item("/NC/_N_NC_TEA_ACX/$MN_MAX_TOOLS_PER_MULTITOOL");
dataSvc.Read(itemToRead);
MAX_TOOLS_PER_MULTITOOLS = (int)itemToRead.Value;
// Read file
string[] toolsStrings = ReadToolTableFile();
// Parse file
CreateToolsFromFileStrings(toolsStrings);
//for (int i = 1; i < MAX_TOOL_NUMER; i++)
//{
@@ -1816,16 +1853,6 @@ namespace CMS_CORE.Siemens
//}
}
private string[] ReadToolTableFile()
{
// Create a configuration file
FileStream f = new FileStream("C:\\TO_INI.INI", FileMode.Create);
// Read siemens configuration file
FILES_RProgramToFile("//NC/ACT.DIR/TO.DIR/TO_INI.INI", f);
f.Close();
return File.ReadAllLines("C:\\TO_INI.INI");
}
private void TOOLS_UpdateToolsData(Guid guid, ToolInfo[] toolInfos)
{
try
@@ -1893,7 +1920,7 @@ namespace CMS_CORE.Siemens
return NO_ERROR;
}
private void CreateToolsFromFile(string[] toolsStrings)
private void CreateToolsFromFileStrings(string[] toolsStrings)
{
SiemensEdgesConfiguration toolEdgesConfig = new SiemensEdgesConfiguration();
@@ -1959,22 +1986,18 @@ namespace CMS_CORE.Siemens
ToolTableData[toolIndex].RightSize = Convert.ToByte(actualString.Split('=').LastOrDefault());
}
break;
case "$TC_TP7":
{
ToolTableData[toolIndex].MagazinePositionType = Convert.ToInt32(actualString.Split('=').LastOrDefault());
}
break;
case "$TC_TP9":
{
ToolTableData[toolIndex].LifeType = (SIEMENS_LIFE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault());
}
break;
case "$TC_TP8":
{
// Get tool status
byte toolStatus = Convert.ToByte(actualString.Split('=').LastOrDefault());
ToolTableData[toolIndex].IsActive = GetBitValue(toolStatus, 1);
ToolTableData[toolIndex].InFixedPlace = GetBitValue(toolStatus, 2);
ToolTableData[toolIndex].IsInhibited = GetBitValue(toolStatus, 3);
@@ -1986,6 +2009,12 @@ namespace CMS_CORE.Siemens
}
break;
case "$TC_TP9":
{
ToolTableData[toolIndex].LifeType = (SIEMENS_LIFE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault());
}
break;
case "$TC_TP25":
{
// Get tool general information
@@ -2004,19 +2033,22 @@ namespace CMS_CORE.Siemens
ToolTableData[toolIndex].Rotation = rotation;
}
break;
case "$TC_MTPN":
{
// Insert new multitool
Multitools.Add(new ShankModel() { Id = firstId });
Multitools.Add(new ShankModel() { Id = firstId });
// Update Index
multitoolIndex = Multitools.Count - 1;
}
break;
case "$TC_MTP2":
{
Multitools[multitoolIndex].Name = actualString.Split('=').LastOrDefault().Replace("\"", "");
}
break;
case "$TC_MTP3":
{
Multitools[multitoolIndex].LeftSize = Convert.ToByte(actualString.Split('=').LastOrDefault());
@@ -2028,11 +2060,13 @@ namespace CMS_CORE.Siemens
Multitools[multitoolIndex].RightSize = Convert.ToByte(actualString.Split('=').LastOrDefault());
}
break;
case "$TC_MTP7":
{
Multitools[multitoolIndex].MagazinePositionType = Convert.ToInt32(actualString.Split('=').LastOrDefault());
}
break;
case "$TC_MTP8":
{
// Get tool status
@@ -2136,6 +2170,7 @@ namespace CMS_CORE.Siemens
}
}
break;
case "$TC_DP2":
case "$TC_DP3":
case "$TC_DP4":
@@ -2181,6 +2216,7 @@ namespace CMS_CORE.Siemens
}
}
break;
case "$TC_MPP1":
{
MagazinePositions.Add(new PositionsModel()
@@ -2191,6 +2227,7 @@ namespace CMS_CORE.Siemens
});
}
break;
case "$TC_MPP6":
{
int toolId = Convert.ToInt32(actualString.Split('=').LastOrDefault());
@@ -2198,15 +2235,17 @@ namespace CMS_CORE.Siemens
{
// Find tool by id
SiemensToolModel tool = ToolTableData.Where(x => x.Id == toolId).FirstOrDefault();
// Find position by id
PositionsModel position = MagazinePositions.Where(x => x.MagazineId == firstId && x.Id == secondId).FirstOrDefault();
if (tool != null)
{
// Add new Magazine-Tool
MagazineAndTools.Add(new PositionWithToolModel()
{
Id = secondId,
PositionId = secondId,
MagazineId = firstId,
Type = position.Type,
Child = new MountedToolModel()
ChildTool = new MountedToolModel()
{
Id = tool.Id,
FamilyName = tool.FamilyName,
@@ -2216,15 +2255,17 @@ namespace CMS_CORE.Siemens
}
else
{
// Find shank by id
ShankModel shank = Multitools.Where(x => x.Id == toolId).FirstOrDefault();
if (shank != null)
{
// Add new Magazine-Multitool
MagazineAndTools.Add(new PositionWithMultiToolModel()
{
Id = secondId,
PositionId = secondId,
MagazineId = firstId,
Type = position.Type,
ShankData = new MountedMultiToolModel()
ChildShank = new MountedMultiToolModel()
{
Id = shank.Id,
Name = shank.Name,
@@ -2236,14 +2277,16 @@ namespace CMS_CORE.Siemens
}
}
break;
case "$TC_MTPP6":
{
// Find tool by id
int toolId = Convert.ToInt32(actualString.Split('=').LastOrDefault());
if (toolId != 0)
{
// Find tool by id
SiemensToolModel tool = ToolTableData.Where(x => x.Id == toolId).First();
// Add new multitool child
Multitools[multitoolIndex].ChildsTools.Add(new ShankChildModel()
{
Id = toolId,
@@ -2267,18 +2310,19 @@ namespace CMS_CORE.Siemens
if (!String.IsNullOrWhiteSpace(text))
{
// Get
// Get indexes from string
int startingData = text.IndexOf("[", StringComparison.Ordinal) + 1;
int secondData = text.IndexOf(",", StringComparison.Ordinal) + 1;
int endingData = text.IndexOf("]", StringComparison.Ordinal);
// If the string is matching with the pattern STRING[N]=N or STRING[N,M]=N
if (startingData > 0 && endingData > 0)
// STRING[N,M]=N case
if (secondData > 0)
{
toolId = Convert.ToInt32(text.Substring(startingData, secondData - (startingData + 1)));
edgeId = Convert.ToInt32(text.Substring(secondData, endingData - (secondData)));
}
else
else // STRING[N]=N case
{
toolId = Convert.ToInt32(text.Substring(startingData, endingData - (startingData)));
edgeId = 0;
@@ -2288,14 +2332,14 @@ namespace CMS_CORE.Siemens
public static string GetUntilOrEmpty(string text, string stopAt = "[")
{
// Get string unti
if (!String.IsNullOrWhiteSpace(text))
{
// Find character index
int charLocation = text.IndexOf(stopAt, StringComparison.Ordinal);
if (charLocation > 0)
{
return text.Substring(0, charLocation);
}
}
return String.Empty;
@@ -2326,7 +2370,7 @@ namespace CMS_CORE.Siemens
{
Id = toolId,
ChildId = Convert.ToInt32(toolsStrings.FirstOrDefault(x => x.StartsWith("$TC_TP1[" + toolId)).Split('=').LastOrDefault()),
FamilyName = toolsStrings.FirstOrDefault(x => x.Contains("$TC_TP2[" + toolId)).Split('=').LastOrDefault(),
FamilyName = toolsStrings.FirstOrDefault(x => x.Contains("$TC_TP2[" + toolId)).Split('=').LastOrDefault().Replace("\"", ""),
LeftSize = Convert.ToByte(toolsStrings.FirstOrDefault(X => X.StartsWith("$TC_TP3[" + toolId)).Split('=').LastOrDefault()),
RightSize = Convert.ToByte(toolsStrings.FirstOrDefault(X => X.StartsWith("$TC_TP4[" + toolId)).Split('=').LastOrDefault()),
Rotation = rotation,
@@ -2481,6 +2525,81 @@ namespace CMS_CORE.Siemens
public override CmsError TOOLS_WUpdateTool(SiemensToolModel tool)
{
try
{
Stopwatch sw = new Stopwatch();
sw.Start();
// TC_TP2
DataSvc dataSvc = new DataSvc();
Item item = new Item("/Tool/Data/toolIdent[" + tool.Id + "]") { Value = tool.FamilyName };
dataSvc.Write(item);
// TC_TP3
item = new Item() { Path = "/Tool/Data/toolsize_left[" + tool.Id + "]", Value = tool.LeftSize };
dataSvc.Write(item);
// TC_TP4
item = new Item() { Path = "/Tool/Data/toolsize_right[" + tool.Id + "]", Value = tool.RightSize };
dataSvc.Write(item);
// TC_TP7
item = new Item() { Path = "/Tool/Data/toolplace_spec[" + tool.Id + "]", Value = tool.MagazinePositionType };
dataSvc.Write(item);
// TC_TP8
BitArray bitArray = new BitArray(new bool[] { tool.IsActive, tool.IsEnabled, tool.IsInhibited, tool.IsMeasured, tool.PreAlarm, tool.InChangeTool, tool.InFixedPlace, tool.IsInUse });
int[] array = new int[1];
bitArray.CopyTo(array, 0);
item = new Item() { Path = "/Tool/Data/toolStateL[" + tool.Id + "]", Value = array[0] };
dataSvc.Write(item);
// TC_TP9
item = new Item() { Path = "/Tool/Data/toolMon[" + tool.Id + "]", Value = (int)tool.LifeType, };
dataSvc.Write(item);
// TC_DP25
item = new Item("/Tool/Compensation/edgeData[c" + tool.Id + ",25]");
dataSvc.Read(item);
int val = Convert.ToInt32(item.Value);
bool clockwhise = false;
bool counterClockwhise = false;
// Convert rotation data
switch (tool.Rotation)
{
case ROTATION.CLOCKWHISE:
clockwhise = true;
counterClockwhise = false;
break;
case ROTATION.COUNTERCLOCKWHISE:
clockwhise = false;
counterClockwhise = true;
break;
default:
clockwhise = false;
counterClockwhise = false;
break;
}
val = SetBitValue(val, clockwhise, 9);
val = SetBitValue(val, counterClockwhise, 10);
val = SetBitValue(val, tool.Cooling1, 11);
val = SetBitValue(val, tool.Cooling2, 12);
item.Value = val;
dataSvc.Write(item);
Console.WriteLine("TEMPO UPDATE:" + sw.ElapsedMilliseconds);
}
catch (Exception ex)
{
return ManageException(ex);
}
return NO_ERROR;
}
@@ -2547,7 +2666,7 @@ namespace CMS_CORE.Siemens
#region Subordinate Private Functions
//Manage the Alarms - Called automatically on changes
// Manage the Alarms - Called automatically on changes
private void AlarmsChanged(Guid guid, Alarm[] alarms)
{
SiemensAlarms = alarms;
@@ -2563,6 +2682,14 @@ namespace CMS_CORE.Siemens
return (b & (1 << bitNumber - 1)) != 0;
}
private int SetBitValue(int intVal, bool val, int bitIndex)
{
if (val)
return intVal | (1 << (bitIndex - 1));
else
return intVal & ~(1 << (bitIndex - 1));
}
//Manage the Mode
private PROC_MODE ConvertToSTEPMode(uint mode, uint JogMode, uint AdvMode)
{
@@ -2687,12 +2814,12 @@ namespace CMS_CORE.Siemens
DataSvc ReadStaticData = new DataSvc();
ReadStaticData.Timeout = TimeoutConn;
ReadStaticData.PriorityFlag = SlPriority.defaultPriority;
Item ItemNcType = new Item(PathNcType);
Item ItemNcVersion = new Item(PathNcVersion);
Item ItemMaxChannelNo = new Item(PathMaxChannelNo);
Item ItemConfChannelNo = new Item(PathConfChannelNo);
Item ItemLanguage = new Item(PathLanguage);
Item ItemSerialNumber = new Item(PathSerialNumber);
Item ItemNcType = new Item(NC_TYPE_PATH);
Item ItemNcVersion = new Item(NC_VERSION_PATH);
Item ItemMaxChannelNo = new Item(MAX_CHANNEL_NO_PATH);
Item ItemConfChannelNo = new Item(CONF_CHANNEL_NO_PATH);
Item ItemLanguage = new Item(LANGUAGE_PATH);
Item ItemSerialNumber = new Item(SERIAL_NO_PATH);
cmsError = ConvertMemToPath(MATR_MACCH_SIEMENS.MemType, MATR_MACCH_SIEMENS.Address, MATR_MACCH_SIEMENS.SubAddress, 0, 1, 'W', out string itemString);
if (cmsError.IsError())
+1 -1
View File
@@ -72,7 +72,7 @@ namespace CMS_CORE_Library
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = false},
new FieldsConfiguration{Name = "lifeType", Type="select", SelectValues = toolLifeList, Category = "general", ReadOnly = false},
new FieldsConfiguration{Name = "familyName", Type = "string", SelectValues = null, Category = "family", ReadOnly = true },
new FieldsConfiguration{Name = "familyName", Type = "string", SelectValues = null, Category = "family", ReadOnly = false },
new FieldsConfiguration{Name = "childId", Type = "int", SelectValues = null, Category = "family", ReadOnly = true },
new FieldsConfiguration{Name = "isEnabled", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "isActive", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},