优化西门子字符串写入
This commit is contained in:
parent
7572bb69ee
commit
0fadf1f0cd
@ -289,7 +289,9 @@ namespace DriverSiemensS7
|
|||||||
//通用方法
|
//通用方法
|
||||||
if (method == nameof(Read))
|
if (method == nameof(Read))
|
||||||
{
|
{
|
||||||
plc?.Write(ioarg.Address, toWrite);
|
var dataItem = DataItem.FromAddress(ioarg.Address);
|
||||||
|
//plc?.Write(dataItem.DataType, dataItem.DB, dataItem.StartByteAdr + 1, ((byte[])toWrite).Length);
|
||||||
|
plc?.Write(dataItem.DataType, dataItem.DB, dataItem.StartByteAdr + 2, toWrite);
|
||||||
|
|
||||||
rpcResponse.IsSuccess = true;
|
rpcResponse.IsSuccess = true;
|
||||||
return rpcResponse;
|
return rpcResponse;
|
||||||
|
Loading…
Reference in New Issue
Block a user