Home > database >  For help! PB MSCOMM receiving data
For help! PB MSCOMM receiving data

Time:09-20

The younger brother to use MSCOMM a little to receive the electronic balance program
MPort=1
ole_1.object.ComOle_1. Object. Settings=(1200, O, 7, 1)
Ole_1. Object. InputLen=0
Ole_1. Object. An InputMode=0
Ole_1. Object. PortOpen=True
Receiving most of the electronic balance weight is normal (e.g., 0.2456 kG), but there is a small amount of weight received only half of it (e.g., 56 kG) (account for around 2% of overall - 3 #)
Ls_data=https://bbs.csdn.net/topics/trim (ole_1. Object. Input)
Here to add a breakpoint
Found in receiving is over (56 KG) of abnormal
Hope ace glad! Thank you for the

CodePudding user response:

Buffer is full?

CodePudding user response:

CodePudding user response:

Try this http://download.csdn.net/detail/pcwe2002/4780334

CodePudding user response:

Set the buffer larger try
 
Ole_1.object.com mport=Integer (ls_commport, 1) (right)
Ole_1. Object. Settings='9600, n, 8, 1//9600 baud rate, data bits 8 bits, parity, stop bits 1
Ole_1. Object. InBufferCount=0//clear the receive buffer
Ole_1. Object. InputLen=0//read the entire buffer content
Ole_1. Object. InBufferSize=1024//receive buffer 1024 bytes
Ole_1. Object. RThreshold=100
Ole_1. Object. Outbuffercount=0
Ole_1. Object. OutBufferSize=512
Ole_1. Object. SThreshold=1
Ole_1. Object. PortOpen=true

CodePudding user response:



The
reference 4 floor pb8 response:
set the buffer larger try
C/C + + code? 12345678910 ole_1.object.com mport=Integer (ls_commport, 1) (right) ole_1. Object. The Settings='9600, n, 8, 1//9600 baud rate, data bits 8 bits, parity, stop bits one ole_1. Object. InBufferCount=0/...


Buffer tried, still won't do, isn't me equipment 1200 because of the low baud rate? Timeout?

CodePudding user response:

Baud rate, try to change 9600, the pathway to the fifth floor, this thing, not too complicated
  • Related