using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MainForm.Models
{
///
/// PLC值回写-触发信号
///
public class WriteToPLC_Flag
{
///
/// 回写信号的 变量名
///
public string Name { get; set; } = string.Empty;
///
/// 回写信号的 地址位
///
public int Adress { get; set; }
///
/// 值类型
///
public PLCValueType ValueType { get; set; } = PLCValueType.Short;
///
/// 值
///
public object Value { get; set; } = default;
///
/// 回写数据
///
public List WriteToPLCDatas { get; set; } = new List();
}
///
/// PLC值回写记录
///
public class WriteToPLC_Data
{
///
/// 回写数据 的变量名
///
public string Name { get; set; } = string.Empty;
///
/// 回写数据 的地址位
///
public int Adress { get; set; }
///
/// 值类型
///
public PLCValueType ValueType { get; set; } = PLCValueType.None;
///
/// 值类型=字符串类型时,最多可占用的寄存器个数
///
public int ValueTypeStrLength { get; set; } = 0;
///
/// 值
///
public object Value { get; set; } = default;
}
///
/// PLC值类型
///
public enum PLCValueType
{
None,
Short,
ShortArray,
Int,
Long,
Float,
Double,
String
}
}