Skip to content

Commit 9ada340

Browse files
committed
fix bug
Fix a bug on timestamp in itag
1 parent 80227ac commit 9ada340

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
463 KB
Binary file not shown.

SCADA/Program/DataService/ITag.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public override int Write(object value)
211211
temp = Convert.ToBoolean(value);
212212
else if (!Boolean.TryParse(str, out temp))
213213
return -1;
214-
_timeStamp = DateTime.Now;
214+
//_timeStamp = DateTime.Now;
215215
return _group.WriteBit(_plcAddress, temp);
216216
}
217217

@@ -280,7 +280,7 @@ public override int Write(object value)
280280
temp = Convert.ToByte(value);
281281
else if (!Byte.TryParse(str, out temp))
282282
return -1;
283-
_timeStamp = DateTime.Now;
283+
//_timeStamp = DateTime.Now;
284284
return _group.WriteBits(_plcAddress, temp);
285285
}
286286

@@ -349,7 +349,7 @@ public override int Write(object value)
349349
temp = Convert.ToInt16(value);
350350
else if (!short.TryParse(str, out temp))
351351
return -1;
352-
_timeStamp = DateTime.Now;
352+
//_timeStamp = DateTime.Now;
353353
return _group.WriteInt16(_plcAddress, temp);
354354
}
355355

@@ -418,7 +418,7 @@ public override int Write(object value)
418418
temp = Convert.ToUInt16(value);
419419
else if (!ushort.TryParse(str, out temp))
420420
return -1;
421-
_timeStamp = DateTime.Now;
421+
//_timeStamp = DateTime.Now;
422422
return _group.WriteUInt16(_plcAddress, temp);
423423
}
424424

@@ -486,7 +486,7 @@ public override int Write(object value)
486486
temp = Convert.ToInt32(value);
487487
else if (!int.TryParse(str, out temp))
488488
return -1;
489-
_timeStamp = DateTime.Now;
489+
//_timeStamp = DateTime.Now;
490490
return _group.WriteInt32(_plcAddress, temp);
491491
}
492492

@@ -554,7 +554,7 @@ public override int Write(object value)
554554
temp = Convert.ToUInt32(value);
555555
else if (!uint.TryParse(str, out temp))
556556
return -1;
557-
_timeStamp = DateTime.Now;
557+
//_timeStamp = DateTime.Now;
558558
return _group.WriteUInt32(_plcAddress, temp);
559559
}
560560

@@ -623,7 +623,7 @@ public override int Write(object value)
623623
temp = Convert.ToSingle(value);
624624
else if (!float.TryParse(str, out temp))
625625
return -1;
626-
_timeStamp = DateTime.Now;
626+
//_timeStamp = DateTime.Now;
627627
return _group.WriteFloat(_plcAddress, temp);
628628
}
629629

@@ -699,7 +699,7 @@ public override int Write(object value)
699699
{
700700
if (value == null) return -1;
701701
var str = (value is String) ? (String)value : value.ToString();
702-
_timeStamp = DateTime.Now;
702+
//_timeStamp = DateTime.Now;
703703
return _group.WriteString(_plcAddress, str);
704704
}
705705

SCADA/dll/DataService.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)