Help with Strings and hex

Wir bemühen uns Ihre Fragestellung zu beantworten.
Antworten
QMESAR
Beiträge: 28
Registriert: Donnerstag 16. April 2015, 12:17

Help with Strings and hex

Beitrag von QMESAR » Mittwoch 28. August 2024, 16:53

HI all
Please can you help me
ConversionExample.prj
(2.85 KiB) 52-mal heruntergeladen
I am truing to convert a dec number(0-255) into a Hex number that must be send with Serial
to an Controller as in the example attached convert 180dec to hex which is B4 however when I send it to the serial I get 1 byte for B and 1 byte for 4
thus instead of sending the oxB4 as one byte I have 2 bytes 0x0B and 0x04 .

What am I doing wrong please help me out
any help hints is appreciated
Regards

funkybaer
Beiträge: 468
Registriert: Mittwoch 22. Oktober 2008, 08:51
Wohnort: Kitzingen

Re: Help with Strings and hex

Beitrag von funkybaer » Donnerstag 29. August 2024, 09:35

Is this what you need ?

hex.jpg
hex.jpg (74.71 KiB) 1156 mal betrachtet

QMESAR
Beiträge: 28
Registriert: Donnerstag 16. April 2015, 12:17

Re: Help with Strings and hex

Beitrag von QMESAR » Freitag 30. August 2024, 16:12

Dear funkybaer

Thank you very much for your help this seems it will work,or is correct,I will give it a go next week when at work again. :D
much appreciated

Regards

Antworten

Zurück zu „PROFILAB SOFTWARE Support“