Apr-20-2017, 11:02 PM
Hi,
Dealing with some python at my work and having a little trouble writing a good script.
I have a txt file with a bunch of Hexadecimal data (1000's lines), e.g 2 frames shown below
AA08430022 AA08410234
The first 2 bytes of each 'frame' is the timestamp signal (in this case AA08). The rest of the frame (3 bytes) is the actual data.
I need to separate the data so that the timestamps can be in their own list and the data can be separated into 3 bins. This data needs to all be linked together at the end so that it is all sequential.
I need to get to a situation where this data is in a csv file in the following way:
COL BIN1 BIN2 BIN3
timestamp(frame1) data(frame1) data(frame1) data(frame1)
timestamp(frame2) data(frame2) data(frame2) data(frame2)
I'm not sure how to go about doing this.
Not expecting any solution but advice what direction to go in would be great as I'm at a dead end.
Thanks
Dealing with some python at my work and having a little trouble writing a good script.
I have a txt file with a bunch of Hexadecimal data (1000's lines), e.g 2 frames shown below
AA08430022 AA08410234
The first 2 bytes of each 'frame' is the timestamp signal (in this case AA08). The rest of the frame (3 bytes) is the actual data.
I need to separate the data so that the timestamps can be in their own list and the data can be separated into 3 bins. This data needs to all be linked together at the end so that it is all sequential.
I need to get to a situation where this data is in a csv file in the following way:
COL BIN1 BIN2 BIN3
timestamp(frame1) data(frame1) data(frame1) data(frame1)
timestamp(frame2) data(frame2) data(frame2) data(frame2)
I'm not sure how to go about doing this.
Not expecting any solution but advice what direction to go in would be great as I'm at a dead end.
Thanks
my code here