PORTS Forum
Ports and Interfaces => Serial Ports => Topic started by: mugsmugs on July 27, 2010, 02: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
-
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