easy-forum

English Support - Hardware => easyE4 => Thema gestartet von: AlesH am Mai 29, 2025, 16:48:15 Nachmittag

Titel: EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: AlesH am Mai 29, 2025, 16:48:15 Nachmittag
Hi, I'm straggling with Modbus RTU. I have set all communication data between Master and slave but I don't understand a logic of writing of a single coil and MU acyclic request module. How I need to write a program.
I'm asking Eaton or other forum expert to provide me an example.

Thank you in advance Ales
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: w.sprungmann am Juni 02, 2025, 08:23:52 Vormittag
hallo,
please upload the project
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: AlesH am Juni 03, 2025, 09:49:22 Vormittag
hallo,
please upload the project

Hi w.sprungmann,

please find attached the project
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: radar17892 am Juni 05, 2025, 14:41:41 Nachmittag
The Modbus register table is required for correct addressing.
See example image below.
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: AlesH am Juni 09, 2025, 13:00:30 Nachmittag
Hi radar17892,
I have try it but doesn't work
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: radar17892 am Juni 12, 2025, 15:58:22 Nachmittag
Hello Ales,
I've taken a look at your project and I think you don't need a MU block. You're already writing Q33 cyclically (100ms) to Slave 1.
It makes no sense to use an acyclic MU block in the program if it is triggered cyclically.
Can you post a picture of the slave Modbus registers?
Please highlight the variables you want to communicate with slave 1.


Thomas
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: Konni66 am Juni 12, 2025, 16:04:02 Nachmittag
Hello all!
I did not have a look onto the entire program...
Only one question: Are you sure you can write a coil?
Not all systems allow to write coils for security reasons. Because if you do so, the automation program loses control on coils.
Just an idea.

Geetz konni
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: AlesH am Juni 16, 2025, 09:43:53 Vormittag
Hi radar17892,

please find attached the pictures.
If I not use MU block how can I define which MW will be my used in my project?

Ales

Hello Ales,
I've taken a look at your project and I think you don't need a MU block. You're already writing Q33 cyclically (100ms) to Slave 1.
It makes no sense to use an acyclic MU block in the program if it is triggered cyclically.
Can you post a picture of the slave Modbus registers?
Please highlight the variables you want to communicate with slave 1.


Thomas
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: AlesH am Juni 16, 2025, 09:47:20 Vormittag
Hi Konni66,

Yes, I'm sure, I have a slave with 32 relays.
https://www.waveshare.com/Modbus-RTU-Relay-32CH.htm

BR.,
Ales

Hello all!
I did not have a look onto the entire program...
Only one question: Are you sure you can write a coil?
Not all systems allow to write coils for security reasons. Because if you do so, the automation program loses control on coils.
Just an idea.

Geetz konni
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: radar17892 am Juni 18, 2025, 21:50:26 Nachmittag
This is what I needed:
https://www.waveshare.com/wiki/Modbus_RTU_Relay_32CH (https://www.waveshare.com/wiki/Modbus_RTU_Relay_32CH)

Register Address Introduction and Modbus RTU Command Introduction

For example, it is more efficient to write the status of 16 or 32 relays with one command (0x0F write multiple coils) than to write each one individually.

activate the checkbox little endian
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: AlesH am Juli 03, 2025, 11:29:12 Vormittag
Hi radar17892,

all set, the point is that we need somewhere define on which Marker Word to assign. This is done with MU-Modbus RTU acyclic request. If I set all of this parameters I will have on marker area assignment all 32 markers related to selected MW colored with green (Read). If I want to have Read/write is in yellow. To have the writ function must be orange.
When I upload program with this configuration I will have few seconds before Modbus RTU goes in fault. To reset the fault I need to reupload a program or reboot the PLC.
I'm also sniffing the communication between Master and Slave but no data is transferred.
Titel: Antw:EASY4 MODBUS RTU write Singel coil example needed
Beitrag von: AlesH am Juli 08, 2025, 14:47:16 Nachmittag
Moreover if Start dress is 0 it's impossible to upload the project. See attach