[
https://issues.apache.org/jira/browse/PLC4X-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17380538#comment-17380538
]
Christofer Dutz commented on PLC4X-154:
---------------------------------------
Hi Mauro,
I could have sworn that's exactly how we do it? If it's not directly supported
we fallback to byte-array reading ... But having a look ... I think it might be
that some PLCs support 0x30 and some don't ... would be good to know what type
of S7 are you using? I know not all versions support all codes. So perhaps
going back to byte arrays is the more portable version. I wouldn't think using
0x08 is ideal because this implies information on how to interpret the bytes
too, which isn't scalable to 8 bytes (number of sign, mantissa and exponent
values). So perhaps using BYTE = 0x02 instead would be the better option.
Chris
> Reading LREAL from S7 causes PlcRuntimeException
> ------------------------------------------------
>
> Key: PLC4X-154
> URL: https://issues.apache.org/jira/browse/PLC4X-154
> Project: Apache PLC4X
> Issue Type: Bug
> Affects Versions: 0.4.0
> Environment: S7-1500 PLC
> Reporter: Sebastian Wiendl
> Priority: Major
>
> Reading an LREAL in my demo project
> https://github.com/sewiendl/plc4j-demo/tree/feature/read-lreal causes the
> following
> exception:{code}org.apache.plc4x.java.api.exceptions.PlcRuntimeException:
> Field 'LReal' could not be fetched, response was INVALID_DATATYPE
> at
> org.apache.plc4x.java.base.messages.DefaultPlcReadResponse.getFieldInternal(DefaultPlcReadResponse.java:577)
> at
> org.apache.plc4x.java.base.messages.DefaultPlcReadResponse.getObject(DefaultPlcReadResponse.java:81)
> at com.example.plc4jdemo.Main.main(Main.java:39){code}The field was
> added with {code} builder.addItem("LReal",
> "%DB101.DBX110:LREAL");{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)