You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.7 KiB
C#

using Rs.Framework;
using Rs.MotionPlat.Commom;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Rs.MotionPlat.Flow.Space
{
public class ZRTest:BaseFlow
{
private static ZRTest _instance;
public static ZRTest Instance
{
get
{
if(_instance==null)
{
_instance = new ZRTest();
}
return _instance;
}
}
int step = 0;
public override void Run()
{
switch (step)
{
case 0:
for(int i=1;i<=9;i++)
{
AxisControl.GetAxis($"NozzleZ{i}").MovePos(0, GlobalVar.WholeSpeed);
AxisControl.GetAxis($"NozzleR{i}").MovePos(0, GlobalVar.WholeSpeed);
}
step++;
break;
case 1:
if(Ops.AllZStoped()&&Ops.AllRStoped())
{
step++;
}
break;
case 2:
for (int i = 1; i <= 9; i++)
{
AxisControl.GetAxis($"NozzleZ{i}").MovePos(-10, GlobalVar.WholeSpeed);
AxisControl.GetAxis($"NozzleR{i}").MovePos(360, GlobalVar.WholeSpeed);
}
step++;
break;
case 3:
if (Ops.AllZStoped() && Ops.AllRStoped())
{
step = 0;
}
break;
}
}
}
}