Custom scripting as a potential safety hazard
Most users don't consider custom scripting as a potential hazard or safety concern because custom scripting allows users great flexibility in human-machine interface (HMI) development. However, HMI development software for a newer distributed control system (DCS) has much greater functionality today than in legacy systems.
Most users don't consider custom scripting as a potential hazard or safety concern because custom scripting allows users great flexibility in human-machine interface (HMI) development. However, this flexibility can come with a copious price tag. The question most users need to ask themselves is: just because custom scripting is available in the HMI display environment, should it be used in this scenario? Users migrating from any legacy system should ask themselves a different question: what are the benefits of custom scripting? Quite often, custom script development in legacy systems is a requirement that is superseded in newer HMI development programs. The HMI development software for a newer distributed control system (DCS) has much greater functionality today than in legacy systems.
There are several potential disadvantages due to the excessive use of custom scripting.
1. HMI graphics performance. The first downside is the performance of the HMI graphics. Display performance can be affected in numerous ways such as slower refresh times on dynamic data, screen overloading, loss of view and slower response time from operator commands to field devices.
2. HMI graphics complexity. Complexity is the second downside due to custom scripting. Higher complexity HMI graphics have a greater potential for problems, some of which can affect plant operations.
3. Troubleshooting time. Over scripting can increase development and troubleshooting time of HMI displays. Increased development and troubleshooting time will translate into increased cost for the end users.
4. Complex migrations and upgrades. Custom scripting can also increase the complexity of basic process control system (BPCS) migrations and/or upgrades. Platform standard or package shapes from the shape library can be efficiently updated during migrations, whereas custom scripts and shapes require individual attention. This is due to programming language changes between BPCS systems and syntax changes between releases of BPCS systems. Migrating custom scripts requires additional time and effort because of the individual attention required. This often results in additional risk for the end users. There is one major restriction when it comes to custom scripting, which is using HMI custom scripts as control logic programming. Operator inputs needed for control logic should pass the operator command value from the HMI to a tag in the BPCS controller, which is where the evaluation and logic should execute.
There are alternatives to custom scripting which should be exhausted before resorting to custom scripting. The first option is to build a standard shapes library and use those shapes whenever possible. HMI specification documents can help keep track of standard shapes per project, plant or facility. The specification document should be updated as needed and should be thought of as an evolving document. If there is no shape in the specifications document, use the prebuilt functionality in the HMI development software as the second option. Using prebuilt shapes such as the "pushbutton" allows the user to quickly create an object without creating another shape or having to script its functionality.
While there are downsides to custom scripting, it does not mean custom scripting should be completely avoided. Custom scripting is still a powerful tool in HMI creation which offers users great flexibility. Custom scripting should be used in unique one-off situations, where creating a standard shape or object will be more time consuming than scripting.
This post was written by Osman Syed. Osman is an Engineer II at Maverick Technologies, a leading automation solutions provider offering industrial automation, strategic manufacturing, and enterprise integration services for the process industries. Maverick delivers expertise and consulting in a wide variety of area including industrial automation controls, distributed control systems, manufacturing execution systems, operational strategy, business process optimization and more.
Maverick Technologies is a CSIA member as of 3/15/2016