Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 24-May-17 21:07pm

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.
 
Share this answer
 
Comments
Stan Huang 6-Jun-17 3:21am    
Your suggests provide very good reference. Now, it's found that it's H/W connection trouble. I spent lots of time to compensate the trouble of no H/W engineer's support.
Quote:
Coonect PC terminal tool to new panel: Panel sends packets to PC correctly.

Quote:
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.
 
Share this answer
 
Comments
Stan Huang 25-May-17 3:39am    
In my opinion, it's not protocol issue so far. There may be protocol issue, but it should come after character string are received. That is, even the original codes can't interpret the protocol of new panel correctly, at least, it must be able to receive the character string. Now, the trouble is that IPC can't receive characters from new panel.
CPallini 25-May-17 3:52am    
Well, you have the opportunity to debug the code at very low level, so you can actually see if nothing arrives from the serial line. In such a case, follow Griff's suggestion and check all the serial port settings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900