Skip to content

Commit 9e2b436

Browse files
committed
reporting clean up
2 parents f9733b5 + 64ae4a2 commit 9e2b436

File tree

14 files changed

+2191
-2027
lines changed

14 files changed

+2191
-2027
lines changed

CnE2PLC.PLC/Controller.cs

Lines changed: 0 additions & 750 deletions
Large diffs are not rendered by default.

CnE2PLC.PLC/XTO/AiData.cs

Lines changed: 0 additions & 397 deletions
Large diffs are not rendered by default.

CnE2PLC.PLC/XTO/AoData.cs

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -83,127 +83,5 @@ public override bool Placeholder
8383
// Local Tags
8484
public string? Cfg_EU { get; set; }
8585

86-
#region Data Outputs
87-
//public static void ToHeaderRow(Excel.Range row)
88-
//{
89-
// int i = 1;
90-
// row.Cells[1, i++].Value = "Scope";
91-
// row.Cells[1, i++].Value = "Tag Name";
92-
// row.Cells[1, i++].Value = "IO";
93-
// row.Cells[1, i++].Value = "Tag Description";
94-
// row.Cells[1, i++].Value = "HMI EquipID";
95-
// row.Cells[1, i++].Value = "HMI EquipDesc";
96-
// row.Cells[1, i++].Value = "HMI EU";
97-
// row.Cells[1, i++].Value = "AOI Calls";
98-
// row.Cells[1, i++].Value = "Tag References";
99-
// row.Cells[1, i++].Value = "InUse";
100-
// row.Cells[1, i++].Value = "Raw";
101-
// row.Cells[1, i++].Value = "Min Raw";
102-
// row.Cells[1, i++].Value = "Max Raw";
103-
// row.Cells[1, i++].Value = "Min EU";
104-
// row.Cells[1, i++].Value = "Max EU";
105-
// row.Cells[1, i++].Value = "CV";
106-
// row.Cells[1, i++].Value = "Inc To Close";
107-
// row.Cells[1, i++].Value = "Sim";
108-
// row.Cells[1, i++].Value = "Sim CV";
109-
110-
//}
111-
public static string[] ToHeaderCSVRow()
112-
{
113-
string[] row = new string[20];
114-
int i = 0;
115-
row[i++] = "Scope";
116-
row[i++] = "Tag Name";
117-
row[i++] = "IO";
118-
row[i++] = "Tag Description";
119-
row[i++] = "HMI EquipID";
120-
row[i++] = "HMI EquipDesc";
121-
row[i++] = "HMI EU";
122-
row[i++] = "AOI Calls";
123-
row[i++] = "Tag References";
124-
row[i++] = "InUse";
125-
row[i++] = "Raw";
126-
row[i++] = "Min Raw";
127-
row[i++] = "Max Raw";
128-
row[i++] = "Min EU";
129-
row[i++] = "Max EU";
130-
row[i++] = "CV";
131-
row[i++] = "Inc To Close";
132-
row[i++] = "Sim";
133-
row[i++] = "Sim CV";
134-
return row;
135-
136-
}
137-
//public void ToDataRow(Excel.Range row)
138-
//{
139-
// int i = 1;
140-
// row.Cells[1, i++].Value = Path;
141-
// row.Cells[1, i++].Value = Name;
142-
// row.Cells[1, i++].Value = IO;
143-
// row.Cells[1, i++].Value = Description;
144-
// row.Cells[1, i++].Value = Cfg_EquipID;
145-
// row.Cells[1, i++].Value = Cfg_EquipDesc;
146-
// row.Cells[1, i++].Value = Cfg_EU;
147-
// row.Cells[1, i++].Value = AOICalls;
148-
// row.Cells[1, i++].Value = References;
149-
// row.Cells[1, i++].Value = InUse == true ? "Yes" : "No";
150-
// row.Cells[1, i++].Value = Raw;
151-
// row.Cells[1, i++].Value = MinRaw;
152-
// row.Cells[1, i++].Value = MaxRaw;
153-
// row.Cells[1, i++].Value = MinEU;
154-
// row.Cells[1, i++].Value = MaxEU;
155-
// row.Cells[1, i++].Value = CV;
156-
// row.Cells[1, i++].Value = Cfg_IncToClose == true ? "Yes" : "No";
157-
// row.Cells[1, i++].Value = Sim == true ? "Yes" : "No";
158-
// row.Cells[1, i++].Value = SimCV;
159-
160-
//}
161-
public string[] ToDataCSVRow()
162-
{
163-
string[] row = new string[20];
164-
int i = 0;
165-
row[i++] = Path;
166-
row[i++] = Name;
167-
row[i++] = IO;
168-
row[i++] = Description;
169-
row[i++] = Cfg_EquipID ?? String.Empty;
170-
row[i++] = Cfg_EquipDesc;
171-
row[i++] = Cfg_EU ?? String.Empty;
172-
row[i++] = $"{AOICalls}";
173-
row[i++] = $"{References}";
174-
row[i++] = InUse == true ? "Yes" : "No";
175-
row[i++] = $"{Raw}";
176-
row[i++] = $"{MinRaw}";
177-
row[i++] = $"{MaxRaw}";
178-
row[i++] = $"{MinEU}";
179-
row[i++] = $"{MaxEU}";
180-
row[i++] = $"{CV}";
181-
row[i++] = Cfg_IncToClose == true ? "Yes" : "No";
182-
row[i++] = Sim == true ? "Yes" : "No";
183-
row[i++] = $"{SimCV}";
184-
return row;
185-
186-
}
187-
#endregion
188-
189-
190-
191-
//public void ToColumn(Excel.Range col)
192-
//{
193-
// col.Cells[2, 1].Value = Cfg_EquipDesc != string.Empty ? Cfg_EquipDesc : Description;
194-
// col.Cells[13, 1].Value = InUse == true ? "Yes" : "No";
195-
// col.Cells[14, 1].Value = Name;
196-
197-
// if (Sim == true)
198-
// {
199-
// col.Cells[14, 1].Interior.Color = ColorTranslator.ToOle(Color.DarkRed);
200-
// col.Cells[14, 1].Font.Color = ColorTranslator.ToOle(Color.White);
201-
// }
202-
203-
// col.Cells[14, 1].AddComment(ToString());
204-
205-
//}
206-
207-
20886
public override void ClearCounts() {}
20987
}

