What's new
Van's Air Force

Don't miss anything! Register now for full access to the definitive RV support community.

Val 2kr RS-232 question

Does anyone have a VAL 2kr connected to a GRT Horizon or any other EFIS which is controlling a Val 2Kr and would be willing to test something for me?

I am having some issues calculating the checksum when sending an RS-232 message. What I am looking for is someone who is willing to make a quick DB15 Y cable with the serial lines broken out and connected to a terminal program. Then I am looking for the transmitted rs232 values from the EFIS to the radio. I realize this information is in the installation sheet, but I don't seem to be understanding the math correctly. If you are willing to help please message me, email me at brmitchell04 (at) g mail. com.

Thanks in advance,
Ben Mitchell
 
This also applies to Val Com 2000 radios which someone has on a bench and would be willing to do the same, only use the front knobs instead of an EFIS.
 
Last edited:
The spec says they conform to NMEA 0183. This is pretty commonly also used by GPS receivers, so you might be able to test your code against some example records like these ones on Wikipedia:

https://en.wikipedia.org/wiki/NMEA_0183#Sample_file

The documentation for the Val 2kr I found says:
The two-digit checksum is generated by adding all values of valid characters together, ignoring carry (if any)

My interpretation of this statement initially was to sum all bytes together, ignoring any bits higher than 255. What you're actually supposed to do is XOR each byte except the initial $ and the * immediately before the checksum hexadecimal bytes.

This python code will correctly calculate the checksums for the strings in the Wikipedia article:
Code:
strings = [
'GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,',
'GPGSA,A,3,10,07,05,02,29,04,08,13,,,,,1.72,1.03,1.38',
'GPGSV,3,1,11,10,63,137,17,07,61,098,15,05,59,290,20,08,54,157,30',
'GPGSV,3,2,11,02,39,223,19,13,28,070,17,26,23,252,,04,14,186,14',
'GPGSV,3,3,11,29,09,301,24,16,09,020,,36,,,',
'GPRMC,092750.000,A,5321.6802,N,00630.3372,W,0.02,31.66,280511,,,A',
'GPGGA,092751.000,5321.6802,N,00630.3371,W,1,8,1.03,61.7,M,55.3,M,,',
'GPGSA,A,3,10,07,05,02,29,04,08,13,,,,,1.72,1.03,1.38',
'GPGSV,3,1,11,10,63,137,17,07,61,098,15,05,59,290,20,08,54,157,30',
'GPGSV,3,2,11,02,39,223,16,13,28,070,17,26,23,252,,04,14,186,15',
'GPGSV,3,3,11,29,09,301,24,16,09,020,,36,,,',
'GPRMC,092751.000,A,5321.6802,N,00630.3371,W,0.06,31.66,280511,,,A']

for string in strings:
  cksum = 0
  for character in string:
    cksum ^= ord(character)
  print '$' + string + '*%02X' % cksum
 
Last edited:
Back
Top