3/24/2025 7:36 AM | |
Joined: 1/24/2021 Last visit: 8/29/2025 Posts: 118 Rating:
|
Hello Sami, Im not sure, but it might have something to do with the amout of connections your plc can have. See user manual Link under chapter "12.4 Asynchronous communication connections"
Br |
Please feel free to rate my contribution if it was helpfull :) |
|
This contribution was helpful to
1 thankful Users |
3/25/2025 8:07 AM | |
Joined: 4/10/2018 Last visit: 7/24/2025 Posts: 47 Rating:
|
Thanks Mr. 0_Einstein for your kind support! Here is the problem, I need to read data from 2 different addresses area for each device (72 instantaneous values starting from address 30001, and 22 energy Values starting from address 40095) and that makes my code little bit complected, so for each device I am calling 2 MB_MASTER blocks to handle 2 different reading for each device, and totally I have 30 blocks in my program, as I mentioned, up to 7 devices it worked perfectly but after adding an extra device I faced 8070 error. Now, could you pls. support if possible to have only 2 MB_MASTER blocks for all 15 meters and rotate the address as you mentioned, or I have to separate the block for each memory areas |
3/26/2025 3:36 PM | |
Joined: 7/7/2010 Last visit: 9/9/2025 Posts: 16079 Rating:
|
You only need 1 MB_MASTER block for all 15 meters reading each meter with 2 different address groups each read. There will be 30 different sets of MB_MASTER call parameters. I recommend having a single FB to call 30 times. Inside that single FB is the single MB_MASTER block. The trick is to have a sequencer call that FB 30 times with different parameters. The trick is to properly handle every error state, leave the current FB running / enabled until Done or Error output occurs. On Error outputs, you need to properly handle / track them for a given meter. On PLC restart, you need to actively kill any existing connection if you want the very first call to succeed. On power cycle restart, you do not need to do anything with existing connections. However, attempting to disconnect a connection that does not exist simply results in an error stating no such connection exists and you have what you want. Hence, disconnecting a connection at startup is advised, whether any connection exists or not. Try getting a single meter working with this approach, passing in the 3xxxxx parameters first. Once that works, pass in the 4xxxx parameters. Once it completely works for a single meter, add a 2nd meter. The only thing that should change is the address passed to the called FB. So, you should essentially clone the 2 calls for the 1st meter into another FB, and then call that FB 15 times with different MB address each call. Make sense? Build it in pieces and it kind of naturally flows into a set of FBs that manages it all for you.
|
science guy |
|
This contribution was helpful to
1 thankful Users |