|
@@ -82,7 +82,11 @@ namespace HKControl |
|
|
{ |
|
|
{ |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
if (!IsConnected) return default; |
|
|
|
|
|
|
|
|
if (!IsConnected) |
|
|
|
|
|
{ |
|
|
|
|
|
ExceptionDis(); |
|
|
|
|
|
return default; |
|
|
|
|
|
} |
|
|
return (TResult)myPlc?.Read(address); |
|
|
return (TResult)myPlc?.Read(address); |
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|