0

I have modbus touch panel with 4 buttons which is connected to a modbus relay board via rs485(A and B).

I want to program the touch panel so when i click a button to open a specific relay in relay board.

As i see from the touch panel manual and his registets every button has 0 or 1 value.

My question is what i need to do?? Should i write to touch panel registers or write to modbus relay?? How can i take the command that is coming from the panel and day to relay to open? I am a little confused withbthe process i need to follow.

Markos
  • 3
  • 1
  • 6
  • Please provide additional information - e.g. model numbers, or links to manuals, for the panel and relay (different units have differing capabilities) and details of what you have tried. You may find the [how to ask](https://stackoverflow.com/help/how-to-ask) and [on-topic](https://stackoverflow.com/help/on-topic) articles useful. Also if the units are linked via RS485 (and not TCP) then please remove the `modbus-tcp` and `modbus-rtp-over-tcp` tags. – Brits Oct 09 '20 at 07:18
  • Please edit your question when providing extra info (it gets lost if you do this in the comments). Some touch panels are Modbus masters (when you press a button it communicates with a Modbus slave to change something) others are a slave (something else, for example a room control unit, regularly polls it and takes action when required). From the manual provided I suspect that your unit is a slave only. This means that you will need something else to act as a Modbus master; your relay may support this, but most cheap units don`t, so you will probably need third device (computer, PLC etc). – Brits Oct 10 '20 at 19:44

1 Answers1

0

First of all you have to know that Modbus communication works in a Master/Slave perspective, in which only master can send requests, slave will only reply to those requests.

So touch panel have to be the master in communication, the relay board will be slave.

Then, Modbus identifies every 16bit parameter with a Register Address; a list of addresses make a Modbus Map. To correctly send request to the relay board, you have to know the modbus map of the relay board:

(for example)

  • Register: Relay 1 command, Address: 0
  • Register: Relay 2 command, Address: 1
  • Register: Relay 3 command, Address: 2 etc...
  • Register: Relay 1 status, Address: 10
  • Register: Relay 2 status, Address: 11 etc...

The task you have to accomplish is to make your touch panel send a write request to the relay board; the request will be to write a "1" in the register linked to relay.

Commercial touch panels often have wizards and the implementation shouldn't be too much specific

  • https://smallpdf.com/shared#st=ba2a1ac3-65eb-491d-8566-9ebb8e7805b1&fn=20201010_114522.pdf&ct=1602319876074&tl=share-document&rf=link – Markos Oct 10 '20 at 08:53
  • This is the manual of my touch panel. I know that i need to send a write request to the relay board. What i don't see is what this touch panel sends when i click the button..The write request needs to be saved somewhere inside touch panel? Or should i receive somehow the touch panel response and modify it and finally send the write request to relay board? – Markos Oct 10 '20 at 08:59
  • My relay board is connected via ethernet to my pc and i have managed to read and write by setting up a client to my computer. The touch panel is connected via rs485 to relay board – Markos Oct 10 '20 at 09:03