You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the library treats FINS_DATA_TYPE_INT32, FINS_DATA_TYPE_UINT32, FINS_DATA_TYPE_BCD32, FINS_DATA_TYPE_SBCD32_0, FINS_DATA_TYPE_SBCD32_1, FINS_DATA_TYPE_SBCD32_2, FINS_DATA_TYPE_SBCD32_3, FINS_DATA_TYPE_FLOAT exactly the same when requesting data from the PLC.
I cannot understand why using seemingly absolute offsets fins_cmnd.body[0]? this should also take bodylen into account or perhaps use pointer arithmetic to move fins_cmnd.body?
am I missing something?
The text was updated successfully, but these errors were encountered:
helle @lammertb
after some testing we noticed that libfins is seemingly broken for
float
anddouble
In libfins at
libfins/src/fins_01_04.c
Lines 185 to 217 in 91e9aa4
the library treats FINS_DATA_TYPE_INT32, FINS_DATA_TYPE_UINT32, FINS_DATA_TYPE_BCD32, FINS_DATA_TYPE_SBCD32_0, FINS_DATA_TYPE_SBCD32_1, FINS_DATA_TYPE_SBCD32_2, FINS_DATA_TYPE_SBCD32_3, FINS_DATA_TYPE_FLOAT exactly the same when requesting data from the PLC.
However, during decoding:
(this seems correct for e.g. uint32)
but broken here:
libfins/src/fins_01_04.c
Lines 333 to 344 in 91e9aa4
I cannot understand why using seemingly absolute offsets
fins_cmnd.body[0]
? this should also takebodylen
into account or perhaps use pointer arithmetic to movefins_cmnd.body
?am I missing something?
The text was updated successfully, but these errors were encountered: