Modbus communication between Omron and Twido

smarius

Member
Join Date
Feb 2010
Location
romania
Posts
9
hi,
i want to make a communication via modbus protocol between a Omron and a Twido PLc's. Can somebody help me?
Thank you
 
What Omron PLC are you using? Many Omron PLCs (CP1L, CP1H, CJ1, CJ2, CS1, NSJ) are capable of Modbus RTU communications either as a Master or as a Slave.
 
CJ1 / CJ2 PLCs can be either a Modbus RTU Master or Modbus RTU Slave when using CJ1W-SCUxx serial modules.
If the Twido can be either a Modbus RTU master or Modbus RTU slave, then you should be able to get the 2 devices to share data.
 
Twido can be modbus master or slave.
Modbus master isn't hard to program to twido, but you can only transfer words, bits are not supported, so you have to mux them to words. If twido is slave, you can also use bit memories on modbus.

Is there allready optional second communication port installed on twido. If not, I recomend you to buy it, price is something 30-40 euros (serial), I think.
It will help you, when you test your programs, because you can debug twido program more easily.
You can use also programming port for communication, it is RS485, but I would use optional port for modbus communication and leave port1 for programming.
And more info is needed, which PLC is master, serial or ethernet protocol, how much data is transferred, do you want read and also write from/to another PLC or only read from another PLC...

OPC is also one solution, then both PLC's can be slave, but you need OPC server and license for server.
 
Last edited:
And more info is needed, which PLC is master, serial or ethernet protocol, how much data is transferred, do you want read and also write from/to another PLC or only read from another PLC...


i want to use a serial protocol, read and write from/to another PLC, and the master PLC can be Twido or Omron

Thank you
 
Ok, on twido you can use so called comm macros for modbus master commucation. If you use comm macros, then you don't need take care of nothing else than slave address and how many words are trandsferred at time. Twido takes care of all other.

1. Configure first comm macros, if you use twidosoft, you find them under macros -> Comm. On twidosuite it can be little bit different method. I use twidosoft, because twidosuite don't work on my computer.

Check mark configured box for comm macro 0. And choose which network you use (probably port2) and give network address (slave address)

On functions page give starting addresses for C_RDNW and C_WRNW comm functions, example 500 and 600.
C_RDNW is shortening of Read multiple words and WRNW means Write Multiple words.
If you use 500 for read, then first word value readed from slave PLC is on Twido memory place 507. Value, which you want write to PLC, have to be placed to memory place 606. Comm macro uses memory places 500-506 and 600-605 internally for comm macros, this of course depends of which memory areas is configured for comm macros on configrataion window at step1.

I said it liitle bit wrong before, you can use also bit addresses, but only one bit can be readed/writed with comm macro. So its better use multiple words commands also for bit addresses, mux bits to words before.

2. On ladder you have to make counter, which gives read and write commands for these 2 comm macros. You can only have one comm macro activated at same time.

3. Now you have to only tell to twido which memory place is starting address for modbus query.

For this you have to use operate block with command %MW503:=10. You configured before, that comm macro uses memory addresses %MW500->. %MW503 tells, that modbus starting address on slave PLC is %MW10 = Modbus 40011.

4. Call com macro C_RDNW to use with command C_RDNW 0 24 (on operate block). This command calls commm macro with instance number 0. and number 24 tells to comm macro, read 24 words from slave PLC. If you want read example 40 word then command is C_RDNW 0 40.

5. Same for WRNW comm macro. %MW603 tells to comm macro which is starting address for writing on slave plc. %MW606 is first value to writed to slave plc.

6. Call com macro with command C_WRNW 0 30. Now twido writes 30 Words to slave PLC.

7. And if you want see real code inside PLC for comm macros, after you have configured all this:

- Change ladder editor to list editor. Then from tools-menu-> Display real code equivalent fo macros.

You can have up 16 different slave's on twido, if twido is modbus master. Problem is that, there is only 3000 memory words for programming on twido PLC. I think, that you can read/write up to something like 100 words at one time, so maybe you only need two different modbus messages.
If you need read/write more words than 100, you have to use several messages for communication.

And if you look twido help files, you find under comm macros little bit more information for this.


Maybe someone else knows how modbus master is configured on Omron PLC...
 
Last edited:

Similar Topics

Good day Programmers I have a RSTi-EP CPE100 Standalone Controller from Emerson as well as a STXMBE001 (MODBUS TCP/IP) as a Modbus communication...
Replies
0
Views
637
Hey Guys, I am struggling to read data from a "JUMO" make controller using modbus RTU with MLX1400. The communication between the devices has...
Replies
18
Views
5,080
Hi All, I am using an Accuenergy Data Acquisition Server (https://www.accuenergy.com/products/aculink-810-data-acquisition-gateway-server/) to...
Replies
9
Views
2,679
we use M580 which have an Modbus RTU port correct if iam wrong now should i have to read input data from ab micrologix through read var block and...
Replies
0
Views
1,860
To execute MODWR and MODRD instruction of Delta PLC, I need address of register in VLT 2800 but I cannot figure out. Can any body help me? I want...
Replies
7
Views
7,054
Back
Top Bottom