ASCII characters to HEX

Christie Widget Designer Version 6 - Q&A

Moderator: Moderator Group

Forum rules
When asking make sure to include the operating system and the revision of Widget Designer you are using.

ASCII characters to HEX

Postby tom0101 » Tue Jun 04, 2019 6:00 pm

Hi,

i am looking for a solution to automatically convert ASCII characters to HEX code.
Like the "VReplaceASCIINumberByHexCode" command, but including characters and not only numbers.

Why?
I want to control a Denon DN700C via TCP and need to calcuate a checksum depending on a fader's volume value.

Description from the manual:
If you change the command parameter from the sample command below, you have to pay attention to change the Check Sum data in the command. The calculation is to add all bytes from the ‘Format’ code to ‘Parameter Pack’ code. For example, in case of CUE TIM 000:05;67 command, Check Sum is the 0x1f8 (0x11 + 0x01 + 0x00 + 0x00 + 0x06 + 0x09 + 0x30 + 0x30 + 0x30 + 0x3a + 0x30 + 0x35 + 0x3b + 0x36 + 0x37, 5th to 19th code). You use 1 byte (0xf8), the Check Sum code is ‘f’ (ASCII code is 0x46) and ‘8’ (ASCII code is 0x38). So, command codes are;
0xF0,0x00,0x40,0x03,0x11,0x01,0x00,0x00,0x06,0x09,0x30,0x30,0x30,0x3a,0x30,0x35,0x3b,0x36,0x37,0x46,0x38,0xF7
tom0101
 
Posts: 2
Joined: Wed Jan 18, 2012 10:46 am

Re: ASCII characters to HEX

Postby Thomas Mrozek » Thu Sep 05, 2019 3:19 pm

Hi.

Unfortunately, there is currently no script available to have this conversion directly, it is on the feature wishlist.

The workaround is to import an ascii table and program your own script to calculate Hex values. A ListView item can maybe help to make the workaround a little bit better. I know it is a huge workaround, but this currently is the only way to solve that request.

cheers
Thomas
Thomas Mrozek
Technical Support Engineer
User avatar
Thomas Mrozek
 
Posts: 113
Joined: Mon Apr 20, 2009 11:08 am


Return to Widget Designer V6

Who is online

Users browsing this forum: No registered users and 2 guests