You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "Christofer Dutz (Jira)" <ji...@apache.org> on 2020/07/23 20:53:00 UTC

[jira] [Resolved] (PLC4X-78) Write operations seem to fail

     [ https://issues.apache.org/jira/browse/PLC4X-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christofer Dutz resolved PLC4X-78.
----------------------------------
    Resolution: Fixed

> Write operations seem to fail
> -----------------------------
>
>                 Key: PLC4X-78
>                 URL: https://issues.apache.org/jira/browse/PLC4X-78
>             Project: Apache PLC4X
>          Issue Type: Bug
>          Components: Driver-S7
>    Affects Versions: 0.2.0
>            Reporter: Christofer Dutz
>            Assignee: Christofer Dutz
>            Priority: Major
>
> It seems the code for writing data to S7 is flawed.
> While the following code works:
>  
> {code:java}
> builder.addItem("builds1", "%DB1.DBX0.0:BOOL", false);
> builder.addItem("builds2", "%DB1.DBX0.1:BOOL", false);
> builder.addItem("builds3", "%DB1.DBX0.2:BOOL", false);
> builder.addItem("builds4", "%DB1.DBX0.3:BOOL", false);
> builder.addItem("builds5", "%DB1.DBX0.4:BOOL", false);
> {code}
> This doesn't:
>  
>  
> {code:java}
> builder.addItem("byte", "%DB1.DBB0:BYTE", (byte) 0x15);
> {code}
> Here no error is produced internally, but the S7 returns the return code is "Data type inconsistent (0x07)"
> And this doesn't work either:
>  
> {code:java}
> builder.addItem("byte", "%DB1.DBX0.0:BOOL[5]", true, false, true, false, true);
> {code}
> Here a NullPointerException is thrown in DefaultS7MessageProcessor.getMergedResponseMessage(DefaultS7MessageProcessor.java:410)
> I guess it tries to merge the payload return data but for write requests, the payload doesn't contain any data. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)