Page 1 of 1

modbus RTU

Posted: Sat May 20, 2023 9:17 pm
by franky1978
Hi everyone
I would like to use a Wecon hmi display to view the value of some variables and change the value of others by reading and writing registers, the display in question communicates via the modbus protocol, but I can't connect the arduino mega to the display, I can't is there a way to establish communication between the two, I tried both with RS232 and with RS485 but nothing changes, obviously with the appropriate serial ttl converters, can you help me?
thank you all

Re: modbus RTU

Posted: Sat May 20, 2023 11:22 pm
by viktor_au
Hi
Can you please provide the flowcode project?

Re: modbus RTU

Posted: Sun May 21, 2023 2:00 pm
by franky1978
hi Victor_au,
I don't have a specific project, I'm trying to use the examples but I don't see arduino communicating with the wecon display, I'm simply trying to write a value from arduino to a display register via modbus RTU; the display is set with the modbus RTU slave all function communication protocol
Thank you

Re: modbus RTU

Posted: Sun May 21, 2023 11:11 pm
by viktor_au
Hi

Can you please attach the example flowcode file you are using?
Viktor

Re: modbus RTU

Posted: Mon May 22, 2023 6:38 am
by franky1978
HI,
these are the examples
Thank you

Re: modbus RTU

Posted: Mon May 22, 2023 11:39 pm
by viktor_au
Hi

You wrote - I tried both with RS232 and with RS485...
Did you write the flowcode program?
What is the display modbus slave N?
How many registers this display use?
What model is it?
Can you please attach the display information?

Re: modbus RTU

Posted: Tue May 23, 2023 6:42 am
by franky1978
hi,
yes I'm trying in all ways and in all configurations, but I can't get the arduino to communicate with the display.
this is the link of the manufacturer https://www.we-con.com.cn/en/product_page/190.html.
with its software the pages are created and the communication parameters can be set, I set the RS485 serial also trying different communication speeds and the modbus rtu slave communication protocol

Re: modbus RTU

Posted: Tue May 23, 2023 7:10 am
by franky1978
I tried to use the Easy MODBUS Viewer program to check the output from the arduino serial (ttl/serial converter) but nothing is seen, is there a definitely working example with which to carry out tests?

Re: modbus RTU

Posted: Tue May 23, 2023 11:52 pm
by viktor_au
Hi
Can you attach the manual for PI3070ig please.
You didn't answer my question:
Is Arduino a Modbus Master or Wecon display a master?

Re: modbus RTU

Posted: Wed May 24, 2023 6:58 am
by franky1978
hi,
on the wecon site there is only the manual for the software to create the hmi pages but there is no manual describing the communication protocol, probably because it is possible to set multiple protocols according to need.
anyway the hmi display is set as modbus rtu slave, so arduino will have to be master i think

Re: modbus RTU

Posted: Wed May 24, 2023 11:46 pm
by viktor_au
Hi

Looks like the HMI is a Modbus Master, and Arduino is a slave. Check the:
https://forum.arduino.cc/t/modbus-ardui ... i/420215/7

Is it possible to attach the block-diagram of your project?
If Arduino is a slave, how many slaves do you plan to use?

Re: modbus RTU

Posted: Thu May 25, 2023 8:04 pm
by franky1978
Hi Victor,

when I use it with other plc, the display is set as slave and the plc as master, so I think it must be like this also using arduino, the example I'm using I attached before; I would like to use only one master and one slave

Thanks

Re: modbus RTU

Posted: Thu May 25, 2023 11:21 pm
by viktor_au
Hi
Looks like the problem is solved.
All the best with your project.
You have the Modbus demos and know the master-slave relationship.
Should be no problems now.

Re: modbus RTU

Posted: Sun May 28, 2023 3:15 pm
by franky1978
hi Victor
there are problems instead, because I can't read or write registers between arduino and wecon display

Re: modbus RTU

Posted: Mon May 29, 2023 7:29 pm
by viktor_au
Hi
Please attach your flowcode file.

Re: modbus RTU

Posted: Tue May 30, 2023 6:31 am
by franky1978
hi Victor
here the flowcode file

Re: modbus RTU

Posted: Wed May 31, 2023 7:14 am
by viktor_au
Hi,
I don't think we understand each other.
Please forget for a while the FC8 project.
----------------------------------
What do you think about the next videos on Youtube?
WECON PI3070ig HMI Communication with Siemens PLC S7 1200
Cloud SCADA Remote Access with WECON PI3070ig HMI
Arduino Mega HMI touch screen "7 inch TFT LCD" based
Arduino HMI intelligent TFT LCD based Sensor Monitoring
Using DWIN 7-inch TFT LCD Display with Arduino to Control Relay

Pls Google->modbus-arduino-and-hmi/420215

Re: modbus RTU

Posted: Fri Jun 02, 2023 8:44 am
by franky1978
hi,
I have seen the videos, but what I would like to do is use the wecon hmi with arduino but using or v8 or v10 flowcode

Re: modbus RTU

Posted: Sat Jun 03, 2023 2:22 am
by viktor_au
Hi
Can you pls attach the photo of display menu?

Re: modbus RTU

Posted: Tue Jun 06, 2023 7:30 am
by franky1978
hi Victor
here the photo

Re: modbus RTU

Posted: Wed Jun 07, 2023 1:44 am
by viktor_au
Hi
I have to ask more questions:
Do you use PISudio?
Did you manage to find out what is the master?
Is it display or Arduino?

Re: modbus RTU

Posted: Wed Jun 07, 2023 6:59 pm
by franky1978
hi victor,
yes I use PI studio, as you see in the image the display is slave therefore I use the modbus master on arduino...
have you got to use the modbus with arduino and flowcode?
thanks

Re: modbus RTU

Posted: Thu Jun 08, 2023 1:05 am
by viktor_au
Hi

A few words about SCADA.
Note: I hope the more advanced users will add more info and correct me...

If you have bought SCADA component for FC8, you will see, that after starting a new project as SCADA, FC8 will load the Ard SCADA component.

What happens next?
You create the Flowcode SCADA program, and then export it as a Matrix SCADA runtime application (software program) to be run on Win PC.
Next: you can run this software on PC and control PLC (say, modbus slaves).
-------------------
FC8 SCADA allow you:
- add some knob, fans/pumps, graph plotter, etc.
You can build the GUI the way you like.
----------------------------------------------------------------
I hope the Matrix stuff will correct me, but PC with SCADA software acts as the Modbus Master.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

WLC Systems example
Modbus SCADA is a software for data collection and system monitoring. The software collects data from Modbus enabled systems (e.g. PLCs, Instruments, I/O Modules configured as Modbus slave devices) and displays it in a friendly way on HMI - Human Machine Interface. Modbus SCADA can be easily integrated with many data acquisition modules and also offers logging historical data. It is cost-effective and, due its simplicity, especially designed for low-volume projects.

Diagrams attached