Compare commits
3 Commits
bae298ca00
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a91a58f00 | ||
| 7e3f87542c | |||
| f480b508b7 |
@@ -96,7 +96,7 @@ namespace vmsnet
|
||||
this.DispCtrl1.Size = new System.Drawing.Size(774, 699);
|
||||
this.DispCtrl1.TabIndex = 3;
|
||||
this.DispCtrl1.Times = null;
|
||||
this.DispCtrl1.Values = null;
|
||||
this.DispCtrl1._Values = null;
|
||||
this.DispCtrl1.OnAlamChange += DispCtrl1_OnAlamChangeL;
|
||||
this.DispCtrl1.OnChangedShowIndex += DispCtrl1_OnChangedShowIndex;
|
||||
this.DispCtrl1.OnClickCell += DispCtrl1_OnClickCell;
|
||||
@@ -1249,7 +1249,8 @@ namespace vmsnet
|
||||
if (maxunno < 0) maxunno = 5;
|
||||
if (maxchno < 0) maxchno = 59;
|
||||
|
||||
PUB.Values = new int[maxmcno + 1, maxunno + 1, maxchno + 1];
|
||||
PUB._Values = new int[maxmcno + 1, maxunno + 1, maxchno + 1];
|
||||
PUB.Received = new bool[maxmcno + 1, maxunno + 1, maxchno + 1];
|
||||
PUB.Times = new string[maxmcno + 1, maxunno + 1, maxchno + 1];
|
||||
PUB.ChNos = new int[maxmcno + 1, maxunno + 1, maxchno + 1];
|
||||
PUB.ChVOffset = new float[maxmcno + 1, maxunno + 1, maxchno + 1];
|
||||
@@ -1263,7 +1264,8 @@ namespace vmsnet
|
||||
{
|
||||
for (int k = 0; k <= maxchno; k++)
|
||||
{
|
||||
PUB.Values[c, i, k] = 0;
|
||||
PUB._Values[c, i, k] = 0;
|
||||
PUB.Received[c, i, k] = false;
|
||||
PUB.Times[c, i, k] = "";
|
||||
PUB.ChVOffset[c, i, k] = 0f;
|
||||
PUB.ChDecPos[c, i, k] = 0;
|
||||
@@ -1289,7 +1291,8 @@ namespace vmsnet
|
||||
PUB.StatusMSG("Ready...");
|
||||
this.DispCtrl1.initmsg = "Complete";
|
||||
this.DispCtrl1.init = true;
|
||||
this.DispCtrl1.Values = PUB.Values;
|
||||
this.DispCtrl1._Values = PUB._Values;
|
||||
this.DispCtrl1.Received = PUB.Received;
|
||||
this.DispCtrl1.Times = PUB.Times;
|
||||
this.DispCtrl1.SmallSize = PUB.CONFIG.viewSize; ////개별표시모드일떄 사용하는 윈도우의 크기
|
||||
this.DispCtrl1.FullScreen = true;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace vmsnet
|
||||
this.DispCtrl1.Size = new System.Drawing.Size(774, 699);
|
||||
this.DispCtrl1.TabIndex = 3;
|
||||
this.DispCtrl1.Times = null;
|
||||
this.DispCtrl1.Values = null;
|
||||
this.DispCtrl1._Values = null;
|
||||
this.DispCtrl1.OnAlamChange += DispCtrl1_OnAlamChangeL;
|
||||
this.DispCtrl1.OnChangedShowIndex += DispCtrl1_OnChangedShowIndex;
|
||||
this.DispCtrl1.OnClickCell += DispCtrl1_OnClickCell;
|
||||
@@ -768,7 +768,8 @@ namespace vmsnet
|
||||
PUB.StatusMSG("Ready...");
|
||||
this.DispCtrl1.initmsg = "Complete";
|
||||
this.DispCtrl1.init = true;
|
||||
this.DispCtrl1.Values = PUB.Values;
|
||||
this.DispCtrl1._Values = PUB._Values;
|
||||
this.DispCtrl1.Received = PUB.Received;
|
||||
this.DispCtrl1.Times = PUB.Times;
|
||||
//Me.DispCtrl1.WINDOW.restarttime = CONFIG.Restart
|
||||
this.DispCtrl1.SmallSize = System.Convert.ToInt32(PUB.CONFIG.viewSize);
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace vmsnet.HMI
|
||||
|
||||
private String _value = "";
|
||||
public int value2 = 0; //소수자리가 들어가기전의 값
|
||||
public bool received = false;
|
||||
public Single CurValue =0f;
|
||||
public Single CurValue1 = 0f;
|
||||
|
||||
@@ -92,6 +93,7 @@ namespace vmsnet.HMI
|
||||
BarRect = new RectangleF(0, 0, 0, 0);
|
||||
_value = "";
|
||||
value2 = 0;
|
||||
received = false;
|
||||
mtime = "";
|
||||
idx = 0;
|
||||
// detailform = null;
|
||||
|
||||
@@ -129,7 +129,8 @@ namespace vmsnet.HMI
|
||||
// }
|
||||
//}
|
||||
|
||||
private int[,,] values;
|
||||
private bool[,,] received;
|
||||
private int[,,] _values;
|
||||
private String[,,] times;
|
||||
|
||||
private Boolean _init = false; //그리드초기화완료여부
|
||||
@@ -309,10 +310,20 @@ namespace vmsnet.HMI
|
||||
|
||||
#region *** Constructors ***
|
||||
|
||||
public int[,,] Values
|
||||
/// <summary>
|
||||
/// 데이터를 수신했는지
|
||||
/// </summary>
|
||||
public bool[,,] Received
|
||||
{
|
||||
get { return this.values; }
|
||||
set { this.values = value; }
|
||||
get { return this.received; }
|
||||
set { this.received = value; }
|
||||
}
|
||||
|
||||
|
||||
public int[,,] _Values
|
||||
{
|
||||
get { return this._values; }
|
||||
set { this._values = value; }
|
||||
}
|
||||
|
||||
public String[,,] Times
|
||||
@@ -670,9 +681,10 @@ namespace vmsnet.HMI
|
||||
//값의 저장소가 아에없다면?
|
||||
//Boolean OverDATA = false;
|
||||
var alarmRemark = string.Empty;
|
||||
if (this.Values == null)
|
||||
if (this._Values == null)
|
||||
{
|
||||
Item.value2 = 0;
|
||||
Item.received = false;
|
||||
Item.CurValue = 0f;
|
||||
Item.CurValue1 = 0f;
|
||||
TimeStr = "Null Error";
|
||||
@@ -685,6 +697,7 @@ namespace vmsnet.HMI
|
||||
if (!Item.사용) //사용여부자체를 설정한다.
|
||||
{
|
||||
Item.value2 = 0;
|
||||
Item.received = false;
|
||||
Item.alamv = -999;
|
||||
Item.CurValue = 0f; //미설정상태라면 값을 표시하지 않는다.
|
||||
Item.CurValue1 = 0f;
|
||||
@@ -698,18 +711,20 @@ namespace vmsnet.HMI
|
||||
//Br = new SolidBrush(Color.Black);
|
||||
Offset = Item.Offset; //수동으로입력된 옾셋
|
||||
|
||||
var u1 = this.Values.GetUpperBound(0);
|
||||
var u2 = this.Values.GetUpperBound(1);
|
||||
var u3 = this.Values.GetUpperBound(2);
|
||||
var u1 = this._Values.GetUpperBound(0);
|
||||
var u2 = this._Values.GetUpperBound(1);
|
||||
var u3 = this._Values.GetUpperBound(2);
|
||||
if (Item.idx_dev >= 0 && Item.idx_unit >= 0 && Item.idx_ch >= 0 &&
|
||||
Item.idx_dev <= u1 && Item.idx_unit <= u2 && Item.idx_ch <= u3)
|
||||
{
|
||||
Item.value2 = this.Values[Item.idx_dev, Item.idx_unit, Item.idx_ch]; //측정값
|
||||
Item.value2 = this._Values[Item.idx_dev, Item.idx_unit, Item.idx_ch]; //측정값
|
||||
TimeStr = this.Times[Item.idx_dev, Item.idx_unit, Item.idx_ch]; //측정시간
|
||||
Item.received = this.Received[Item.idx_dev, Item.idx_unit, Item.idx_ch]; //수신여부
|
||||
}
|
||||
else
|
||||
{
|
||||
Item.value2 = 0;
|
||||
Item.received = false;
|
||||
TimeStr = "";
|
||||
}
|
||||
|
||||
@@ -791,7 +806,12 @@ namespace vmsnet.HMI
|
||||
if (Item.alamv == -999 || Item.alamv == 0) Item.alamv = Item.CurValue;
|
||||
|
||||
Item.적용형태 = "AUTO";
|
||||
if (Item.CurValue > Item.alamv) //큰값이 있을경우 상한선을 확인한다.
|
||||
if (Item.received == false)
|
||||
{
|
||||
Item.onalamh = false;
|
||||
Item.onalaml = false;
|
||||
}
|
||||
else if (Item.CurValue > Item.alamv) //큰값이 있을경우 상한선을 확인한다.
|
||||
{
|
||||
Single gap = Math.Abs(Item.CurValue - Item.alamv);
|
||||
if (gap >= Math.Abs(Item.aalamh))
|
||||
@@ -818,7 +838,12 @@ namespace vmsnet.HMI
|
||||
else if (grp.AlarmType == "MANUAL")
|
||||
{
|
||||
Item.적용형태 = "MANUAL";
|
||||
if (Item.CurValue >= Item.alamh)
|
||||
if (Item.received == false)
|
||||
{
|
||||
Item.onalamh = false;
|
||||
Item.onalaml = false;
|
||||
}
|
||||
else if (Item.CurValue >= Item.alamh)
|
||||
{
|
||||
Item.onalamh = true;
|
||||
Item.onalaml = false;
|
||||
@@ -842,7 +867,12 @@ namespace vmsnet.HMI
|
||||
break;
|
||||
case COMM.EALAMTYPE.개별알람:
|
||||
Item.적용형태 = "MANUAL";
|
||||
if (Item.CurValue >= Item.alamh)
|
||||
if (Item.received == false)
|
||||
{
|
||||
Item.onalamh = false;
|
||||
Item.onalaml = false;
|
||||
}
|
||||
else if (Item.CurValue >= Item.alamh)
|
||||
{
|
||||
Item.onalamh = true;
|
||||
Item.onalaml = false;
|
||||
@@ -864,7 +894,12 @@ namespace vmsnet.HMI
|
||||
/* 작성자: 이재웅, 작성일: 2025-06-17, 작성내용: 'Item.alamv == 0' OR조건 추가 */
|
||||
if (Item.alamv == -999 || Item.alamv == 0) Item.alamv = Item.CurValue;
|
||||
|
||||
if (Item.CurValue > Item.alamv) //큰값이 있을경우 상한선을 확인한다.
|
||||
if (Item.received == false)
|
||||
{
|
||||
Item.onalamh = false;
|
||||
Item.onalaml = false;
|
||||
}
|
||||
else if (Item.CurValue > Item.alamv) //큰값이 있을경우 상한선을 확인한다.
|
||||
{
|
||||
Single gap = Math.Abs(Item.CurValue - Item.alamv);
|
||||
if (gap >= Math.Abs(Item.aalamh))
|
||||
@@ -934,7 +969,7 @@ namespace vmsnet.HMI
|
||||
}
|
||||
}
|
||||
|
||||
if (!Item.활성화 && Item.사용)
|
||||
if ((!Item.활성화 && Item.사용) || Item.received == false)
|
||||
{
|
||||
Item._onalamover = false;
|
||||
Item._onalamh = false;
|
||||
@@ -954,6 +989,10 @@ namespace vmsnet.HMI
|
||||
BrColor = (Color.DarkMagenta);
|
||||
grp._errorcount += 1;
|
||||
}
|
||||
else if (Item.received == false)
|
||||
{
|
||||
ValueStr = "--";
|
||||
}
|
||||
else if (!Item.활성화)
|
||||
{
|
||||
ValueStr = "--";
|
||||
@@ -1306,7 +1345,7 @@ namespace vmsnet.HMI
|
||||
try
|
||||
{
|
||||
grp._ampdecpos = 3;
|
||||
grp._amp = (float)(this.Values[di1, di2, di3 - 1] / (Math.Pow(10, grp._ampdecpos)));
|
||||
grp._amp = (float)(this._Values[di1, di2, di3 - 1] / (Math.Pow(10, grp._ampdecpos)));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -1281,8 +1281,6 @@ namespace TrendCtrlII
|
||||
base.OnSizeChanged(e);
|
||||
if (this.Visible == false) return;
|
||||
Console.WriteLine("OnSizeChanged");
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CreateBufferGraphic()
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace vmsnet
|
||||
|
||||
try
|
||||
{
|
||||
PUB.KA1_SUM += (float)(PUB.Values[di1, di2, di3 - 1] / (Math.Pow(10, _ampdecpos)));
|
||||
PUB.KA1_SUM += (float)(PUB._Values[di1, di2, di3 - 1] / (Math.Pow(10, _ampdecpos)));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@@ -89,7 +89,7 @@ namespace vmsnet
|
||||
|
||||
try
|
||||
{
|
||||
PUB.KA2_SUM += (float)(PUB.Values[di1, di2, di3 - 1] / (Math.Pow(10, _ampdecpos)));
|
||||
PUB.KA2_SUM += (float)(PUB._Values[di1, di2, di3 - 1] / (Math.Pow(10, _ampdecpos)));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
@@ -13,6 +13,14 @@ namespace vmsnet
|
||||
{
|
||||
VAR.STR[EVarString.MCStatus] = PUB.sm.Step.ToString();
|
||||
}
|
||||
|
||||
//셀정보자동저장
|
||||
if (PUB.sm != null && PUB.sm.Step == ESMStep.RUN && PUB.CONFIG.savetermcellinfo > 0)
|
||||
{
|
||||
var ts_saveCellinfo = DateTime.Now - PUB.LastWindowCellinfoSaved;
|
||||
if (ts_saveCellinfo.TotalMinutes > PUB.CONFIG.savetermcellinfo)
|
||||
PUB.RaiseRemoteCommandEvent(rCommand.SaveGroupClass);
|
||||
}
|
||||
}
|
||||
|
||||
private void SPS_Max()
|
||||
|
||||
@@ -117,7 +117,16 @@ namespace vmsnet
|
||||
/// </summary>
|
||||
public bool opensubwindow { get; set; }
|
||||
public short trashper { get; set; } ////자동삭제용량단위
|
||||
|
||||
/// <summary>
|
||||
/// 저장주기(단위:초)
|
||||
/// </summary>
|
||||
public short saveterm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 셀저장보 저장 주기(단위:분)
|
||||
/// </summary>
|
||||
public short savetermcellinfo { get; set; }
|
||||
public bool seconddata { get; set; }
|
||||
public bool thirddata { get; set; }
|
||||
public bool getdata4 { get; set; }
|
||||
|
||||
593
cVMS.NET_CS/Setting/Frm_Config.Designer.cs
generated
593
cVMS.NET_CS/Setting/Frm_Config.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -180,6 +180,8 @@ namespace vmsnet
|
||||
this.chk_lsb.Checked = PUB.CONFIG.lsb;
|
||||
this.tb_trashper.Text = PUB.CONFIG.trashper.ToString();
|
||||
this.tb_saveterm.Text = PUB.CONFIG.saveterm.ToString();
|
||||
this.tb_savetermCellInfo.Text = PUB.CONFIG.savetermcellinfo.ToString();
|
||||
|
||||
this.chk_2nddata.Checked = PUB.CONFIG.seconddata;
|
||||
this.chk_3rdData.Checked = PUB.CONFIG.thirddata;
|
||||
this.chk_4thData.Checked = PUB.CONFIG.getdata4;
|
||||
@@ -348,6 +350,25 @@ namespace vmsnet
|
||||
return;
|
||||
}
|
||||
|
||||
if (short.TryParse(this.tb_saveterm.Text, out short v_saveterm) == false)
|
||||
{
|
||||
UTIL.MsgE("저장주기를 입력하세요");
|
||||
this.tb_saveterm.Focus();
|
||||
return;
|
||||
}
|
||||
if (short.TryParse(this.tb_savetermCellInfo.Text, out short v_savetermCellInfo) == false)
|
||||
{
|
||||
UTIL.MsgE("셀정보 저장주기를 입력하세요");
|
||||
this.tb_savetermCellInfo.Focus();
|
||||
return;
|
||||
}
|
||||
if(short.TryParse(this.tb_trashper.Text, out short v_trashper) == false)
|
||||
{
|
||||
UTIL.MsgE("디스크 정리주기를 입력하세요");
|
||||
this.tb_trashper.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
//데이터베이스적용
|
||||
PUB.DS.Clear();
|
||||
PUB.DS.Merge(this.DocumentElement1);
|
||||
@@ -367,8 +388,10 @@ namespace vmsnet
|
||||
PUB.CONFIG.synctime = this.chk_synctime.Checked;
|
||||
PUB.CONFIG.databasefolder = this.tb_savepath.Text;
|
||||
PUB.CONFIG.lsb = this.chk_lsb.Checked;
|
||||
PUB.CONFIG.trashper = short.Parse(this.tb_trashper.Text);
|
||||
PUB.CONFIG.saveterm = short.Parse(this.tb_saveterm.Text);
|
||||
PUB.CONFIG.trashper = v_trashper;// short.Parse(this.tb_trashper.Text);
|
||||
PUB.CONFIG.saveterm = v_saveterm;// short.Parse(this.tb_saveterm.Text);
|
||||
PUB.CONFIG.savetermcellinfo = v_savetermCellInfo;// short.Parse(this.tb_savetermCellInfo.Text);
|
||||
|
||||
PUB.CONFIG.seconddata = this.chk_2nddata.Checked;
|
||||
PUB.CONFIG.thirddata = this.chk_3rdData.Checked;
|
||||
PUB.CONFIG.getdata4 = this.chk_4thData.Checked;
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<data name="bt_save.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAWfSURBVFhH7ZZrTFNnHMaZFu/Oy3QxE5cQk12yGS+oUbm0
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAWfSURBVFhH7ZZrTFNnHMaZFu/Oy3QxE5cQk12yGS+oUbm0
|
||||
WqWES6HQc3oDoqCACDjBTRCxjhF1uDjdCNOBMgzqFJB6w4EDKZeWm7QqKligBHFbsmTf9sFkybP8j3JG
|
||||
3zoU93VP8qTved/n/3venvRDPTz+1ziUd9Vj4cGfJCl51ZIbedUTOo03JH+RaU17wtlVj4Xs3H9W7jVP
|
||||
n7zrE4uP/jwfFV0haHXmwD58BEN/lAumNe3RGWUoSzMs57X0xdWJ+V/VzkPdw0QM/F6Ent8O4t6TXeh6
|
||||
@@ -263,7 +263,7 @@
|
||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||
@@ -278,7 +278,7 @@
|
||||
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||
@@ -623,7 +623,7 @@
|
||||
<data name="bt_remakelist.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAZPSURBVFhH7ZJrTFRnHsatvaXtZpveku1lm/RLP7SdghFZ
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAZPSURBVFhH7ZJrTFRnHsatvaXtZpveku1lm/RLP7SdghFZ
|
||||
15Tih03ELt0IzDlzgVK8FFbFWky7EWozbdNL2rCVRUS8UECwVooSUFRSRSwCMzADBRGYC2eYGeZ6zpxz
|
||||
hmGm2mzybN7jMpEDDNp+9Ul+Oe+85/9/nv/7zlm27K7u6g60umTw2ZSPTIUpe/rPpZSYjC/tMf2XQNbS
|
||||
3kemQlIj7/vdWlNiSkr50Fj9bo0Zp4c42LgopsTr4CI3EIzekNbmQBTtIzx21VlAateUGJLkPncunW75
|
||||
|
||||
@@ -14,6 +14,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using vmsnet;
|
||||
using System.Xml;
|
||||
|
||||
namespace vmsnet
|
||||
{
|
||||
@@ -47,10 +48,14 @@ namespace vmsnet
|
||||
public static DigitalIndicator indicator;
|
||||
public static int sleepoffset = 0; ////쓰레드슬립시간
|
||||
|
||||
/// <summary>
|
||||
/// 데이터를 수신받았는지 체크
|
||||
/// </summary>
|
||||
public static bool[,,] Received;
|
||||
/// <summary>
|
||||
/// 측정값(전압)이 들어있다(mcidx/unitno/chidx)
|
||||
/// </summary>
|
||||
public static int[,,] Values;
|
||||
public static int[,,] _Values;
|
||||
/// <summary>
|
||||
/// 측정값(시간)이 들어있다(mcidx/unitno/chidx)
|
||||
/// yyyy-MM-dd HH:mm:ss
|
||||
@@ -84,6 +89,7 @@ namespace vmsnet
|
||||
public static FMain mainWindow;
|
||||
public static DocumentElement DS = new DocumentElement();
|
||||
public static bool runerror = false; ////실행오류
|
||||
public static DateTime LastWindowCellinfoSaved = DateTime.Now;
|
||||
|
||||
|
||||
public static string lastStatueMessage = "";
|
||||
@@ -219,16 +225,17 @@ namespace vmsnet
|
||||
/// <returns></returns>
|
||||
public static bool AddMeasureValue(int mcidx, int unit, int ch, int value, string time)
|
||||
{
|
||||
var l0 = PUB.Values.GetUpperBound(0) + 1; //mc array size
|
||||
var l1 = PUB.Values.GetUpperBound(1) + 1; //unit array size
|
||||
var l2 = PUB.Values.GetUpperBound(2) + 1; //ch array size
|
||||
var l0 = PUB._Values.GetUpperBound(0) + 1; //mc array size
|
||||
var l1 = PUB._Values.GetUpperBound(1) + 1; //unit array size
|
||||
var l2 = PUB._Values.GetUpperBound(2) + 1; //ch array size
|
||||
|
||||
if (mcidx < l0 && unit < l1 && ch > 0 && ch <= l2)
|
||||
{
|
||||
try
|
||||
{
|
||||
PUB.Values[mcidx, unit, ch - 1] = value;
|
||||
PUB._Values[mcidx, unit, ch - 1] = value;
|
||||
PUB.Times[mcidx, unit, ch - 1] = time;
|
||||
PUB.Received[mcidx, unit, ch - 1] = true;
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -596,15 +603,22 @@ namespace vmsnet
|
||||
|
||||
public static void SaveGroupClass(HMI.CGROUP[] grous, System.IO.FileInfo fi)
|
||||
{
|
||||
|
||||
LastWindowCellinfoSaved = DateTime.Now;
|
||||
|
||||
////그룹정보를 파일로 직렬화저장
|
||||
try
|
||||
{
|
||||
if (fi.Directory.Exists == false) fi.Directory.Create();
|
||||
System.IO.FileStream fs2 = new System.IO.FileStream(fi.FullName, System.IO.FileMode.Create);
|
||||
|
||||
var tempfile = fi.FullName + ".temp";
|
||||
System.IO.FileStream fs2 = new System.IO.FileStream(tempfile, System.IO.FileMode.Create);
|
||||
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf2 = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
|
||||
bf2.Serialize(fs2, grous);
|
||||
fs2.Close();
|
||||
PUB.log.Add(AR.Log.ETYPE.NORMAL, "그룹정보파일 저장완료");
|
||||
System.IO.File.Copy(tempfile, fi.FullName, true);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -783,7 +797,9 @@ namespace vmsnet
|
||||
////master-K 231120 chi
|
||||
masterk = new arDev.MasterK();
|
||||
|
||||
indicator = new DigitalIndicator();
|
||||
//indicator = new DigitalIndicator();
|
||||
/* 작성자: 이재웅, 작성일: 2025-06-26, 작성내용: DigitalIndicator() 생성자의 인자로 (byte)PUB.CONFIG.indicator_slaveno 추가 */
|
||||
indicator = new DigitalIndicator((byte)PUB.CONFIG.indicator_slaveno);
|
||||
|
||||
////init Folder
|
||||
workmsg("Init Dir");
|
||||
|
||||
Reference in New Issue
Block a user