Inst ToolsInst ToolsInst Tools
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: #4 PLC Best Practices – Use PLC Flags as Integrity Checks
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > #4 PLC Best Practices – Use PLC Flags as Integrity Checks

#4 PLC Best Practices – Use PLC Flags as Integrity Checks

One of the best PLC best practices is to use PLC flags as integrity checks. Put counters on PLC error flags to capture any math problems.

Last updated: September 21, 2021 1:23 am
Editorial Staff
PLC Tutorials
No Comments
Share
3 Min Read
SHARE

One of the best PLC best practices is to use PLC flags as integrity checks.

Contents
Use PLC Flags as Integrity ChecksExample

Put counters on PLC error flags to capture any math problems.

Security ObjectiveTarget Group
  The integrity of PLC logicProduct Supplier Integration / Maintenance Service Provider

Use PLC Flags as Integrity Checks

If the PLC code was working fine but suddenly does a divide by zero, investigate. If something is communicating peer to peer from another PLC and the function/logic does a divide by zero when it wasn’t expected, investigate.

Most programmers will ignore the issue as a math error or worse yet, might presume their code is perfect and let the PLC enter a hard fault state.

During code development, engineers need to test and validate their code modules (snippets or routines) by inputting data outside of expected bounds. This may be termed Unit Level Test.

Assign different, locked memory segments for firmware, logic, and protocol stack. Test the protocol stack for abuse cases. Abuse cases could be peculiar flag conditions in a packet header.

Use PLC Flags as Integrity Checks

Example

PLC faults caused by out-of-bounds data are very common. This happens, for example, when an input value causes array indices to go out of bounds, or timers with negative presets, or divide by zero exceptions.

Typical flags of interest are

  • divide by zero
  • counter overflow
  • negative counter or timer preset
  • I/O scan overrun

Why?

Beneficial for…?Why?
      SecurityAttacks on PLCs could include changing their logic, activating a new program, testing new code, loading a new process recipe, inserting auxiliary logic to send messages, or activating some feature.

Since most PLCs do not provide cryptographic integrity checks, flags can be a good indicator if one of the above logic changes happens.
  ReliabilityFlags taken seriously can avoid the PLC running with programming or I/O errors.

Also, if an error occurs, the source of the failure is more obvious.
Maintenance/

References

Standard/frameworkMapping
MITRE ATT&CK for ICSTactic: TA010 – Impair Process Control
Technique:  T0836 – Modify Parameter
  ISA 62443-3-3SR 3.5: Input Validation
SR 3.6: Deterministic Output
  ISA 62443-4-2CR 3.5: Input Validation
CR 3.6: Deterministic Output
  ISA 62443-4-1SI-2: Secure coding standards
SVV-1: Security requirements testing
    MITRE CWECWE-128: Wrap-around
CWE-190: Integer Overflow
CWE-369: Divide by Zero
CWE-754: Improper Check for Unusual or Exceptional Conditions

Source: PLC Security

Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !
PLC to PLC Communication using S7 Connection PUT & GET Instructions
CX Programmer Example: Perfume Mixing and Filling System
What are High-Speed Inputs in PLC?
Learn PLC in Hindi
How to Control VFD with PLC using Ladder Logic
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
208kSubscribersSubscribe
38kFollowersFollow

Categories

Recent Comments

  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • MIHARITSOA Aina Sitraka on Top Non-PLC Certification Courses for Automation Professionals
  • Vaishnavi on Free Instrumentation Course for Trainee Engineers

Related Articles

Interlock Philosophy

Types of Interlocks

Function and Application of FIFO Block

How to use FIFO Block in TIA Portal? – Siemens PLC Programming

Allen-Bradley SLC 500

History of Programmable Logic Controllers (PLC)

SCADA Software and their Comparison

SCADA Software and their Comparison

Functional Block Diagram PLC Example for Traffic Light System

Functional Block Diagram PLC Example for Traffic Light System

Codesys function block example

Create a User-Defined Function Block in Codesys

Communication Protocols in PLC

Various Communication Protocols in PLC

Studio 5000 Programming Three Motors with Fixed Priorities

Studio 5000: Programming Three Motors with Fixed Priorities

More Articles

circuit breaker principle

What is a circuit breaker ?

Averaging Pitot Tubes

Pitot Tube Problems and Troubleshooting Steps – Flow Instrument

Process-Variable-to-Percentage-Conversion

Formula for Process Variable to Percentage Conversion

Contact less Tachometer

Types of Tachometers – Mechanical and Electrical Tachometers

Hydrostatic Level Measurement

Hydrostatic Level Measurement

Digital Electronics Multiple Choice Questions

Asynchronous Down Counter Objective Questions

Interview Questions and Answers

Temperature Sensors Questions & Answers

Limit Switches Wiring

Draw Limit Switch Symbol ?

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?