Skip to main content
10-Marble
February 21, 2025
Question

U-CON Seek_String hexadecimal

  • February 21, 2025
  • 1 reply
  • 1928 views

Good evening,

 

I'm currently working with U-CON (User configurable driver). Telegrams are in hexadecimal. I need to finf a chain of two bytes h90, h90. I can find each byte with "Seek Character" but I have no success by using "Seek String"

Corresponding character of h90 is not available so I cannot use the ASCII character.

I have tried with many format s( ASCII Hex String, Unicode string ..) without success.

 

Can you please help?

 

Thank you

 

Best regards

1 reply

14-Alexandrite
February 21, 2025

h90 is not a printable ASCII character, the printable ASCII falls between 0x20 to 0x7E in hexadecimal.

Since, Seek Character works on byte-level searching , might have given a success however Seek String is a text-based searching and as I mentioned earlier h90 is a non-printable byte.

Stephan_G10-MarbleAuthor
10-Marble
February 24, 2025

Thank you. Indeed h90 (144) is no a printable character but as far I understand from the manual the format "ASCII Hex String" can be used for this case? Do you confirm? If yes, do you know what should be the syntax ?

Stephan_G10-MarbleAuthor
10-Marble
February 25, 2025

Hello,

The telegram to be decoded is a 10 bytes hexadecimal string: 

- Byte #1: Status: h90 for valid data, h91 for reduced performance data, hA1 for invalid data

- Byte#2: Header: h90

- Byte3&4: 16 bit interger data

- Byte5&6: 16 bit interger data

- Byte7&8: 16 bit interger data

- Byte9&19: 16 bit interger data

As you see, this srting as no delimiter. As it is sent continusly, I capture 20 butes and I researche these three possible strings:

- h90 h90

- h91 h90

- hA1 h90

 

See attached the captures of the messages in hexadecimal and ASCII (ASCII is useless)

See attached the correspnoding Kepware project. For now, I use "Seek character" but it would be much safer to use "Seek string" because any of these 3 hexadecimal values (h90, h91, hA1) could be part of the data.

Here the recorded messages start with h90 h90. This is a chance but I have seen the message shifted and these two character can shift at the middle of the message.

I think "Seek string" can be used with the format "ASCII Hex characters" but I can't find the proper syntax.

 

Thank you very much for your support

Stephan