|
|
|
@ -191,8 +191,8 @@ public class PlcMgr
|
|
|
|
|
{
|
|
|
|
|
if (PlcClient != null)
|
|
|
|
|
{
|
|
|
|
|
HostToPlc writeHostToPlc = new HostToPlc();
|
|
|
|
|
heart = !heart;
|
|
|
|
|
HostToPlc writeHostToPlc = new HostToPlc();
|
|
|
|
|
writeHostToPlc.CommunicationDiagnosis.Value = (ushort)(heart ? 1 : 0);
|
|
|
|
|
writeHostToPlc.Years.Value = (ushort)DateTime.Now.Year;
|
|
|
|
|
writeHostToPlc.Month.Value = (ushort)DateTime.Now.Month;
|
|
|
|
@ -201,7 +201,7 @@ public class PlcMgr
|
|
|
|
|
writeHostToPlc.Points.Value = (ushort)DateTime.Now.Minute;
|
|
|
|
|
writeHostToPlc.Seconds.Value = (ushort)DateTime.Now.Second;
|
|
|
|
|
|
|
|
|
|
bool write1 = PlcClient.WriteValue(writeHostToPlc.CommunicationDiagnosis);
|
|
|
|
|
bool write0 = PlcClient.WriteValue(writeHostToPlc.CommunicationDiagnosis);
|
|
|
|
|
bool write1 = PlcClient.WriteValue(writeHostToPlc.Years);
|
|
|
|
|
bool write2 = PlcClient.WriteValue(writeHostToPlc.Month);
|
|
|
|
|
bool write3 = PlcClient.WriteValue(writeHostToPlc.Day);
|
|
|
|
|