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