搜索
bottom↓
回复: 22

学习BCB6,串口实时波形显示终于搞定,有兴趣的看看,老鸟就免了,这点玩意,汗……

[复制链接]

出0入0汤圆

发表于 2009-4-10 20:05:09 | 显示全部楼层 |阅读模式
开始本来想用Delphi,可是一直没能搞定,所以又转到BCB上来了。

其实很简单,串口和显示都是使用的控件,还搞到现在,关键时间都花在将串口接收的字符串转化为整形并跟参考电压计算上了。

主要目的是将24位AD采集的数据通过串口输出并显示,总共8个通道。

串口控件使用Cport,显示控件使用Iocomp,资料都来自本论坛 fangbao 伍奇 网友的帖子:18B20温度采集+上位机实时曲线,附源程序

程序和界面都做的很简陋,只是做个验证,调试时使用的,没有版权啥的,随意更改,你要是方便的话,就将你更新过的或者更好的传上来。

首先给出两个什么都没接,采集空间电压的波形,奇怪,前两个通道跟其他的不一样,而且两次采集的波形有很大的出入,可能硬件有问题。


1 (原文件名:1.JPG)


2 (原文件名:2.JPG)

源代码,上传过程中总不成功,发现文件中一个tds文件特别大,上网查了下好像是调试文件,先删除了,不知道还能不能编译,家中的电脑没有安装BCB,不能验证,如果不能的话,改天再上传。

串口接收框下面的两个按钮不好使,因为还没有想好对应的程序,本意是将接受的字符串与十六进制形式相互转化的。

My Com--NO tdsourdev_435272.rar(文件大小:111K) (原文件名:My Com.rar)

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

发表于 2009-4-10 21:04:21 | 显示全部楼层
mark

出0入0汤圆

发表于 2009-4-10 21:44:01 | 显示全部楼层
好,要好好学习一下

出0入0汤圆

 楼主| 发表于 2009-4-11 00:47:39 | 显示全部楼层
突然发现刚才上传的不能用,熬夜家中的电脑安装上BCB6,重新上传:
2ourdev_435337.rar(文件大小:491K) (原文件名:My Com.rar)

出0入0汤圆

发表于 2009-4-13 08:45:16 | 显示全部楼层
打开是提示缺少Iocomp65.bpl

出0入0汤圆

 楼主| 发表于 2009-4-13 08:51:07 | 显示全部楼层
to 4楼
你的控件安装好了吗?库路径包含对了吗?

出0入0汤圆

发表于 2009-4-15 08:51:12 | 显示全部楼层
我没有这个控件呀。如何安装。

出0入0汤圆

 楼主| 发表于 2009-4-15 09:14:04 | 显示全部楼层
楼主贴已经说了:
串口控件使用Cport,显示控件使用Iocomp,资料都来自本论坛 fangbao 伍奇 网友的帖子:18B20温度采集+上位机实时曲线,附源程序

可以在本论坛搜索这个帖子,里面有下载

出0入0汤圆

发表于 2009-4-16 16:53:22 | 显示全部楼层
“串口控件使用Cport,显示控件使用Iocomp,资料都来自本论坛 fangbao 伍奇 网友的帖子:18B20温度采集+上位机实时曲线,附源程序”里面的控件怎么在bcb6里面安装啊?本人是新手,希望得到回答。

出0入50汤圆

发表于 2009-4-16 19:42:28 | 显示全部楼层
真是见鬼了,那个Iocomp65.bpl 文件,我把楼主所说的fangbao 伍奇帖子里所有附件都下载到一个文件夹里,解压每一个文件,包括可执行文件也没放过,就是没找到。

本来挺喜欢这个软件,现在只有放弃了。

出0入0汤圆

 楼主| 发表于 2009-4-16 22:42:09 | 显示全部楼层
BCB6的安装方法:

Iocomp Components C++ Builder 6 Install Notes

--------------------------------------------------------------------------------

Installation
These instructions must be completed only if the automatic compile fails during the install process...

Open Borland C++ Builder 6.0.  
From the Main Menu, select File->Open  
From the Open dialog, browse to "c:\iocomp\product\CBuilder6" or to the installed directory if different than the default directory.  
From the Open dialog, select and open iocomp65.bpk (iocomp65clx.bpk for CLX components)..  
The Package Project Manager dialog should now be open. The project is by default set up for the Professional Pack and Plot Pack products. If you did not purchase both of these products, you will need to modify the BPK file as follows...

