using static PLCSharp.VVMs.MotionController.Axis;
using static PLCSharp.VVMs.MotionController.InterpolationGroup;
namespace PLCSharp.VVMs.MotionController
{
///
/// ControllerSDK
///
public abstract class ControllerSDK
{
public abstract bool Init(ushort controllerNo, string ip);
public abstract void Close();
public abstract void GetDI();
public abstract void GetDQ();
public abstract void SetDQ(ushort port, ushort off_on);
///
/// DI_数量
///
public int DI_Count { get; set; }
///
/// DI
///
public List DI { get; set; } = [];
///
/// DQ_数量
///
public int DQ_Count { get; set; }
///
/// DQ
///
public List DQ { get; set; } = [];
public abstract void Get_Axis_Status(ushort axisNo);
public abstract void Stop(ushort axisNo);
public abstract void Reset(ushort axisNo);
public abstract short CreateORG(ushort axisNo, AxisParams axisParams);
public abstract short Power(ushort axisNo, bool onoff);
public abstract bool CheckORG(ushort axisNo);
public abstract short Move(ushort axisNo, ushort mode, AxisParams axisParams);
public abstract short MulticoorMove(List interpolations, InterpolationGroupParams interpolationParams);
public abstract short Save(ushort axisNo, AxisParams axisParams);
///
/// ControllerNo
///
public ushort ControllerNo { get; set; }
///
/// 轴IOs
///
public List AxisIOs { get; set; } = [];
}
///
/// 轴State
///
public class AxisState
{
///
/// PowerOn
///
public bool PowerOn { get; set; }
///
/// ALM
///
public bool ALM { get; set; }
///
/// ORG
///
public bool ORG { get; set; }
///
/// LimitP
///
public bool LimitP { get; set; }
///
/// LimitN
///
public bool LimitN { get; set; }
///
/// Moving
///
public bool Moving { get; set; }
///
/// 指令位置反馈
///
public double CommandPosition { get; set; }
///
/// 编码器位置
///
public double EncoderPosition { get; set; }
///
/// 速度反馈
///
public double Velocity { get; set; }
}
}