Hi guys. First up, I have gone through all the MODBUS vids (thanks) and used the examples, but there are a few things I don't understand. I'm really sorry to ask, because I know these are simple things for you all, but I don't know where else to find this info... there is no one else I can ask.
I have this V350 which is my "master" and a heat pump which is Modbus enabled, that I am trying to read data from, which would be the Slave. I have no means of programming anything on this heat pump; I cannot download a program to it, so I cannot put the Modbus Slave demo program on it (do I have to do this?! I mean how do you handle that, with stuff that isn't a PLC? Do they default to being "Slave" anyway?). I have some info for it that tells me the default address for the heat pump is 9, and that the COM setup is defaulted to 9600, 8, E, 1 (although I may be able to change this if I have to). I can upload the modbus "map" I have for the heatpump if it helps?
So I used the example Modbus Master program given in the videos and I have changed the settings in the COM INIT function block accordingly.
I would like to read the heat pump's setpoint temperature, then display it on the HMI. According to the info I have the heat pump uses holding register 0x24 for this value. I'm assuming this is a hex value and I have to covert to decimal, which is (I think) 36? so I have entered "36" as the value for the start vector in the MODBUS RHR fb. The length of that vector is (for now) just 1, as I am only reading this one register. I have also set the slave ID to 9 here too. The demo program takes the value from that register, and plonks it into MI5 on the Master. Well, nope. I can't get it to work.
I am using the V350's RJ11 connection. It's only 2 wires for MODBUS although the connection on the heat pump has 3: A+, B-, and GND. I was just using A and B.
If I can crack this little bit, I am pretty happy that I can do whatever else I need, it's just getting the basics - and teaching yourself something is never easy! What am I missing here? Is it that my physical connections are wrong, or is it programming..? Any advice is so welcome. I feel very stupid.
Alison