Mscomm doesn't hear my serial port 
Author Message
 Mscomm doesn't hear my serial port

I am having trouble getting my VB program to listen to a serial port
connected to an electronic scale.  I have used Mscomm successfully in
the past to communicate via serial ports, but I can't seem to find the
right combination of properties this time.  The scale documentation
lists the following parameters (most can be changed):

        Baud: 9600
        Parity: E
        Bits/Char: 7
        Checksum: Yes

The first 3 match well with MsComm properties, but Mscomm doesn't seem
to include a checksum property (at least under that name).  Also, the
scale does not specify a number of stop bits.  I'm wondering if
anybody has had similar problems and has been able to figure them
out.  My RThreshold is set at 1 and I get no OnComm Events.  I have
even gone so far as to test my serial cable for continuity and checked
the "computer end" of the cable with a voltmeter to see if any signals
are being sent from the scale.  Everything seems to be working from
the scale end.

Anyway, I am getting close to using API calls (a new step for me), but
I thought I would check this group first.  BTW, I have checked the
knowledge base and tried some of the suggestions listed there.  I am
also waiting to hear back from the scale "tech support" people,
although my previous experience with them makes me wonder what help
(if any) they can provide.   If API is the way to go here, I would
also appreciate any 32-bit code examples that open and receive serial
port communcations.  There is one such example pointed to from the
knowledge base, but it was for VB3, and I can't even read the MAK file
from my VB 5 Ent.

Any help/suggestions are appreciated, e-mail or posts OK by me.

Mike Haverdink



Sat, 21 Oct 2000 03:00:00 GMT  
 Mscomm doesn't hear my serial port

Mike,

Quote:
> Baud: 9600
> Parity: E
> Bits/Char: 7
> Checksum: Yes

The checksum shouldn't be a problem - it just means that the "message" sent
from the scale will be that much longer.  It's up to your program to
recalculate the checksum for verification of successful transmission, or
just assume and dump it.  BTW, the docs for the scale should say something
about how the checksum is calculated.

Quote:
>even gone so far as to test my serial cable for continuity and checked
>the "computer end" of the cable with a voltmeter to see if any signals
>are being sent from the scale.  Everything seems to be working from
>the scale end.

This may have been what you've done here, but it has been my experience in
thses cases that the device often uses a specific cable.  Are you absolutely
sure the cable is correct?

Have you switched off all handshaking facilities?

Try getting your hands on the ol' Windows Terminal program.  Setting that up
according to the scale settings should give you data in (even if it's just
garbage) - do you get anything at all?  If you do, it has to do with MSComm
settings.  If not I'd bet on a "wrong" cable.

Hope this helps...

Ketil



Sat, 21 Oct 2000 03:00:00 GMT  
 Mscomm doesn't hear my serial port

Quote:

>This may have been what you've done here, but it has been my experience in
>thses cases that the device often uses a specific cable.  Are you absolutely
>sure the cable is correct?

Thanks for the advice.  I did some checking into the cable, and it
turned out that I needed a cable that switched the R/S wires.  I got a
cable that did that and was reading data from the port with MSComm
within minutes.

Mike



Sun, 22 Oct 2000 03:00:00 GMT  
 Mscomm doesn't hear my serial port

Quote:

> I am having trouble getting my VB program to listen to a serial port
> connected to an electronic scale.  I have used Mscomm successfully in
> the past to communicate via serial ports, but I can't seem to find the
> right combination of properties this time.

   The first thing to do when trying to talk to a strange new
serial device, is not to use VB, but use a Terminal program.
With a good terminal program, you can change the serial port
parameters and discover the proper settings needed to talk
to your device.  Then you can put those in your VB program.
   In Win31 we had TERMINAL.EXE.   It let you set just about
everything.  In Win95, there's HyperTerm, but if it's got
a setup screen, then I don't know where it is.  There's probably
a good shareware terminal program at http://www.hotfiles.com
(PC magazine's shareware/freeware page)


Tue, 24 Oct 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Newbie's MSComm / serial port woes...

2. Modem : I hear but he can't hear me

3. Modem : I hear but he can't hear me

4. mscomm - send/receive from serial port

5. ?MSCOMM - Read Signals From Serial Ports

6. Mscomm, serial port question

7. Using serial port without using MSCOMM

8. MSComm problem with multi-port serial card

9. VB Communications, MSComm, Serial Ports and Modems...

10. Modems, Serial Ports, MSComm and VB

11. Modem, serial port, MSComm and VB Communications

12. Serial port, MSComm, Modem and VB communication

 

 
Powered by phpBB® Forum Software