Reading log files of current

We’re able to monitor PDP current and log it (have 2015 DS, roboRIO and PDP with latest firmware (Rev 1.4 from http://crosstheroadelectronics.com/control_system.html) with CAN connected between them) and we see the log file created when the robot is disabled following an enabled period. This log file is in C:\Users\Public\Documents\FRC\Log Files with the extension .pdplog. Problem is, we’re having trouble finding a way to read the file? Is there a reader we need to download?

The reader for the .pdplog hasn’t been released yet.

If you instantiate a PowerDistributionPanel object (I know you can do this in Java and C++, but I don’t know about Labview), you can access the current of individual channels as well as the total current in real time.

Well that’s a bummer. I thought the ability to log current was one of the big marketing points about this new roboRIO and PDP?

[quote]If you instantiate a PowerDistributionPanel object … you can access the current of individual channels as well as the total current in real time. /QUOTE]

We use labview - our programmer’s able to display the individual currents in real time - didn’t know we could display total current? I’d considered asking him to sum all the individual together or something like that and display the sum but if there’s an easier way that’s inherent to labview - can anyone advise on that?

Looking at instantaneous current values is better than nothing, but it’ll really be nice to be able to look at a log after the fact. Any advice?[/quote]

You might consider saving the current values to your own log file every couple second or milliseconds. Probably best to use a csv or tab delimited format, then you could put it into a spreadsheet program and possibly graph the data there.

have your programmers read the current during the match and write a file on the roboRIO?

My understanding is that the log viewer will be released after week 1.

Has the spec for the .pdplog file format been released?

Is the file human-readable?

It would appear that it isn’t, but I haven’t tried too much.
Here’s a link to one of ours https://drive.google.com/file/d/0BzfxWVZUp3DNV1ZOTWMydFpQRVU/view?usp=sharing

Can logging be disabled? It’s quite useless as it is now, and we end up in a bad state if we enable and disable quickly, which I believe is the log file being sent over.

The PDP firmware update (1.40) addresses this bug.

Uh yeah. Here’s all the text extracted:

Xn Wn Vn Un Tn Sn Rn Qn Pn On Nn Mn Ln Kn Jn In Hn Gn Fn En Dn Cn Bn An AD AE
AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ Aa Ab Ac Ad Ae
Af Ag Ah Ai Aj Ak Al Am CTWAT ww tfp CTWAT wv rjq CTWAT wu iw CTWAT wt CTWAT ws
g CTWAT wr Zf CTWAT wq te CTWAT wq Ye CTWAT wp CTWAT wo CTWAT wn CTWAT wm CTWAT
wl CTWAT wl CTWAT wk CTWAT wj CTWAT wi CTWAT wh Oa CTWAT wg CTWAT wg CTWAT wf
xa CTWAT we CTWAT wd CTWAT wc CTWAT wb CTWAT wb CTWAT wa CTWAT CTWAT CTWAT
CTWAT CTWAT mX CTWAT CTWAT wZ CTWAT wY CTWAT wX CTWAT wW CTWAT wW CTWAT wV
CTWAT wU CTWAT wT WC CTWAT wS QVI CTWAT wR mUO CTWAT wR UR MS CTWAT wQ VV CTWAT
wP CTWAT wO Tb CTWAT wN Sh CTWAT wM Rn CTWAT wM Rr CTWAT wL Su CTWAT wK CTWAT
wJ CTWAT wI DQ CTWAT wH CTWAT wH CTWAT wG oQ CTWAT wF CTWAT wE CTWAT wD CTWAT
wC CTWAT wB CTWAT wA CTWAT CTWAT CTWAT UK CTWAT mH CTWAT KH CTWAT zI CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT ED CTWAT CTWAT CTWAT oD CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT KE CTWAT KJ CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT KE CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT wH
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT qH CTWAT CTWAT CTWAT HY
CTWAT MHr CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT CTWAT CTWAT jF CTWAT CTWAT pA bP CTWAT PA PB rs CTWAT CTWAT CTWAT
BC AX CTWAT tP CTWAT ppA CTWAT PC pC eS PD CTWAT bX CTWAT CTWAT ub CTWAT CTWAT
w Uk Ql VJm mQn CTWAT vs QA CTWAT CTWAT PB CTWAT PB CTWAT EK fM CM YM CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT
CTWAT CTWAT NE YF CTWAT bJ WA pL CTWAT bf CTWAT TB CTWAT CTWAT CTWAT bXq CTWAT
w bE Vt CTWAT hpB CTWAT CTWAT UT CTWAT CTWAT bl CTWAT wz QB CTWAT wy JL CTWAT
wx CTWAT ww CTWAT wv CTWAT wv CTWAT wu Ow dtA CTWAT wt bQ xP CTWAT ws bm pN
CTWAT wr CTWAT wq CTWAT wq CTWAT wp CTWAT wo CTWAT wn EEA LD SC ed CTWAT wm VI
v CTWAT wl pE CTWAT wk CTWAT wk PF CTWAT wj bH CTWAT wi bb bd CTWAT wh Yh CTWAT
wg Go Jp CTWAT wf CTWAT wf Yu CTWAT we Oy TXz CTWAT wd cK CTWAT wc aL ch CTWAT
wb QJ tPH CTWAT wa pH CTWAT wa bc TpA CTWAT tA CTWAT bS Qi CTWAT bo CTWAT CTWAT
w CTWAT CTWAT pA CTWAT wZ ht AZ PA QN CTWAT wY CTWAT wX pA CTWAT wW CTWAT wV
CTWAT wV PB CTWAT wU bG CTWAT wT ba CTWAT wS PC PG CTWAT wR sa CTWAT wQ CTWAT
wQ pI HF CTWAT wP CTWAT wO EK CTWAT wN SH CTWAT wM CTWAT wL CTWAT wL bv SJ
CTWAT wK CTWAT wJ bV CTWAT wI bp Jg CTWAT wH CTWAT wG jH CTWAT wG JI CTWAT wF
CTWAT wE MA bB JD CTWAT wD UF CTWAT wC FN CTWAT wB NS CTWAT wB CTWAT wA CTWAT
Ia uHb aIc MId CTWAT If Gg Gh CTWAT Gl Fm Io Gp CTWAT Uv CTWAT CTWAT CTWAT DJ
CTWAT bU CTWAT bo CTWAT CTWAT CTWAT IH oQ CTWAT dI PH CTWAT CTWAT pA CTWAT
CTWAT CTWAT pI CTWAT PD CTWAT bH CTWAT bd CTWAT hK CTWAT CTWAT bS bb CTWAT
CTWAT YQ CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT CTWAT bV iG UF CTWAT br CTWAT
CTWAT CTWAT PA CTWAT CTWAT LF CTWAT CTWAT PB xf CTWAT CTWAT CTWAT CTWAT bJ
CTWAT bf LP uLP CTWAT TP WU Lr CTWAT CTWAT bf CTWAT CTWAT Df CTWAT Vm In Fo
CTWAT Gq sFr Gs nGt ZDu CTWAT Qy CTWAT bK ve CTWAT PB WP CTWAT XJ CTWAT bY
CTWAT bs CTWAT CTWAT CTWAT PC dC CTWAT PC PbMB CTWAT CTWAT xO CTWAT OO CTWAT nE
zE rF CTWAT HG pB CTWAT bO CTWAT bi CTWAT CTWAT CTWAT CTWAT HI CTWAT CTWAT w b

For fun, I started reverse engineering the file to see what I can see. Here’s a snippet of the file displayed as hex:

(exported from frhed, and trimming off the first 0x14 bytes on a hunch (I think it’s the header))


4bb98a019cf804b3030243545741540011776c0100000000000000000000000000621d27
4ca99d01000000000008300080030000c04003278cd0400403ae0000000000000000d55e
4da9b001000000000008000080030000c040031a4480810d03a70000000000000000f8b9
4ea9c301000000000008000080030000c04003100070451403a7000000000000000064cd
4fa9d601000000000008300080030000c040030f0020c20803ad0000000000000000a323
50a9e901000000000008300080030000c040032ea030010503ae0000000000000000b0f6
51b9eb019cf884b3030243545741540011776b0100000000000000000000000000623726
52b906009cf884b3030443545741540011776b0100000000000000000000000000621b26
53a90600000000000008000080034f005046030f0020810603a900000000000000000126
54a91a00000000000000000080031900c0410334a800030b03a100000000000000008830
55a92d00000000000008000080031b00b04103133030031303a50000000000000000fa0d
56a94000000000000008000080031b00b041030f0070030b03a9000000000000000016d6
57a95300000000000008000080033500b042030f0020030e03a40000000000000000e826

I see two different kinds of record here. The first 4 bytes looks like a timestamp to me (reverse the byteorder (little-endian))
018ab94b
019da94c
01b0a94d

I’ve also been looking for floating point numbers (put a 4 byte likely candidate into an IEEE-754 calculator to see if it’s a meaningful number).
My guess is that it’s recording low resolution data quickly, or it’s higher resolution data very quickly and they are multiplexing the current sensing.

I’m still trying to make sense of it. It would be super helpful to have a file from a robot under known conditions. Something like


power up
disabled for 30s
start teleop, but do nothing for 10s
run a motor on channel 1 forward and back in 5s intervals for 30s
run a motor on channel 2 forward for 5s
ch3 for 5s, etc
disabled
power off

I’ll poke for a little while longer and maybe try to get a file off the robot at comp, but I probably won’t have it decoded by the time a viewer is released.

I know the OP wasn’t looking for a research project, but this is an interesting type of problem that can be solved with a little testing.