12/20/2011 3:22 PM | |
Joined: 1/17/2007 Last visit: 5/8/2024 Posts: 1542 Rating: (532)
|
What you have done is actually a multi-drop configuration. This is where the devices are connected in a bus structure with the connectors "daisy chaining" through intermediate devices and terminating at the two end devices. To be fully compliant with the RS485 specification, the two physical extremities of the bus should have terminator resistors (120 ohm are fine) fitted between the A and B connections. However in your case with 5m being a very short cable run, termination is not really needed. A good rule of thumb is if the propagation delay of the data line is much less than one bit width, termination is not needed. It seems that you have wired your PC as a "bus snooper" to diagnose the data comms. This is a technique I use often. But hyperterminal is not the best thing for analysing data as you cannot see the actual data values, just the characters what hyperterminal uses to represent these data values. There are several free serial port monitors that capture the data bytes in their raw (non ASCII) format. Here is a suggested application. More can be found by googling "free serial port monitor". Capture some data using a serial port monitor and post the results here. I will also need to know what you are sending to the device and what you expect to be returned. Do you have a spec for the speed measuring device? |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
12/20/2011 8:07 PM | |
Joined: 10/18/2011 Last visit: 5/8/2024 Posts: 40 Rating: (0) |
Hi Smiffy, I made some screen shot. I am using RS485 to usb converter, so I guess the RS232 analyzer doesn't work for my case. I use Realterm instead. The txt file is what I should receive. The first byte in reply message(second message in the screen shot) should be 1(31), but it is ?(3F). Thank you! Attachmentcommunication_monitoring.zip (147 Downloads) |
Follow us on