Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21993

MSCOMM Help Needed realll bad

$
0
0
Hey Guys,

So I am working with a VB6 project that is really old. This is my first time seeing this and it appears to be having problems when used with newer machines or with a usb to serial adapter. The purpose of the program is to load a script on the the chip?

It has to settings- send settings I assume, it is under the loadloader function

Code:

          MSComm1.OutBufferSize = 2048
          MSComm1.CommPort = CommPortNumber
          MSComm1.Settings = "9600,N,8,1"
          MSComm1.InputMode = comInputModeBinary
          MSComm1.PortOpen = True

and here is the second set of settings that I believe is recieving, though I could be wrong. This is under the OpenComm function

Code:

MSComm1.CommPort = CommPortNumber
       
        MSComm1.Settings = "38400,N,8,1"
        'MSComm1.RThreshold = 39
        MSComm1.SThreshold = 100
     
        MSComm1.InputMode = comInputModeBinary
        MSComm1.PortOpen = True
       
        SerialPortOpen = True
        Delay (100)

        MSComm1.InputLen = 0
        Delay (100)
        b = MSComm1.Input

When debugging , I noticed that it gets stuck in a look because the right .CommEvent isnt triggered. The program is continually looking for this.

Code:

    If MSComm1.CommEvent = comEvReceive Then
However the only commevents that occur are

comEvCD 5 Change in Carrier Detect line.

comEvDSR 4 Change in Data Set Ready line. This event is only fired when DSR changes from 1 to 0.

and I have no idea what they mean, I tried doing some goggling but that has proven to be of no use. Could someone explain in lamans terms what those mean? Also any suggestions on what could be the problem here would be awesome.

I have also attached the settings of the serial to usb converter I am currently using.
Attached Images
 

Viewing all articles
Browse latest Browse all 21993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>