Home > database >  PB by OLE control connected to the RS232 interface electronic says read data problem
PB by OLE control connected to the RS232 interface electronic says read data problem

Time:10-14

I want to achieve is a great god if you questions PB to read through the OLE control RS232 interface of electronic data according to

I want to modify events when read in the input box to get the data, so I added in the picture an ole Control (Microsoft Communications Control), and then wrote a piece of code below in the modify events
String ls_Output
String ls_Output_kg
MPort=4
ole_1.object.ComOle_1. Object. Settings="9600, N, 8, 1", "
Ole_1. Object. InputLen=1
Ole_1. Object. PortOpen=True
Ole_1. Object. The Output="S"
Do
The Yield ()
LOOP Until ole_1. Object. InBufferCount & gt;=1
Ls_Output=ole_1. Object. Input
Ole_1. Object. PortOpen=FALSE
Ls_Output_kg=mid (ls_Output, 4, 10)
Dw_1. Setitem (1, "delivery_case_case_weight_kg", ls_Output)

But anyway have no reaction to LOOP Until ole_1. Object. InBufferCount & gt; Has been dead cycle=1, didn't get the data, you can help me to analyse the program went wrong? Port should be no problem I use hyperterminal to test of output and receiving can be




CodePudding user response:

Free done some related projects, can communicate, QQ has been on-site messages to you
  • Related