Re: Data logger using HP48GX
- From: rdgoogle@xxxxxxxxxxx
- Date: Mon, 3 Mar 2008 14:23:11 -0800 (PST)
On Feb 25, 3:42 am, DMach <dan.m...@xxxxxxxxx> wrote:
Hello,
I have been trying to find a program that can receive data input from
this Computer Serial Temperature Meter & Data Logger (http://www.quasarelectronics.com/3145.htm), the output data is a continuous
stream in simple text format (sensor number 1 through 4 followed by
temperature reading to 2 decimal places).
It should store the data to a file, so I can use it in excel later.
The terminal program in Windows is set to 2400 baud, 8 bits, no
parity, 1 or 2 stop bits, I think the 48GX can handle it.
Can anyone help me find the right direction?
Thanks in advance!
Hi Dan,
A buffer such as the one TomCee describes in his document is necessary
so you can get the HP48 TxD voltage up to something the data logger
will recognize. ONce you get the HW problem solved, you're on to SW
problems. For this you'll use some grunt-level serial I/O commands in
the HP48.
1. First, use the OPENIO command to activate the serial port.
2. When you need to send a command to the datalogger, enter it as an
alpha string in Level 1 and use XMIT to send it. You'll get a
"result" flag in Level 1, which
you can drop (assuming the transfer was successful).
3. When your datalogger is spitting data at you, you have two
options:
a. Use BUFLEN to see how many characters are in the 48 buffer,
then DROP to get rid of the "result" flag in Level 1, then SRECV to
read that number of characters.
b. Put an arbitrary number in Level 1, then SRECV to read that
number of characters.
You'll end up with a character string in Level 2 and another
"result" flag in Level 1. (I always used the BUFLEN DROP SRECV,
because I never knew what
size my data strings were going to be.)
4. The "result" flag can help you diagnose connection problems. See
http://www.hpcalc.org/hp48/docs/misc/iotest.txt for more information
on testing your serial port.
5. When you're finished receiving data, use CLOSEIO to turn off the
serial port and save battery power.
--
Regards
Ray Depew
.
- Prev by Date: HP35
- Next by Date: HP-35S keys and display
- Previous by thread: HP35
- Next by thread: HP-35S keys and display
- Index(es):
Relevant Pages
|