Send Voltage via MSCOMM Control and Serial Port 
Author Message
 Send Voltage via MSCOMM Control and Serial Port

I want to send a 1 volt signal out of Pin 1 on a 9 Pin
Serial Port via the MSComm Control.  

I am trying to control a flow meter via a 9 Pin D Type
connector using a simple VB6 interface.

Does anyone know what settings (Baud / Parity / Stop Bit
etc) I would use?  Or is there a simple MSComm.Output
command to use?  Do I need to send a RTS or do any
handshaking?



Sat, 10 Dec 2005 03:02:00 GMT  
 Send Voltage via MSCOMM Control and Serial Port
Here is the basic code sequence using RTS as a source to
your device. I would not bother with pin 1 - that is a
carrier detect output and the code could get convoluted.
This is pretty simple - don't worry about setting the
other parameters if you are not sending any data.

    MSComm1.CommPort = X
    MSComm1.RTSEnable = True
    MSComm1.PortOpen = True

Keep in mind that in theory the output should go from -3
to +3 Volts only and is no good for much power. I am
running mine thru optical coupler just to turn the
transmitter on and off. I have not finshed the project but
I would guess that around 20 ma is about the max, I did
not measure it.



Sat, 10 Dec 2005 12:41:17 GMT  
 Send Voltage via MSCOMM Control and Serial Port
Thanks for your help.

This may be a dumb question, but what code do I use to
specify 1 volt or 2 volts etc... exactly?

Quote:
>-----Original Message-----
>Here is the basic code sequence using RTS as a source to
>your device. I would not bother with pin 1 - that is a
>carrier detect output and the code could get convoluted.
>This is pretty simple - don't worry about setting the
>other parameters if you are not sending any data.

>    MSComm1.CommPort = X
>    MSComm1.RTSEnable = True
>    MSComm1.PortOpen = True

>Keep in mind that in theory the output should go from -3
>to +3 Volts only and is no good for much power. I am
>running mine thru optical coupler just to turn the
>transmitter on and off. I have not finshed the project
but
>I would guess that around 20 ma is about the max, I did
>not measure it.

>.



Sun, 11 Dec 2005 23:31:44 GMT  
 Send Voltage via MSCOMM Control and Serial Port
You cannot.  This is a digital output, not analog.  The output voltage is
specified by the hardware design of the computer's serial port.  It might be
as low as -5 to +5 volts, to as high as -12 to +12 volts.

--
Richard Grier  (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.



Sun, 11 Dec 2005 23:45:00 GMT  
 Send Voltage via MSCOMM Control and Serial Port
Ahhhhhh I seeeeeee.  Okay now it makes sense.

So I guess the right thing to do is to build a D/A that
converts the digital output from the serial port to the
analog voltage that I need.

Quote:
>-----Original Message-----
>You cannot.  This is a digital output, not analog.  The
output voltage is
>specified by the hardware design of the computer's serial
port.  It might be
>as low as -5 to +5 volts, to as high as -12 to +12 volts.

>--
>Richard Grier  (Microsoft Visual Basic MVP)

>See www.hardandsoftware.net for contact information.

>Author of Visual Basic Programmer's Guide to Serial
Communications, 3rd
>Edition ISBN 1-890422-27-4 (391 pages) published February
2002.

>.



Mon, 12 Dec 2005 00:55:15 GMT  
 Send Voltage via MSCOMM Control and Serial Port
You may want to use an off-the-shelf solution.  For example, B&B Electronics
(and others) have inexpensive solutions.  You can use links on my homepage.

--
Richard Grier  (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.



Tue, 13 Dec 2005 02:23:23 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. sending hex control codes via serial port

2. mscomm - send/receive from serial port

3. send data stream via serial port?

4. Sending a resource file bitmap via serial port?

5. VB3 Serial Port Control without MSCOMM.VBX

6. About Mscomm Control programming(Serial Port)

7. Problems with using the control MSComm for serial port communication

8. Serial port controls other than Sax and MSComm

9. Looking for a Serial Port Control to replace MsComm

10. About Mscomm Control programming(Serial Port)

11. vb5 &controlling devices via serial ports

12. CCD Camera Control via RS-232 serial port

 

 
Powered by phpBB® Forum Software