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: 2020-04-25 02:15 PM
Hi All
I am trying to read from input register 3x of Micom IEDs and writing the returned values to input registers 3x of my Modicon Quantum CPU through NOE771 11 eghernet module
I tried IO scanning but that only supports reading from holding registers
MBP_MSTR on the other hand can read input registers but it does not allow writing to input registers of CPU state RAM
Any ideas please
Osama
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: 2020-04-27 01:57 AM . Last Modified: 2020-04-27 02:00 AM
After reading 3x register via MBP_MSTR(function code 15), you can write the data to 3x register with WRITE_INPUT_INT function.
BR
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: 2020-04-27 02:17 AM
The solution is perhaps to read the 3x register using the MBP_MSTR and use a WRITE_INPUT_INT to write the %IW.
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: 2020-04-27 12:23 AM
Hi OsamaSalih
Unfortunately you cannot write to Input Registers (3x). Originally these registers contained the values of Analogue Inputs and as a real input into the PLC they are not writeable (same as a digital input 1x register).
Could you not use a holding register (4x) to store your values instead.
Regards
Stevey
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: 2020-04-27 01:28 AM
Hi Stevey
You totally right,, only the IO scanner function can write to input registers of the PLC, but as I said earlier it can not read from the 3x data of the slave, which is unbelievable 😕
I can use the 4x area in the Plc but I will have to modify my SCADA application as well, which I am trying to avoid
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: 2020-04-27 01:57 AM . Last Modified: 2020-04-27 02:00 AM
After reading 3x register via MBP_MSTR(function code 15), you can write the data to 3x register with WRITE_INPUT_INT function.
BR
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: 2020-04-27 02:17 AM
The solution is perhaps to read the 3x register using the MBP_MSTR and use a WRITE_INPUT_INT to write the %IW.
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: 2020-04-28 04:45 PM
Thank you @TaeHoon
I will try this soon,
the question is why Unity Pro makes is so hard to read slave input registers? you know that MBP_MSTR function code 15 is very complecated to program, each single poll will need effort to complete, and I need to program about 120 polls, Hope developers of Unity Pro (Control Expert) make it simpler in the future
one more question, does CONCEPT latest version support MBP_MSTR function code 15?
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: 2020-04-29 12:16 AM
Why it is so hard ?
Because it is a rule of IEC 61131 which prohibits writing in inputs. This seems a good thing, since an entry should only be written through the physical channel linked to it. These functions were not present at the beginning and were added in Control Expert to facilitate the simulation.
When using a SCADA, it is not recommended to use a direct physical channel (% IW or 3x registers) as these depend on the hardware.
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: 2020-04-29 01:50 AM
Well, It is so hard if compared with programming of READ_VAR which I can not implement in my program
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: 2020-04-29 01:54 AM
I am reading those registers from Micom protection relays IEDs, All modbus data are located in 3x data area
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: 2020-04-29 02:09 AM
I don't understand well your issue. READ_VAR is able to read 3x registers or their equivalent in IEC %IW.
You can read your register in the protection relays. the values will be available in the reception table that can be used by the SCADA. there is no need to forward the 3x registers coming from the protection relays to 3x register in the PLC. If I well understood the SCADA uses 3x registers to read the values, so in that case forward the reception data into a %IW register, using the Write_input_int:
(*INT*) Simulated_Input:=WRITE_INPUT_INT (INP:=Value (*INT*));
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: 2020-04-29 03:14 AM
Hello OsmaSalih,
you can read continuous 125 input registers(3x) per one poll.
Quantum CPU for Concept was end of sales in 2015.
And Quantum CPU for Unity pro was end of sales in 2018.
So I don't think there will be further development.
Concept latest version is V2.6 SR7.
As I know, MBP_MSTR in Concept soft doesn't support function code 15.
One more, you can't use read_var function in Quantum.
You can migrate from Quantum to M580 with existing Quantum IO
I hope this information is helpful for you.
BR
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: 2020-04-29 08:12 AM
READ_VAR is not supported for Quantum CPUs,
My only option is MBP_MSTR with function code 15
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.
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-17 09:40 AM
Wondering if you were able to use MBP_MSTR block to pull 3000x values?
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: 2023-03-24 02:20 PM . Last Modified: 2023-03-24 02:31 PM
I am using M580 standalone with BMXNOM200 on local rack. This BMXNOM200 is set as modbus rtu client and communicate to dcs that is set as master. From M580 send %MW10 (40011) to DCS and DCS read it with register 30011 but DCS can not read data on register 30011. I don't understand this case. When I am trying using modbus scan. I am able to read register 40011 but like DCS register 30011 is not able to be read. On the last history of this system is register 30011 able to read data from modicon premium due to now, i migrate modicon premium to m580, register 30011 is no longer to be read by DCS.
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: 2023-03-24 04:00 PM
M580 doesn't use %IW (3x) registers. They exist, but unless you're using quantum RIO there won't be any values. In the M580 you will have to map your input variables to x4 (%MW adresses) to read them from your DCS.
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: 2023-03-24 06:37 PM
Hi @Bosswaffle,
How to map the M580's holding register 40011 (%MW10) so that can be read on register 30011 on DCS. I have tried modscan software, when i give value to %MW10 (for example) on my plc logic so the register 40011 on the modscan can read value as per what i have set on plc. But register 30011 on modscan can not be read. Thats why, I assume that the register 30011 on DCS can not read the value of register 40011. But By using Modicon premium register 30011 on dcs can read the same value of register 40011 from plc (%mw10). The logic between old plc (premium) and M580 (new plc) are the same but the effect to dcs is not the same
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: 2023-03-24 08:08 PM
You need to provide some additional information.
1. What is the part number of the M580 CPU?
2. What firmware do you have installed in the M580 CPU?
3. What version of Unity Pro / EcoStruxure Control Expert are you using?
4. Has the application libset been updated to match the version of Unity Pro / EcoStruxure Control Expert.
5. The BMEP584040 and higher original support the Modbus 0x, 1x, 3x and 4x references to allow migration of the original Modicon Controllers. With the correct firmware and EcoStruxure Control Expert software all M580 controllers can now be programmed to respond to the 0x,1x,3x and 4x request. NOTE: The BMEx584040 and higher are still required when connecting to legacy Modicon I/O and converting the original 984LL applications.
6. If you have a BMENOCxxx module in the rack please provide the model number and installed firmware.
7. The M580 must have logic developed to move a %MW (Modbus 4x READ / WRITE) to a %IW (Modbus 3x READ ONLY) and %M (Modbus 0x READ / WRITE) to a %I (Modbus 1x READ ONLY). If the register is not utilized in the application, then a Modbus READ/WRITE request will fail since the register has not been assigned.
8. There are EFB's that will allow you to WRITE to a READ ONLY variable and this can easily be done in Structured Text. The UMAC Unity M580 Application Converter typically handles this for you during the application conversion from Modicon Quantum and Premium to the M580. You must have a registered copy of the UMAC application. A simple test would be to create a Modicon Quantum application with a DI, DO, AI and AO module and assigned a located variable to each I/O channel. Export this application to a XEF or ZEF format. Open UMAC and open this file and convert it to a M580. During the conversion UMAC will automatically create the Structured Text sections to map the 0x,1x,3x and 4x reference from the original Modicon Quantum I/O moules.
9. Take a look at System Words %SW139 and %SW141 to adjust the %M and %MW offset if required. The M580 does not require a offset for %I and %IW.
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: 2023-03-24 08:10 PM . Last Modified: 2023-03-24 08:21 PM
@Tedjo Slightly unrelated: If you don't like having the offset in address', you can set %SW138-%SW141 all to 1. Those registers are the modbus "base" and default to zero, but if you set them to 1 the adress will line up (%MW10=400010). SW138 is for 1x, SW139 is for 0x, SW140 is for 3x, and SW141 is for 4x. I personally keep these all at the default to minimize confusion, but it might help with your upgrade from premium.
If you really need to read the 3x registers in your DCS, you can use the above "WRITE_INPUT_INT function" to copy your 4x registers to 3x. I've attached screen shots of how I would this quickly in ST, but you'll need to change a project setting and do an offline build/download to apply that. (Tools>Project Settings>Variables>Directly represented array variables). If you can't STOP the PLC or don't want to, you'll have to make an instance of the "WRITE_INPUT_INT function" for each 3x register you need. The ST section is attached in the .zip folder.
Great reply @Robert_Willis, if the actual IO needs moved into %IW it's easy to do with a FOR loop and the Device DDT:
FOR i:=Start_index TO End_index DO
%IW0[i] := WRITE_INPUT_INT (INP := PLC0_d0_r0_s2_AMI0810.ANA_CH_IN[i].ANA.Value);
END_FOR;
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: 2023-03-24 09:21 PM
Hi @Robert_Willis ,
Thanks for your commment.
I use PMEP583020 sv : 3.1, Ecostruxure Control Expert XL 15.2 and BMXNOM200 sv : 1.5 and no DI, DO, AI and AO module are installed on local rackThis plc is used as gateway from Scada and Dcs. Communication between scada and plc is under modbus tcp throughs hub switch. This modbus tcp communication is working well. According to your recommendation, I will try add new logic for moving %Mw to % Iw as well as using %Sw. I did not add any logic due to this system was ptp to Dcs and on old logic, i did not find also the logic for move register. Like communication to scada, no additional logic, i did here.
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: 2023-03-24 09:28 PM
Thank you very much @Bosswaffle, Your information have opened my mind to solve this case. I will try what you and @Robert_Willis have suggested to me.
BR
Tedjo
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: 2023-03-26 08:50 PM
If the M580 is being used as a Gateway between SCADA and the DCS you might want to consider a different approach and only use %M - Modbus 0x and %MW - Modbus 4x. The M580 can read the data from the various Modbus devices using any of the Modbus Register references (0x, 1x, 3x and 4x) using communication EFB's and the I/O Scanner as appropriate. You might also consider packing the bits into a %MW register.
This would only require the DCS to issue a %MW (Modbus 4x) or %M (Modbus 0x) request. If the registers were packed in sequence, then the DCS could issue a Modbus READ/WRITE request with the maximum size which would minimize the number of messages and improve communication performance. I usually create a Modbus 4x register group for the READS and then another group for the WRITES.
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: 2023-03-27 12:33 AM
I am reading those registers from Micom protection relays IEDs, All modbus data are located in 3x data area
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: 2023-05-28 08:07 AM . Last Modified: 2023-05-29 09:35 AM
After almost 3 months postpone fixing the Modbus register 3x issues. I found something that really make me more confused which I tried to demonstrate this issue in my lab by using p582040 in the same way that I had done on pmep583020. But in this trial, my Modbus scanner was able to read Modbus register 3x as well register 4x. Something that make me thinking that what a wonder this case. Implementing the program source code to the different cpu generated different result. I did not insert "write_input_int" but the register 3x were able to be read.
Is this the limitation of M580 type? I really need the explaination about this issue so that on the further project, I could choose the correct M580's CPU.
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: 2023-05-29 04:11 PM
What is the firmware version of both M580 CPU's? Initially the M580 4040 and higher CPU allowed access to Modbus 0x, 1x, 3x and 4x references while all other M580 CPU's could only addresses the Modbus 0x and 4x references.
I will need to check to see if this requires a specific version of Unity Pro / EcoStruxure Control Expert. NOTE: If you are migrating a Modicon Quantum to a M580 you must select a 4040 or higher CPU.
As I recall the M580 must have variables assigned in order for the Modbus Request to return a valid response.
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.