float: IEEE, big endian, little endian

E

Ernst Murnleitner

Dear readers,

Maybe someone can help:

I need to exchange data with a PLC. My computer (Linux on intel) uses the
intel format (little endian), the other device uses the motorola format (big
endian).

So I have to change the order of the bytes for "int". But for "float":

A) I do not know, if the order has also to be changed for float.

B) As the float datatype can have any format, is there a function in the
library to ensure, that I can get a 32bit IEEE floating point number?

Greetings
Ernst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top