slimplynth
Senior Member
Someone might find this useful...
Because (tbh) i'm no good with VB.net yet.
I've been outputting sertxd data, collected from my RF data logger as XML to use with HTML or Excel.
suppose there could be a push switch command to terminate the program with an </xml_dl> tag. (NB im well aware how shoddy my clock is, it's ignored later as i only use it really to slow down the program... i plan to replace this with the digital IC clock when i get my birthday order with rev-ed completed... like many others i want the 20X2 though )
I open the picaxe terminal screen and copy the input buffer and paste into a txt file, goto the end and insert the </xml_dl> tag. Then save the txt file as overnight_data.xml.. as thats what it's called in the HTML below.
clickin on the saved html file above should give a nice table of results, if the xml data file is too long then explorer will moan about how long it's going to take.
either that or just use excel to open the xml file directly.
Because (tbh) i'm no good with VB.net yet.
I've been outputting sertxd data, collected from my RF data logger as XML to use with HTML or Excel.
Code:
init:
symbol ok_led = 0
pause 10000
sertxd(60,"xml_dl",62,13,10)
main:
for w0=1 to 365
for b2=0 to 23
for b3 = 0 to 59
for b4 = 0 to 5
high ok_led
b5=b4*10
w4=w4+1
pause 9120 'wait ten seconds
serin 2,N2400,("data"),b6
low ok_led
let b6=b6-3
sertxd(60,"num",62,#w4,13,10)
sertxd(60,"time",62,#b2,":",#b3,":",#b5,60,47,"time",62,13,10)
sertxd(60,"day",62,#w0,60,47,"day",62,13,10)
sertxd(60,"temp",62,#b6,60,47,"temp",62,13,10)
sertxd(60,47,"num",62)
sertxd(13,10,13,10)
next b4
next b3
next b2
next w0
goto main
I open the picaxe terminal screen and copy the input buffer and paste into a txt file, goto the end and insert the </xml_dl> tag. Then save the txt file as overnight_data.xml.. as thats what it's called in the HTML below.
Code:
<xml_dl>
example data output from terminal
<num>1
<time>0:18:20</time>
<day>1</day>
<temp>20</temp>
</num>
<num>2
<time>0:18:30</time>
<day>1</day>
<temp>20</temp>
</num>
Code:
<html>
<head>
</head>
<body>
<script type="text/javascript">
var xmlDoc=null;
if (window.ActiveXObject)
{// code for IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation.createDocument)
{// code for Mozilla, Firefox, Opera, etc.
xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Your browser cannot handle this script');
}
if (xmlDoc!=null)
{
xmlDoc.async=false;
xmlDoc.load("overnight_data.xml");
var x=xmlDoc.getElementsByTagName("num");
document.write("<table border='1'>");
document.write("<thead>");
document.write("<tr><th>Reading</th><th>temp</th></tr>");
document.write("</thead>");
for (var i=0;i<x.length;i++)
{
var w=i+1
document.write("<tr>");
document.write("<td>");
document.write([w]);
document.write("</td>");
document.write("<td>");
document.write(x[i].getElementsByTagName("temp")[0].childNodes[0].nodeValue);
document.write("</td>");
document.write("</tr>");
}
document.write("</table>");
}
</script>
</body>
</html>
either that or just use excel to open the xml file directly.