提交
This commit is contained in:
@ -8,6 +8,7 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using DH.Commons.Base;
|
||||
using DH.Commons.Enums;
|
||||
using HslCommunication;
|
||||
using HslCommunication.Enthernet;
|
||||
@ -47,7 +48,7 @@ namespace DH.Devices.PLC
|
||||
OperateResult ret = TcpNet.ConnectServer();
|
||||
if (ret.IsSuccess)
|
||||
{
|
||||
connected = true;
|
||||
Connected = true;
|
||||
MonitorPieces();
|
||||
TurntableOpen(12000,true);
|
||||
|
||||
@ -382,13 +383,13 @@ namespace DH.Devices.PLC
|
||||
|
||||
public override bool PLCDisConnect()
|
||||
{
|
||||
if (connected)
|
||||
if (Connected)
|
||||
{
|
||||
TurntableStop();
|
||||
var res = TcpNet.ConnectClose();
|
||||
if (res.IsSuccess)
|
||||
{
|
||||
connected = false;
|
||||
Connected = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -442,7 +443,7 @@ namespace DH.Devices.PLC
|
||||
TimeSpan timeSpan = endTime - startTime;
|
||||
Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;
|
||||
//while (CurrentState != DeviceState.DSClose && CurrentState != DeviceState.DSExcept && CurrentState != DeviceState.DSUninit)
|
||||
while (connected)
|
||||
while (Connected)
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
uint tmpPieceNumber = 0;
|
||||
|
Reference in New Issue
Block a user