它是RS-232兼容性问题吗? [英] Is it an RS-232 compatibility issue?

查看:273
本文介绍了它是RS-232兼容性问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I''ve been working on a VxWorks-based IPC. My mission is now to update S/W for changing touch panel, which is connected to the mother board through RS-232. According to relative data & original codes, what I need to update is from interpretation of touch panel''s protocol. The old & new panel''s baud rates are both 9600. But unfortunately, IPC can''t even get characters from new touch panel correctly. Below are what I did as experimenting on old & new panels:

1. Coonect PC terminal tool to new panel: Panel sends packets to PC correctly.
2. Connect PC terminal tool to old panel: Panel sends packets to PC correctly.
3. Old panel connecting to IPC mother board: working fine.
4. Use scope to measure the pulse of signal from RS-232 of both panels: the voltage are the same.

From the above data, it seems that IPC should be able to receive character string from new panel. But the result is that IPC can''t get character from the new panel. Is there anything I still missed to check? What makes IPC can''t get characters from new panel?



我尝试过的事情:



What I have tried:

Discussed with my coworkers, googled it, posted to other group but was rejected and deleted.

推荐答案

RS232有时是一个有趣的野兽-它不仅是波特率是可配置的,它也是每个字符的位,奇偶校验,停止位和控制行.
首先检查超级终端(或类似设备)在使用两个面板时计算机是否从两个面板接收到类似(或更优的相同)数据,而无需更改任何通信参数-如果您这样做,则基本通信就可以了,您的软件不应该这样做''不需要任何参数更改.然后开始查看控制线(232从您的计算机端发出了多条输出线,这些输出线可用于防止远程设备传输,因此请检查RTS/CTS,DTR/DSR/DCD的启动器,并确保它们在启动时相同.您可以将软件与终端程序进行比较.
进行数据传输时,您可以开始查看软件收到的数据内容-请记住,如果面板来自不同的制造商,则它们可能不会使用相同的协议,因此数据包可能会大相径庭.
我将更改软件以将原始输入记录到文件中,并通过相同的测试范围来运行旧面板和新面板,然后使用十六进制编辑器检查数据以找出它们要发送的内容.

抱歉-但是我们不能仅仅告诉您执行此操作",因为这里有太多太多的变量在起作用!在开始对任何差异进行编码之前,您将必须进行一些研究和实验以找出正在发生的事情.
RS232 is a funny beast at times - it''s not just the baud rate that is configurable, it''s also the bits per character, parity, stop bits, and control lines.
Start by checking with Hyperterminal (or similar) that the computer receives similar (or better identical) data from both panels when you use them without changing any communications parameters - if you do, then the basic communications are fine, and your software shouldn''t need any parameter changes. Then start looking at control lines (and 232 has several output lines from your computer end which can be used to prevent the remote device transmitting, so check RTS/CTS, DTR/DSR/DCD for starters and make sure that they are the same when you compare your software to the terminal program.
When you have data transfer, you can start looking at the data content that your software receives - and bear in mind that if the panels come from different manufacturers they may not use the same protocol so the packets may be wildly different.
I''d change the software to log raw inputs to a file, and run the old and new panels through the same range of tests, then examine the data using a hex editor to find out what they are sending.

Sorry - but we can''t just tell you "do this" because there are far, far too many variables in play here! You will have to do some research and experimentation to find out what is going on before you can start coding for any differences.


引用:

Coonect PC终端工具到新面板:面板将数据包正确发送到PC.

Coonect PC terminal tool to new panel: Panel sends packets to PC correctly.


报价:

但是结果是IPC无法从新面板中获取字符

But the result is that IPC can''t get character from the new panel


看起来原始程序无法接收(正确发送的)数据包.这可能是协议问题.请查看旧触摸屏和新触摸屏的文档以进行澄清.


It looks the original program is not able to receive the (correctly sent) packets. It could be a protocol problem. check out the documentation of the old and new touch panel in order to clarify it.


这篇关于它是RS-232兼容性问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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