Data to Computer?

Is it possible to instantly download data from my datalogger to my PC when it records each piece of data?

If so, can someone please tell me how to do it.
 

ylp88

Senior Member
You can add a &quot;SEROUT <i>pin, speed, variable </i> &quot; after each data sample to send the data via an output pin to your PC's serial communications port (where <i>variable </i> is the byte or word location which the sample is stored,<i>pin </i> is the ouput pin you wish to serially send the data via, and <i>speed </i> is the baud reate of the data, usually &quot;N2400&quot; or &quot;N4800&quot;). Alternativley, you can use the DEBUG command to send all the variables to your PC for viewing though Programming Editor's &quot;debug&quot; screen.

ylp88

Edited by - ylp88 on 10/11/2005 1:33:25 PM

Edited by - ylp88 on 10/11/2005 1:33:40 PM
 

ylp88

Senior Member
I might as well add, for the sake of clarity and fullness:

You can view the data via Window's HyperTerminal, or more conveniently, via Programmng Editor's &quot;Terminal&quot; facility (F8).

You can also use the &quot;SERTXD <i>variable </i> &quot; command so that you do not have to use another output pin on your PICAXE chip - the data is sent via your download cable. Note that you must set the &quot;Terminal&quot; to &quot;4800&quot; baud in order to receive data this way.

ylp88

Edited by - ylp88 on 10/11/2005 1:34:58 PM
 

hax

New Member
By the way I'm still on the lookout for some (free) software that simply saves the serial messages in a csv file for use with excel. I know there are some commercial applications out there but I am after something simple. Any ideas?
 

manuka

Senior Member
How simple do you need?What are you finally trying to do with the data ? You can always manually assign the data as .csv - I used &quot;BananaComm&quot; <A href='http://www.picaxe.orcon.net.nz/bcom30.zip' Target=_Blank>External Web Link</a>(DOS but Windows friendly)in 2002 for this, but superior display freebies such as StampPlot<A href='http://www.selmaware.com/stampplotlite/home.htm ' Target=_Blank>External Web Link</a>(Selmaware) may do. You're right -this is a HUGE field with numerous approaches. Stan

Edited by - Stan. Swan on 10/12/2005 8:36:21 AM
 

hippy

Ex-Staff (retired)
Haxby : Re free serial capture software

Will this do you ... ?

http://homepage.ntlworld.com/the.happy.hippy/picaxe/capture.exe (32KB)

&quot;Capture&quot; allows a file to be specified for the output, then any lines ( CR terminated ) are saved to the file. All other non-ASCII characters are stripped out. Any line starting with &quot;&lt;&quot; terminates the capture, or the &quot;Stop&quot; button can be used. Any line starting with &quot;&gt;&quot; is ignored.

&quot;Start&quot; allows the PICAXE to specify the filename to save to in a line which starts with &quot;&gt;&quot;, the rest of the line is the filename to save to. Again, capture terminates when a line starting with &quot;&lt;&quot; is received or &quot;Stop&quot; is used.

It's up to you to ensure the PICAXE sends data in the required format, with commas etc in the right places.

Only tested on my 98SE PC so it might complain of missing .DLL's etc and might look messy under XP. If it goes someway to doing what you want then I'll add the stuff for remembering settings and screen position between executions and other improvements.
 

tarzan

Senior Member
I would like to give Hippy a medal for all his hard work but first I must get this working.
I'm using windows home XP sp2, don't know if I'm using Serial Capture quite right so if you would please give an example of &quot;sertxd&quot; to be send from picaxe with file name attached this might help me to get it working.

Thank you

Dan
 

Michael 2727

Senior Member
I have XP Pro installed, I tried Hippy's
capture exe with mixed results.

2400 and 4800 gave some results but I could not repeat them, and once I had to wait 10 to 15 program cycles for anything to appear.

I will have another go at it later on and
write down what happened this time.

PS: Hippy could you please contact me if you have some time.

Edited by - Michael 2727 on 10/13/2005 12:50:30 PM
 

hax

New Member
By the way I used it on XP Pro. No error messages. I tried it with a serial GPS connected to the com port so far. Will try with a picaxe some time soon.
 

ylp88

Senior Member
I'm a bit confused about what you are asking at the end of your last post, tarzan. But perhaps this is what you want:
<code><pre><font size=2>
start:
SERTXD &quot;Test Text. &quot;
PAUSE 1000
goto start
</font></pre></code>

This should send the text &quot;Test Text. &quot; once per second to your serial capture screen. Your capture should be tested with your download cable inserted and your PC set to receive at 4800bps.

ylp88
 

hippy

Ex-Staff (retired)
I've just suffered a catastrophic hard disk failure, and as is sod's law, before the off-site backup kicked in ( the 'other partition' backup has been lost ).

With all source code gone, it means everyone is stuck with what there is for the time being. I'll re-write the code, but I'm sure you'll all appreciate it's not one of my priorities at present. Sorry folks.
 

hippy

Ex-Staff (retired)
<i>Please give an example of &quot;sertxd&quot; to be sent from picaxe with file name attached </i>

Using &quot;Capture&quot; it should just grab whatever gets sent as per ylp88's example, although it needs a CR or CR+LF at the end ( I recommend the later if code space isn't an issue ) ...

