diff --git a/Net461DllTest/Enums/PlcVarEnum.cs b/Net461DllTest/Enums/PlcVarEnum.cs new file mode 100644 index 0000000..8fac389 --- /dev/null +++ b/Net461DllTest/Enums/PlcVarEnum.cs @@ -0,0 +1,95 @@ +using Net461DllTest.Signal; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static Net461DllTest.Signal.PlcValueAttribute; + +namespace Net461DllTest.Enums +{ + + + + /// + /// PLC变量 + /// + public enum PlcVarEnum + { + None, + /// + /// 上位机指令 + /// + [PlcValue(typeof(short), "V102", VarType.Writable)] + CmdForPLC, + + /// + /// 下位机状态 + /// + [PlcValue(typeof(short), "V112", VarType.ReadOnly)] + PLCState, + + + /// + /// 门2正常待机车位号,存车完成地面车位0 + /// + [PlcValue(typeof(short), "V124", VarType.ReadOnly)] + Door2CurSpaceNum, + + /// + /// 下位机运行模式 + /// + [PlcValue(typeof(short), "V116", VarType.Writable)] + PLCRunMode, + + /// + /// 执行的门号 + /// + [PlcValue(typeof(short), "V104", VarType.Writable)] + DoorVar, + + /// + /// 门1是否开到位 + /// + [PlcValue(typeof(bool), "V207.0", VarType.ReadOnly)] + IsDoor1OpenDone, + + /// + /// 门1是否关到位 + /// + [PlcValue(typeof(bool), "V207.1", VarType.ReadOnly)] + IsDoor1ClosedDone, + + + /// + /// 门2是否开到位 + /// + [PlcValue(typeof(bool), "V207.3", VarType.ReadOnly)] + IsDoor2OpenDone, + + /// + /// 门2是否关到位 + /// + [PlcValue(typeof(bool), "V207.4", VarType.ReadOnly)] + IsDoor2ClosedDone, + + + /// + /// 下位机异常代码 + /// + [PlcValue(typeof(short), "V2", VarType.ReadOnly)] + ErrorCode, + + /// + /// 1号门指示灯 + /// + [PlcValue(typeof(bool), "Q17.0", VarType.ReadOnly)] + Gate1Light, + + /// + /// 2号门指示灯 + /// + [PlcValue(typeof(bool), "Q17.3", VarType.ReadOnly)] + Gate2Light, + } +}