Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:串口缓冲区中的字节数组如何存入Uinteger数组中

1楼
YANGYUNLIN 发表于:2023/11/30 13:04:00
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&replyID=854171&ID=127515&skin=1


Dim aaff As uInteger() = {&H01, &H03, &H04, &H01, &Hf4, &H13, &H88}  ’ 将常数存入aaff中

Dim Val(6) As Byte
Ports("Com2").Write(Val, 0, 5)
从串口中读取的内容到字节数组后,如何将字节数组Val中的内容存到aaff中(即:Byte数组转uInteger()




2楼
有点蓝 发表于:2023/11/30 13:36:00
Dim Val() As Byte = {&H01, &H03, &H04, &H01, &Hf4, &H13, &H88}
Dim aaff(Val.Length) As UInteger
Val.CopyTo(aaff, 0)
Output.Show(aaff(0))
3楼
YANGYUNLIN 发表于:2023/12/1 9:40:00
谢谢老师的代码
共3 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02734 s, 2 queries.