(Andre) wrote in news:5d4872e6.0307062216.1c13f960
@posting.google.com:
I need to connect a device with a computer over RS232, distance about
50m. I have tried connecting directly, doesn't work. I'm thinking of
trying a repeater. So I searched the web I found other means as well:
like converting to RS432. Which would be better.
I have just finished doing such a project and - wonder of wonders - IT
WORKED!
Here is what I did.
1) The project concerned hooking up some laboratory analyzers to a remote
computer so that the computer could read the data directly from the
analyzers rather than writing the data down and then retyping it.
We could not put a computer nearby because of space limitations.
Therefore, we had to string wire from the room with the analyzers to my
office about 100 feet away.
2) Before dealing with any specialized hardware, I got a laptop and
developed a program that would communicate with analyzers over a six-foot
serial cable. In more detail, I developed the program on my office
desktop and copied it onto the laptop. Then I would go to the lab with
the analyzers and test the program using the serial cable. I had to do
this a bunch of time before I got it working. Eventually, I was
satisfied with the program running on the laptop and was ready to try it
long distance.
3)We got a contractor to string cable from the analyzers to my office.
(This did not cost a great amount I think it was $300 for about 4 hours
work. It also saved me from having to tunnel around in our ceiling.)
4) Next, I got a couple of RS-485 converters and hooked one of them on to
the serial port of my machine. I then hooked the others to the
analyzers. (In your case, if you have just one machine, you won't need
to worry about several machines on one cable. By the way, "several-
machines-on-one-cable" is called a "multi-drop environment." One machine
on one cable is called a "single drop environment." Oooo. Ooooo. Now I
can impress my boss with some new vocabulary.)
5) I then plugged my program in and... and.... IT WORKED!!! Yes!. YES!
OK. OK. I'm leaving out some details. Here they are....
6) I bought the 485 converters from Integrity Instruments in Pine River
Minnesota. You can find them at
http://www.rs-485.com/
They are nice people and they helped me understand what I was doing wrong
a couple of times. You might be able to find cheaper converters
somewhere but, unless you are buying them in great quantity, I don't
think it's worth it. These things work and I think they work pretty
well. Besides, if you buy from II, you can pick their brains and that's
worth a lot to me.
I used their 485-25A which cost about $58.00.
Each 485-25A needs a power supply so I also bought a PS9CST transformer
for each converter. The transformers are about $10 each so that total
per converter is about $68.
7) You will need special cable to string from your instruments to your
computer. I got the cable the II people recommended. (I think it was
Belkin cable. I can look it up if you want.) As I remember, a 500 foot
length cost about $200. (I could be wrong about this. It might be $100
either way.)
8) You will need to attach the cable to the converters using
wirestrippers and screw drivers. This is not as difficult as it might
sound at first. The II people send you a couple of useful diagrams and,
believe it or not, a tiny little screwdriver that, at first, I thought
was just an advertising gadget. However, it was really handy since it
was just the right size for screwing in the wires.
9) I developed the program in Visual Basic since it was quite simple.
All it does is poll the machines asking them if they have any unsent
data. If they answer affirmatively, it asks for the data. It then
writes the data out to a file. I just keeps doing this over and over and
over.....
10) I used Microsoft's COMM control as the interface between my machine
and the RS-232 port. It worked transparently with the 485 converters
hanging off that port.
11) With the 485 converters, I had no need of any null modem cables.
The total cost for five converters and power supplies, cables and
contractors stuff was about $1000.
I hope this helps. Thanks for letting me brag.
--PatF