Author Topic: Multipel telegram datastring  (Read 5588 times)

Martin s.

  • Guest
Multipel telegram datastring
« on: December 02, 2014, 01:09:26 PM »
I need some held to setup the Can rx with datamask function. I get a datastring consisting of 5 telegrams sent with the same id. The first byte gives the order I the row. 
It looks like this?
40   22   C2   88   AC   BA   3   0
41   B0   AC   20   28   F8   43   63
42   24   63   24   0   0   0   0
43   1   0   0   0   D4   97   67
44   23   70   4E   EB   0A   0   0
60   22   C3   88   AC   BA   3   0
61   40   94   35   28   F8   43   63
62   24   63   24   0   0   0   0
63   1   0   0   0   D4   97   67
64   23   70   4E   EB   0A   0   0
80   22   C4   90   AC   BA   3   0
81   10   82   10   21   7   42   63
82   24   63   24   0   0   0   0
83   1   0   0   0   D4   97   67
84   23   70   4E   EB   0A   1   0
A0   22   C5   90   AC   BA   3   0
A1   E0   13   4D   28   F8   43   63
A2   24   63   24   0   0   0   0
A3   1   0   0   0   D4   97   67
A4   23   70   4E   EB   0A   0   0
C0   22   C6   90   AC   BA   3   0
C1   F0   FE   56   28   F8   43   63
C2   24   63   24   0   0   0   0
C3   1   0   0   0   D4   97   67
C4   23   70   4E   EB   0A   0   0
E0   22   C7   A0   AC   BA   3   0
E1   FF   FF   FF   FF   FF   FF   63
E2   24   63   24   0   0   0   0
E3   1   0   0   0   D4   97   67
E4   23   70   4E   EB   0A   0   0
0   22   C8   A8   AC   BA   3   0
1   90   2B   67   28   F8   43   63
2   24   63   24   0   0   0   0
3   1   0   0   0   D4   97   67
4   23   70   4E   EB   0A   0   0

I hope this makes my issue clear ::)
« Last Edit: December 03, 2014, 10:07:49 AM by Martin s. »

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: Multipel telegram datastring
« Reply #1 on: December 03, 2014, 08:25:02 AM »
Hi Martin

You could use the divide and modulo components to keep track of the datasets, and then store values in an array with 35 positions.
This way you can also make an error check and only update if all 5 telegrams has been retrieved.

I hope this helps you onward :)

Hilsen Jakob.

Martin s.

  • Guest
Re: Multipel telegram datastring
« Reply #2 on: January 21, 2015, 09:14:54 AM »
If any body else needs to do this, here is how setup ended op looking like