December 26, 2018

Explain greater than instruction using example


Application:-Explain greater than instruction in the PLC. Write PLC program for explanation using ladder diagram language in the Programmable Logic Controller (PLC).

Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source, 24VDC temperature controller.


Diagram:-
















Explanation:-

Consider a simple temperature controller example for explanation of greater than (>) instruction in the Programmable Logic Controller (PLC). Here we have considered simple HMI (Human Machine Interface) for display and programmable Logic Controller (PLC) for programming. Consider one temperature control which is displaying the temperature given by temperature sensor, here we haven’t considered analog signal calculation and scaling so we directly consider actual value in the PLC. Here if the actual temp value in the actual temp box is greater than set temp, temperature indication will be ON.

If set temperature is 100 degree and temperature read by temperature controller is more than 100 degree or consider 102 degree, lamp should be ON because 102 degree is greater than 100 degree.

PLC program:-

Write the ladder program for above application using ladder diagram language. Here for ladder logic we can use any supported PLC system like S7-1200, S7-300, S7-1500 or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

For our application lamp is digital output. Set temp is the input word.

Digital Output:-

Temp Lamp=Q0.0

M Memory:-

Set temp.:-MW10

Actual temp:-MW20











PLC program Explanation:-

In network 1 actual temperature (MW10) will be compared with set temperature (MW20). So if the measured temperature (MW10) is greater than set temperature (MW20), temperature indication lamp (Q0.0) will be ON

In greater or equal (>) instruction, two operands are compared, we can set data type in comparator instruction.


Parameter Initialization when Power UP

PLC Program for Automatic Parameter Initialisation on Power-Up

This document outlines a PLC programming solution for automatically initializing critical parameters upon machine power-up, preventing data loss due to power failures and enhancing operational efficiency.

Problem Description

In industrial applications, certain machine parameters (e.g., set speed, batch size, target position) often require specific initial values for proper operation. A common challenge arises when power interruptions occur, potentially causing these parameters to reset to zero or retain incorrect values. This necessitates manual re-entry of data by the operator every time the machine powers up or recovers from a power failure, leading to downtime, potential errors, and reduced productivity.

The objective is to ensure that essential machine parameters are automatically initialized to predefined values whenever the machine is powered on, eliminating the need for manual intervention in such scenarios.

Diagram:- 


Problem Solution Approach

To address this, we will implement PLC logic that automatically initializes parameters during the PLC's first scan after power-up. Additionally, a manual initialization button will be provided, allowing operators to reinitialize parameters during normal machine operation if needed.

For demonstration purposes, we will consider "Machine Set Speed" as the parameter to be initialized. It will automatically set to a default value on power-up, and an operator can manually adjust or reinitialize it via a button during runtime.

Hardware and Software

  • PLC: Siemens S7-1200

  • Programming Software: Siemens TIA Portal

List of Inputs/Outputs

Type

Address

Description

Input

I0.0

Parameter Initialization Button

Memory

MW10

Set Speed (from HMI/Display)

Output

MW12

Speed for Drive (Actual Speed Command)


PLC Program Description

The program utilizes the S7-1200's system memory capabilities, specifically the "First Scan" bit, to trigger automatic initialization. The system memory bits (Always ON, Always OFF, First Scan, Diagnostic Status Changed) are internal bits provided by the PLC for specific system states. Here, we configure M1.0 as the First Scan bit.

Network 1: Automatic and Manual Parameter Initialization


This network handles the initialization of the MW12 (Speed for Drive) parameter.

  • We use a Normally Open (NO) contact of the First Scan bit (M1.0). This contact is active only for one scan cycle immediately after the PLC transitions from STOP to RUN mode (e.g., on power-up or after a manual restart).

  • When M1.0 is active, a MOVE instruction is executed. This instruction moves the initial default value (e.g., 5 RPM) into MW12 (Speed for Drive). This ensures that the motor starts at a safe, predefined speed automatically upon power-up.

  • Additionally, a Normally Open (NO) contact of the Parameter Initialization Button (I0.0) is connected in parallel. If the operator presses this button during runtime, it will also trigger the MOVE instruction, reinitializing MW12 to 5 RPM, providing a manual override.

Network 2: Manual Data Entry for Runtime Adjustment


