Files
2026-07-14 13:55:17 +08:00

60 lines
1.7 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PLCCommunication
{
[Serializable]
public class PLCConfig
{
/// <summary>
///
/// </summary>
public int Index;
/// <summary>
/// PLC IP地址
/// </summary>
public string IP;
/// <summary>
/// PLC端口号
/// </summary>
public int Port;
/// <summary>
///
/// </summary>
public int JobCount;
/// <summary>
/// 是否启用心跳消息
/// </summary>
public bool HeartBeat;
/// <summary>
/// 心跳设置地址
/// </summary>
public string HeartAddr;
/// <summary>
/// 扫描间隔时间
/// </summary>
public int ScanTime;
/// <summary>
/// 上位机的节点地址,假如你的电脑的Ip地址为192.168.1.30,那么这个值就是30
/// </summary>
public int SA1;
/// <summary>
/// PLC的插槽号,通常都为0
/// </summary>
public int Solt;
/// <summary>
/// 如果设置为True,当数据读取失败的时候,会自动变更当前的SA1值,会选择自动增加,但不会和DA1一致,本值需要在对象实例化之后立即设置。
/// </summary>
public bool ChangeSA1;
/// <summary>
/// 获取或设置在解析字符串的时候是否将字节按照字单位反转,获取或设置数据解析的格式,可选ABCD, BADC,CDAB,DCBA格式
/// </summary>
public int DataFormat;
public List<TriggerParams> lstTgrParams;
}
}