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 !
Electrical and Instrumentation – Automation Pre-engineering Documents
Edge Detection in PLC Programming
Safety Considerations in PLC System Design
Sheets, Tags, Elements in Functional Block Diagram of Studio 5000
How to Protect Siemens PLC using Password?
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

  • Kamli on Top Free PLC Software
  • 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

Related Articles

PLC Program for Water Level Control

PLC Program for Water Level Control Logic

running two single-phase induction motors sequentially

Control Two Motors in Sequence after Time Delay – Circuit, Operation

Forward reverse motor control diagram with timer

Timer during Motor Direction Change PLC Program

Relay Wiring

Animation of Electromagnetic Relay

Yokogawa DCS

Yokogawa DCS and SIS System Architecture

Most Asked Questions on SCADA

Most Asked Questions on SCADA with Answers

Contextual HMI

What is Contextual HMI? – HMI Screens on a Mobile or Tablet

PLC Example on Switch Program with Timers

PLC Example on Switch Program with Timers

More Articles

Inductor Principle

Inductor

Diagram of Oscillator Circuit

Barkhausen Criterion

thermocouple head

Thermocouples Connector and Tip styles

Industrial safety Objective Questions and Answers

Top 10 Industrial safety Objective Questions

Electronic Symbols List

Electronic Symbols

Power Electronics Objective Questions

Full Wave Diode Rectifier Quiz

Surface Detector Level Measurement System

Surface Detector Level Gauges (Plumb-bob)

Features of PID Controller

Features of PID Controller actions

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?