Sharing a read/write modbus register

Paulo Balbino

Member
Join Date
Feb 2023
Location
Abu Dhabi
Posts
7
Hi everyone,

I am working on a project that needs to expose the SV (Set Value) of a temperature controller to a SCADA system.

SCADA <- (modbus TCP) -> PLC <- (serial/rs485) -> Temperature Controller

Scada needs to be able to read current value and to modify it (write). I was thinking about exposing a single register for both read and write operations (on the PLC so SCADA can access it using Modbus/TCP, then on the ladder logic verify if the value changes, in case it changes perform a write to the Temperature controller. I was reading on some forums that this is not a good practice.

How do you guys address this kind of scenario?

Any opinion or suggestion would be appreciated.
 
What make, model, kind of system is the SCADA (PC? MCU? Arduino? Custom?)? What protocols are available on the SCADA system?

What make, model, kind of system is the PLC? What protocols are available on the PLC?

Once I settled on a protocol, I would work the problem independently from each side.
  • If the SCADA system was going to be a Modbus Master and the PLC was going to be a Modbus Slave, then I would first run a simulated Modbus Slave on a PC running Windows or Linux and configure the SCADA system as a Modbus Master to communicate with it, reading and writing holding registers.
  • Second, I would run a Modbus Master on a PC and configure the PLC as a Modbus Slave to communicate with the PC, and make sure the PC Modbus Master can read and write the target data.
The advantage to that is that the PC based Modbus applications will generally have better diagnostics to resolve any issues.

Only once I have those two independent processes running would I try to connect the SCADA Modbus Master to the PLC Modbus Slave. You may be able to go directly to this step, but if something does not work then the tools to diagnose the problem are few and complex.
 
I'd be interested in knowing where you heard that's not good practice, because I can't see how that could be true when using Modbus. Modbus is designed to have a single register be both read and write. These registers are called Holding Registers. Holding Registers are the most commonly used Modbus type. When using Modbus, you should expose only a single read/write register for a single parameter, such as a Set Value. It is actually quite uncommon, and would likely confuse many Modbus users, to expose the Set Value as two separate registers - one for only reading and another for only writing.

For completeness, there are protocols (such as PROFINET IO, EtherNet/IP, EtherCAT, etc.) that support I/O data exchanges that are based on separate, high-speed input and output streams, where the data does need to be segregated into read-only and write-only blocks. However, this is due to the nature of the protocol, not because it is good practice.
 
I don't think it is bad practice to compare the old value with the new value and write it to controller if it changes.
But taking some precautions, such as making sure that the PLC writes the value to the controller without errors and if there is an error, retry every few seconds.
Also, the setpoint should be written to the controller when the system starts, for example by setting an impossible value in the old value register when the PLC starts.
 
Some older process controllers might have a limit to how many times certain settings can be written because they are stored in EEPROM, but I would hope that a PID Setpoint would not be one of them. That is the only reason I could think of where repeatedly writing to the temperature controller might be ill advised.
 

Similar Topics

Hi, We don't do many Rockwell projects but recently did onw with a Control Logix and Panelview. What files do customers expect when you send...
Replies
4
Views
259
Hi, I recently acquired a micro830 48qwb, and it has relay outputs bult in. For outputs 0-6, they all use 24vdc. To save on space and terminal...
Replies
1
Views
1,509
Hi, I'm challenging myself to install a PLC for the first time. I went for a Micro830 48QWB, since it has 48 I/O and free software (CCW). From my...
Replies
3
Views
1,972
Hello, Can someone clarify and correct my understanding of two controllers sharing an I/O card. I read through the Logix 5000 I/O document and...
Replies
4
Views
2,007
For a stone crusher, which is driven by 2 identical motors (each 160kw) has VFD (SCHNEIDER ATV930C22N4C) for 1st motor and 2nd motor starts DOL...
Replies
27
Views
7,923
Back
Top Bottom