parallax daq & DS18B20 data logging error

steviejay

Member
HI

Im trying to set up a simple data logger using 08m2 and DS18b20

set up like this
https://picasaweb.google.com/113722269455296509901/InputCircuits#5135515315717431986


Using the code below sends the serial data(temp) back to programming editor ok
but when I connect thru parallax to excel I get "ERROR DATA<ASCII 10 or > ASCII 200" message.

can someone explain what that error message means

thanks
steve

main:

for b0 = 1 to 10
read b0, b1
wait 1
sertxd ("Data = ",#b0,9,#b1,13,10)
next b0

for b0 = 1 to 10
readtemp 1, b1
write b0,b1
wait 1
sertxd ("Data = ",#b0,9,#b1,13,10)
next b0
goto main
 
Hi,

I've used Parallax PLX-DAQ a lot - a very useful piece of software and I don't know how I would manage without it. I found it a few years ago after it was mentioned on this forum.

I suggest you try:

sertxd ("DATA",44, #b0, 44, #b1, 44, cr, lf)

Decimal 44 is the ASCII for a comma. DATA is a Directive and must be in upper case and you have to force the right tab by sending a comma either as ",", or as ASCII code 44. If you want to move a column to the right, then add a pair of quotes followed by 44 e.g. "",44, - getting the right number of commas concentrates the mind! I usually have one or two blank columns on the left hand side because at least one has been configured for time. cr and lf can be used instead of ASCII 13, 10

Incidentally, if you want to put a formula in, say, the next cell to the right, perhaps to convert the value in the variable to a degrees C etc, then you can can also send the formula as part of the data string and this saves having to enter it by hand later and copy and paste to get all of the temperatures. You may need to add a counter to program to keep track of the row number.

Hope this helps.

Richard


HI

Im trying to set up a simple data logger using 08m2 and DS18b20

set up like this
https://picasaweb.google.com/113722269455296509901/InputCircuits#5135515315717431986


Using the code below sends the serial data(temp) back to programming editor ok
but when I connect thru parallax to excel I get "ERROR DATA<ASCII 10 or > ASCII 200" message.

can someone explain what that error message means

thanks
steve

main:

for b0 = 1 to 10
read b0, b1
wait 1
sertxd ("Data = ",#b0,9,#b1,13,10)
next b0

for b0 = 1 to 10
readtemp 1, b1
write b0,b1
wait 1
sertxd ("Data = ",#b0,9,#b1,13,10)
next b0
goto main
 

steviejay

Member
thanks Richard
that is exactly what I needed, explicit code sequence and punctuation in the string seems to be the key

Im trying to send column headers that will automatically appear in excel,
im using this

sertxd (13,"LABEL,Date,Time,w1,",13,10)

for the code below, but it doesn't appear in excel

thanks for your insights(hard won Im sure)

steve



sertxd (13)

sertxd (13,"LABEL,Date,Time,w1,",13,10)

Main:
for b0 = 0 TO 100

Read_Therm:
readtemp 1, w1

sertxd ("DATA,DATE,TIME,",#w1,44,13,10)

pause 2000

next

pause 2000


sertxd ("CLEARDATA",13)

GOTO Main
 
Hi Steve,

You can also send column headings using the DATA Directive providing you put the headings in quotes and put commas in all the right places. Looking at a couple of my old projects, I see that I have used both the DATA and the LABEL Directives to add column headings.

Possibly your <sertxd (13,"LABEL,Date,Time,w1,",13,10)> needs to be split up as

sertxd (13,"LABEL",44,"Date,Time,w1,",13,10)

because otherwise PLX-DAQ doesn't know that LABEL is a Directive.

Richard
 
Top