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/EngineeringDebuggingMode/PlcCommunicationUtil.cs

34 lines
811 B
C#

using Mesnac.Action.ChemicalWeighing.Entity;
namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode
{
public class PlcCommunicationUtil
{
/// <summary>
/// 从PLC中读取值
/// </summary>
/// <param name="dmValue">要读取的属性</param>
/// <returns></returns>
public static string GetDataToString(string dmValue)
{
return new DataKeyValue(dmValue).NowValue.ToString();
}
/// <summary>
/// 从PLC中读取值
/// </summary>
/// <param name="dmValue">要读取的属性</param>
/// <returns></returns>
public static string GetDataToString(string dmName, string dmValue)
{
return GetDataToString(dmName + dmValue);
}
}
}