Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB8.0
I need someone to help me with a program... im new to programing and need help with a visual basic program that reads Com port 2 on my industrial computer and then writes the info out through Com Port 1.. has to be ASCII Characters 0-255..... 9600,8,n,1... any help would be greaty appreiated... Smile | :)
Posted 27-Jun-12 8:45am
Comments
OriginalGriff at 27-Jun-12 14:52pm
   
Why the heck would you want to use an expensive industrial PC for that when you could do the job with two connectors and a few bits of wire? It would take you less time to build the connector than to write, test and debug the program!
Sergey Alexandrovich Kryukov at 27-Jun-12 15:19pm
   
:-)
Member 9179020 at 28-Jun-12 6:15am
   
My two devices are already hooked up to the computer and im using them for other things, what it im doing is hooking up a 900mhz xbee radio to the computer and controling a R8x Pro relay contoller with my other computer from a base station.... would be nice if i could hook up the radio straight to the relay contoller but RS232 voltage levels wont work togehter... just figured that if i could RX over one com port and TX over the other then everything would work great... but it seems that its harder than i thought.... :(
OriginalGriff at 28-Jun-12 6:27am
   
Um.
RS232 includes a voltage spec (which is nominally -12V to +12V, but in practice everything should accept -25V to +25 as that is the spec limits) - if your two devices are 232, then you can connect them directly. Otherwise if you have non standard 232 voltages, you will fry the PC when you connect it (unless you have good optoisolation on the serial ports which would be unusual).
Member 9179020 at 28-Jun-12 6:44am
   
i thought so too, i checked the output of the computer hooked directly up to the relay board with a scope and it checked out at -12 and when i sent the packets it went up to +12 +-, but when i check the out put of the radio it only goes down to -5 volts and up to +5 volts when info is sent.... i figured if i sent packets through the computer everything would work out the way i wanted it to.... not logical? it has me stumped.... :)
OriginalGriff at 28-Jun-12 6:57am
   
That's all fine. 3 to 15V (positive or negative) is a valid 232 signal, +3 to -3 is invalid (to allow floating pins to be non-signal rather than 0 or 1).
Some cheap devices only provide + or - 5V because it means they don't need a "proper" 232 driver chip like the MAX232. It means the range is generally pretty poor unless you use serious cables, but it works close up.
See RS232 on Wiki: http://en.wikipedia.org/wiki/RS-232 or google for RS232 Spec (but the later is very, very tedious)
Himachandra at 29-Jun-12 3:19am
   
I am doing the same thing ....... If you need help
reach me @ +91 9901722663

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Nirav Prabtani 268
1 OriginalGriff 217
2 Mika Wendelius 185
3 _Amy 170
4 CPallini 170
0 Nirav Prabtani 284
1 OriginalGriff 217
2 Mika Wendelius 185
3 _Amy 170
4 Sergey Alexandrovich Kryukov 154


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 27 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100