This network allows the operator to modify the machine's set speed during normal operation.

  • This logic enables the operator to enter a desired speed value into MW10 (Set Speed from Display) via an HMI (Human Machine Interface) or display unit.

  • A MOVE instruction then transfers the value from MW10 (Set Speed from Display) to MW12 (Speed for Drive).

  • For example, if the operator enters 100 RPM into MW10, this value will be moved to MW12, causing the motor to run at 100 RPM. This allows for dynamic adjustment of the speed during the running cycle, independent of the automatic initialization.

Runtime Test Cases

Input Condition

Expected Output (MW12)

Physical Element Behaviour

PLC Power-Up (First Scan M1.0 becomes 1)

5

Motor runs at 5 RPM (initial)

Operator enters 100 into MW10

100

Motor runs at 100 RPM

Parameter Initialization Button (I0.0) pressed

5

Motor reinitializes to 5 RPM

Explain less or equal (<=) instruction using example


Application:-Explain less or equal instruction in the PLC. Write PLC program for explanation using ladder diagram language in the Programmable Logic Controller (PLC).

Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source, 24VDC temperature controller.

Diagram:-

























Explanation:-

Consider a simple temperature controller example for explanation of less equal instruction in the PLC. Here we have taken simple HMI (Human Machine Interface) for display and programmable Logic Controller (PLC) for programming. Consider one temperature control which is displaying the temperature given by temperature sensor, here we haven’t considered analog signal calculation and scaling so we can directly consider actual temp value in the PLC. Here if the actual temp value in the actual temp box is less or equal than set temp, temperature indication will be ON.

If set temperature is 50 degree and temperature read by temperature controller is 45 0r 50 degree, lamp should be ON because 45 degree is less than 50 degree.





PLC program:-

Write the ladder program for above application using ladder diagram language. Here for ladder logic we can use any supported PLC system like S7-1200, S7-300, S7-1500 or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.

For our application lamp is digital output. Set temp is the input word.

Digital Output:-

Temp Lamp=Q0.0

M Memory:-

Set temp.:-MW10

Actual temp:-MW20
















PLC program Explanation:-

In network 1, actual temperature (MW10) will be compared with set temperature (MW20). So if the measured temperature (MW10) is less or equal than set temperature (MW20), low temperature indication lamp (Q0.0) will be ON.

In less or equal (<=) instruction, two operands are compared, we can set data type in comparator instruction.


Liquid Mixing Application

Liquid Mixing Application


Liquid mixing technique is used in different industries.Learn PLC program for this application.

Click on image for more detail

https://instrumentationtools.com/plc-program-for-automatic-liquid-mixing-application/

December 14, 2018

Drive multiple speed with different reference using PLC

Drive nultiple speed with different reference using PLC




Click on image for more detail





Automatic Lamp Control

Automatic Lamp ON/OFF Control in a Godown using PLC

Problem Statement

In traditional setups, when someone enters the godown (storage area), they manually press a switch that turns all lamps ON simultaneously. This leads to unnecessary energy consumption, especially when only certain segments are in use.

A solution is needed to optimize power usage with segment-wise automation.

Diagram:-


Automated Solution Using PLC

We’ve implemented a simple automation system using a PLC (Siemens S7-1200) and the TIA Portal software.

The godown is divided into three segments, each with:

  • One lamp
  • One switch
  • Interlocking logic to prevent multiple lights from running at once

Operation Logic:

  • When the user presses Switch 1 (SW1)Lamp 1 turns ON.
  • The system locks control of Lamps 2 & 3 until Lamp 1 is turned OFF.
  • This pattern is repeated for each segment, enforcing sequential access to lighting and conserving energy.

PLC I/O List

Digital Inputs

Digital Outputs

SW1 = I0.0

Lamp 1 = Q0.0

SW2 = I0.2

Lamp 2 = Q0.1

SW3 = I0.3

Lamp 3 = Q0.2

 

Ladder Logic Summary

  • Network 1:

    • Lamp 1 (Q0.0) is triggered via NO contact of SW1 (I0.0)
    • NC contacts of other switches are used to ensure interlocking

  • Network 2:


    • Lamp 2 (Q0.1) uses NO contact of SW2 (I0.2)
    • Interlocked via NCs from other segments

  • Network 3:

    • Lamp 3 (Q0.2) uses NO contact of SW3 (I0.3)
    • Follows similar interlocking structure

