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: Statement List (STL) to Find Highest Value
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 > 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.

Contents
Statement List (STL) to Find Highest ValueStep 1:Step 2:Step 3:Step 4:Step 5:

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 !
Pulse Generation using Timer in Siemens PLC
Basics of Permissive and Interlock Circuits
PLC Input Output Modules
How to import GSD files into the TIA Portal? – Siemens PLC
Difference Between PNP and NPN Sensors
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

Types of Industrial Relays

What is a Relay? Types of Industrial Relays

Basics of Sinking and Sourcing

Basics of Sinking and Sourcing – Automation System MCQ

Omron PLC Car Parking Program

OMRON PLC Tutorial: Car Parking System Application

SCADA

Top 100+ SCADA Questions

Relay Parts

Difference Between NO and NC Contacts

TP Timer in CodeSys

Timers in Codesys – Timer ON, Timer OFF, Pulse Timer

Jog button in Motor Start Stop Logic using PLC

Jog Function in Motor Start Stop Logic using PLC

Digital Output Card With Relay and Wet Contact

Wiring Diagrams of PLC and DCS Systems – DI, DO, AI, AO

More Articles

Transformers Questions & Answers Part-4

Transformers Questions & Answers Part-4

DCS Alarm and Setpoint

Setpoints and Alarms in Control System

Car Lifts

Car Lifts – Choosing the Right One for Your Mechanic Shop

Orifice Flange Rating

Why Orifice Flow Meter Flange is Not Recommended 150# Rating?

Automatic Coffee Machine

Automatic Coffee Vending Machine – PLC Logic Programming

VFD Pros and Cons - Variable Frequency Drives

VFD Pros and Cons – Variable Frequency Drives

Why Measure Level

Thermocouple Temperature Range

Thermocouple Properties, Temperature Ranges, Element Construction

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?