..
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Project.ViewForm
|
||||
// ctlAuto1.dev_plc = PUB.PLC;
|
||||
ctlAuto1.dev_bms = PUB.BMS;
|
||||
ctlAuto1.dev_xbe = PUB.XBE;
|
||||
this.timer1.Start();
|
||||
|
||||
PUB.AGV.DataReceive += AGV_DataReceive;
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace Project.ViewForm
|
||||
if (rlt == false) AR.UTIL.MsgE(errmsg);
|
||||
}
|
||||
}
|
||||
|
||||
this.timer1.Start();
|
||||
}
|
||||
private void AGV_DataReceive(object sender, arDev.Narumi.DataEventArgs e)
|
||||
{
|
||||
@@ -106,40 +108,44 @@ namespace Project.ViewForm
|
||||
}
|
||||
|
||||
bool tmrun = false;
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Visible == false) return;
|
||||
if (tmrun == true) return;
|
||||
tmrun = true;
|
||||
|
||||
this.ctlAuto1.OnUpdateMode = true;
|
||||
|
||||
if (this.ctlAuto1.Scean == CtlAuto.eScean.Progress)
|
||||
{
|
||||
ctlAuto1.ProgressVal = PUB.Result.SMSG_ProgressValue;
|
||||
ctlAuto1.ProgressMax = PUB.Result.SMSG_ProgressMax;
|
||||
ctlAuto1.StatusMessage = VAR.STR?.Get(eVarString.StatusMessage) ?? string.Empty;
|
||||
}
|
||||
this.ctlAuto1.StopMessage = string.Empty;
|
||||
|
||||
if (PUB.sm.Step == StateMachine.eSMStep.RUN)
|
||||
{
|
||||
this.ctlAuto1.runStep = PUB.sm.RunStep;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ctlAuto1.runStep = ERunStep.READY;
|
||||
}
|
||||
this.ctlAuto1.OnUpdateMode = false;
|
||||
this.ctlAuto1.Invalidate();
|
||||
tmrun = false;
|
||||
}
|
||||
|
||||
|
||||
private void fAuto_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.timer1.Enabled = this.Visible;
|
||||
if (timer1.Enabled) timer1.Start();
|
||||
else timer1.Stop();
|
||||
}
|
||||
|
||||
private void timer1_Tick_1(object sender, EventArgs e)
|
||||
{
|
||||
//if (this.Visible == false) return;
|
||||
//if (tmrun == true) return;
|
||||
//tmrun = true;
|
||||
|
||||
//this.ctlAuto1.OnUpdateMode = true;
|
||||
|
||||
//if (this.ctlAuto1.Scean == CtlAuto.eScean.Progress)
|
||||
//{
|
||||
// ctlAuto1.ProgressVal = PUB.Result.SMSG_ProgressValue;
|
||||
// ctlAuto1.ProgressMax = PUB.Result.SMSG_ProgressMax;
|
||||
// ctlAuto1.StatusMessage = VAR.STR?.Get(eVarString.StatusMessage) ?? string.Empty;
|
||||
//}
|
||||
//this.ctlAuto1.StopMessage = string.Empty;
|
||||
|
||||
//if (PUB.sm.Step == StateMachine.eSMStep.RUN)
|
||||
//{
|
||||
// this.ctlAuto1.runStep = PUB.sm.RunStep;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.ctlAuto1.runStep = ERunStep.READY;
|
||||
//}
|
||||
//this.ctlAuto1.OnUpdateMode = false;
|
||||
//this.ctlAuto1.Invalidate();
|
||||
|
||||
//PUB.mapctl.PredictNextAction();
|
||||
|
||||
//tmrun = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user