Fix axes
This commit is contained in:
@@ -274,32 +274,35 @@ namespace CMS_CORE_Library.Siemens
|
||||
}
|
||||
}
|
||||
|
||||
// Clean listener
|
||||
AxesSvc.UnSubscribe(ManageAxes);
|
||||
|
||||
if (SelectedProcess > 0)
|
||||
if (this.EnableAxes)
|
||||
{
|
||||
List<AxisModel> axesConf = new List<AxisModel>();
|
||||
// Clean listener
|
||||
AxesSvc.UnSubscribe(ManageAxes);
|
||||
|
||||
AXES_RAxesNames(SelectedProcess, ref AxesData);
|
||||
|
||||
List<Item> axesData = new List<Item>();
|
||||
foreach (var conf in AxesData)
|
||||
if (SelectedProcess > 0)
|
||||
{
|
||||
// Setup the items to be subscribed
|
||||
// Machine
|
||||
axesData.Add(new Item() { Path = string.Format("/Nck/{0}[u{1},{2}]", "MachineAxis/actToolBasePos", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
// Programmed
|
||||
axesData.Add(new Item() { Path = string.Format("/Channel/{0}[u{1},{2}]", "GeometricAxis/cmdProgPos", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
// Interp
|
||||
axesData.Add(new Item() { Path = string.Format("/Channel/{0}[u{1},{2}]", "GeometricAxis/actToolEdgeCenterPos", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
// Dist to go
|
||||
axesData.Add(new Item() { Path = string.Format("/Channel/{0}[u{1},{2}]", "MachineAxis/toolBaseDistToGo", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
}
|
||||
List<AxisModel> axesConf = new List<AxisModel>();
|
||||
|
||||
if (axesData.Count() > 0)
|
||||
// Subscribe to axis changes
|
||||
AxesSvc.Subscribe(ManageAxes, axesData.ToArray());
|
||||
AXES_RAxesNames(SelectedProcess, ref AxesData);
|
||||
|
||||
List<Item> axesData = new List<Item>();
|
||||
foreach (var conf in AxesData)
|
||||
{
|
||||
// Setup the items to be subscribed
|
||||
// Machine
|
||||
axesData.Add(new Item() { Path = string.Format("/Nck/{0}[u{1},{2}]", "MachineAxis/actToolBasePos", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
// Programmed
|
||||
axesData.Add(new Item() { Path = string.Format("/Channel/{0}[u{1},{2}]", "GeometricAxis/cmdProgPos", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
// Interp
|
||||
axesData.Add(new Item() { Path = string.Format("/Channel/{0}[u{1},{2}]", "GeometricAxis/actToolEdgeCenterPos", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
// Dist to go
|
||||
axesData.Add(new Item() { Path = string.Format("/Channel/{0}[u{1},{2}]", "MachineAxis/toolBaseDistToGo", SelectedProcess, conf.Id), SymbolicName = conf.Id.ToString() });
|
||||
}
|
||||
|
||||
if (axesData.Count() > 0)
|
||||
// Subscribe to axis changes
|
||||
AxesSvc.Subscribe(ManageAxes, axesData.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user