Introduction - If you have any usage issues, please Google them yourself
/ Initial COM m_ctrlComm.SetCommPort (1) // select com1 m_ctrlComm.SetSettings (" 9600, n, 8,1" ) // communication parameters set the baud rate 9600, no parity, 8 data bits, 1 Stop bit m_ctrlComm.SetInBufferSize (1024) // specify the receive buffer size m_ctrlComm.SetRThreshold (1) // Parameter 1 indicates the serial port receive buffer whenever there is more than or equal to one character will lead to a receive data OnComm event m_ctrlComm.SetInputMode (1) // define properties for data Input mode (0: Text mode 1: Binary mode). m_ctrlComm.SetInputLen (0) // Set each Input the number of characters read, the default value is 0, the receive buffer read in its entirety. m_ctrlComm.SetInBufferCount (0) // Clear receive buffer m_ctrlComm.SetPortOpen (TRUE) // Open the serial port