RS485 Problems

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)

Comments

  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,159
    You know,

    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)
    :)
  • avosystemsavosystems Junior Member Posts: 13
    Finally got back to this one, and have a laptop with a 485 converter on the end connected to the heating, which works perfectly.
    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!! :o)
  • Jimweir192Jimweir192 Junior Member Posts: 502
    Can you post some example strings and the code your using?
  • avosystemsavosystems Junior Member Posts: 13
    Unfortunately I don't think it's down to the code, I'm starting to wonder if the rs485 isn't working correctly in the latest firmware.
    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.
  • Jimweir192Jimweir192 Junior Member Posts: 502
    You could also try enabling 485 on a 2nd Serial Port on the Master and send strings between these 2 using a 485 connection - see if you still get a garbled response locally on the master
  • avosystemsavosystems Junior Member Posts: 13
    Good idea, I will try that shortly and post the results.
    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.
  • avosystemsavosystems Junior Member Posts: 13
    This is strange..
    - 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? :)
  • Joe HebertJoe Hebert Junior Member Posts: 2,154
    avosystems wrote: »
    - The rs485 converter connected to the amx produces garbled messages
    - The amx connected to the heating produces garbled messages
    Two things come to mind, power and/or cabling.

    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.
  • Jimweir192Jimweir192 Junior Member Posts: 502
    Are you using a pre-made / moulded cable? You should just be using pins 1(+9), 4(+6) & 5 for gnd at the Master

    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
  • annuelloannuello Junior Member Posts: 294
    I second Jim's comments. On the AMX "A" is Data-, on a Maxim RS485 chip "A" is Data+. My rule of thumb is to meter both lines in the idle state to figure out which one is D+ & D-. Then wire D- to the AMX "A" and D+ to the AMX "B". Inverted data (due to incorrect polarity) will always come through garbled.

    Roger McLean.
  • avosystemsavosystems Junior Member Posts: 13
    Brilliant! That is exactly the problem.. I can't believe I didn't think to try reversing them but I just assumed they had their labeling correct!
    Thank you all very much for your help!! :)
Sign In or Register to comment.