Initial commit

This commit is contained in:
ChiKyun Kim
2025-07-17 16:11:46 +09:00
parent 4865711adc
commit 4a1b1924ba
743 changed files with 230954 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
using System;
namespace Project
{
[Serializable]
public class sPositionData
{
public float inpositionrange { get; set; }
public int Axis;
public double Position { get; set; }
public double Acc;
public double _dcc;
public double Dcc
{
get
{
if (_dcc == 0) return Acc;
else return _dcc;
}
set
{
_dcc = value;
}
}
public double Speed;
public Boolean isError { get { return Speed == 0; } }
public string Message;
public sPositionData(sPositionData baseData)
{
this.Clear();
this.Position = baseData.Position;
this.Acc = baseData.Acc;
this.Dcc = baseData.Dcc;
this._dcc = baseData._dcc;
this.Speed = baseData.Speed;
this.Axis = baseData.Axis;
this.Message = baseData.Message;
this.inpositionrange = baseData.inpositionrange;
}
public sPositionData Clone()
{
return new sPositionData
{
Position = this.Position,
Acc = this.Acc,
Dcc = this.Dcc,
//isError = this.isError,
Message = this.Message,
Speed = this.Speed,
_dcc = this.Dcc,
Axis = this.Axis,
inpositionrange = this.inpositionrange,
};
}
public sPositionData()
{
Clear();
}
public sPositionData(double pos)
{
Clear();
this.Position = pos;
}
//public void SetPosition(double pos) { this.Position = pos; }
public void Clear()
{
Axis = -1;
inpositionrange = 0f;
Position = 0;
Acc = 500;
_dcc = 0;
Speed = 0;
Message = "Not Set";
}
public override string ToString()
{
return $"Pos:{Position},Spd:{Speed}";
}
}
}