Aggiunta comandi assi (da provare in SIM)
This commit is contained in:
@@ -566,6 +566,83 @@ namespace Thermo.Active.NC
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Legge dal PLC elenco di eventi LOG del ciclo e li salva in memoria
|
||||
/// </summary>
|
||||
/// <param name="machineLog">Oggetto elenco elementi LOG registrati da macchina</param>
|
||||
/// <returns></returns>
|
||||
public CmsError SendAxisCommand(int AxisId, Model.DTOModels.ThAxes.AxisCommand currCommand, double TargetPos)
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
Dictionary<DateTime, int> machineLog = new Dictionary<DateTime, int>();
|
||||
|
||||
// sistemo i valori...
|
||||
bool writeTargetPos = currCommand == AxisCommand.Reset;
|
||||
uint biteCommand = 0;
|
||||
bool doWrite = false;
|
||||
switch (currCommand)
|
||||
{
|
||||
case AxisCommand.None:
|
||||
break;
|
||||
case AxisCommand.MoveAbsolute:
|
||||
doWrite = true;
|
||||
biteCommand = 0;
|
||||
break;
|
||||
case AxisCommand.JogIncPlus:
|
||||
doWrite = true;
|
||||
biteCommand = 1;
|
||||
break;
|
||||
case AxisCommand.JogIncMinus:
|
||||
doWrite = true;
|
||||
biteCommand = 2;
|
||||
break;
|
||||
case AxisCommand.Align:
|
||||
doWrite = true;
|
||||
biteCommand = 3;
|
||||
break;
|
||||
case AxisCommand.Probe:
|
||||
doWrite = true;
|
||||
biteCommand = 4;
|
||||
break;
|
||||
case AxisCommand.SetSlavePosition:
|
||||
doWrite = true;
|
||||
biteCommand = 5;
|
||||
break;
|
||||
case AxisCommand.Reset:
|
||||
doWrite = true;
|
||||
biteCommand = 6;
|
||||
break;
|
||||
case AxisCommand.Num07:
|
||||
break;
|
||||
case AxisCommand.Num08:
|
||||
break;
|
||||
case AxisCommand.Num09:
|
||||
break;
|
||||
case AxisCommand.Num10:
|
||||
break;
|
||||
case AxisCommand.Num11:
|
||||
break;
|
||||
case AxisCommand.Num12:
|
||||
break;
|
||||
case AxisCommand.Num13:
|
||||
break;
|
||||
case AxisCommand.Num14:
|
||||
break;
|
||||
case AxisCommand.Num15:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (doWrite)
|
||||
{
|
||||
// effettua chaiamta!
|
||||
libraryError = numericalControl.PLC_WAxisCommand(AxisId, biteCommand, writeTargetPos, TargetPos);
|
||||
}
|
||||
|
||||
// restituisco cod errore se trovato
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
public CmsError GetExpiredMaintenances(out List<DTOExpiredMaintenanceModel> expiredMaintenance)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user