- SERTXD(&quot;Test. Test&quot;,CR)
- SERTXD(&quot;Test. Test&quot;,CR,LF)

Using an appropriate SEROUT should also work.

For &quot;Start&quot;, with the PICAXE providing the filename, the following <i>should </i> work ...

- SERTXD(&quot;&gt;C:\tmp\xyzzy.txt&quot;,CR,LF)
- SERTXD(&quot;Line 1&quot;,CR,LF)
- SERTXD(&quot;Line 2&quot;,CR,LF)
- SERTXD(&quot;&lt;&quot;,CR,LF)
- END

I don't have the Programming Editor currently installed, but I recall using &quot;\&quot; in a text string causes some problems. The actual ASCII value of &quot;\&quot; can be used; this is the same as above ...

- SERTXD(&quot;&gt;C:&quot;,$5C,&quot;tmp&quot;,$5C,&quot;xyzzy.txt&quot;,CR,LF)

I did change the code to accept &quot;/&quot; in place of &quot;\&quot; to make life easier ...

- SERTXD(&quot;&gt;C:/tmp/xyzzy.txt&quot;)

but not sure if that made it into the .EXE download available, and I presently have no way of testing it.

If filenames aren't fully specified ( ie no disk drive or folder specified ), I'm not sure where the file ends up ( in, or under, &quot;C:\My Documents&quot; probably ) ...

- SERTXD(&quot;&gt;xyxxy.txt&quot;,CR,LF)
- SERTXD(&quot;&gt;/tmp/xyzzy.txt&quot;,CR,LF)
- SERTXD(&quot;&gt;tmp/xyzzy.txt&quot;,CR,LF)

The output from your program can be checked by using the Programming Editor Terminal window which will show everything sent ( hence the recommendation for CR and LF ). The .EXE only displays lines it has accepted, so &quot;&gt;&quot; lines in &quot;Capture&quot; won't get displayed, and when using &quot;Start&quot; data won't be displayed until the &quot;&gt;&quot; line has been received - One of the areas I was intending to improve upon.
 

tarzan

Senior Member
Hi Hippy

Sorry to hear about you computer woe's.

I now have Serial Capture working as described. The backward to forward slash does work. I don't expect you to change Serial Capture as to the way it works just a couple of observations: If file is open when trying to save to that file it does not work, Serial Capture overwrites previous data and should or does it somehow know to received data without using &quot;Start&quot; button or &quot;Capture&quot; button?

Thank you for creating something that I'm sure many Picaxe users will find useful.

Dan

Edited by - tarzan on 10/13/2005 8:44:26 PM
 

hippy

Ex-Staff (retired)
Managed to rescue most of the disk; the FAT for C: and some files were trashed but the other partitions are readable and appear intact. I've come to expect a forced OS rebuild (98SE) every six months, and this one was an overdue event.

Trying to write to a file already open won't work because the OS won't permit it ( unless opened as 'read only' maybe ).

It currently overwrites an existing file if the same filename is used, and there is no warning ( a pain for a PICAXE providing a filename which won't change ! ). And there's no 'auto-capture' at present; one of the buttons has to be pressed to set it going.

I'll admit that I never really thought too much about the parcticalities of operation, so I'll keep these points in mind for Version 2.
 

delcam

Member
Can anyone point me to a site where WIndows Hyperterminal is elucidated? I read several replies on questions regarding downloading data from PICAXES and using this program but I never succeeded in getting the data into my PC using this program......

Delcam
 

ylp88

Senior Member
Sorry for not really answering your request but I recommend that you don't even use HyperTerminal, especially if you are just trying to receive serial datad from a PICAXE chip.

Programming Editor's &quot;Terminal&quot; facility is more than sufficient to view your received data, without haveing to muck around with teh intricacies of Window's HyperTerminal.

ylp88
 

manuka

Senior Member
Agreed- the inbuilt F8 terminal is usually fine. However you may just want a simple standalone terminal program for an older PC <A href='http://www.picaxe.orcon.net.nz/termdemo.jpg ' Target=_Blank>External Web Link</a>instead, so suggest the likes of Bananacomm (DOS ~170k but Windows friendly)=&gt;<A href='http://www.picaxe.orcon.net.nz/bcom30.zip ' Target=_Blank>External Web Link</a>

I've had lots of fun with old LCD organiser terminal programs,&amp; Flash RAM Sharp OZ/ZQ Wizards<A href='http://www.picaxe.orcon.net.nz/wizard.gif' Target=_Blank>External Web Link</a> are particurly nice for a &quot;big screen&quot; LCD display. Casio Pocket viewers<A href='http://www.picaxe.orcon.net.nz/pvdemo.jpg ' Target=_Blank>External Web Link</a> may do too - many of these Y2K era organisers are now &quot;free to a good home&quot; &amp; run for ages on a couple of AAs. Stan
 

tarzan

Senior Member
Have a look here:
http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=1865&amp;forum_id=13&amp;Topic_Title=tach&amp;forum_title=No+new+posts+please%21+7
<A href='http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=1865&amp;forum_id=13&amp;Topic_Title=tach&amp;forum_title=No+new+posts+please%21+7' Target=_Blank>External Web Link</a>

Edited by - tarzan on 10/22/2005 9:51:35 PM
 
Top