大家能不能帮我看看,这样发送指令为什么不对
我需要在串口中输入两个空格,为什么这样写在运行程序的时候出现错误?
Dim OutByte(0) As Byte
OutByte(0) = 32
OutByte(1) = 32
RS232.Write(OutByte, 0, 2) --------------------编程问答-------------------- 什么错误?
访问越界?
Dim OutByte(0) As Byte
OutByte(0) = 32
OutByte(1) = 32
->
Dim OutByte(0 to 1) As Byte
OutByte(0) = 32
OutByte(1) = 32 --------------------编程问答--------------------
Dim OutByte(0) As Byte
OutByte(0) = 32
OutByte(1) = 32
RS232.Write(OutByte, 0, OutByte.Length)
COM口打开没有?
补充:.NET技术 , VB.NET