Datenkonvertierung Motorola(Big Endian) zu Intel(Little endian)

More
8 years 2 hours ago #119710 by andrax
Hallo,

ich muss jetzt das Thema doch noch mal auf machen.

Die Datenkonvertierung funktioniert und ich bekomme die Positionsdaten richtig angezeigt.
Wenn gewünscht, kann ich auch den Code hier einstellen, auch wenn er wahrscheinlich unter aller Sau ist.
Allerdings habe ich ein Anzeige bzw. Skalierungsproblem.

Ich bekomme beispielsweise einen Wert (float) 3775, was 3,775mm entspricht.
In Linuxcnc jedoch wird 3775.000 angezeigt, was 3775mm entspricht.

Wie kann ich das Korrigieren?

vielen Dank im Voraus.

Andre

Please Log in to join the conversation.

More
8 years 55 minutes ago #119715 by andypugh
Code:
pin out float out; ... out = (temp1 | temp2) /1000.0;

Please Log in to join the conversation.

More
7 years 11 months ago #119981 by andrax

Please Log in to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum