| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- using GSG.NET.Concurrent;
- using OHV.SqliteDAL;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace VehicleControlSystem.ControlLayer.Motion
- {
- /// <summary>
- /// 나성권 부장이 만든 Dll 을 사용할 클래스
- /// </summary>
- public class GSIMotion : ControlObjectBase
- {
- public bool IsStop { get; set; }
- double currentPos = 0;
- public double CurrentPos { get { return this.currentPos; } set { SetField(ref this.currentPos, value); } }
- private string currentTag;
- public string CurrentTag { get { return currentTag; } set { SetField(ref this.currentTag, value); } }
- private double currentSpeed;
- public double CurrentSpeed { get { return currentSpeed; } set { SetField(ref this.currentSpeed, value); } }
- private double currentTorque;
- public double CurrentTorque { get { return currentTorque; } set { SetField(ref this.currentTorque, value); } }
- public bool IsErrorOn { get; set; }
- TaskCancel taskCancel = new TaskCancel();
- SqliteManager sql = null;
- public GSIMotion(SqliteManager sql)
- {
- this.sql = sql;
- }
- public void Init()
- {
- }
- public bool MoveToPoint(string point, double velocity)
- {
- var task = Task.Factory.StartNew(() =>
- {
- int index = 0;
- while (true)
- {
- LockUtils.Wait(500);
- this.CurrentPos = index++;
- if (CurrentPos > 20)
- break;
- }
- });
- return true;
- }
- public void EStop()
- {
- }
- public bool Stop()
- {
- return true;
- }
- public bool SlowStop()
- {
- return true;
- }
- public bool VelocityChainge(double velocity)
- {
- return true;
- }
- public bool AmpFaultReset()
- {
- return true;
- }
- #region Test Method
- #endregion
- }
- }
|