Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert High bytes and Low bytes in U16

An electronics device send me U16 data. On the serial port I read bytes. How can I transform this array of bytes that contains both the high and low bytes of the data in U16 ?

thanks,
0 Kudos
Message 1 of 3
(3,390 Views)
Il suffit d'utiliser la fonction "Chaine hexadécimale en nombre", en spécifiant une commande de représentation U16 sur l'entrée "valeur par défaut".
la conversion est immédiate.
Cf Vi ci-joint.

Cordialement

Frédéric BOULLOT
Ingénieur d'Applications
NIF
0 Kudos
Message 2 of 3
(3,390 Views)
Merci,

Cela resoud une partie de mon probleme. Au final je dois avoir un Array de 256 U16 a partir d'une string de 512 bytes.
0 Kudos
Message 3 of 3
(3,390 Views)