You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjHelp.cs

37 lines
805 B
C#

using DataBlockHelper;
using HslCommunication;
1 year ago
namespace Mesnac.Action.ChemicalWeighing
1 year ago
{
public static class LjHelp
{
1 year ago
1 year ago
//开门狗
1 year ago
public static int WatchDog
{
get
{
try
{
OperateResult<byte[]> read = PlcConnect.Instance.Read("DB2107.2.0", 2);
var content = read.Content;
if (read.IsSuccess)
{
return PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
}
return 0;
}
catch (System.Exception)
{
1 year ago
return 0;
}
1 year ago
}
}
1 year ago
}
}