CnE2PLC.PLC/XTO/DiData.cs

Lines changed: 0 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -48,167 +48,6 @@ public override string ToString()
4848
return c;
4949
}
5050

51-
//public void ToValueRow(Excel.Range row)
52-
//{
53-
// row.Cells[1, 1].Value = Cfg_EquipID;
54-
// row.Cells[1, 2].Value = Cfg_EquipDesc != string.Empty ? Cfg_EquipDesc : Description;
55-
// row.Cells[1, 3].Value = Name;
56-
// row.Cells[1, 4].Value = $"{Name}.Value";
57-
// row.Cells[1, 5].Value = "Digital Input";
58-
// row.Cells[1, 6].Value = InUse == true ? "Standard IO" : "Not In Use";
59-
// row.Cells[1, 7].Value = "";
60-
// row.Cells[1, 8].Value = "Bool";
61-
// row.Cells[1, 9].Value = "";
62-
// row.Cells[1, 10].Value = "";
63-
// row.Cells[1, 11].Value = "";
64-
// row.Cells[1, 12].Value = "";
65-
// row.Cells[1, 13].Value = "";
66-
// row.Cells[1, 14].Value = "";
67-
// row.Cells[1, 15].Value = "";
68-
// row.Cells[1, 16].Value = "";
69-
70-
// if ( Val_Count == 0)
71-
// {
72-
// {
73-
// row.Cells[1, 4].Interior.Color = ColorTranslator.ToOle(Color.Yellow);
74-
// row.Cells[1, 4].Font.Color = ColorTranslator.ToOle(Color.Black);
75-
// }
76-
// }
77-
78-
// if (Sim == true)
79-
// {
80-
// row.Cells[1, 3].Interior.Color = ColorTranslator.ToOle(Color.DarkRed);
81-
// row.Cells[1, 3].Font.Color = ColorTranslator.ToOle(Color.White);
82-
// }
83-
84-
// // comments
85-
// row.Cells[1, 3].AddComment(ToString());
86-
//}
87-
88-
//public void ToAlarmRow(Excel.Range row)
89-
//{
90-
// row.Cells[1, 1].Value = Cfg_EquipID;
91-
// row.Cells[1, 2].Value = Cfg_EquipDesc != string.Empty ? Cfg_EquipDesc : Description;
92-
// row.Cells[1, 3].Value = Name;
93-
// row.Cells[1, 4].Value = $"{Name}.Alarm";
94-
// row.Cells[1, 5].Value = "AOI Output";
95-
// row.Cells[1, 6].Value = (AlmEnable == true & InUse == true) ? "Standard IO" : "Not In Use";
96-
// row.Cells[1, 7].Value = "";
97-
// row.Cells[1, 8].Value = "Bool";
98-
// row.Cells[1, 9].Value = $"{Cfg_AlmOnTmr} Sec.";
99-
// row.Cells[1, 9].AddComment($"Delay: {Cfg_AlmDlyTmr} secs.");
100-
// row.Cells[1, 10].Value = $"{Cfg_AlmOffTmr} Sec.";
101-
// row.Cells[1, 11].Value = "";
102-
// row.Cells[1, 12].Value = "";
103-
// row.Cells[1, 13].Value = "";
104-
// row.Cells[1, 14].Value = "";
105-
// row.Cells[1, 15].Value = AlmAutoAck == true ? "Y" : "";
106-
// row.Cells[1, 16].Value = "";
107-
108-
// if (Alm_Count == 0)
109-
// {
110-
// {
111-
// row.Cells[1, 4].Interior.Color = ColorTranslator.ToOle(Color.Yellow);
112-
// row.Cells[1, 4].Font.Color = ColorTranslator.ToOle(Color.Black);
113-
// }
114-
// }
115-
116-
//}
117-
118-
//public void ToShutdownRow(Excel.Range row)
119-
//{
120-
// row.Cells[1, 1].Value = Cfg_EquipID;
121-
// row.Cells[1, 2].Value = Cfg_EquipDesc != string.Empty ? Cfg_EquipDesc : Description;
122-
// row.Cells[1, 3].Value = Name;
123-
// row.Cells[1, 4].Value = $"{Name}.Shutdown";
124-
// row.Cells[1, 5].Value = "AOI Output";
125-
// row.Cells[1, 6].Value = "Not In Use";
126-
// row.Cells[1, 6].Value = (AlmEnable == true & InUse == true) ? "Standard IO" : "Not In Use";
127-
// row.Cells[1, 7].Value = "";
128-
// row.Cells[1, 8].Value = "Bool";
129-
// row.Cells[1, 9].Value = $"{Cfg_SDDlyTmr} Sec.";
130-
// row.Cells[1, 10].Value = "";
131-
// row.Cells[1, 11].Value = "";
132-
// row.Cells[1, 12].Value = "";
133-
// row.Cells[1, 13].Value = "";
134-
// row.Cells[1, 14].Value = "";
135-
// row.Cells[1, 15].Value = "";
136-
// row.Cells[1, 16].Value = "";
137-
138-
// if (SD_Count == 0)
139-
// {
140-
// {
141-
// row.Cells[1, 4].Interior.Color = ColorTranslator.ToOle(Color.Yellow);
142-
// row.Cells[1, 4].Font.Color = ColorTranslator.ToOle(Color.Black);
143-
// }
144-
// }
145-
146-
//}
147-
148-
//public static void ToHeaderRow(Excel.Range row)
149-
//{
150-
// int i = 1;
151-
// row.Cells[1, i++].Value = "Scope";
152-
// row.Cells[1, i++].Value = "Tag Name";
153-
// row.Cells[1, i++].Value = "IO";
154-
// row.Cells[1, i++].Value = "Tag Description";
155-
// row.Cells[1, i++].Value = "HMI EquipID";
156-
// row.Cells[1, i++].Value = "HMI EquipDesc";
157-
// row.Cells[1, i++].Value = "AOI Calls";
158-
// row.Cells[1, i++].Value = "Tag References";
159-
// row.Cells[1, i++].Value = "InUse";
160-
// row.Cells[1, i++].Value = "Raw";
161-
// row.Cells[1, i++].Value = "Value";
162-
// row.Cells[1, i++].Value = "Alarm Enable";
163-
// row.Cells[1, i++].Value = "Alarm Auto Ack";
164-
// row.Cells[1, i++].Value = "Alarm State";
165-
// row.Cells[1, i++].Value = "Alarm On Time";
166-
// row.Cells[1, i++].Value = "Alarm Off Time";
167-
// row.Cells[1, i++].Value = "Alarm Dly Time";
168-
// row.Cells[1, i++].Value = "Alarm SD Time";
169-
// row.Cells[1, i++].Value = "Alarm";
170-
// row.Cells[1, i++].Value = "Alarm Count";
171-
// row.Cells[1, i++].Value = "SD Count";
172-
// row.Cells[1, i++].Value = "Sim";
173-
// row.Cells[1, i++].Value = "Sim Value";
174-
//}
175-
176-
//public void ToDataRow(Excel.Range row)
177-
//{
178-
// int i = 1;
179-
// row.Cells[1, i++].Value = Path;
180-
// row.Cells[1, i++].Value = Name;
181-
// row.Cells[1, i++].Value = IO;
182-
// row.Cells[1, i++].Value = Description;
183-
184-
// row.Cells[1, i++].Value = Cfg_EquipID;
185-
// row.Cells[1, i++].Value = Cfg_EquipDesc;
186-
187-
// row.Cells[1, i++].Value = AOICalls;
188-
// row.Cells[1, i++].Value = References;
189-
190-
// row.Cells[1, i++].Value = InUse == true ? "Yes" : "No";
191-
192-
// row.Cells[1, i++].Value = Raw == true ? "On" : "Off";
193-
// row.Cells[1, i++].Value = Value == true ? "On" : "Off";
194-
195-
// row.Cells[1, i++].Value = AlmEnable == true ? "Yes" : "No";
196-
// row.Cells[1, i++].Value = AlmAutoAck == true ? "Yes" : "No";
197-
// row.Cells[1, i++].Value = AlmState == 1 ? "On" : "Off";
198-
// row.Cells[1, i++].Value = Cfg_AlmOnTmr;
199-
// row.Cells[1, i++].Value = Cfg_AlmOffTmr;
200-
// row.Cells[1, i++].Value = Cfg_AlmDlyTmr;
201-
// row.Cells[1, i++].Value = Cfg_SDDlyTmr;
202-
// row.Cells[1, i++].Value = Alarm == true ? "Alarm" : "Ok";
203-
// row.Cells[1, i++].Value = Alm_Count;
204-
// row.Cells[1, i++].Value = SD_Count;
205-
206-
// row.Cells[1, i++].Value = Sim == true ? "Yes" : "No";
207-
// row.Cells[1, i++].Value = SimValue == true ? "On" : "Off";
208-
209-
210-
//}
211-
21251
public override bool Simmed { get { return Sim ?? false; } }
21352
public override bool Bypassed { get { return BypActive ?? false; } }
21453
public override bool Alarmed { get { return AlmCode == 0 ? false : true; } }

