| Author |
Message |
DB_Man
Joined: 28 Aug 2008 Posts: 4
|
28 Aug 2008 8:53 RS485 network problem/no idea |
|
|
|
Hello everyone.
Just started new here cos I'm deperately looking for an answer. Have tried a lot.
Ok, my application first:
PC --> RS232 to RS485 converter --> Digital counter RS485 --> Digital counter RS485 --> Display RS485 --> End of bus.
- All wiring is twisted pair and all devices are the same brand.
- Max length between each device 20m.
- Distance from node to device max 20cm.
I programmed my application in VB 6.0.
What it does:
<li>
<ul>Send request to device 1 - wait - device 1 sends response - read buffer - use response from device 1</ul>
<ul>Send request to device 2 - wait - device 2 sends response - read buffer - use response from device 2</ul>
<ul>Send ASCII string to device 3 for update display</ul>
</li>
That happens in a loop.
My application works in a way that I can switch on and off each component individually. Device 1 only. Device 2 only. Device 1 and 2. Update of display separately.
My problem now is that it all works fine on my desk. Once I install it where it is supposed to go the following happens:
I can access device 1 and 2 as long as device 3 is DISconnected from power supply. Once I engergise device 3, d1 and d2 aren't accessible anymore but d3 I can update. ????
I created a simple counter that increases by 1 once I hit a button in my application. That new value is sent to d3 (display). Funny is that occassionaly if I push that button I get a response from d1 or d2. But totally random. Normally I get an update every second.
Already used a different power supply for d3. Nothing.
As I said. My application works perfect without the last device and that distance is only 5 metres from the previous node. Already had the bus terminated (120Ohm) and open. Nothing.
What else can I try?
As I said it works fine on my desk whereas the distances are shorter of the wiring.
Cheers
Sven
PS: Using MSComm for serial connection. Have used different delay times between sending and receiving. RTS signal is switched within program. Works.
|
|
| Back to top |
|
 |
dna
Joined: 12 Aug 2008 Posts: 6
|
28 Aug 2008 10:30 Re: RS485 network problem/no idea |
|
|
|
Hi,
So, if this works fine in your desk, and it do not work on the place where it has to be, try finding the cable routes. Are they close to some high voltage cables, that may cause noises trough the communication. That happens very often to me.
Best regards,
Julian Dimitrov
|
|
| Back to top |
|
 |
DB_Man
Joined: 28 Aug 2008 Posts: 4
|
28 Aug 2008 11:02 Re: RS485 network problem/no idea |
|
|
|
Already done that.
Used a separate/different connection of twisted pair between d2 and d3 as well as another power supply. Neither helped.
Do you think it could be noise? I mean it works without d3 and d2 and d3 are pretty close together (4m apart).
|
|
| Back to top |
|
 |
laktronics
Joined: 06 Jan 2007 Posts: 896 Helped: 152
|
28 Aug 2008 15:02 Re: RS485 network problem/no idea |
|
|
|
Hi,
It appears, as a standard, you are using only one power supply for all the three devices; how do you distribute the supply over the distance?
Are you connecting a common ground wire between the devices?
Any possibility of an open in one of the data bus connections at d2? Try interchanging d1 and d2 devices and see if the results are same?
Oserve the bus signal levels and supply voltage with and without d3 being connected.
Switch off all devices and short the bus at d3 and see if short is seen at the PC side only when shorted using a multimeter.
Regards,
Laktronics
|
|
| Back to top |
|
 |
DB_Man
Joined: 28 Aug 2008 Posts: 4
|
29 Aug 2008 3:11 Re: RS485 network problem/no idea |
|
|
|
HI laktronics.
Thanks for your reply.
All three devices have separate power supply (230V AC). So no issues there. I even used another one for d3, just in case. Same result.
I'm not using a common ground for RS485 connection. 2-wire only.
What I did now was, I moved d3 from its position next to d1. Now I can access d1 without problems (delays) and d3 as well. BUT d2 responses only occasionally. Admittedly more often as with previous configuration.
I will try to decrease the baudrate of the bus to see if there is an improvement noticeable.
Do you think a common ground for the bus might help?
Thanks for your help so far.
|
|
| Back to top |
|
 |
IanP
Joined: 05 Oct 2004 Posts: 6346 Helped: 1505 Location: West Coast
|
29 Aug 2008 3:26 Re: RS485 network problem/no idea |
|
|
|
If you don't have them already, try to install bias resistors ..
See details at:
http://www.ni.com/support/serial/resinfo.htm
and in your case (short distances) a common reference (common ground) may help ..
Rgds,
IanP
|
|
| Back to top |
|
 |
laktronics
Joined: 06 Jan 2007 Posts: 896 Helped: 152
|
29 Aug 2008 7:15 Re: RS485 network problem/no idea |
|
|
|
Hi,
Yes, either you use bias resistors or you use common ground, there seems to be a problem with earth connection at D2.
Regards,
Laktronics
|
|
| Back to top |
|
 |