|
|
@ -150,13 +150,6 @@ namespace SlnMesnac.Business
|
|
|
|
List<base_cabinet_info> cabinet_Infos = new List<base_cabinet_info>();
|
|
|
|
List<base_cabinet_info> cabinet_Infos = new List<base_cabinet_info>();
|
|
|
|
base.GetCabinetInfos(address, out cabinet_Infos);
|
|
|
|
base.GetCabinetInfos(address, out cabinet_Infos);
|
|
|
|
|
|
|
|
|
|
|
|
if (!_plc.writeInt32ByAddress("VD1516", 1)) //下发轨道电机启动信号
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new ArgumentException($"启动信号写入PLC失败;VD1516写1");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_log.Info($"启动信号写入PLC成功;VD1516写1");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in cabinet_Infos)
|
|
|
|
foreach (var item in cabinet_Infos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -402,5 +395,19 @@ namespace SlnMesnac.Business
|
|
|
|
|
|
|
|
|
|
|
|
return deviceStatusFlag;
|
|
|
|
return deviceStatusFlag;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 取消PLC工作模式
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <exception cref="ArgumentException"></exception>
|
|
|
|
|
|
|
|
public void ClearPlcMode()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!_plc.writeInt32ByAddress("VD1536", 0)) //工作模式:1-自动;2-巡检;3-手动;0-取消
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new ArgumentException($"工作模式:取消;写入PLC失败;VD1536写0");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_log.Info($"工作模式:取消;写入PLC成功;VD1536写0");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|