<div class="gmail_quote">On Tue, Jun 12, 2012 at 11:51 AM, Svenn Are Bjerkem <span dir="ltr"><<a href="mailto:svenn.bjerkem@googlemail.com" target="_blank">svenn.bjerkem@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I have an ASCII log file from an Agilent logic analyzer which gives me<br>
hedadecimal numbers in signed 12-bit format from a quadrature ADC.<br>
1,fff,002,001,ffe<br>
0,ffe,fff,000,fff<br>
1,000,001,fff,ffe<br>
0,fff,ffd,000,001<br>
....<br>
<br>
The first column is indicating I (1) or Q (0) and the following values<br>
are the 12-bit data values from four ADCs operating in parallell using<br>
the same clock.<br>
<br>
So far I have used an awk script to extract all I-lines and Q-lines<br>
separately and convert them to signed decimal and write to two files<br>
and then read those two files into kst2. I wonder if there is a way<br>
inside kst to sample every line starting with 0 and put into one<br>
vector, and then sample every line starting with 1 and put into<br>
another vector. The next thing is the conversion of fff to -1 and so<br>
on. Usually hexadecimal numbers are prefixed with 0x, but that is not<br>
done by this Agilent device.<br>
<br>
I have a workaround through the awk script, but I wonder if this kind<br>
of number filtering and conversion is already available in kst, or if<br>
it is something I can write a plugin to achieve. </blockquote><div><br></div><div>A plugin could be written.  On the other hand...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Advantage would be to<br>
have the logic analyzer stream the data on a network connection<br>
directly into kst.<br></blockquote><div><br></div><div>You could probably achieve this with "tail -f" supplying your awk script, like</div><div><br></div><div>% tail -f file_Agilent_Is_Dumping_To.dat | awk yourcommand.awk > ascii_file.dat &</div>
<div>% kst ascii_file.dat -n 100 -y 1 -y 2</div><div> </div><div>This should give you happy real-time kst fun.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

In case somebody wonders why I don't use signed decimal representation<br>
on the logic analyzer, it is because the same data will be used in a<br>
VHDL testbench which is optimized for reading the 12-bit numbers on<br>
exactly this format.<br>
<br>
I am using kst 2.0.3 as that is the latest version available in Debian unstable.</blockquote><div><br></div><div>You will have a far far better experience with kst 2.0.5</div><div><br></div><div>We should look into getting that package into debian!</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
--<br>
Svenn<br>
_______________________________________________<br>
Kst mailing list<br>
<a href="mailto:Kst@kde.org">Kst@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kst" target="_blank">https://mail.kde.org/mailman/listinfo/kst</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136,136,136)">C. Barth Netterfield<br>University of Toronto<br>
416-845-0946</span><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136,136,136)"><br></span></div><br>