patrick.xu
2020-12-24 5d05df27234fcb2bb9d5179a640c59590009f15a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace LLMF
{
     #region 运行状态
    public enum RunStatus
    {
        /// <summary>
        /// 正常状态
        /// </summary>
        Normal = 0,
 
        /// <summary>
        /// 调整状态
        /// </summary>
        adjustMent = 1,
 
        /// <summary>
        /// 第一次拍照
        /// </summary>
        firstCapture = 2,
 
        /// <summary>
        /// 标定
        /// </summary>
        calibration = 3,
 
        /// <summary>
        /// 持续拍照
        /// </summary>
        continueCapture = 4,
 
        /// <summary>
        /// 测试状态
        /// </summary>
        testMent = 5,
    }
     #endregion
 
    #region OPC Parameters
    public struct OPCConfig
    {
        public string serverName;
        public string serverIP;
        public int itmHandleClient;
        public GroupProperty groupProperty;
    }
 
    public struct GroupProperty
    {
        public bool defaultGroupIsActive;
        public int defaultGroupDeadband;
        public int updateRate;
        public bool isActive;
        public bool isSubscribed;
    }
    #endregion OPC Parameters
 
    public struct CamerasConfig
    {
        public uint[] SerialNumber;
    }
 
    [Serializable]
    public class ConfigStruct
    {
        public string title;
        public OPCConfig opcConfig;
        public double angleOffset;
        public double angleOffset_Left;
        public CamerasConfig cams;
        public string password;
        public double minAngle;
        public double maxAngle;
        public int pulsePerDegree;
        public int pulsePerDegree_Left;
        public double calAngle;
        public bool leftUsed;
        public bool rightUsed;
        public bool saveImage;
        public string saveImageFormat;
        public long inch13;
        public long inch15;
        public long inch16;
        public int selectedSizeIndex;
    }
 
    #region OPC Tags
    public class InputTag
    {
        /* Command */
        public const string Alarm = "LLMF.Green.Input.Alarm";
        public const string Start = "LLMF.Green.Input.Start";
        public const string Capture = "LLMF.Green.Input.Capture";
        public const string Position = "LLMF.Green.Input.Position";
 
        public const string Alarm_left = "LLMF.Left.Input.Alarm";
        public const string Start_left = "LLMF.Left.Input.Start";
        public const string Capture_left = "LLMF.Left.Input.Capture";
        public const string Position_left = "LLMF.Left.Input.Position";
        //input 显示
        public const string X_JinDian = "LLMF.Green.Input.X_JinDian";
        public const string Z_JinDian = "LLMF.Green.Input.Z_JinDian";
        public const string X_Alarm = "LLMF.Green.Input.X_Alarm";
        public const string Z_Alarm = "LLMF.Green.Input.Z_Alarm";
 
        public const string X_CW = "LLMF.Green.Input.X_CW";
        public const string X_CCW = "LLMF.Green.Input.X_CCW";
        public const string Z_CW = "LLMF.Green.Input.Z_CW";
        public const string Z_CCW = "LLMF.Green.Input.Z_CCW";
        public const string DingWei_CW = "LLMF.Green.Input.DingWei_CW";
        public const string DingWei_CCW = "LLMF.Green.Input.DingWei_CCW";
        public const string DingWei_JinDian = "LLMF.Green.Input.DingWei_JinDian";
        public const string DingWei_Alarm = "LLMF.Green.Input.DingWei_Alarm";
 
 
 
 
        public const string Start1 = "LLMF.Green.Input.Start1";
        public const string Start2 = "LLMF.Green.Input.Start2";
        public const string Reset = "LLMF.Green.Input.Reset";
        public const string E_Stop = "LLMF.Green.Input.E_Stop";
        public const string SafeCurtain = "LLMF.Green.Input.SafeCurtain";
        public const string OpenJieJin = "LLMF.Green.Input.OpenJieJin";
        public const string CeBianQian = "LLMF.Green.Input.CeBianQian";
        public const string CeBianHou = "LLMF.Green.Input.CeBianHou";
 
        public const string WuGanQian = "LLMF.Green.Input.WuGanQian";
        public const string WuGanHou = "LLMF.Green.Input.WuGanHou";
       
 
    }
 
    public class OutputTag
    {
        /* Command */
        public const string Move_Distance = "LLMF.Green.Output.Move_Distance";
        public const string Move = "LLMF.Green.Output.Move";
        public const string Move_OK = "LLMF.Green.Output.Move_OK";
        public const string CameraLight = "LLMF.Green.Output.CameraLight";
        public const string Move_Test = "LLMF.Green.Output.Move_Test";
        public const string ORI = "LLMF.Green.Output.ORI";
        public const string CaptureFail_Right = "LLMF.Green.Output.CaptureFail_Right";
        public const string Start = "LLMF.Green.Output.Start";
 
        public const string Manual = "LLMF.Green.Output.Manual";
        public const string qigangjiajin = "LLMF.Green.Output.qigangjiajin";
        public const string qigangsongkai = "LLMF.Green.Output.qigangsongkai";
        public const string guanmen = "LLMF.Green.Output.guanmen";
        public const string kaimen = "LLMF.Green.Output.kaimen";
        public const string huataiqigang = "LLMF.Green.Output.huataiqigang";
        public const string songliao = "LLMF.Green.Output.songliao";
        public const string chuliao = "LLMF.Green.Output.chuliao";
        public const string shoudongdingwei = "LLMF.Green.Output.shoudongdingwei";
 
        public const string X_Start = "LLMF.Green.Output.X_Start";
        public const string X_Work = "LLMF.Green.Output.X_Work";
        public const string Z_Start = "LLMF.Green.Output.Z_Start";
        public const string Z_Work = "LLMF.Green.Output.Z_Work";
 
 
        public const string Move_Distance_left = "LLMF.Left.Output.Move_Distance";
        public const string Move_left = "LLMF.Left.Output.Move";
        public const string Move_OK_left = "LLMF.Left.Output.Move_OK";
        public const string CameraLight_left = "LLMF.Left.Output.CameraLight";
        public const string Move_Test_left = "LLMF.Left.Output.Move_Test";
        public const string ORI_left = "LLMF.Left.Output.ORI";
        public const string CaptureFail_left = "LLMF.Left.Output.CaptureFail_Left";
        public const string Start_left = "LLMF.Left.Output.Start";
 
        public const string Manual_left = "LLMF.Left.Output.Manual";
        public const string qigangjiajin_left = "LLMF.Left.Output.qigangjiajin";
        public const string qigangsongkai_left = "LLMF.Left.Output.qigangsongkai";
        public const string guanmen_left = "LLMF.Left.Output.guanmen";
        public const string kaimen_left = "LLMF.Left.Output.kaimen";
        public const string huataiqigang_left = "LLMF.Left.Output.huataiqigang";
        public const string songliao_left = "LLMF.Left.Output.songliao";
        public const string chuliao_left = "LLMF.Left.Output.chuliao";
        public const string shoudongdingwei_left = "LLMF.Left.Output.shoudongdingwei";
 
        public const string X_Start_left = "LLMF.Left.Output.X_Start";
        public const string X_Work_left = "LLMF.Left.Output.X_Work";
        public const string Z_Start_left = "LLMF.Left.Output.Z_Start";
        public const string Z_Work_left = "LLMF.Left.Output.Z_Work";
        //Output显示
        public const string Red = "LLMF.Green.Output.Red";
        public const string Yellow = "LLMF.Green.Output.Yellow";
        public const string Green = "LLMF.Green.Output.Green";
        public const string Buzzer = "LLMF.Green.Output.Buzzer";
        public const string CeBianCylider = "LLMF.Green.Output.CeBianCylider";
        public const string ZhengBianCylider = "LLMF.Green.Output.ZhengBianCylider";
        public const string WuGanCylider = "LLMF.Green.Output.WuGanCylider";
        public const string HuaTaiCylider = "LLMF.Green.Output.HuaTaiCylider";
        public const string SiFuPowerOn = "LLMF.Green.Output.SiFuPowerOn";
 
        public const string X_SRV_ON = "LLMF.Green.Output.X_SRV_ON";
        public const string Z_SRV_ON = "LLMF.Green.Output.Z_SRV_ON";
        public const string DingWei_SRV_ON = "LLMF.Green.Output.DingWei_SRV_ON";
        public const string Z_ShaChe = "LLMF.Green.Output.Z_ShaChe";
        public const string ForApple = "LLMF.Green.Output.ForApple";
        public const string CameraLighto = "LLMF.Green.Output.CameraLighto";
        public const string WuGanCylider2 = "LLMF.Green.Output.WuGanCylider2";
    }
 
    #endregion OPC Tags
}