Re: [racket] Beginner: advice COM port I/O

2011-12-31 Thread Gilbert Martinez
Thanks, Eli. I completely misread the documentation and incorrectly assumed that Windows converted LF to CRLF when writing to the port (turns out this is not the case for 'binary mode). I've incorporated the flush-output expression and made a note to get heavy on format string syntax. -Gil On F

Re: [racket] Beginner: advice COM port I/O

2011-12-30 Thread Eli Barzilay
20 minutes ago, Gilbert Martinez wrote: > Thanks for the advice; consistent with your recommendations and those of Mr. > Cleis, I will re-implement this using write-bytes rather attempting to display > a string. > > My working VB code required the carriage-return linefeed character in order to > w

Re: [racket] Beginner: advice COM port I/O

2011-12-30 Thread Gilbert Martinez
Thanks for the advice; consistent with your recommendations and those of Mr. Cleis, I will re-implement this using write-bytes rather attempting to display a string. My working VB code required the carriage-return linefeed character in order to work properly ( .WriteLine("V00" & vbCrLf) ). I'll a

Re: [racket] Beginner: advice COM port I/O

2011-12-30 Thread Neil Van Dyke
There are a number of things that could be going wrong, due to RS232 and terminal device subtleties, and the OS abstractions. Assuming that your bit rate, data bits, parity, and stop bit are compatible, and you're using the right cable (null-modem or straight through, and enough of the pins wi

Re: [racket] Beginner: advice COM port I/O

2011-12-30 Thread Richard Cleis
I'm not near a Winbox, so I can't try it. Normally, though, I loop the tx to the rx to ensure that the port can read what it writes. Looping back normally involves little more than connecting pins 2 & 3 on the D-connector, if that is what you are using. I would also be wary of the terminator

[racket] Beginner: advice COM port I/O

2011-12-30 Thread Gilbert Martinez
I've been experimenting with Racket v5.2 and a GW Instek 8212 meter connected to my PC via COM1 (running WinXP SP3). The meter responds to simple commands (e.g., "V00" terminated with a line feed is read voltage) and I've written simple programs in Python, VB, and even QuickBasic to query the de