Browse Source

协议修改

样式分支
pry 2 years ago
parent
commit
ab598d6f7f
3 changed files with 4 additions and 4 deletions
  1. +2
    -2
      BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
  2. +1
    -1
      BPASmartClient.S7Net/SiemensHelper.cs
  3. +1
    -1
      DosingSystem/Model/DeviceInquire.cs

+ 2
- 2
BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs View File

@@ -351,7 +351,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
{ {
if (SiemensDevice.IsConnected) if (SiemensDevice.IsConnected)
{ {
return SiemensDevice.Siemens_PLC_S7.Read(Address);
return SiemensDevice.Siemens_PLC_S7.Read<object>(Address);
} }
else else
{ {
@@ -373,7 +373,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
{ {
if (HKDevice.IsConnected) if (HKDevice.IsConnected)
{ {
return HKDevice.HK_PLC_S7.Read(Address);
return HKDevice.HK_PLC_S7.Read<object>(Address);
} }
else else
{ {


+ 1
- 1
BPASmartClient.S7Net/SiemensHelper.cs View File

@@ -51,7 +51,7 @@ namespace BPASmartClient.S7Net


public void Write<TValue>(string address, TValue value) public void Write<TValue>(string address, TValue value)
{ {
myPlc?.Write(address, value);
if (IsConnected) myPlc?.Write(address, value);
} }


public TResult ReadClass<TResult>(int db, int startByteAdr = 0) where TResult : class, new() public TResult ReadClass<TResult>(int db, int startByteAdr = 0) where TResult : class, new()


+ 1
- 1
DosingSystem/Model/DeviceInquire.cs View File

@@ -98,7 +98,7 @@ namespace BPASmartClient.DosingSystem.Model


public void Init() public void Init()
{ {
//TestData();
TestData();
IpAddressLines(); IpAddressLines();
DeviceDataInit(); DeviceDataInit();
ThreadManage.GetInstance().StartLong(new Action(() => ThreadManage.GetInstance().StartLong(new Action(() =>


Loading…
Cancel
Save