|
|
@ -68,6 +68,7 @@ public class PlcApi
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static bool WriteEntranceLamp(ushort data)
|
|
|
|
public static bool WriteEntranceLamp(ushort data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Log.Info($"PlcApi writeEntranceLamp start data={data}");
|
|
|
|
var writeEntranceLamp = PlcMgr.WriteEntranceLamp(data);
|
|
|
|
var writeEntranceLamp = PlcMgr.WriteEntranceLamp(data);
|
|
|
|
Log.Info($"PlcApi writeEntranceLamp resp={writeEntranceLamp}");
|
|
|
|
Log.Info($"PlcApi writeEntranceLamp resp={writeEntranceLamp}");
|
|
|
|
return writeEntranceLamp;
|
|
|
|
return writeEntranceLamp;
|
|
|
@ -82,6 +83,7 @@ public class PlcApi
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static bool WriteExistLamp(ushort data)
|
|
|
|
public static bool WriteExistLamp(ushort data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Log.Info($"PlcApi WriteExistLamp start data={data}");
|
|
|
|
var writeExistLamp = PlcMgr.WriteExistLamp(data);
|
|
|
|
var writeExistLamp = PlcMgr.WriteExistLamp(data);
|
|
|
|
Log.Info($"PlcApi WriteExistLamp resp={writeExistLamp}");
|
|
|
|
Log.Info($"PlcApi WriteExistLamp resp={writeExistLamp}");
|
|
|
|
return writeExistLamp;
|
|
|
|
return writeExistLamp;
|
|
|
@ -95,6 +97,7 @@ public class PlcApi
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static bool DistributeSelectPack(string inBinNo, string outBinNo)
|
|
|
|
public static bool DistributeSelectPack(string inBinNo, string outBinNo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Log.Info($"PlcApi DistributeSelectPack start inBinNo={inBinNo} outBinNo={outBinNo}");
|
|
|
|
return PlcMgr.DistributeBinNo(inBinNo, outBinNo);
|
|
|
|
return PlcMgr.DistributeBinNo(inBinNo, outBinNo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -132,6 +135,7 @@ public class PlcApi
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static bool HoldOn()
|
|
|
|
public static bool HoldOn()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Log.Info($"PlcApi start HoldOn ");
|
|
|
|
var holdOn = PlcMgr.HoldOn();
|
|
|
|
var holdOn = PlcMgr.HoldOn();
|
|
|
|
Log.Info($"PlcApi HoldOn resp={holdOn}");
|
|
|
|
Log.Info($"PlcApi HoldOn resp={holdOn}");
|
|
|
|
return holdOn;
|
|
|
|
return holdOn;
|
|
|
@ -144,6 +148,7 @@ public class PlcApi
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static ushort ChannelStatus()
|
|
|
|
public static ushort ChannelStatus()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Log.Info($"PlcApi start ChannelStatus ");
|
|
|
|
PlcMgr.ResetPlc();
|
|
|
|
PlcMgr.ResetPlc();
|
|
|
|
var channelStatus = PlcMgr.ChannelStatus();
|
|
|
|
var channelStatus = PlcMgr.ChannelStatus();
|
|
|
|
Log.Info($"PlcApi ChannelStatus resp= {channelStatus}");
|
|
|
|
Log.Info($"PlcApi ChannelStatus resp= {channelStatus}");
|
|
|
@ -157,6 +162,7 @@ public class PlcApi
|
|
|
|
/// <returns>6未连接</returns>
|
|
|
|
/// <returns>6未连接</returns>
|
|
|
|
public static int ReadPlcTaskStatus()
|
|
|
|
public static int ReadPlcTaskStatus()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Log.Info($"PlcApi start ReadPlcTaskStatus ");
|
|
|
|
var readPlcTaskStatus = PlcMgr.ReadPlcTaskStatus();
|
|
|
|
var readPlcTaskStatus = PlcMgr.ReadPlcTaskStatus();
|
|
|
|
Log.Info($"PlcApi ReadPlcTaskStatus resp= {readPlcTaskStatus}");
|
|
|
|
Log.Info($"PlcApi ReadPlcTaskStatus resp= {readPlcTaskStatus}");
|
|
|
|
return readPlcTaskStatus;
|
|
|
|
return readPlcTaskStatus;
|
|
|
|