Ports
May 21, 2013, 07:22:08 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Welcome to the PORTS Forum. Please post your questions, answers, and comments relating to USB and other hardware interfaces in the appropriate forums below. - Jan
Pages: [1]
  Print  
Author Topic: Monitor the DTR signal in VB as a digital input? Help?  (Read 2665 times)
mugsmugs
Member
*
Posts: 1


« on: July 27, 2010, 01:36:33 pm »

I’m a PLC guy and not very experienced with VB.  I need to write something in VB to look at the DTR signal from the serial port as a digital input.  I have a touch probe that has a dry contact, which I need to wire to the DTR of the serial port, then detect when this goes high using VB to trigger another event.  I have read a lot about this, but I’m still not clear on exactly how to do it.


Jim
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1627


WWW
« Reply #1 on: July 27, 2010, 04:55:22 pm »

In VB .NET, in the System.IO.Ports namespace, see:

SerialPinChangedEventHandler

SerialPinChange Enumeration

My Serial Ports page has an example of serial-port communications using VB .NET.

DTR is an output on PCs. You would monitor the the contact on DSR, which is an input.

Jan
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!