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: 2022-01-28 08:39 AM
Hi,
I'm using a M580 and i need to communicate with two differents Modbus slave. The only way to communication with those slaves is through Modbus RTU protocol. If i'm using two differents BMXNOM0200, can i do two simultaneous modbus requests(with Read_var fonction block) ?
Thank you,
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-31 12:29 PM
The BMXNOM0200 module has two serial communication ports.
If your slave devices have different communications characteristics (baud rate, parity etc) then use one channel for each device and a READ_VAR block for each.
If you slave devices have the same communication characteristics then you can connect them to the same port and use a single instance of READ_VAR but index the address input to point to the slaves respectively.
1st call will read the first slave, 2nd call will read the second slave then back to the start.
There are a few methods of looping the command with changing input addresses and what method you use can depend on how many devices you have connected to a single port. Note, I tend to limit the number of connected devices to around eight as more than this starts to impact on the overall update time if the data has time constraints on the update.
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-02-01 09:11 AM
Thank you for your answer!
So i will probably need to use both serial port on the BMXNOM0200 module. Can i do two differents request(read_var) on the same cycle time or i need to manage that? If the first slave doesn't answer quickly, do i need to wait until the timeout happen to send the request for the second slave?
thanks
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-02-01 09:32 AM . Last Modified: 2022-02-01 09:33 AM
Hello
Both Serial Port on BMX NOM module are independent.
You can manage a Master Modbus Request on both port simultaneously, with 2 separate Read_Var() or Write_Var() Function.
BR
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.