Home > database > Pb to realize data, read the com read is null.
Pb to realize data, read the com read is null.
Time:09-16
PB8, I want to a serial port to send data after receiving and displayed in the text box, why received is empty? It is code, ace to help me analyse what went wrong?
//use COM1 port, MPort=1 ole_2.object.Com//set rate for 9600, parity, 8 bits of data, and a stop bit. Ole_2. Object. Settings="9600, N, 8, 1", " //read the data of the buffer,
If ole_2. Object. PortOpen=true then Ole_2. Object. PortOpen=false End the if
Ole_2. Object. PortOpen=True
String ls_re_data
Ls_re_data="" Mle_1. Text=""
Messagebox (' 1 ', '1') Ole_2. Object. InputLen=0 //open port Ole_2. Object. An InputMode=0