LP Modifiche a M156 (Fanuc) e Siemens aree di memoria errate per balluf.
This commit is contained in:
@@ -1119,9 +1119,9 @@ namespace CMS_CORE_Library.Fanuc
|
||||
if (bits[processId - 1])
|
||||
{
|
||||
double responseVal = 0;
|
||||
// Read machine variable
|
||||
// Read machine variable Geferson 23/12/2020 si legge sempre dalla M155
|
||||
cmsError =
|
||||
ReadMacroValue((int)processId, M156_RESPONSE_MEMORY, true, ref responseVal);
|
||||
ReadMacroValue((int)processId, M155_RESPONSE_MEMORY, true, ref responseVal);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
|
||||
@@ -4776,7 +4776,9 @@ namespace CMS_CORE_Library.Siemens
|
||||
bitArray.CopyTo(statusArray, 0);
|
||||
|
||||
// Setup dimensions byte ( byte is formed by nibble => left_size right_size 0001 0001 )
|
||||
ushort dimensions = (ushort)((((tool.LeftSize << 4) + tool.RightSize) << 8) + 17); // 17 = 0001 0001 ->
|
||||
//scambio left e right
|
||||
//ushort dimensions = (ushort)((((tool.LeftSize << 4) + tool.RightSize) << 8) + 17); // 17 = 0001 0001 ->
|
||||
ushort dimensions = (ushort)((((tool.RightSize << 4) + tool.LeftSize) << 8) + 17); // 17 = 0001 0001 ->
|
||||
|
||||
var maxSpeed = GetSiemensFormattedDouble(tool.MaxSpeed);
|
||||
|
||||
@@ -4796,6 +4798,8 @@ namespace CMS_CORE_Library.Siemens
|
||||
new Item(){ Path = string.Format("DB{0}.DBD54", BALLUF_EMPTY_TABLE.Address), Value = tool.MaxLoadPctAutoload },
|
||||
new Item(){ Path = string.Format("DB{0}.DBD58", BALLUF_EMPTY_TABLE.Address), Value = tool.MinLoadPctAutoload },
|
||||
new Item(){ Path = string.Format("DB{0}.DBD62", BALLUF_EMPTY_TABLE.Address), Value = tool.ToolTypeCode },
|
||||
//new Item(){ Path = string.Format("DB{0}.DBD58", BALLUF_EMPTY_TABLE.Address), Value = tool.Cooling1 },
|
||||
//new Item(){ Path = string.Format("DB{0}.DBD62", BALLUF_EMPTY_TABLE.Address), Value = tool.Cooling2 },
|
||||
//new Item(){ Path = string.Format("DB{0}.DBB64:STRING", BALLUF_EMPTY_TABLE.Address), Value = tool.FamilyName },
|
||||
|
||||
new Item(){ Path = string.Format("DB{0}.DBW70", BALLUF_EMPTY_TABLE.Address), Value = 1 },
|
||||
@@ -4805,6 +4809,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
new Item(){ Path = string.Format("DB{0}.DBW88", BALLUF_EMPTY_TABLE.Address), Value = 9 },
|
||||
};
|
||||
|
||||
|
||||
EdgeModel edge = tool.EdgesData[0];
|
||||
|
||||
SiemensEdgesConfiguration toolEdgesConfig = new SiemensEdgesConfiguration();
|
||||
@@ -4815,12 +4820,25 @@ namespace CMS_CORE_Library.Siemens
|
||||
{
|
||||
if (edge.EdgeAdditionalParams.ContainsKey(conf.Name) && toolEdgesConfig.TDIEdgeFields.ContainsKey(conf.Path))
|
||||
{
|
||||
var formattedValue = GetSiemensFormattedDouble(edge.EdgeAdditionalParams[conf.Name]);
|
||||
items.Add(new Item()
|
||||
if(conf.Name == "teeth")
|
||||
{
|
||||
Path = string.Format(toolEdgesConfig.TDIEdgeFields[conf.Path], BALLUF_EMPTY_TABLE.Address),
|
||||
Value = formattedValue
|
||||
});
|
||||
UInt16 formattedValue =Convert.ToUInt16(edge.EdgeAdditionalParams[conf.Name]);
|
||||
items.Add(new Item()
|
||||
{
|
||||
Path = string.Format(toolEdgesConfig.TDIEdgeFields[conf.Path], BALLUF_EMPTY_TABLE.Address),
|
||||
Value = formattedValue
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var formattedValue = GetSiemensFormattedDouble(edge.EdgeAdditionalParams[conf.Name]);
|
||||
items.Add(new Item()
|
||||
{
|
||||
Path = string.Format(toolEdgesConfig.TDIEdgeFields[conf.Path], BALLUF_EMPTY_TABLE.Address),
|
||||
Value = formattedValue
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -473,7 +473,8 @@ namespace CMS_CORE_Library.Siemens
|
||||
{ "$TC_DP22[", "DB{0}.DBD" + (ADDITIONAL_PARAMS_START_INDEX + 76)},
|
||||
{ "$TC_DP23[", "DB{0}.DBD" + (ADDITIONAL_PARAMS_START_INDEX + 80)},
|
||||
{ "$TC_DP24[", "DB{0}.DBD" + (ADDITIONAL_PARAMS_START_INDEX + 84)},
|
||||
{ "$TC_DP25[", "DB{0}.DBD" + (ADDITIONAL_PARAMS_START_INDEX + 88)}
|
||||
{ "$TC_DP25[", "DB{0}.DBD" + (ADDITIONAL_PARAMS_START_INDEX + 88)},
|
||||
{ "$TC_DPNT[", "DB{0}.DBW212"}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user