|
@@ -1,7 +1,6 @@
|
|
|
using AdsCommunicatorNet8;
|
|
|
using Log;
|
|
|
using ProtocalGeneral;
|
|
|
-using TwinCAT.TypeSystem;
|
|
|
|
|
|
namespace PLCIOPointTool.Services;
|
|
|
|
|
@@ -53,13 +52,13 @@ public class PLCCommunicator : ICommunicator, ITcpConnectNority, IDisposable
|
|
|
|
|
|
public void GetValue(string symbolName, ValueType valueType)
|
|
|
{
|
|
|
- if(string.IsNullOrWhiteSpace(symbolName))
|
|
|
+ if (string.IsNullOrWhiteSpace(symbolName))
|
|
|
{
|
|
|
_log?.Error("Symbol name can not be null");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (!_isConnected)
|
|
|
+ if (!_isConnected)
|
|
|
{
|
|
|
_log?.Error("Client is in disconnected");
|
|
|
return;
|
|
@@ -108,7 +107,7 @@ public class PLCCommunicator : ICommunicator, ITcpConnectNority, IDisposable
|
|
|
|
|
|
public void SetValue(string symbolName, string inputValue, ValueType valueType)
|
|
|
{
|
|
|
- if(string.IsNullOrWhiteSpace(symbolName)|| string.IsNullOrWhiteSpace(inputValue))
|
|
|
+ if (string.IsNullOrWhiteSpace(symbolName) || string.IsNullOrWhiteSpace(inputValue))
|
|
|
{
|
|
|
_log?.Error("Symbol name or input value can not be null");
|
|
|
return;
|