Files
cms-core-active/CMS_CORE_Library/ToolConfigurations.cs
T
Lucio Maranta beec03905d Added siemens functions:
Update magazine
Available tools
Max value in config
2018-05-16 16:01:15 +00:00

154 lines
11 KiB
C#

using System.Collections.Generic;
using static CMS_CORE_Library.DataStructures;
namespace CMS_CORE_Library
{
public static class ToolConfigurations
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region PRIVATE_SELECTS_VALUES
private static Dictionary<int, string> toolTypeList = new Dictionary<int, string>()
{
{100, "Milling tool"},
{110, "Ball nose end mill"},
{111, "Conical ball end"},
{120, "End mill"},
{121, "End mill corner rounding"},
{130, "Angle head cutter"},
{131, "Corn.round.ang.hd.cut"},
{140, "Facing tool"},
{145, "Thread cutter"},
{150, "Side mill"},
{151, "Saw"},
{155, "Bevelled cutter"},
{156, "Bevelled cutter corner"},
{157, "Tap. die-sink. cutter"},
{160, "Drill&thread cut."},
{200, "Twist drill"},
{205, "Solid drill"},
{210, "Boring bar"},
{220, "Center drill"},
{230, "Countersink"},
{231, "Counterbore"},
{240, "Tap"},
{241, "Fine tap"},
{242, "Tap, Whitworth"},
{250, "Reamer"},
{700, "Slotting saw"},
{710, "3D probe"},
{711, "Edge finder"},
{712, "Mono probe"},
{713, "L probe"},
{714, "Star probe"},
{725, "Calibrating tool"},
{730, "Stop"},
{900, "Auxiliary tools"}
};
private static Dictionary<int, string> toolLifeList = new Dictionary<int, string>()
{
{0, "timeLife"},
{1, "countLife"},
{2, "wearLife"}
};
private static Dictionary<int, string> rotationTypeList = new Dictionary<int, string>()
{
{0, "none"},
{1, "clockWhise"},
{2, "counterClockWhise"}
};
#endregion PRIVATE_SELECTS_VALUES
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region PUBLIC_CONFIGS_FIELDS
public static List<FieldsConfiguration> SiemensToolsConfig = new List<FieldsConfiguration>()
{
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 = 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},
new FieldsConfiguration{Name = "isInhibited", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "inFixedPlace", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "isMeasured", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "inChangeTool", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "inUse", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "preAlarm", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "cooling1", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false},
new FieldsConfiguration{Name = "cooling2", Type = "boolean", SelectValues = null, Category = "cooling" , ReadOnly = false},
new FieldsConfiguration{Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
new FieldsConfiguration{Name = "leftSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
new FieldsConfiguration{Name = "rightSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
new FieldsConfiguration{Name = "rotation", Type = "select", SelectValues = rotationTypeList, Category = "head", ReadOnly = false}
};
public static FamiliesConfiguration SiemensFamiliesConfig = new FamiliesConfiguration()
{
FamilyConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "name", Type = "string", SelectValues = null, Category = "general", ReadOnly = false}
},
ToolsConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "childId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true}
}
};
public static ShanksConfiguration SiemensShanksConfig = new ShanksConfiguration()
{
ShankConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "name", Type = "string", SelectValues = null, Category = "general", ReadOnly = false },
new FieldsConfiguration{Name = "isEnabled", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "isInhibited", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "inFixedPlace", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "inChangeTool", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "inUse", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
new FieldsConfiguration{Name = "leftSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
new FieldsConfiguration{Name = "rightSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
new FieldsConfiguration{Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
},
ToolsConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "multitoolId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "familyName", Type = "string", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = true }
}
};
public static List<FieldsConfiguration> SiemensMagazinePosConfig = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "magazineId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "positionId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "type", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "disabled", Type = "bool", SelectValues = null, Category = "general", ReadOnly = true },
};
public static EdgesConfiguration SiemensEdgesConfiguration = new EdgesConfiguration()
{
EdgeConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
new FieldsConfiguration{Name = "residualLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false },
new FieldsConfiguration{Name = "nominalLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false },
new FieldsConfiguration{Name = "preAlmLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false }
},
EdgesAdditionalParamsConfiguration = new Dictionary<int, List<string>>() // Set value runtime, based on NC vendor
};
#endregion PUBLIC_CONFIGS_FIELDS
}
}