Runtime Test Scenarios

Input Conditions

Output States

Lamp Status

I0.0 = 1

Q0.0 = 1

Lamp 1 ON (Lamp 2 & 3 OFF)

I0.2 = 1

Q0.1 = 1

Lamp 2 ON (Lamp 1 & 3 OFF)

I0.3 = 1

Q0.2 = 1

Lamp 3 ON (Lamp 1 & 2 OFF)

 



December 3, 2018

Explain Not equal (< >) instruction using example


Application:-Explain not Equal instruction in the PLC. Write PLC program for explanation using ladder diagram language in the Programmable Logic Controller (PLC).
Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source.

Diagram:-
















Explanation:-
Consider a simple example for explanation of not equal instruction in the PLC. Here we have taken simple HMI (Human Machine Interface) for display and programmable Logic Controller (PLC) for programming. Take two values, set value 1 and set value 2 for example. Here if both the value in the set value 1 and set value 2 equal then lamp will be OFF. So we need to use not equal (< >) instruction for above example.
Enter 20 value in the value 1 box and enter 20 value in the value 2 box so lamp should be OFF and if someone enter 21 value in the set value 1 box, lamp should be ON.

 PLC program:-
Write the ladder program for above application using ladder diagram language. Here for ladder logic we can use any supported PLC system like S7-1200, S7-300, S7-1500 or any other PLC which can support this instruction. For PLC logic we need digital inputs and outputs.
For our application lamp is digital output. Two set values from the HMI are input words.
Digital Output:-
Lamp=Q0.0
M Memory:-
Value 1:-MW10
Value 2:-MW12








PLC program Explanation:-
In network 1 two values are compared in the comparison instruction. Value 1 (MW10) is compared with Value 2 (MW12).Hence if both values are not equal, lamp (Q0.0) will be ON.
In not equal (< >) instruction, two operands are compared, we can set data type in comparator instruction.


Normally open (NO) contact concept.

Normally open (NO) contact concept.

This is PLC Program for NO contact.

Normally open contact is known as NO contact. When the quantity has signal state 1, the open contact closes and therefore the signal state of the output is changed.
When the quantity has signal state zero, the open contact closes is not activated and therefore output state is zero.
If two NO contacts are connected in series, the power flows once all contacts are closed
If two NO contacts are connected in parallel connection, the power flows once one contact amongst all contacts are closed.

Example of the NO contacts.
In above example two NO contact s are connected in series (tag 1 and tag 3). When both signal state is 1 then tag 2 state is 1.



Explain greater or equal (>=) instruction using example

Application:-Explain greater or equal instruction in the PLC. Write PLC program for explanation using ladder diagram language in the Programmable Logic Controller (PLC).
Components:-Programmable logic controller, HMI panel, wires, 24 VDC lamp, 24 VDC power source, 24VDC temperature controller.
 
Diagram:-




Explanation:-
Consider a simple temperature controller example for explanation of greater equal instruction in the PLC. Here we have taken simple HMI (Human Machine Interface) for display and programmable Logic Controller (PLC) for programming. Consider one temperature control which is displaying the temperature given by temperature sensor, here we haven’t considered analog signal calculation and scaling so we directly consider actual value in the PLC. Here if the actual temp value in the actual temp box is greater or equal than set temp, temperature indication will be ON.
If set temperature is 50 degree and temperature read by temperature controller is 50 0r 52 degree, lamp should be ON because 52 degree is greater than 50 degree.





























Normally open (NC) contact concept.

Normally open (NC) contact concept.

This is PLC Program for NC contact.

Normally closed contact is known as NC contact. When the quantity has signal state 0, the NC contact allow signal flow and output result is 1.
When the quantity has signal state 1, the closed contact is not activated and therefore output state is zero.
If two NC contacts are connected in series, the power flows once all contacts have zero signal state.
If two NC contacts are connected in parallel connection, the power flows when one NC contact amongst all have zero signal state.

Example of the NC contacts.
In above example two NC contact are connected in series (tag 1 and tag 3). When both signal state are zero, output result is 1.