Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Statement List (STL) to Find Highest Value
Share
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Statement List (STL) to Find Highest Value

Statement List (STL) to Find Highest Value

Last updated: March 4, 2021 12:07 pm
Editorial Staff
PLC Tutorials
No Comments
Share
4 Min Read
SHARE

This article explains the detail logic and all steps involved to find the Highest value in given Data block using the Statement List (STL). Also helps to you in array pointer logic in simatic manager.

Statement List (STL) to Find Highest Value

Follow the below setps.

Step 1:

Create Global Data Block write no of data in DB and save it.

Data you can save in dec, bin, int, real format.

We have written data here in dec for our program.

Insert Data Block as shown below.

Insert Data Block in Siemens S7 300

Step 2:

Create Data Value in the Data Block.

Create Data Value In Data Block

Step 3:

Insert Function

Insert Function in Siemens S7 300
FC1 Object Name

Step 4:

Create Function and write code in STL as given below.

      A     M     40.2                  /// START Search  CMD

      JCN   END

      L     0

      T     MW    50                    // STARTINNG LOCATION OF DATA

      T     MW    56

REOP: NOP   0

      L     MW    50

      SLW   3

      LAR1  

      OPN   "DATA"

      L     DBB [AR1,P#0.0]             // DATA 1ST LOCATIO

      L     MB    56

      >I    

      JC    STR                         //// DATA GREATER THEN CHENG

INC:  L     MW    50

      L     1                           // INCREASE LOACTION 

      +I    

      T     MW    50

      L     MW    50

      L     21                          // IF DATA LOCATION IS EXCCED

      <I                                // CHECK FOR NEXT LOCATION

      JC    REOP

      JU    END

STR:  NOP   0

      L     MW    50

      SLW   3

      LAR1  

      OPN   "DATA"

      L     DBB [AR1,P#0.0]

      T     MB    56

      JU    INC

END:  NOP   0

Statement List (STL) to Find Highest Value in the Data Block

Statement List (STL) to Find Highest Value in the Data Block

Step 5:

Start search command by using bit M40.2 = True

You can gate Highest value of given data in MW56

STL Code to find Maximum Value

Author: Rahul khaladkar

If you liked this article, then please subscribe to our YouTube Channel for PLC and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Read Next:

  • Memory Structure of Siemens
  • Function Block for Motor Logic
  • FIFO Instruction in Allen Bradley
  • Troubleshoot Siemens Program
  • Types of Interrupt OB in Siemens
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 !

Continue Reading

PLC Programming for Train Detection and Gate Operation
#17 PLC Best Practices – Log PLC Uptime and Trend it on HMI
Series Tanks Level Control using PLC Ladder Programming
What is a Line Choke or Reactor in a VFD?
How to Create New Project in Studio 5000?
SCADA Systems
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
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Principle of Operation of PLC
Bread Oven Control in Auto and Manual Modes PLC Program
What is a Annunciator Panel?
Basics of Ladder Diagram in PLC Programming
Omron PLC for Product Painting with Integrated Weighing System
Automatic Railway Crossing Gate Control PLC Program
Working Principle of Single Phase Preventer Relay
Tank Farm Management System: CX-Programmer [OMRON]

Keep Learning

PLC Latching circuit Animation

What is Seal-in Circuit ?

Relay Symbols

Relay circuits

Conditional Jump instruction

Jump Instruction in Siemens Tia Portal

Modbus in Industrial Networks

How Modbus is used in Industrial Networks?

PLC Logic - Control Spray Nozzle, Fans, and Puncher

PLC Logic: Control Spray Nozzle, Fans, and Puncher

PLC Questions & Answers

Programmable Logic Controller Questions and Answers

Siemens PLC

#20 PLC Best Practices – Identify Critical Alerts

Siemens PLC

Five Types of PLC Programming languages

Learn More

Common Materials used in Instrumentation Cables

Common Materials used in Instrumentation Cables

C programming language

What is C Programming Language? Fundamentals, Pros & Cons

Valves Legend P&ID

Comparison of Gate Valves and Globe Valves

Factors Affecting Inductance

Factors Affecting Inductance

Questions and Answers in Electrical Machines

Questions and Answers in Electrical Machines

Siemens LOGO PLC Complete Programming Course

Siemens LOGO PLC Complete Programming Course

PLC Program for Traffic Light Sequence using Functional Blocks

PLC Program for Traffic Light Sequence using Functional Blocks

What is a Wet Contact in PLC

What is a Wet Contact? – Basics of PLC Wiring

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

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?