|
|
@@ -0,0 +1,110 @@ |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
namespace BPASmartClient.MorkCL.Model.Control |
|
|
|
{ |
|
|
|
internal class FryingPanSet : FryingPanGet |
|
|
|
{ |
|
|
|
/// <summary> |
|
|
|
/// 搅拌启停 |
|
|
|
/// </summary> |
|
|
|
public bool StirStartOrStop { get { return default; } set { MyModbus.Write("LB0".ToModbusAdd(), value); } } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 加热启停 |
|
|
|
/// </summary> |
|
|
|
public bool HeatStartOrStop { get { return default; } set { MyModbus.Write("LB3".ToModbusAdd(), value); } } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 通道下料启动控制(1-3) |
|
|
|
/// </summary> |
|
|
|
/// <param name="ChannelNum">通道编号,1-3</param> |
|
|
|
/// <param name="value">通道需求值</param> |
|
|
|
public void CuttingControl(int ChannelNum, ushort value) |
|
|
|
{ |
|
|
|
if (ChannelNum >= 1 && ChannelNum <= 3) |
|
|
|
{ |
|
|
|
byte[] VWOffset = new byte[3] { 6, 8, 10 }; |
|
|
|
byte[] LBOffset = new byte[3] { 6, 7, 0 }; |
|
|
|
MyModbus.Write($"VW10{VWOffset[ChannelNum - 1]}".ToModbusAdd(), value); |
|
|
|
MyModbus.Write($"LB{LBOffset[ChannelNum - 1]}".ToModbusAdd(), true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 加热档位设定 |
|
|
|
/// </summary> |
|
|
|
/// <param name="Gear">档位,1-8挡</param> |
|
|
|
public void HeatingGearSet(ushort Gear) |
|
|
|
{ |
|
|
|
if (Gear >= 1 && Gear <= 8) |
|
|
|
{ |
|
|
|
MyModbus.Write($"VW100".ToModbusAdd(), Gear); |
|
|
|
MyModbus.Write($"LB9".ToModbusAdd(), true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 搅拌频率设定 |
|
|
|
/// </summary> |
|
|
|
/// <param name="Frequency">频率,0-50HZ</param> |
|
|
|
public void MixingFrequencySet(ushort Frequency) |
|
|
|
{ |
|
|
|
if (Frequency >= 0 && Frequency <= 50) |
|
|
|
{ |
|
|
|
MyModbus.Write($"VW102".ToModbusAdd(), Frequency); |
|
|
|
MyModbus.Write($"LB10".ToModbusAdd(), true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 翻转频率设定 |
|
|
|
/// </summary> |
|
|
|
/// <param name="Frequency">频率,0-50HZ</param> |
|
|
|
public void OverturnFrequencySet(ushort Frequency) |
|
|
|
{ |
|
|
|
if (Frequency >= 0 && Frequency <= 50) |
|
|
|
{ |
|
|
|
MyModbus.Write($"VW104".ToModbusAdd(), Frequency); |
|
|
|
MyModbus.Write($"LB11".ToModbusAdd(), true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 炒锅回原点 |
|
|
|
/// </summary> |
|
|
|
public bool FryingPanHome { get { return default; } set { MyModbus.Write("LB12".ToModbusAdd(), value); } } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 出餐启动 |
|
|
|
/// </summary> |
|
|
|
public bool DiningOutStart { get { return default; } set { MyModbus.Write("LB13".ToModbusAdd(), value); } } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 炒锅清洗 |
|
|
|
/// </summary> |
|
|
|
public bool FryingPanClear { get { return default; } set { MyModbus.Write("LB14".ToModbusAdd(), value); } } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 炒锅回投料位置 |
|
|
|
/// </summary> |
|
|
|
public bool FryingPanFeedingLoc { get { return default; } set { MyModbus.Write("LB15".ToModbusAdd(), value); } } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 去炒制位控制 |
|
|
|
/// </summary> |
|
|
|
/// <param name="loc">炒锅位置,1-4</param> |
|
|
|
public void SetStirFryingLoc(ushort loc) |
|
|
|
{ |
|
|
|
if (loc >= 1 && loc <= 4) |
|
|
|
{ |
|
|
|
MyModbus.Write($"LB{loc + 15}".ToModbusAdd(), true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |