hello, I'm working on simple project. could you help me?
my project:
when I press "set" button on HMI, then Led 13 on Arduino lights up.
when I press "reset" button on HMI, then Led 13 on Arduino lights off.
if you want to get a register from your slave why do you need to call two registers with two different methods?
As other already asked: come up with a link to your slave device.
And additionally: clearly point out which simplemodbusmaster library you are using (LINK!!!)
thank you for respond
my devices are consist of Delta HMI (DOP-B10E615), Arduino UNO R3, MAX485.
I would like to commiunication on Modbus RS485 by 2 wires. and using "simplemodbusmaster" library.
I'm new at arduino and I can't write right codes.
please check attachments & guide me.
Why have you choosen READ_HOLDING_REGISTERS für Register 60 vs. PRESSET_MULTIPLE_REGISTERS for reading Register 100?
I just used an example on youtube. according to the simplemodbusmaster manual:
Function 1 - READ_COIL_STATUS 1 // Reads the ON/OFF status of discrete outputs (0X references, coils) in the slave.
Function 2 - READ_INPUT_STATUS 2 // Reads the ON/OFF status of discrete inputs (1X references) in the slave.
Function 3 - READ_HOLDING_REGISTERS 3 // Reads the binary contents of holding registers (4X
references) in the slave.
Function 4 - READ_INPUT_REGISTERS 4 // Reads the binary contents of input registers (3X references) in the slave. Not writable.
Function 5 - FORCE_SINGLE_COIL 5 // Forces a single coil (0X reference) to either ON (0xFF00) or OFF
(0x0000).
Function 6 - PRESET_SINGLE_REGISTER 6 // Presets a value into a single holding register (4X reference).
Function 15 - FORCE_MULTIPLE_COILS 15 // Forces each coil (0X reference) in a sequence of coils to
either ON or OFF.
Function 16 - PRESET_MULTIPLE_REGISTERS 16 // Presets values into a sequence of holding registers (4X references).
could you give me a simple example for modbus?(Industrial HMI & Arduino)
An Example will not help you, because it should fit to your display.
I checked your attached PDF. This PDF only describes the electronic interfaces, i.e. which PIN is what in 8 different languages, wtf. Make a diagram and a picture of how you have connected to your hardware.
What you need is a datasheet, where the REGISTERS are described and with which function (1, 2, 3, 4,5, 6, 15,16...) you can read/write which register. Please check that on your own, where you can find that information. I will not read a 140MB documentation for you. Please check the 2000 pages on your own.
As it seems to me that this is a highly customizable display you have to "program/define" all that stuff on your own on the display. I don't have any information what you have done so far.
If this is your first Modbus project, I highly recommend following:
buy a simple Modbus device, a temperatur sensor or a relay board and experiment with that simple device to get knowledge about Modbus and how to implement simplemodbus on an Arduino
if you are familiar with Modbus and the library move on to the display
Frankly spoken: you want to fly to the moon but failed already to ride the bicycle to the next bus stop ...