CAN的定时发送的更改和一些其他的改动
This commit is contained in:
@@ -2747,7 +2747,7 @@ namespace CapMachine.Wpf.Services
|
||||
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||
{
|
||||
case CanLinEnum.Can:
|
||||
//获取PLC的使能状态,更新到CAN的使能状态
|
||||
//获取PLC的使能状态,更新到CAN的使能状态
|
||||
CanDriveService.UpdateCapEnableCmdData(item.State);
|
||||
//itemTag.Value.EngPvValue = 0;
|
||||
break;
|
||||
@@ -3068,10 +3068,12 @@ namespace CapMachine.Wpf.Services
|
||||
switch (itemStepExd.ValueType)
|
||||
{
|
||||
case ExdValueType.Bool:
|
||||
SiemensDrive.Write(DataAdrees.Address, (bool)itemStepExd.Value == true ? 1 : 0);
|
||||
var ResultBool = SiemensDrive.Write(DataAdrees.Address, (bool)itemStepExd.Value == true ? 1 : 0);
|
||||
if (!ResultBool.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:{itemStepExd.Name}写入失败");
|
||||
break;
|
||||
case ExdValueType.Short:
|
||||
SiemensDrive.Write(DataAdrees.Address, (short)itemStepExd.Value);
|
||||
var ResultShort = SiemensDrive.Write(DataAdrees.Address, (short)itemStepExd.Value);
|
||||
if (!ResultShort.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:{itemStepExd.Name}写入失败");
|
||||
break;
|
||||
case ExdValueType.Double:
|
||||
break;
|
||||
@@ -3117,6 +3119,7 @@ namespace CapMachine.Wpf.Services
|
||||
|
||||
/// <summary>
|
||||
/// 发送速度SV到压缩机
|
||||
/// 自动步骤数据发送
|
||||
/// </summary>
|
||||
private void SendSpeedSvToCap(int SpeedSv)
|
||||
{
|
||||
@@ -3124,7 +3127,11 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
case CanLinEnum.Can:
|
||||
//获取PLC的SV数据 更新SV的速度值到压缩机
|
||||
CanDriveService.UpdateSpeedCmdData(SpeedSv);
|
||||
if (CanDriveService.CanAutoHand)//自动时步骤的数据可以赋值数据
|
||||
{
|
||||
CanDriveService.UpdateSpeedCmdData(SpeedSv);
|
||||
}
|
||||
|
||||
//itemTag.Value.EngPvValue = 0;
|
||||
break;
|
||||
case CanLinEnum.Lin:
|
||||
|
||||
Reference in New Issue
Block a user