Home > database >  Pb call MSComm problem, urgent!!!!!! Online etc.!!!!!!!!!!
Pb call MSComm problem, urgent!!!!!! Online etc.!!!!!!!!!!

Time:09-23

Window open event:
MPort=4
ole_MSComm.object.ComOle_MSComm. Object. Settings='19200, N, 8, 1,'
Ole_MSComm. Object. Rthreshold=1
Ole_MSComm. Object. Inputlen=0
Ole_MSComm. Object. PortOpen=true

Ole_MSComm oncomm event:
Choose case mEvent ole_MSComm.object.Com
Case 2
String ls_Msg
Ole_mscomm. Object. InputLen=0
Ls_Msg=ole_mscomm. Object. Input
St_3. Text=ls_Msg
Messagebox (" 11 ", ls_Msg)
The end choose

Why was I value such as 116 # a (com wizard test), why st_3 display is 16 # a, messagebox tip is 1, how can I get 116 # a directly?

CodePudding user response:

Ole_1. Object. Rthreshold=1 wrong here,
Don't=1
The length of the to=send to come over

CodePudding user response:

I am sending a character length is not sure, 2-5 May, also cannot be set to 5, because if the two I also want to come out, what method did not make me what a serial port what is coming out to?
reference 1st floor response:
ole_1. Object. Rthreshold=1 wrong here,
Don't=1
To send over the length of the=

CodePudding user response:

 
Ole_MSComm oncomm event:
Choose case mEvent ole_MSComm.object.Com
Case 2
String ls_Msg
//ole_mscomm. Object. InputLen=0//remove the this
Ls_Msg=ole_mscomm. Object. Input
St_3. Text +=ls_Msg//sum up here with +=
//messagebox (" 11 ", ls_Msg)//the first comment out
The end choose



CodePudding user response:

MPort=1
ole_1.object.ComOle_1. Object. Settings='115200, N, 8, 1,'
Ole_1. Object. Rthreshold=1
Ole_1. Object. Inputlen=1
Ole_1. Object. An InputMode=0
Ole_1. Obejct. SThreshold=1
Ole_1. InBufferSize=1024
Ole_1. Object. OutBufferSize=512
Ole_1. Object. InBufferCount=0
Ole_1. Object. OutBufferCount=0
Ole_1. PortOpen=true
  • Related