Dear LeTomas AHUMADA! I asked following question under M17.2 too, but I put it here because its topic belongs here: Is it possible that the M221 is part of two different communication systems (e.g. both MODBUS RTU): in one BUS the M221 would be the master, controlling several fans as slaves (e.g. 16 pcs fans); and in the another communication system it would be a slave among 12 cooling devices, containing the same M221 CPU's each, but controlled by a superior master CPU of any kind/manufacturer? (So in one MODBUS it would be the master, but in the another it would be the slave, controlled by a supervisory PLC). Thank you in advance for your reply.
Hi Viktor! Good call on creating another comment otherwise it is problematic for me to follow 😅. If the devices are on ModbusTcp over ethernet then the M221 can be master/slave (client/server) in the same port. If the devices are on Modbus Serial then on that network only one master can be so you can use the M221 port to control the slaves. Then if you have a different network that another devices is the master then you will need another serial port in the m221 to be slave. The choice for you will be to have a m221 with ethernet and 1 serial port + the modbus cardtridge or have m221 without ethernet but with 2 serial ports.
Hello, if I have several PLCs (example: an HMI, M580) to communicate with the m221, can I use a single read_var block and a single write_var block for communication?
Hi there! You can use the M221 as a server in a modbus tcp network then you will have multiples clients. You will need to check how you are going to use the M580 to read to the m221
@@LeTomasAHUMADA thank you very much, I have a project that I want to set up, to have 4 PLCs communicate (M221,M580, HMI, ARDUINO OPTA AND SIMATIC OIT2040). Basically, I want to create a decentralized architecture and send my data to everyone.
@@LeTomasAHUMADA i used the requet function with the M580 to the M221 where i read a variable ( ex: %MW10 ) and write on another variable( EX: %MW5 ) and on the M221 i create an animation table with these two variables. isn't there a solution where i can read and write on the same variable?
Hi Leandro, Thank you very much for the great videos. I am now experimenting and learning with M221. Regarding Modbus TCP IP. If I only want to Read/Write to the M221 from a another device, do I still need to set up a communication block? Is there a separate manual available for Modbus communications? Thank you
Hi there! You have different ways but the easiest is to configure the network settings on the m221, check the m221 is server then try to keep the %M and/or %MW ready for the client to read/write them.
Hola Leandro. Excelentes videos. Me han ayudado mucho! Estoy teniendo problemas con la función read/var en el machine expert con un TM262. Tendrás algún ejemplo que me puedas compartir.?.
Buenas Gerardo, en el siguiente link podras encontrar el exported pou donde se puede ver como se utilizan los bloques de comunicacion : schneider-electric.box.com/s/bfg5ow6frqlr0lhkhweokic0j25qqg2t La direccion en el addm es un string en donde en tu casa es ‘1.(slave address)’. Dentro del com serie deberas agregar un modbus manager y configurar el m262 como master. Como importar el pou en tu project por las dudas fijate el siguiente video: schneider-electric.box.com/s/4bvegb89udef194mavkubonmoc6pb2of
Hi Ahmed! I have not made any video related to wireless communication probably because in the offer of this plcs (M2xx) we do not have a wireless communication card (but you can use the TCSEGWB13FA0 … i do not have it to test it ☹️) like the m580 with the PMXNOW0300. In my house i use wireless communication between some of the devices but i use a tp link mesh system and before that a vap11s-5g.
Hi Ben! I am still working in the content for the PID so far i managed to divide it like this (no video or presentation yet): _M17.1 PID in M221 _M17.2 PID Assistant _M17.3 PID Programming Part 1 (Call PID + animation table for variables) _M17.3 PID Programming Part 2 (Configuration) _M17.4 PID Implementation (Encoder + Motor + PWM Output (T)) For the implementation i was thinking in Speed control with PID but i can probably add temperature control. Are you interesting in heating control or refrigeration control?
@@LeTomasAHUMADA this looks ideal. I’m mostly interested in heating side of pid with thermocouples and SSR output. Looking forward to these videos. Thanks
Hi there! The first thing is to configure the Etherley port: th-cam.com/video/-WnZD-kgFJ4/w-d-xo.html Then you need to locate the data to be accessed by the PC. On the PC you will need a driver related to Modbus Tcp and use modus function for holding registers.
@LeTomasAHUMADA Hi! Configuration I already did . I have a custom SW with modbus driver to work with and it requires modbus device ID ( I think in my case it's 0 , when I add ip address on Modbus TCP with ID 0 ) and register number to read from device ( from 40000 to 49999 ) or write - but where I can find address of PLC variables ( like %IWN300 in IO scanner used ) . Do I need to add all commands in channel assist for my PC IP - read , write , read/write?
Buenas! Si usas los bloques deberías agregar una logica antes de la ejecucion para no realizar la comunicacion con el dispositivo apagado. Esto deberia ser configurable desde el hmi o en tu logica intentar communicarse x cant de veces y dejar de intentar. Solo son ideas las que puse en este comentario. Saludos
Hi A S! The initialisation is useful when you want to set in the server (slave) some values before the communication of the values defined in the channel. I strongly recommend you to use the IOscanner rather than the function blocks, please take a look in the next video: th-cam.com/video/nyXspkScEjk/w-d-xo.html
Using rs232 I need to acquire the value of a weight indicator in my Schneider MODICON M221 plc, I know that in ecostruxure machine expert basic the block for the ASCII protocol is Send Receive Message, my question is which address should I use to be able to obtain the floating value of weight that the indicator sends me
Hi Diego! The info received from the device should be converted in the plc from word to float. I believe you can assign the value to a %MW60 and %MW61 then in the code use the %MF60 (check if swap the words is needed)
Hi Mahmoud! If you have an Scada then it will much better that the scada is the client and the m221 is the server. You will probably need to add a modbus tcp driver in the scada to communicate with the m221 to access to the %M and %MW areas.
Hello, if I have several PLCs (example: an HMI, M580) to communicate with the m221, can I use a single read_var block and a single write_var block for communication?
If you are going to use the Ethernet port of the Modicon M221 for Modbus Tcp then yes you can do it. Check my next playlist for the softwares in Schneider: th-cam.com/play/PLFqT6GhMpgpJCPj3K8OgGura0dYPHEqJS.html
@@LeTomasAHUMADA thanks! Do you have any video about this content? And tcpmodbus support 2 master? Because hmi---->plc(tm221)----->tcpmodbus device. Hmi and PLC would be a 2 master isn't it?
@@jardasfernandes6886 Hello, if I have several PLCs (example: an HMI, M580) to communicate with the m221, can I use a single read_var block and a single write_var block for communication?
Hi, thanks for your videos. I would like to connect the M221 (which is already connected to an HMI through ethernet) to a PC that gives it commands through ethernet using a switch. Is it something possible?
Yes you can but probably it will be much better to use IOscanner. I have made this video using Serial but you can instead use MOdbusTcp: th-cam.com/video/kZul3e6Q_Rg/w-d-xo.html
Hi there! If you are using the M221 the encoder must have Modbus Serial or Modbus Tcp, they also need to be compatible with the Modbus Function available in the controller.
Hi Leandro, Is there a way to use the M-2-2-1 as a modbus gateway : ip-rtu ? : I have multiple Modbus RTU (non IP) devices that I want to pilot/monitor remotely from the M221 connected by IP. Usage : I want to send requests/orders (example a speed) to the M221, and the M221 send it to the right device (example a pump).Thank you
Hi there! Yes it is possible but it will need manual work in your code so the variables from the slave are available for you client on the ethernet network. I can try to make a video about it.
Thank you Thomas. I'm now able to read on a regular basis the values on the Modbus RTU device and "publish" it on Modbus TCP. On the other way, I'm able to send data to the M221, which transmits to the devices. Regards
Like ascii message ? In the M221 I believe that is only possible using the Modbus Serial Communication not the Modbus Tcp because you must know where to send the data to (register)
Hi there! I just coming back from my holiday. If you are able to access to the plc then you can check the status to make it in run.(check if the switch is not in stop)
Hola Leandro. Como debería ejecutar los bloques Read_Var y Write_Var si posee múltiples dispositivos ethernet (en modo servers). ¿Se puede ejecutar simultáneamente los bloques o el PLC no gestiona automáticamente las tramas? Yo suelo emplear una cuenta que se incrementa cada 100ms y por cada valor de dicha cuenta voy ejecutando el bloque correspondiente, pero siempre tuve la duda de cuál es la manera correcta de hacerlo. Saludos.
Buenas Nestor! Te voy a hacer honesto el uso de bloque no lo uso desde que podemos utilizar el Ioscanner y es un antes y despues… es mas sencillo: th-cam.com/video/nyXspkScEjk/w-d-xo.html Pero si queres seguir haciendo lo de los bloques podes hacer comparaciones de un numero que se va incrementando a medida que tenes un done o error a la salida del bloque y con cada comparacion ejecutas un bloque pero lo mejor es el Ioscanner.
@@LeTomasAHUMADA si, respecto del ioscanner he tenido mala experiencia tras perder conexión con un dispositivo haciendo que la conexión no retome automáticamente bloqueando el resto de las comunicaciones
@@desatingenieria hay unas variables de sistema para checkear por código la conexión y resetearla si hay un problema quizas falto eso pero no reemplazaría el ioscanner por bloques.
@@LeTomasAHUMADA si, las he empleado, pero he tenido mejor resultado con los bloques, en particular al comandar variadores de velocidad los cuales al perder comunicación generan muchos problemas. Gracias por tus respuestas.
Thank you so much for all Mr AHUMADA 🤝
you are welcome Hichem!
Thanks!
Thank you for your contribution to my channel ❤️🎉
Leandro buenos días. Muy buen video. Se puede cambiar el puerto 502 por otro en 221? Porque no puedo usar el 502 clásico para modbustcp. Gracias
Buenas, el puerto que se puede cambiar es el del simulator. Si en la configuracion del modbus tcp la opcion no aparece dudo que se pueda cambiar.
Dear LeTomas AHUMADA! I asked following question under M17.2 too, but I put it here because its topic belongs here: Is it possible that the M221 is part of two different communication systems (e.g. both MODBUS RTU): in one BUS the M221 would be the master, controlling several fans as slaves (e.g. 16 pcs fans); and in the another communication system it would be a slave among 12 cooling devices, containing the same M221 CPU's each, but controlled by a superior master CPU of any kind/manufacturer? (So in one MODBUS it would be the master, but in the another it would be the slave, controlled by a supervisory PLC). Thank you in advance for your reply.
Hi Viktor! Good call on creating another comment otherwise it is problematic for me to follow 😅.
If the devices are on ModbusTcp over ethernet then the M221 can be master/slave (client/server) in the same port.
If the devices are on Modbus Serial then on that network only one master can be so you can use the M221 port to control the slaves. Then if you have a different network that another devices is the master then you will need another serial port in the m221 to be slave.
The choice for you will be to have a m221 with ethernet and 1 serial port + the modbus cardtridge or have m221 without ethernet but with 2 serial ports.
Hello, if I have several PLCs (example: an HMI, M580) to communicate with the m221, can I use a single read_var block and a single write_var block for communication?
Hi there! You can use the M221 as a server in a modbus tcp network then you will have multiples clients. You will need to check how you are going to use the M580 to read to the m221
@@LeTomasAHUMADA thank you very much, I have a project that I want to set up, to have 4 PLCs communicate (M221,M580, HMI, ARDUINO OPTA AND SIMATIC OIT2040). Basically, I want to create a decentralized architecture and send my data to everyone.
@@LeTomasAHUMADA i used the requet function with the M580 to the M221 where i read a variable ( ex: %MW10 ) and write on another variable( EX: %MW5 ) and on the M221 i create an animation table with these two variables. isn't there a solution where i can read and write on the same variable?
please can u explene me
Hi Leandro, Thank you very much for the great videos. I am now experimenting and learning with M221. Regarding Modbus TCP IP. If I only want to Read/Write to the M221 from a another device, do I still need to set up a communication block? Is there a separate manual available for Modbus communications? Thank you
Hi there! You have different ways but the easiest is to configure the network settings on the m221, check the m221 is server then try to keep the %M and/or %MW ready for the client to read/write them.
@@LeTomasAHUMADA Thank you very much for the response. My controller and display should arrive this week, so I will experiment :)
Hola Leandro. Excelentes videos. Me han ayudado mucho! Estoy teniendo problemas con la función read/var en el machine expert con un TM262. Tendrás algún ejemplo que me puedas compartir.?.
Buenas Gerardo, en el siguiente link podras encontrar el exported pou donde se puede ver como se utilizan los bloques de comunicacion :
schneider-electric.box.com/s/bfg5ow6frqlr0lhkhweokic0j25qqg2t
La direccion en el addm es un string en donde en tu casa es ‘1.(slave address)’.
Dentro del com serie deberas agregar un modbus manager y configurar el m262 como master.
Como importar el pou en tu project por las dudas fijate el siguiente video:
schneider-electric.box.com/s/4bvegb89udef194mavkubonmoc6pb2of
Muchas graciss Leandro. Solo confirmando esto es para comunicación tcp/ip verdad?
Saludos
@@germartinez10 puede ser para modbus serial tambien, solo cambias el address en el addm
Is there any videos about communication between PLCs and Hmi wireless? and also for remote I/os ?
Hi Ahmed! I have not made any video related to wireless communication probably because in the offer of this plcs (M2xx) we do not have a wireless communication card (but you can use the TCSEGWB13FA0 … i do not have it to test it ☹️) like the m580 with the PMXNOW0300. In my house i use wireless communication between some of the devices but i use a tp link mesh system and before that a vap11s-5g.
Is it possible to use "anybus wireless bridge and bolt" to access for example PLC m221 module and remote I/O with bus coupler?
Any chance of a video explaining how to use the PID function. Specifically for temperature control?
Great videos :) thanks
Hi Ben! I am still working in the content for the PID so far i managed to divide it like this (no video or presentation yet):
_M17.1 PID in M221
_M17.2 PID Assistant
_M17.3 PID Programming Part 1 (Call PID + animation table for variables)
_M17.3 PID Programming Part 2 (Configuration)
_M17.4 PID Implementation (Encoder + Motor + PWM Output (T))
For the implementation i was thinking in Speed control with PID but i can probably add temperature control.
Are you interesting in heating control or refrigeration control?
@@LeTomasAHUMADA this looks ideal. I’m mostly interested in heating side of pid with thermocouples and SSR output.
Looking forward to these videos. Thanks
@@LeTomasAHUMADA good morning, is it possible to connect modbus tcp encoders and reading data from them ?
Hi Leandro ,
Can you advice how to properly configure M200 as IO card and communicate with card via tcp modbus with PC?
Hi there!
The first thing is to configure the Etherley port:
th-cam.com/video/-WnZD-kgFJ4/w-d-xo.html
Then you need to locate the data to be accessed by the PC.
On the PC you will need a driver related to Modbus Tcp and use modus function for holding registers.
@LeTomasAHUMADA Hi! Configuration I already did . I have a custom SW with modbus driver to work with and it requires modbus device ID ( I think in my case it's 0 , when I add ip address on Modbus TCP with ID 0 ) and register number to read from device ( from 40000 to 49999 ) or write - but where I can find address of PLC variables ( like %IWN300 in IO scanner used ) . Do I need to add all commands in channel assist for my PC IP - read , write , read/write?
Si apago un esclavo se pierde comunicación en este caso que recomendaría estimado gracias por du tiempo
Buenas! Si usas los bloques deberías agregar una logica antes de la ejecucion para no realizar la comunicacion con el dispositivo apagado. Esto deberia ser configurable desde el hmi o en tu logica intentar communicarse x cant de veces y dejar de intentar. Solo son ideas las que puse en este comentario. Saludos
What about the settings for the Initialization Request Assistant such as the initialization value? If this is not set up generic devices will not work
Hi A S! The initialisation is useful when you want to set in the server (slave) some values before the communication of the values defined in the channel. I strongly recommend you to use the IOscanner rather than the function blocks, please take a look in the next video: th-cam.com/video/nyXspkScEjk/w-d-xo.html
Using rs232 I need to acquire the value of a weight indicator in my Schneider MODICON M221 plc, I know that in ecostruxure machine expert basic the block for the ASCII protocol is Send Receive Message, my question is which address should I use to be able to obtain the floating value of weight that the indicator sends me
Hi Diego! The info received from the device should be converted in the plc from word to float. I believe you can assign the value to a %MW60 and %MW61 then in the code use the %MF60 (check if swap the words is needed)
Thank you , what about if I want to connect PLC with SCADA system , in this case SCADA will be client and PLC will be server?!
Hi Mahmoud! If you have an Scada then it will much better that the scada is the client and the m221 is the server. You will probably need to add a modbus tcp driver in the scada to communicate with the m221 to access to the %M and %MW areas.
Hello, if I have several PLCs (example: an HMI, M580) to communicate with the m221, can I use a single read_var block and a single write_var block for communication?
Can I use a hmi for communicate with tm221 already communicating with a tcpmodbus device?
If you are going to use the Ethernet port of the Modicon M221 for Modbus Tcp then yes you can do it. Check my next playlist for the softwares in Schneider:
th-cam.com/play/PLFqT6GhMpgpJCPj3K8OgGura0dYPHEqJS.html
@@LeTomasAHUMADA thanks! Do you have any video about this content? And tcpmodbus support 2 master? Because hmi---->plc(tm221)----->tcpmodbus device. Hmi and PLC would be a 2 master isn't it?
@@jardasfernandes6886 Hello, if I have several PLCs (example: an HMI, M580) to communicate with the m221, can I use a single read_var block and a single write_var block for communication?
Hi, thanks for your videos.
I would like to connect the M221 (which is already connected to an HMI through ethernet) to a PC that gives it commands through ethernet using a switch. Is it something possible?
Hi Dem Ira! You can but the M221 needs to be ModbusTcp server then the PC needs to use modbus functions to read/write from/to the PLC
@@LeTomasAHUMADA Do you have a video that explains that?
@@demira3190 dont think i have but i can make one 😊
@@LeTomasAHUMADA that is great 😊
hi sir, can we connect 2 TM221 PLCs by this way?
Yes you can but probably it will be much better to use IOscanner. I have made this video using Serial but you can instead use MOdbusTcp: th-cam.com/video/kZul3e6Q_Rg/w-d-xo.html
@@LeTomasAHUMADA thank you so much
Good morning, is it possible to connect modbus top encoders and reading data from them? Thank you
Hi there! If you are using the M221 the encoder must have Modbus Serial or Modbus Tcp, they also need to be compatible with the Modbus Function available in the controller.
Hi Leandro,
Is there a way to use the M-2-2-1 as a modbus gateway : ip-rtu ? :
I have multiple Modbus RTU (non IP) devices that I want to pilot/monitor remotely from the M221 connected by IP. Usage : I want to send requests/orders (example a speed) to the M221, and the M221 send it to the right device (example a pump).Thank you
Hi there! Yes it is possible but it will need manual work in your code so the variables from the slave are available for you client on the ethernet network. I can try to make a video about it.
If you do not need adidtional logic you can use the EcoStruxure Panel Server to access to the Slave otherwise add a PLC
Thank you Thomas.
I'm now able to read on a regular basis the values on the Modbus RTU device and "publish" it on Modbus TCP. On the other way, I'm able to send data to the M221, which transmits to the devices. Regards
iIs it possible to send a '1' (as a bool) to an IP address and a specific port (not PLC)?
Like ascii message ? In the M221 I believe that is only possible using the Modbus Serial Communication not the Modbus Tcp because you must know where to send the data to (register)
leandro meu clp tm221c40t nao entra em rum via cabo uma dica para mim sou valdir
Hi there! I just coming back from my holiday. If you are able to access to the plc then you can check the status to make it in run.(check if the switch is not in stop)
Hola Leandro. Como debería ejecutar los bloques Read_Var y Write_Var si posee múltiples dispositivos ethernet (en modo servers). ¿Se puede ejecutar simultáneamente los bloques o el PLC no gestiona automáticamente las tramas? Yo suelo emplear una cuenta que se incrementa cada 100ms y por cada valor de dicha cuenta voy ejecutando el bloque correspondiente, pero siempre tuve la duda de cuál es la manera correcta de hacerlo. Saludos.
Buenas Nestor! Te voy a hacer honesto el uso de bloque no lo uso desde que podemos utilizar el Ioscanner y es un antes y despues… es mas sencillo:
th-cam.com/video/nyXspkScEjk/w-d-xo.html
Pero si queres seguir haciendo lo de los bloques podes hacer comparaciones de un numero que se va incrementando a medida que tenes un done o error a la salida del bloque y con cada comparacion ejecutas un bloque pero lo mejor es el Ioscanner.
@@LeTomasAHUMADA si, respecto del ioscanner he tenido mala experiencia tras perder conexión con un dispositivo haciendo que la conexión no retome automáticamente bloqueando el resto de las comunicaciones
@@desatingenieria hay unas variables de sistema para checkear por código la conexión y resetearla si hay un problema quizas falto eso pero no reemplazaría el ioscanner por bloques.
@@LeTomasAHUMADA si, las he empleado, pero he tenido mejor resultado con los bloques, en particular al comandar variadores de velocidad los cuales al perder comunicación generan muchos problemas. Gracias por tus respuestas.
please share the files program
Hi Hichem! now the project is available in the description :)