Jump to content

Modbus, blocking Write command


Recommended Posts

Hi all,

in my application, a V350 will be a slave in a Modbus RTU net (RS485).

I will provide, in a support text, the address map of the registers the Master (SCADA) should read to get the info required.

But, in any case the Master (SCADA) should not be able to Write in the Slave PLC memory.

As I have seen from the examples, activating the Modbus in the slave PLC enables the Master

to Read and Write to any register in the PLC.

Is there any way to block the Write command ?

(The SCADA development is a future project, which may not be granded to me)

Thanks

Link to comment
Share on other sites

I asked this question recently and never got an actual answer, but I have found the answer to be no that there is no way to block a masters ability to write to a location. Your only protection is misdirection and hoping and praying that the master reading/writing your data does not accidentally mess up something important. What I am doing is the following:

1) If a location is being written to by my program then you will be ok because whatever a custer tries to write over will just be rewritten again by your program.

2) If it is a screen enterable variable that you only want local personel to be able to change and not some unknown entity in a far away land then you can take the MI the local user would write to and copy that value to a secondd MI then put that second MI on your address list so a remote master can read it but it will not be writable for the same reason it is not in my first point. While not a good solution it is better than nothing.

The inability to block memory locations from being written to is something that should be changed. I do not know how hard it would be to do this, but it should still be done anyway.

Keith

Link to comment
Share on other sites

Dear Walkerok, thanks for the reply.

I have seen your post, and I also noticed that you got no answer.

The issue with the Write command blocking could be further extended,

as the application may need the Master (a SCADA) to Write some MI or MB as user inputs to the PLC.

In this case if the Write addressing is not correct (not rare at all) it could cause the PLC running with out any control

as temporary registers (indexes, pointers, vector bases etc.) may be affected.

I hope the Unitronics team to have a solution to this issue.

Comment:

It seems to me that in the Profibus and Allen Bradley protocols they have implemented it.

Best regards,

Nikolas

Link to comment
Share on other sites

Dear Emil,

the SCADA programmer can be any person with unknown skills.

If he accidentally (or during his evaluation / debugging) writes into my PLC,

the PLC application may run with no control. The result will be a disaster for the customer system.

So, I would ask for an enhanced version of Modbus functions (it seems to me that this is provided in the Profibus functions),

or another way to work around that issue, inside the PLC.

Link to comment
Share on other sites

It is a project we are developing now, using V350s.

Three PLCs running the same software, having external hardware "outputs voting" and "minority voting" monitoring.

The three PLCs are to be connected through RS485 (Modbus RTU) with a future SCADA.

We have already implement, beyond the scenarios functions:

- Alarm DBs (Actives, History),

- Alarm Logging,

- SD event logging

Only the Com functions are incomplete.

For our application :

only an area of 100 coils (MBs), and another area of 100 registers (MIs)

can be open (write enabled) to Modbus Write operations.

Link to comment
Share on other sites

Hi Emil,

This request is not application specific. If anything it is universal accross all possible programs. You seem to to be making the assumption that as the unitronics programmer we will have contact with the SCADA developer or whoever may be making a master. Nothing could be further from the actual chain of events. When we make a program that allows for master control it is most of the time (for me) for eventual sale to an OEM manufacturer that will in turn sell that to their customer who may or may not be the end customer so we may be 2 - 3 levels removed from who is going to be trying to implement a SCADA system. OEMs generally want to hide as best possible who the manufacturer of their parts are (to protect from their customers coming direct to us) so it is entirely likely that the end customer may not even know who we are as the actual programmer. Without write protection like I have said before and Nikolas has said here, the people writing the master can easily make a typing mistake and change the value of MI243 and not MI234 like they were supposed to, or they will have a multi write function that they make too long, or they just think they need to know something use a Modbus data sniffer to try and map out locations that we as the programmer never told them about (we do this with variable speed drives all the time so that we can do our jobs directly when the manufacturer did not make a complete modbus table 15 years ago and that person has quit,retired, or died and no one there knows what to do anymore). While we or others do not do this to maliciously hurt the operation of the equipment we are polling, mistakes can and will happen.

I will only hear about it when I get the angry phone call that my equipment is trash and does not work and I need to fly out to wherever the PLC might be tomorrow morning to fix it "or else!!". Why did the equipment not work..........because some guy I have never talked to changed a memory location I would have wanted to block but could not. It is not a question of if, but when, this event will happen.

To answer the question what makes sense is to have the ability to either dynamicaly block MBs, MIs, MLs, and DWs or to assign a block (for example MI2000 - MI4000 read only) so that I can segreagate my program in read/write and read only locations to protect myself.

Thank You

Keith

Link to comment
Share on other sites

  • MVP 2021

+1 on Keith's comments. I've had third party SCADA people stomp on my stuff as well - it usually involves a "programmer" who views communication with the PLC as a necessary evil to glorify his screen and database making brilliance. "I typed in the wrong Modbus address? Oh. No big deal."

What's needed is a SCANEX function blocks where you define blocks of what's allowed to go through; every other request is blocked. I've worked with Modbus I/O modules where this is the case- you get a read or write error if you try to access an address not defined in their documentation.

Joe T.

Link to comment
Share on other sites

Dear Emil,

the feature in Profibus looks like with what is required for Modbus.

Could you implement the same feature for Modbus too?

"Define in the Slave the area which is accessible by the Master",

and if the Master attempts to Write in this area an error coded reply will be transmitted back.

Although I believe that what is needed is a new SCANEX fb, as Joe Tauser has mentioned in his post,

which seems not so difficult.

I totally agree with Walkerok and Joe comments (+1 , +1 on both guys comments by me too).

Anybody have worked with remote I/O modules or other industrial equipments like Drives, Meters, Indicators etc.

have met the situation of wrong addressing commands.

This feature is provided build even in products costing 45 Euro (panel indicator),

which is about the cost of the extra serial port in the Unitronics PLC, but the PLC is not just a dummy indicator.

PLC is included in the system to perform the control of it.

Leaving a "back door" open, providing access to the control logic can be a disaster.

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...