LIN 调度表 V1
This commit is contained in:
@@ -57,7 +57,7 @@ namespace CapMachine.Wpf.LinDrive
|
||||
HighSpeedDataService = ContainerProvider.Resolve<HighSpeedDataService>();
|
||||
LoggerService = ContainerProvider.Resolve<ILogService>();
|
||||
|
||||
|
||||
|
||||
//Stopwatch.Frequency表示高精度计时器每秒的计数次数(ticks/秒)每毫秒的ticks数 = 每秒的ticks数 ÷ 1000
|
||||
TicksPerMs = Stopwatch.Frequency / 1000.0;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ namespace CapMachine.Wpf.LinDrive
|
||||
|
||||
}
|
||||
|
||||
IsReviceOk= true;
|
||||
IsReviceOk = true;
|
||||
|
||||
//StringBuilder ValueStr = new StringBuilder(64);
|
||||
//LDFParser.LDF_ExeFrameToBus(LDFHandle, new StringBuilder("ID_DATA"), 1);
|
||||
@@ -614,7 +614,7 @@ namespace CapMachine.Wpf.LinDrive
|
||||
}
|
||||
}
|
||||
|
||||
IsSendOk=true;
|
||||
IsSendOk = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -666,7 +666,61 @@ namespace CapMachine.Wpf.LinDrive
|
||||
|
||||
#endregion
|
||||
|
||||
#region 调度器发送报文
|
||||
|
||||
private bool _SchEnable;
|
||||
/// <summary>
|
||||
/// 调度表使能
|
||||
/// </summary>
|
||||
public bool SchEnable
|
||||
{
|
||||
get { return _SchEnable; }
|
||||
set
|
||||
{
|
||||
_SchEnable = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 调度表数量
|
||||
/// </summary>
|
||||
public int SchCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取调度表数量
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int GetSchCount()
|
||||
{
|
||||
SchCount = LDFParser.LDF_GetSchQuantity(LDFHandle);
|
||||
return SchCount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void LinTest()
|
||||
{
|
||||
GetSchCount();
|
||||
|
||||
for (int i = 0; i < SchCount; i++)
|
||||
{
|
||||
StringBuilder pSchName = new StringBuilder();
|
||||
var Ret = LDFParser.LDF_GetSchName(LDFHandle, i, pSchName);
|
||||
if (Ret <= 0)
|
||||
{
|
||||
Console.WriteLine($"{pSchName.ToString()}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("执行失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 关闭设备
|
||||
|
||||
Reference in New Issue
Block a user