0
votes

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.

1
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 and 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
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

1 Answers

0
votes

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