Post Reply 
48: Send string via serial as text file
05-15-2014, 10:03 PM
Post: #1
48: Send string via serial as text file
I've been logging some data on my 48GX, then later transferring it to my 200LX to analyze in 1-2-3. Right now I just build a string with CSV data in it on the 48, then send it in ASCII mode via Kermit. Works perfectly fine, but I have to open up Memo on the 200LX and strip out the standard HP headers and quote marks around the string before I can import the file into 1-2-3.

What settings/commands could I use to make the 48 send a string variable in much the same fashion as an MS-DOS system would transmit a text file? Note that I still want to use Kermit or XModem for error checking, so I can't just push it over with XMIT and capture the text on the 200LX side. Might drop a byte here or there without hardware flow control, especially if I'm using IR.

In other words, I'd like the content of the string to end up as an identical text file on the 200LX without needing to scrub it up in Memo first.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-15-2014, 10:29 PM
Post: #2
RE: 48: Send string via serial as text file
You could use awk on the LX to filter out the unwanted chars. It's possible with the DOS commands FOR and ECHO, but awk is much nicer;-)

-- Ray
Find all posts by this user
Quote this message in a reply
05-15-2014, 10:52 PM
Post: #3
RE: 48: Send string via serial as text file
(05-15-2014 10:29 PM)Raymond Del Tondo Wrote:  You could use awk on the LX to filter out the unwanted chars. It's possible with the DOS commands FOR and ECHO, but awk is much nicer;-)

Yeah, I considered writing/installing a tool to do it on the DOS side, but I don't know how much time it would actually save compared to just opening it in Memo and trimming a few characters off the top and bottom. Certainly an option, though. If I can build it into the tiny data sending program I run on the 48, that'll be most efficient.

And all of this is a bit academic anyway, as I've probably already spent more time writing in this thread than I stand to save by eliminating that step. Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
05-15-2014, 10:59 PM
Post: #4
RE: 48: Send string via serial as text file
(05-15-2014 10:52 PM)Dave Britten Wrote:  And all of this is a bit academic anyway, as I've probably already spent more time writing in this thread than I stand to save by eliminating that step. Smile
It depends on how often you transfer such strings to the 200LX;-)

How about the macro recorder of the LX?

-- Ray
Find all posts by this user
Quote this message in a reply
05-15-2014, 11:10 PM
Post: #5
RE: 48: Send string via serial as text file
(05-15-2014 10:59 PM)Raymond Del Tondo Wrote:  
(05-15-2014 10:52 PM)Dave Britten Wrote:  And all of this is a bit academic anyway, as I've probably already spent more time writing in this thread than I stand to save by eliminating that step. Smile
It depends on how often you transfer such strings to the 200LX;-)

How about the macro recorder of the LX?

Oh yeah, that's probably a good start, actually, as it's a very predictable sequence of keystrokes to clean the file up. Not sure why that didn't cross my mind; I'll just blame all the IV medications I'm receiving right now.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-16-2014, 12:30 PM
Post: #6
RE: 48: Send string via serial as text file
(05-15-2014 10:03 PM)Dave Britten Wrote:  I've been logging some data on my 48GX, then later transferring it to my 200LX to analyze in 1-2-3. Right now I just build a string with CSV data in it on the 48, then send it in ASCII mode via Kermit. Works perfectly fine, but I have to open up Memo on the 200LX and strip out the standard HP headers and quote marks around the string before I can import the file into 1-2-3.

What settings/commands could I use to make the 48 send a string variable in much the same fashion as an MS-DOS system would transmit a text file? Note that I still want to use Kermit or XModem for error checking, so I can't just push it over with XMIT and capture the text on the 200LX side. Might drop a byte here or there without hardware flow control, especially if I'm using IR.

In other words, I'd like the content of the string to end up as an identical text file on the 200LX without needing to scrub it up in Memo first.

Well that's a coincidence! I've just been adding the same functionality to my Hoppi program (for HP48/49/50 <-> Mac OSX communications). I added a feature to the Kermit server on the computer so that it can dynamically decode a calculator string on the fly, as it is received, and store the contents in the file. To do this I had to watch out for embedded backslashes and double-quotes in the string as they need to be "unescaped" when encountered.

I remember being mildly surprised, when I first tried to transfer text files, that there seemed to be no easy way of doing it with built-in RPL functionality -- unless I missed something?

Paul
Visit this user's website Find all posts by this user
Quote this message in a reply
05-16-2014, 12:54 PM
Post: #7
RE: 48: Send string via serial as text file
Written in Common Lisp! Wow!

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)