在QB64上使用COM端口? [英] Using COM Port with QB64?

查看:91
本文介绍了在QB64上使用COM端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




大家好,



$
  ;  先感谢您。  我是新来的,并且可以寻求一些可能与驾驶员相关的问题的帮助。



   我试图在Windows 7机器上使用QB64 v1.00(非Visual Basic或VBA)与COM端口进行通信。  我从这里安装了具有讽刺意味的INPOUT32.dll  http://www.highrez.co.uk/downloads/inpout32/ (这是
来自Logix4u早期的inpout32.dll的更新) 。  我正在使用QB64 wiki上描述的代码:http://www.qb64.net/wiki/index.php?title = Port_Access_Libraries 通过向UART端口发送位级命令来打开COM端口作为
,紧接在"COM端口"下的代码中显示在页面的中间。



并且,一切正常,但是我在这里加载了免费的串口测试程序之后:microridge.com/comtestserial.htm(我有没有兴趣参加这个节目,也没有为它做广告。它恰好是我发现的第一个有效的节目。  使用
测试程序,我可以将字符发送到COM端口并手动更改其状态。如果我同时运行我的QB64程序,我也可以这样做。一旦我关闭测试程序,我就无法再使用Basic的COM端口做任何事情。



所以,我认为存在问题DLL未正确打开COM端口。  首先,这里有没有人有使用QB64使用COM端口的直接经验?  是否有任何我失踪的工作?  我需要,例如,
,以某种方式在Win7中为QB64和INPUOT32.DLL设置权限以访问COM端口?



  ;我已经在Excel中测试了VBa中的COM端口,因此COM端口可以工作。  但我真的希望能够使用现有的QB64代码来处理它。  对此事的任何帮助将不胜感激。  

$


  Dan



解决方案

大多数人都会搜索QB64论坛,如果他们遇到QB64问题,而不是在Visual Basic .Net语言论坛上发帖,并说他们不想使用Visual Basic,而是对QB64有疑问。


然后大多数人也不会在这个论坛上询问有关C#或C ++的问题。


https://www.google.com/?gws_rd=ssl#q=QB64+forums



Hello folks,


    Thank you in advance.  I am new here and have come seeking some help for a problem which may be driver-related.

    I am trying to communicate with a COM port using QB64 v1.00 (Not Visual Basic or VBA) on a windows 7 machine.   I have installed the ironically named INPOUT32.dll from here  http://www.highrez.co.uk/downloads/inpout32/  (this is an update from the earlier inpout32.dll made by Logix4u).  I am using the code described on the QB64 wiki here: http://www.qb64.net/wiki/index.php?title=Port_Access_Libraries  to open the COM port by sending bit-level commands to the UART ports as shown in the code immediately under "COM Ports" halfway down the page.

And, everything works, BUT ONLY after I have loaded the free serial port test program here: microridge.com/comtestserial.htm (I have no interest in this program and am not advertising for it.  It just happens to be the first one I found that works).  With that test program I can send characters to the COM port and change it's state manually. If I run my QB64 program concurrently, I can do the same. As soon as I shut down the test program, I can no longer do anything with the COM port from Basic.

So, I am thinking that there is an issue with the DLL not properly opening the COM port.   First of all, does anyone here have direct experience in working with COM ports using QB64?   Is there any  work around that I am missing?  Do I need, for example, to somehow set permissions in Win7 for QB64 and INPUOT32.DLL to have access to the COM ports?

 I have already tested the COM port in VBa from Excel, so the COM port works.  But I would really like to be able to use existing QB64 code to work with it.  Any help on this matter would be greatly appreciated.  


  Dan


解决方案

Most people would search for a QB64 forum if they had issues with QB64 rather than posting questions in a Visual Basic .Net language forum and saying they don't want to use Visual Basic but have questions about QB64 instead.

Then again most people don't ask questions about C# or C++ in this forum either.

https://www.google.com/?gws_rd=ssl#q=QB64+forums


这篇关于在QB64上使用COM端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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