modbus RTU

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

modbus RTU

Post 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

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post by viktor_au »

Hi
Can you please provide the flowcode project?

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post 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

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post by viktor_au »

Hi

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

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post by franky1978 »

HI,
these are the examples
Thank you
Attachments
TEST_MODBUS.fcfx
(8.84 KiB) Downloaded 372 times
ModBusSlaveDemo.fcfx
(12.46 KiB) Downloaded 355 times

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post 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?

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post 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

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post 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?

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post 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?

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post 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

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post 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?

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post 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

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post 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.

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post by franky1978 »

hi Victor
there are problems instead, because I can't read or write registers between arduino and wecon display

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post by viktor_au »

Hi
Please attach your flowcode file.

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post by franky1978 »

hi Victor
here the flowcode file
Attachments
TEST_MODBUS.fcfx
(8.33 KiB) Downloaded 367 times

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post 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

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post 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

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post by viktor_au »

Hi
Can you pls attach the photo of display menu?

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post by franky1978 »

hi Victor
here the photo
Attachments
Cattura.JPG
Cattura.JPG (43.67 KiB) Viewed 339760 times

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post 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?

franky1978
Posts: 23
Joined: Thu Jun 13, 2019 2:29 pm

Re: modbus RTU

Post 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

viktor_au
Posts: 362
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 45 times
Been thanked: 62 times
Contact:

Re: modbus RTU

Post 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
Attachments
HMI_as_Master.jpg
HMI_as_Master.jpg (49.9 KiB) Viewed 339717 times
FC8_Scada_1.jpg
FC8_Scada_1.jpg (43.25 KiB) Viewed 339717 times

Post Reply