如何将Outout发送到com端口 [英] How to send Outout to com port

查看:87
本文介绍了如何将Outout发送到com端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要在com端口(com1)上发送信号,但我必须能够从端口读取信号,但无法将信号输出到com端口,输出功能会引发一些异常
"base {System.SystemException} = {"来自HRESULT的异常:0x800A018A(CTL_E_GETNOTSUPPORTED)}"
我需要将ENTER信号发送到com端口
欢迎任何帮助.

我的代码是

Hi,
i need to send a signal on com port (com1) i m able to read from the port but not able to output the signal to com port the output funtion is throwing some exception
"base {System.SystemException} = {"Exception from HRESULT: 0x800A018A (CTL_E_GETNOTSUPPORTED)"}"
and i need to send ENTER signal to com port
any help is welcome.

my code is

com.Output= "r01";
after that i want to send enter signal to com port

推荐答案

ENTER信号是什么意思?你是说CR/LF字符吗?
com.Output ="r01 \ n "帮不上忙吗?
what do you mean by ENTER signal? Do you mean a CR/LF character?
com.Output = "r01\n" doesn''t do the trick for you?


这篇关于如何将Outout发送到com端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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