RS485 Problems
avosystems
Posts: 13
Hi
I'm trying to interface into a heatmiser underfloor heating control system and have been given the following information:-
RS485
4800BPS
1 start bit + 8 data bit + 1 stop bit
Parity NONE
I have joined pins 1-9 and 4-6 on the DB9, and connected A to A and B to B. I have used the following code to setup the port:-
SEND_COMMAND dvHeating, "'SET BAUD 4800,N,8,1 485 ENABLE'"
But everytime I plug the Netlinx into the heating it appears to be blowing up ports on the heating hub as before connection they read 0.162v and after connection they shoot up to 0.48ish and I get no reading after I disconnect it on the port it was connected to (though all other ports read 0.162v again)
Any advice or suggestions would be greatly appreciated as I'm a bit stuck on this now. (thinking of getting a RS232 to RS485 convertor to see if it something with the AMX RS485 output that doesn't agree with the heating system but not sure that is the answer)
I'm trying to interface into a heatmiser underfloor heating control system and have been given the following information:-
RS485
4800BPS
1 start bit + 8 data bit + 1 stop bit
Parity NONE
I have joined pins 1-9 and 4-6 on the DB9, and connected A to A and B to B. I have used the following code to setup the port:-
SEND_COMMAND dvHeating, "'SET BAUD 4800,N,8,1 485 ENABLE'"
But everytime I plug the Netlinx into the heating it appears to be blowing up ports on the heating hub as before connection they read 0.162v and after connection they shoot up to 0.48ish and I get no reading after I disconnect it on the port it was connected to (though all other ports read 0.162v again)
Any advice or suggestions would be greatly appreciated as I'm a bit stuck on this now. (thinking of getting a RS232 to RS485 convertor to see if it something with the AMX RS485 output that doesn't agree with the heating system but not sure that is the answer)
0
Comments
While I've learned never to say never, I'm not sure that simply hooking up a port incorrectly should be 'blowing it'.
The voltages that we see on these kind of circuits are just not high enough to burn something up. In fact, I happen to know that the voltage on the rs-232 port coming off a Destiny 6100 alarm system is something like +10 volts to -8 volts. That's nowhere near what you're seeing. Nothing gets blowed up there.
It's a vexing problem. You might try hooking up the Heating System connection side to a laptop and configure it's comm port to the same settings and see what is getting down the pipe from the AMX masteer. And then reverse it to see what's coming out of the heating system. (but, use an old laptop)
Nothing was blown up, it turned out that no-one had bothered configuring the thermostats to each have there own address when they installed the system, but I am still unable to control it from the NI4100.
I have connected the 485 from the master to the laptop and send some test strings but they all come out garbled at the master or at the laptop so I'm guessing it a problem with the master comms.
It appears to shift the asci so a '1' becomes a 'g', and a 'a' becomes a '0' which is very strange.
Any ideas or suggestions would be greatly appreciated as it feels like it's so close as I can control the heating from the laptop!! )
All I have is a data event like this (I'm still just trying to get a PC with a RS485 convertor and a NI4100 to talk over rs485 before I go back to coding to control the equipment):
// Setup RS485 Port + store incoming string
DATA_EVENT[dvRS485]
{
ONLINE:
{
SEND_COMMAND dvRS485, "'SET BAUD 4800,N,8,1 485 ENABLE'"
}
STRING:
{
LOCAL_VAR CHAR IncomingData[20]
IncomingData = DATA.TEXT
SEND_STRING dvLog, IncomingData
}
}
I am then sending a string to the master from the PC and it comes out garbled, and then the other direction and it comes out garbled that way as well.
I have just hooked up 2 different RS485 converters together and the communications work find over that link, so that leads me to believe that the converters are ok as they also talk to the heating system without anything getting garbled.
- The amx ports work ok linked together via rs485
- The rs485 converters work ok linked together on the laptop
- The rs485 converter work ok connected to the heating system
But..
- The rs485 converter connected to the amx produces garbled messages
- The amx connected to the heating produces garbled messages
Any other ideas/suggestions?
How are the RS485 converters powered? Do they get power from the RS232 port? If they do then I suggest using an RS485 converter that can accept an external power source. An AMX comm port is not the same as a PC comm port since an AMX comm port can natively do both RS232 and RS485/422. The AMX comm port shouldn?t be used as a power source since the handshake lines (where the converter is stealing power from) aren?t implemented the same as a regular PC comm port. The AMX comm port is smarter.
Are you plugging the RS485 converter directly into the AMX comm port? If you are (or if you are using a premade cable between the converter and the AMX comm port) then I suggest putting a 3 wire (RX,TX, and GND) cable between the RS485 converter (on the RS232 side of course ) and the AMX comm port for the same reasoning as stated in the previous paragraph.
I?ve run into both of the above scenarios and each of them produced symptoms similar to yours. Hope some of this helps.
You may also find that the A & B lines need to be crossed between the Master & the heating interface - there are many variations to labeling of 485 pinouts so it's worth trying A-B & B-A
Heatmiser looks like it uses Y & B lables, so I'd definately cross-over as this can result in bit flip which would explain your '1' appearing a 'g'.
HTH
Roger McLean.
Thank you all very much for your help!!