通过串口发送大号 [英] Sending larg number over serial port

查看:95
本文介绍了通过串口发送大号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好每一个

i我试图通过串口发送一组大数(3000及以上)使用vb.net是否有任何方法发送此(3000)一次(即不转换到字节)

hello every one
i am trying to send a group of large numbers(3000 and above) over serial port using vb.net is there any method to send this (3000)once (i.e. not convert to bytes)

推荐答案

数字本身只是一堆字节,所以为什么要担心。您可以将其作为二进制文件发送(首选方式,需要两个字节,如果您不超过 65535 )或使用其字符串表示形式(如果您不使用,则需要4个字节) t超过 9999 )。在任何情况下,您都必须通过串行线发送字节。请注意,您可以在单个函数调用中发送所有字节。
The number itself is just a bunch of bytes, so why worry. You may send it as binary (preferred way, two bytes needed, if you don''t exceed 65535) or using its string representation (4 bytes needed if you don''t exceed 9999). In any case you have to send bytes over the serial line. Note that you may send all the bytes in a single function call.


这篇关于通过串口发送大号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