现场更改3
This commit is contained in:
@@ -230,7 +230,7 @@ namespace CapMachine.Wpf.Services
|
||||
if (ListCanDbcModel.Count > 0)
|
||||
{
|
||||
ToomossCanDrive.IsCycleRevice = true;
|
||||
ToomossCanDrive.StartPrecisionCycleSendMsg();
|
||||
ToomossCanDrive.StartCycleReviceCanMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1119,18 +1119,16 @@ namespace CapMachine.Wpf.Services
|
||||
while (ThreadEnable)
|
||||
{
|
||||
cycleCount++;
|
||||
if (cycleCount % 20 == 0) // 每10秒记录一次
|
||||
if (cycleCount % 100 == 0)
|
||||
{
|
||||
LogService.Info($"RtScanDeviceStart 循环计数: {cycleCount}");
|
||||
}
|
||||
//await Task.Delay(5);
|
||||
await Task.CompletedTask;
|
||||
await Task.Delay(50);
|
||||
|
||||
DiagnosticsTime.Reset();
|
||||
DiagnosticsTime.Start();
|
||||
try
|
||||
{
|
||||
LogService.Debug($"RtScanDeviceStart 开始扫描周期 {cycleCount}");
|
||||
//TagInfo.RtValue.Value++;
|
||||
|
||||
//var data = TagManger.DicTags["转速"].ValueType.Name;
|
||||
@@ -1186,7 +1184,6 @@ namespace CapMachine.Wpf.Services
|
||||
try
|
||||
{
|
||||
var speedValue = CanDriveService.GetDbcSpeedValueBySpeedName("通讯转速");
|
||||
LogService.Debug($"RtScanDeviceStart 读取CAN通讯转速: {speedValue}");
|
||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)speedValue);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1213,7 +1210,6 @@ namespace CapMachine.Wpf.Services
|
||||
try
|
||||
{
|
||||
var voltageValue = CanDriveService.GetDbcValueByName("通讯母线电压");
|
||||
LogService.Debug($"RtScanDeviceStart 读取CAN通讯母线电压: {voltageValue}");
|
||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(voltageValue * itemTag.Value.Precision));
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1240,7 +1236,6 @@ namespace CapMachine.Wpf.Services
|
||||
try
|
||||
{
|
||||
var currentValue = CanDriveService.GetDbcValueByName("通讯母线电流");
|
||||
LogService.Debug($"RtScanDeviceStart 读取CAN通讯母线电流: {currentValue}");
|
||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(currentValue * itemTag.Value.Precision));
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1267,7 +1262,6 @@ namespace CapMachine.Wpf.Services
|
||||
try
|
||||
{
|
||||
var phaseCurrentValue = CanDriveService.GetDbcValueByName("通讯相电流");
|
||||
LogService.Debug($"RtScanDeviceStart 读取CAN通讯相电流: {phaseCurrentValue}");
|
||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(phaseCurrentValue * itemTag.Value.Precision));
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1294,7 +1288,6 @@ namespace CapMachine.Wpf.Services
|
||||
try
|
||||
{
|
||||
var powerValue = CanDriveService.GetDbcValueByName("通讯功率");
|
||||
LogService.Debug($"RtScanDeviceStart 读取CAN通讯功率: {powerValue}");
|
||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(powerValue * itemTag.Value.Precision));
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1321,7 +1314,6 @@ namespace CapMachine.Wpf.Services
|
||||
try
|
||||
{
|
||||
var tempValue = CanDriveService.GetDbcValueByName("通讯芯片温度");
|
||||
LogService.Debug($"RtScanDeviceStart 读取CAN通讯芯片温度: {tempValue}");
|
||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(tempValue * itemTag.Value.Precision));
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1365,7 +1357,6 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
var dbcValue = CanDriveService.GetDbcValueByName(itemTag.Value.NameNoUnit);
|
||||
itemTag.Value.EngPvValue = dbcValue;
|
||||
LogService.Debug($"RtScanDeviceStart 回读CAN数据 {itemTag.Value.NameNoUnit}: {dbcValue}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user