For VCL Component Package...

Instrument Pack Only
Remove iPlotPackPropertyEditorsReg.pas
Remove iPlotPackReg.dcr
Remove iPlotPackReg.pas
Remove iProfessionalPropertyEditorsReg.pas
Remove iProfessionalReg.dcr
Remove iProfessionalReg.pas

ProfessionalPack Only
Remove iPlotPackPropertyEditorsReg.pas
Remove iPlotPackReg.dcr
Remove iPlotPackReg.pas

Plot Pack Only
Remove iInstrumentPackPropertyEditorsReg.pas
Remove iInstrumentPackReg.dcr
Remove iInstrumentPackReg.pas
Remove iProfessionalPropertyEditorsReg.pas
Remove iProfessionalReg.dcr
Remove iProfessionalReg.pas

For CLX Component Package...

Instrument Pack Only
Remove QiPlotPackPropertyEditorsReg.pas
Remove QiPlotPackReg.dcr
Remove QiPlotPackReg.pas
Remove QiProfessionalPropertyEditorsReg.pas
Remove QiProfessionalReg.dcr
Remove QiProfessionalReg.pas

ProfessionalPack Only
Remove QiPlotPackPropertyEditorsReg.pas
Remove QiPlotPackReg.dcr
Remove QiPlotPackReg.pas

Plot Pack Only
Remove QiInstrumentPackPropertyEditorsReg.pas
Remove QiInstrumentPackReg.dcr
Remove QiInstrumentPackReg.pas
Remove QiProfessionalPropertyEditorsReg.pas
Remove QiProfessionalReg.dcr
Remove QiProfessionalReg.pas

From the Project Manager, click the Install button.  
Click OK on the Information Dialog showing the installed components.  
Close the Project Manager and click YES when prompted to save changes.  
From the Main Menu, select Tools->Environment Options.  
Select the Library tab.  
Click on the Library Path browse button ("...") to modify.  
From the Directories dialog, click on the browse button ("...").  
For VCL Application Development: From the Browse For Folder dialog, browse to "c:\iocomp\product\CBuilder6" or to the installed directory if different than the default directory.  
For CLX Application Development: From the Browse For Folder dialog, browse to "c:\iocomp\product\CBuilder6clx" or to the installed directory if different than the default directory.  
From the Browse For Folder dialog, click the OK button.  
From the Directories dialog, click the ADD button, then the OK button.  
From the Environment Options dialog, click OK.  
You are now ready to start using Iocomp Instrumentation Components.

出0入0汤圆

发表于 2009-4-16 23:09:49 | 显示全部楼层
mark

出0入0汤圆

发表于 2009-4-16 23:17:37 | 显示全部楼层
还是不明白怎么才能把Iocomp显示控件导入到BCB6中。

出0入0汤圆

发表于 2009-6-8 23:08:35 | 显示全部楼层
看起来很漂亮!

出0入0汤圆

发表于 2011-7-20 15:33:30 | 显示全部楼层
楼主,打开exe文件时弹出“没有找到Iocomp65.bpl,因此这个应用程序未能启动。重新安装应用程序可能会修复次问题”,我自己按照你给出的程序也做了一个发现,把exe文件拿到没有装Iocomp的电脑上也会弹出这个问题,不知道为什么?怎么解决这个问题啊?
麻烦楼主了!

出0入0汤圆

发表于 2011-7-22 22:36:24 | 显示全部楼层
mark

出0入0汤圆

发表于 2011-7-25 16:57:41 | 显示全部楼层
控件在
http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=1381150&bbs_page_no=1&search_mode=1&search_text=18b20温度采集&bbs_id=9999

出50入10汤圆

发表于 2011-7-28 17:54:10 | 显示全部楼层
mark

出0入0汤圆

发表于 2011-12-14 15:03:02 | 显示全部楼层
好东西

出0入0汤圆

发表于 2012-3-7 22:24:37 | 显示全部楼层
这个能用Labview做吗

出0入0汤圆

发表于 2012-3-8 14:01:21 | 显示全部楼层
好东西

出0入0汤圆

发表于 2012-3-8 16:56:35 | 显示全部楼层
逛顶

出0入0汤圆

发表于 2012-3-24 11:27:54 | 显示全部楼层
mark:@,顶一下
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-23 18:29

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表