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-03-16 12:03 AM
Hello,
I've read that the MBP_MSTR block's function code 15 is only usable with a NOE module on a Quantum drop. But I'd like to use it on a M580 drop with either a BME P58 6040 CPU module or BME NOC 0301.3 communications module.
Trying to read 3xxxx registers via Modbus TCP from a flowmeter using an old DFB which uses the MBP_MSTR block.
Could someone tell me if this is possible and if so, point me to any examples?
Thanks in advance,
Brendan
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-03-16 03:05 PM
It shows up in the help under the M580, so it will likely work. And if not, you could chase up with Schneider Tech Support around issues (since it's documented in the help for the M580).
But it's probably not the best option if you can avoid it, and you're not likely to get sample code for using the M580 in this fashion because as mentioned by the other poster, there are more preferred ways of doing this in the M580, with the READ_VAR etc blocks.
The help for the block under the M580 section looks like it hasn't been updated/reviewed for M580 specifically.. so may be hit/miss on quality/accuracy. But it seems relatively 'standard'.. you would need to tell it which slot the NOC is in, and I suspect the least significant byte should just be 0.
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-03-16 09:18 PM
I don't think it would be NOC specific here, if it doesn't work on the NOC, I wouldn't expect it to work on the CPU module.
The NOC certainly supports the ModbusTCP Explicit Function Code for FC15.
Whether the implementation of the MBP_MSTR instruction on the M580 does the right thing is a different story. And this is where I'm not saying it does or doesn't. But that it's not often the way it's done, so you'd be going into poorly chartered (and hence potentially buggy) waters.. you should anticipate encountering challenges.
Recommendation would be to setup a test bench, with the M580 PLC and something like Wireshark, and see if the NOC does indeed spit out the FC15 packet when requested. If it does, case closed, the previous engineer was wrong, all worked fine. If it doesn't, then you should report to Schneider for them to investigate and fix in the future (but you should also find a work around that gets your project across the line because Schneider will be very unlikely to investigate/fix that within a reasonable timeframe... I would generally expect 1-2 years for such a low impact item).
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-03-16 06:39 AM
Hi,
In M580 platform we have a function called Read_Var, that can read the 3x. please see the attachment for the sample code. please read the comments carefully.
Regards,
Farzad
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-03-16 06:53 AM
Hi Farzad,
Thanks for the response and sample code.
However, I'm looking to find out whether the MBP_MSTR block can be used to read 3x registers on a M580 drop using the BME P58 6040 CPU module or BME NOC 0301.3 communications module.
I'm trying to leverage a DFB developed on an older project which uses said block.
Could you please confirm if the MBP_MSTR block will work with either the BME P58 6040 CPU module or BME NOC 0301.3 communications module and provide an example?
Thanks a lot,
Brendan
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-03-16 03:05 PM
It shows up in the help under the M580, so it will likely work. And if not, you could chase up with Schneider Tech Support around issues (since it's documented in the help for the M580).
But it's probably not the best option if you can avoid it, and you're not likely to get sample code for using the M580 in this fashion because as mentioned by the other poster, there are more preferred ways of doing this in the M580, with the READ_VAR etc blocks.
The help for the block under the M580 section looks like it hasn't been updated/reviewed for M580 specifically.. so may be hit/miss on quality/accuracy. But it seems relatively 'standard'.. you would need to tell it which slot the NOC is in, and I suspect the least significant byte should just be 0.
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-03-16 05:41 PM
Hi Bevan,
Just a quick one, you mentioned:
The help for the block under the M580 section looks like it hasn't been updated/reviewed for M580 specifically.. so may be hit/miss on quality/accuracy. But it seems relatively 'standard'.. you would need to tell it which slot the NOC is in, and I suspect the least significant byte should just be 0.
Do you mean that it would work with NOC modules too? The documentation left by the previous engineer mentioned that the NOC Ethernet modules weren't compatible with function code 15 of the MBP_MSTR block, but nor I or any of the other current engineers have found any documentation to support this statement.
To account for the potential limitation with NOC modules, I was planning to send the Modbus request via the M580 CPU module.
Thanks in advance,
Brendan
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-03-16 09:18 PM
I don't think it would be NOC specific here, if it doesn't work on the NOC, I wouldn't expect it to work on the CPU module.
The NOC certainly supports the ModbusTCP Explicit Function Code for FC15.
Whether the implementation of the MBP_MSTR instruction on the M580 does the right thing is a different story. And this is where I'm not saying it does or doesn't. But that it's not often the way it's done, so you'd be going into poorly chartered (and hence potentially buggy) waters.. you should anticipate encountering challenges.
Recommendation would be to setup a test bench, with the M580 PLC and something like Wireshark, and see if the NOC does indeed spit out the FC15 packet when requested. If it does, case closed, the previous engineer was wrong, all worked fine. If it doesn't, then you should report to Schneider for them to investigate and fix in the future (but you should also find a work around that gets your project across the line because Schneider will be very unlikely to investigate/fix that within a reasonable timeframe... I would generally expect 1-2 years for such a low impact item).
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-03-16 09:29 PM
Sounds like we'll need to do some testing!
Thanks for all your help Bevan, greatly appreciated.
Brendan
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-03-16 10:13 PM
The M580 will support the following ModBus Functions via the MBP_MSTR function block
Supported operation codes: 1 = Write data, 2 = Read data, 14 = CIP Explicit Message, 15 = Send Modbus Request, 23 = Read / Write data
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-03-16 10:15 PM
Thanks for the confirmation Alastair!
Will check out ModSim2 for testing.
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.