problem with VB MSComm and the DTR-line 
Author Message
 problem with VB MSComm and the DTR-line


I want to get data from a D/A-transformer that is connected to the
serial port. He's adressed and the data is read with the RTS/CTS-lines.
With the DTR-line, the transformer is given a 'clock-signal' and in the
first step the transformer-state is switched to 'on'.

I change the state of the RTS/CTS-lines using the fields RTSEnable and
CTSHolding. The state of the DTR-line is switched with DTREnable.

RTS and CTS are working properly, I tested that connecting two computers
with a null-modem-cable. But changing the state of the DTR-line leads to
no result! The transformer isn't working, because he don't knows that he
is switched to 'on' and a test with the second computer shows that the
DTR-line has not changed to 'HIGH' or 'LOW'.

I've tested several settings of the MSComm-Object with no result. I'm
using WinNT 4.0 and tested my code under Win98, but that doesn't work,

Here's a s{*filter*}t of my VB-Code, perhaps I've forgot to set a Field...?


    MSComm.CommPort = 1

    MSComm.Settings = "9600, N, 8, 1"
    MSComm.RThreshold = 0
    MSComm.SThreshold = 0
    MSComm.InputLen = 0
    MSComm.CTSTimeout = 0:

    MSComm.PortOpen = True

    'WHILE ...

       MSComm.DTREnable = False

       '... some code .... change of RTS (write) & CTS (read)

       MSComm.DTREnable = True

       '... some code ....



Perhaps it is possible to change the state of the handshake-lines with
the windows API?

Has anyone an idea?
Thank you in advance.




Fri, 01 Feb 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Problem with VB MSComm and the DTR-line

2. problem with VB MSComm and the DTR-line

3. Monitoring DTR line in VB Win

4. DTR control with MSCOMM

5. rts enable nd dtr enable with mscomm

6. Detecting State Change in DTR Line with VB4.0

7. Detecting Changes in DTR Comm Line in VB4

8. ***** Fix to DTR Problem *****

9. vb-5 mscomm problem

10. VB 6.0 MsComm object problem

11. VB 4.0a fixes MSCOMM problem?

12. Problem with Modesm, MSCOMM.VBX and VB 3.0 Pro


Powered by phpBB® Forum Software