MSCOMM control properties
l CommPort: Set or return to the port document. There are 16 port restrictions in VB.
Mscomm1.commport = 1 'uses COM1 ports
l setting: Set the initialization parameter. Set or return to 4 parameters such as connection speed, parity, data bit, stop bit in string form. Such as "9600, N, 8, 1", odd O, even E.
Mscomm1.setting = "9600, n, 8, 1"
l INPUT: The characters that have been read from the input register and remove the read.
Buffer = mscomm1.input, read into buffer string variables
l Output: Write output register
l INPUTLEN: Specifies the length of the string read by the serial port. The default is 0, this value will cause the control of the INPUT instruction to read all the input buffers. If we need to make special operations for a fixed string length, set this property.
l Handshaking: Specifies the handshake protocol of communication between communication. The handshake protocol is to do is the control of the data transmission speed, also known as "flow control". Simply put, if the speed of the data sent by the part exceeds the speed that the other party can handle, the receiving is convenient to request the transmission party to suspend the data.
The RTS / CTS handshake protocol is the hardware handshake protocol, which uses the RTS foot and the function of the CTS foot.
XON / XOFF is a software handshake protocol. It uses XON to indicate the transmission of data; and use XOFF to reply to the transfer. The XON uses a CHR (19) as a control signal, and if the transmitted data contains a CHR (19) character, it will cause the transfer pause, and an error occurs.
l Rthreshold: Set or return the number of characters that receive events. When the receiving register reaches the number of characters set, the received events in the ONCOMM event will be thrown. Default is 0. Indicates that there is no reception event regardless of the number of characters in the register.
l Commmevent: An ONCOMM event is generated as long as the communication error or event occurs.
l DTRENABLE: Data Terminal Ready (DTR) line is enabled when communicating. DTR is a signal transmitted from a computer to a modem indicating that the computer is waiting to receive transmission. When set to TRUE, the DTR line will set high potential when the connection port is opened. Set low potential when the port is closed. The user can set a low potential to hang up the phone.
l RTSenable: Decides whether it makes the Request to Send line valid. In general, the RTS signal is transmitted by the computer to the modem to request a permission to transmit data. True is a high potential.
l InbufferCount: The number of characters sent in the receiving register. Set 0 to empty the receiving register.
l INPUTMODE: Remove the form of receiving register data. (String or binary form), use only ANSI character sets in the data, use strings form. CominputModetext. There is a control character nulls or a character containing ASCII128, using CominputMode Binary.
l DSRHOLDING: Pass back the DSR foot status. High is True, low is false.
l CTSholding: Passing the CTS foot status of the communication port
l CDHolding: The DCD foot status of the communication port is transmitted.