Modicon PAC Forum
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-06 06:04 AM . Last Modified: 2021-01-06 06:07 AM
Hi,
I am trying to read data from 30 modbus slave devices (rs485) in M580, apart from Read Var and Write Var blocks, what would be the best efficient method of programming to get data quickly into PLC?
Regards..
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-06 11:41 AM
Hi,
As the connection used is serial, the performance is not achieved by means of one block or another, as it is RS485, until a request is finished, the next cannot be started, so to perform a reading of the 30 devices, at least you will need 90 program cycles (3 cycles per device) assuming the devices respond in less time than the M580 program cycle.
I would recommend that you use different communication rings, which will allow you to launch as many requests in the same program cycle as there are communication rings.
Another option is to use Modbus TCP / IP - Modbus gateways, these can process requests waiting, which will increase the performance of the channel (you can reduce 1 cycle per device).
In addition to the Read_Var and Write_Var blocks, you can also use Data_Exch.
Regards,
Juan
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-12 02:13 PM
There are a few things to consider.
- you are reaching the limits on a RS485 network for number of connected devices (limit 31 before repeater is required). You would need to use a good RS485 master such as BMXNOM0200 or Link150 gateway. The M340 CPU RS485 port is not really up to this duty. Make sure that the wiring is of good standard with correct termination.
- what baud rate will the slave devices support?
- how much data are you trying to read?
- do any slave devices go offline?
If you are using a BMXNOM0200 then I'd suggest an indexed READ_VAR block and manage the timeouts so that the block runs as fast as possible. Biggest problem is a device that goes offline and you have to wait foe comms time out before moving onto the next device.
By indexed I mean that there is one READ_VAR block and you index the parameters and response from/ to arrays.
Start with one slave then go from there.
A good bench test tool is https://sourceforge.net/projects/modrssim2/
This allows you to set up your family of slave devices on your PC and read them using the PLC. You can enable/ disable individual devices.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-22 10:41 AM
Hello Juan, would you email me at Ivan.Ospina@QubitsENergy.com please?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-02-16 07:54 PM
@Juan wrote:Hi,
As the connection used is serial, the performance is not achieved by means of one block or another, as it is RS485, until a request is finished, the next cannot be started, so to perform a reading of the 30 devices, at least you will need 90 program cycles (3 cycles per device) assuming the devices respond in less time than the M580 program cycle.
I would recommend that you use different communication rings, which will allow you to launch as many requests in the same program cycle as there are communication rings.
Another option is to use Modbus TCP / IP - Modbus gateways, these can process requests waiting, which will increase the performance of the channel (you can reduce 1 cycle per device).
In addition to the Read_Var and Write_Var blocks, you can also use Data_Exch.
Regards,
Juan
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-01-18 08:47 AM
I would recommend that you use different communication rings, which will allow you to launch as many requests in the same program cycle as there are communication rings.
Another option is to use Modbus TCP / IP - Modbus gateways, these can process requests waiting, which will increase the performance of the channel (you can reduce 1 cycle per device).
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.