You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using BPASmartClient.Helper;
- using BPASmartClient.Modbus;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using BPASmartClient.S7Net;
- using BPASmartClient.CustomResource.Pages.Model;
- using System.Threading;
-
- namespace BPASmartClient.DosingHKProject.Model.HK_PLC
- {
- public class HKDeviceStatus
- {
- public SiemensHelper HK_PLC_S7 = new SiemensHelper();
- public bool IsConnected => HK_PLC_S7.IsConnected;
- public void Init()
- {
- if (IsConnected)
- {
- ThreadManage.GetInstance().StartLong(new Action(() =>
- {
- var res = this.HK_PLC_S7.ReadClass<HKPlcCommRead>(1);
- if (res != null && res is HKPlcCommRead data)
- {
- GVL_SmallStation.GetInstance.plcRead = data;
- }
- Thread.Sleep(10);
- }),"信号交互");
- }
- }
- }
- }
|