List Info

Thread: Re: RS232 Programming




Re: RS232 Programming
country flaguser name
United States
2007-08-13 16:20:36

Hello Ken and Hello George,

Ken, i found some source code at a Excel sheet which shows values
from a connected (classmodule Comm handles serial port access with
writefile...) multimeter. (original from
http://www.mikrocontroller.net/topic/23039).

...
> > As well as I can remember, I have not seen that "file"
construct
> used for RS232 in VB.
...

George thank's for Your question - it's me who is learning a lot with
this.
Maybe some kind of visualisation could be useful for You too (worth a
look i think http://realterm.sourceforge.net)?
For testing some circuits i use a "pin board"; to get experience in
handling unknown hardware.
Mostly i use baud speeds 9600, 19200 and 115200 (max cable 1m) with
8 data bits, no parity, no handshaking (3-wire txd, rxd, gnd) and it
took me "some" hours to connect my PC to my device, because of
- different voltages (maximum values for serial port -5 or 0_+5
to +15_-15 Volts or even more? - could damage Your hardware!!!)
- inversion of signal lines (eg IC MAX232)

hopefully avoids disappointment ;)
regards bernard

__._,_.___
.

__,_._,___
Re: RS232 Programming
country flaguser name
United States
2007-08-13 18:42:50

Hi George and Berhard,
we are at slightly crossed purposes here. (Unless Bernhard is also
working on the Relay system, and is ahead of George and me.)
George, I think, only needs to monitor what data traffic comes and
goes from the PC, in order to learn the protocol/syntax of the system
he is interested in, so that he can write a PC program to bypass the
Relay program. He has to work with whatever the Dr001 device gives
him, which may or may not be a CSV stream. CSV would be the best
case, probably, but George is stuck with whatever the Relay system
gives him. The first step is to find what that is. A pin
board/breakout box is the easiest way to get into the RS232 signals
to monitor them. Since modems are involved at each end of the line,
George's program will probably/possibly have to initialise the PC end
modem, before it can talk to the Dr001.
A weather station, or a GPS receiver, will power up and start pumping
its data down the line as a CSV stream, until it is turned off. Once
the device is installed, only one way data is required. Simple stuff,
and if the Dr001 works like this, the job is easy. But you need to
know, first, that that is how it works. If it sits there and waits
for individual "read meter 023" type instructions, which given that
George said the existing Relay program is quite complex to operate,
is quite possible, then writing the program to listen for, and
process a CSV stream, will not do. Also, using an AVR uP and Bascom,
it would be very easy to build a Dr001 type device that did behave
like a weatherstation. So easy that it would hardly be economic for
George's client to purchase the Relay system, rather than build their
own, so I assume there is more to it.
Find out what we are dealing with, George.

Bernhard, I did not download and look at the file, I know nuffink
about VBA anyway, but from the description, it looks like you have
found the construct you were after. God bless the internet!

cheers, Ken

--- In visualbasic6programming%40yahoogroups.com">visualbasic6programmingyahoogroups.com, "bernhard"
<baernibaer...> wrote:
&gt;
> Hello Ken and Hello George,
>
> Ken, i found some source code at a Excel sheet which shows values
> from a connected (classmodule Comm handles serial port access with
> writefile...) multimeter. (original from
> http://www.mikrocontroller.net/topic/23039).
>
> ...
> > > As well as I can remember, I have not seen that "file"
> construct
> > used for RS232 in VB.
> ...
>
> George thank's for Your question - it's me who is learning a lot
with
> this.
> Maybe some kind of visualisation could be useful for You too (worth
a
> look i think http://realterm.sourceforge.net)?
> For testing some circuits i use a "pin board"; to get experience in
> handling unknown hardware.
> Mostly i use baud speeds 9600, 19200 and 115200 (max cable 1m)
with
> 8 data bits, no parity, no handshaking (3-wire txd, rxd, gnd) and
it
> took me "some" hours to connect my PC to my device, because of
> - different voltages (maximum values for serial port -5 or 0_+5
> to +15_-15 Volts or even more? - could damage Your hardware!!!)
> - inversion of signal lines (eg IC MAX232)
>
> hopefully avoids disappointment ;)
> regards bernard
>

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )