![]() |
48: Send string via serial as text file - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: 48: Send string via serial as text file (/thread-1323.html) |
48: Send string via serial as text file - Dave Britten - 05-15-2014 10:03 PM 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. RE: 48: Send string via serial as text file - Raymond Del Tondo - 05-15-2014 10:29 PM 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;-) RE: 48: Send string via serial as text file - Dave Britten - 05-15-2014 10:52 PM (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. ![]() RE: 48: Send string via serial as text file - Raymond Del Tondo - 05-15-2014 10:59 PM (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.It depends on how often you transfer such strings to the 200LX;-) How about the macro recorder of the LX? RE: 48: Send string via serial as text file - Dave Britten - 05-15-2014 11:10 PM (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.It depends on how often you transfer such strings to the 200LX;-) 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. RE: 48: Send string via serial as text file - pdo - 05-16-2014 12:30 PM (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. 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 RE: 48: Send string via serial as text file - HP67 - 05-16-2014 12:54 PM Written in Common Lisp! Wow! |