CnE2PLC.PLC/XTO/DoData.cs

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -66,69 +66,5 @@ public override bool Placeholder
6666
}
6767
}
6868

69-
70-
#region Data Outputs
71-
//public static void ToHeaderRow(Excel.Range row)
72-
//{
73-
// int i = 1;
74-
// row.Cells[1, i++].Value = "Scope";
75-
// row.Cells[1, i++].Value = "Tag Name";
76-
// row.Cells[1, i++].Value = "IO";
77-
// row.Cells[1, i++].Value = "Tag Description";
78-
// row.Cells[1, i++].Value = "HMI EquipID";
79-
// row.Cells[1, i++].Value = "HMI EquipDesc";
80-
// row.Cells[1, i++].Value = "AOI Calls";
81-
// row.Cells[1, i++].Value = "Tag References";
82-
// row.Cells[1, i++].Value = "InUse";
83-
// row.Cells[1, i++].Value = "Raw";
84-
// row.Cells[1, i++].Value = "Value";
85-
// row.Cells[1, i++].Value = "Sim";
86-
// row.Cells[1, i++].Value = "Sim Value";
87-
88-
//}
89-
//public void ToDataRow(Excel.Range row)
90-
//{
91-
// int i = 1;
92-
// row.Cells[1, i++].Value = Path;
93-
// row.Cells[1, i++].Value = Name;
94-
// row.Cells[1, i++].Value = IO;
95-
// row.Cells[1, i++].Value = Description;
96-
// row.Cells[1, i++].Value = Cfg_EquipID;
97-
// row.Cells[1, i++].Value = Cfg_EquipDesc;
98-
// row.Cells[1, i++].Value = AOICalls;
99-
// row.Cells[1, i++].Value = References;
100-
// row.Cells[1, i++].Value = InUse == true ? "Yes" : "No";
101-
// row.Cells[1, i++].Value = Raw;
102-
// row.Cells[1, i++].Value = Value;
103-
// row.Cells[1, i++].Value = Sim == true ? "Yes" : "No";
104-
// row.Cells[1, i++].Value = SimVal;
105-
106-
//}
107-
#endregion
108-
109-
//public void ToColumn(Excel.Range col, int TagCount = -1)
110-
//{
111-
// col.Cells[2, 1].Value = Cfg_EquipDesc != string.Empty ? Cfg_EquipDesc : Description;
112-
// col.Cells[13, 1].Value = InUse == true ? "Yes" : "No";
113-
// col.Cells[14, 1].Value = Name;
114-
115-
// if(TagCount == 0)
116-
// {
117-
// {
118-
// col.Cells[14, 1].Interior.Color = ColorTranslator.ToOle(Color.Yellow);
119-
// col.Cells[14, 1].Font.Color = ColorTranslator.ToOle(Color.Black);
120-
// }
121-
// }
122-
123-
// if (Sim == true)
124-
// {
125-
// col.Cells[14, 1].Interior.Color = ColorTranslator.ToOle(Color.DarkRed);
126-
// col.Cells[14, 1].Font.Color = ColorTranslator.ToOle(Color.White);
127-
// }
128-
129-
// col.Cells[14, 1].AddComment(ToString());
130-
//}
131-
132-
13369
public override void ClearCounts() { }
13470
}

0 commit comments

Comments
 (0)