Do Do str_in = str_in & Link.ReadExisting Loop While ((str_in.Length < length_predicted) And ((DateAndTime.Now.Ticks - tmr_indicator) < lng_length)) .... 'Checking FCS code 'Checking PLC Response code (No Command Error) ... 'Assume we're waiting for frame(s) 'The matter that must be checked is the penultimate and the last 'character received from PLC. if mid$(str_in,str_int.length - 1,1)<>"*" then 'Means some frame(s) are ready to be received 'First Process Data 'Clear RS232 Input Buffer str_out = Link.readExisting 'str_out = "" link.Write(vbCr)'Indicates Host Computer is ready to receive data ... end if ... Loop While loop_condition
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....