Completata gestione feed/speed rate...
This commit is contained in:
Binary file not shown.
@@ -91,13 +91,38 @@ namespace MTC_Sim
|
||||
mTravel.Add(Condition.Level.FAULT, "ERR_06: Travel outside boundaries", "OP");
|
||||
}
|
||||
|
||||
public override void getAxes()
|
||||
public override void getPath()
|
||||
{
|
||||
base.getAxes();
|
||||
base.getPath();
|
||||
|
||||
|
||||
mxLoad.Value = parentForm.datiProd.xLoad;
|
||||
mcLoad.Value = parentForm.datiProd.cLoad;
|
||||
}
|
||||
public override int FeedRate
|
||||
{
|
||||
get
|
||||
{
|
||||
return parentForm.datiProd.PathFeedrate;
|
||||
}
|
||||
}
|
||||
|
||||
public override int FeedRateOver
|
||||
{
|
||||
get
|
||||
{
|
||||
return parentForm.datiProd.PathFeedrateOver;
|
||||
}
|
||||
}
|
||||
|
||||
public override int SpeedRateOver
|
||||
{
|
||||
get
|
||||
{
|
||||
return parentForm.datiProd.PathSpeedrateOver;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupero dati da form...
|
||||
/// </summary>
|
||||
|
||||
@@ -65,6 +65,10 @@ namespace MTC_Sim
|
||||
mAdapter.AddDataItem(mMessage);
|
||||
|
||||
// TimeSeries (es assi)
|
||||
mAdapter.AddDataItem(mPathFeed);
|
||||
mAdapter.AddDataItem(mPathFeedOver);
|
||||
mAdapter.AddDataItem(mPathSpeedOver);
|
||||
|
||||
mAdapter.AddDataItem(mPosition);
|
||||
mAdapter.AddDataItem(mxLoad);
|
||||
|
||||
@@ -213,6 +217,9 @@ namespace MTC_Sim
|
||||
#region Samples
|
||||
|
||||
|
||||
public Sample mPathFeed = new Sample("PATH_FEEDRATE");
|
||||
public Sample mPathFeedOver = new Sample("PATH_FEEDRATE_OVER");
|
||||
public Sample mPathSpeedOver = new Sample("PATH_SPEEDRATE_OVER");
|
||||
|
||||
public Sample mPosition = new Sample("xPosition");
|
||||
public Sample mxLoad = new Sample("xLoad");
|
||||
@@ -280,7 +287,7 @@ namespace MTC_Sim
|
||||
// fix dati x ulteriori (allarmi, modalità RUN/EXEC, ...)
|
||||
getCurrMode();
|
||||
|
||||
getAxes();
|
||||
getPath();
|
||||
|
||||
getAlarms();
|
||||
|
||||
@@ -299,9 +306,10 @@ namespace MTC_Sim
|
||||
/// <summary>
|
||||
/// recupero dati ASSI
|
||||
/// </summary>
|
||||
public virtual void getAxes()
|
||||
public virtual void getPath()
|
||||
{
|
||||
// da gestire su ogni adapter...
|
||||
// SE presente recupero dati path
|
||||
checkPath();
|
||||
}
|
||||
/// <summary>
|
||||
/// recupero allarmi
|
||||
@@ -356,6 +364,59 @@ namespace MTC_Sim
|
||||
|
||||
#region area metodi comunicazione con PLC/CNC
|
||||
|
||||
public void checkPath()
|
||||
{
|
||||
if (utils.IsSetAny(STROBE_PLC, Strobe.FEED_SPEED))
|
||||
{
|
||||
// leggo i valori feed/speed
|
||||
mPathFeed.Value = FeedRate;
|
||||
mPathFeedOver.Value = FeedRateOver;
|
||||
mPathSpeedOver.Value = SpeedRateOver;
|
||||
|
||||
// alzo flag lettura...
|
||||
if (utils.IsSetAll(STROBE_PLC, Strobe.FEED_SPEED)) STROBE_ADP = STROBE_ADP | Strobe.FEED_SPEED;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// resetto eventuali flag di lettura...
|
||||
if (utils.IsSetAll(STROBE_ADP, Strobe.FEED_SPEED)) STROBE_ADP -= Strobe.FEED_SPEED;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// recupera FeedRate (fare override!)
|
||||
/// </summary>
|
||||
public virtual int FeedRate
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera FeedRateOver (fare override!)
|
||||
/// </summary>
|
||||
public virtual int FeedRateOver
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera SpeedRateOver (fare override!)
|
||||
/// </summary>
|
||||
public virtual int SpeedRateOver
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
public void checkProd()
|
||||
{
|
||||
|
||||
@@ -207,6 +207,11 @@ namespace MTC_Sim
|
||||
answ.pzKo = pzKo;
|
||||
answ.pzTot = pzOk + pzKo;
|
||||
|
||||
// FEED/SPEED
|
||||
answ.PathFeedrate = hsPathFeed.Value;
|
||||
answ.PathFeedrateOver= hsPathFeedOver.Value;
|
||||
answ.PathSpeedrateOver= hsPathSpeedOver.Value;
|
||||
|
||||
// load...
|
||||
answ.xLoad = xLoad.Value;
|
||||
answ.cLoad = cLoad.Value;
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace MTC_Sim
|
||||
public int pzOk;
|
||||
public int pzKo;
|
||||
|
||||
public UInt32 PathFeedrate;
|
||||
public int PathFeedrate;
|
||||
public int PathFeedrateOver;
|
||||
public int PathSpeedrateOver;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user