Conversation with Merlin [email protected] · Tue Dec 05 2023

various components of plc and scada, and also ots types based on this content?Introduction to SCADA: The term SCADA stands for Supervisory Control and Data Acquisition. A SCADA system is a common process automation system which is used to gather data from sensors and instruments located at remote sites and to transmit and display this data at a central site for control or monitoring purposes.

The Term SCADA usually refers to centralized systems which monitor and control entire sites, or complexes of systems spread out over large areas (anything between an industrial plant and a country). Most control actions are performed automatically by Remote Terminal Units (RTUs) or by programmable logic controllers (PLCs). Host control functions are usually restricted to basic overriding or supervisory level intervention. For example, a PLC may control the flow of cooling water through part of an industrial process, but the SCADA system may allow operators to change the set points for the flow, and enable alarm conditions, such as loss of flow and high temperature, to be displayed and recorded. The feedback control loop passes through the RTU or PLC, while the SCADA system monitors the overall performance of the loop.

Components of SCADA

  1. Human Machine Interface:

It is an interface which presents process data to a human operator, and through this, the human operator monitors and controls the process. 2. Supervisory (computer) system It gathers data on the process and sending commands (or control) to the process. 3. Remote Terminal Units (RTUs) It connects to sensors in the process, converting sensor signals to digital data and sending digital data to the supervisory system. 4. Programmable Logic Controller (PLCs) It is used as field devices because they are more economical, versatile, flexible, and configurable than special-purpose RTUs. 5. Communication infrastructure It provides connectivity to the supervisory system to the Remote Terminal Units • Control industrial processes locally or at remote locations. • Monitor, gather, and process real-time data. • Directly interact with devices such as sensors, valves, pumps, motors, and more through human-machine interface (HMI) software. • Record events into a log file.

SCADA systems are classified into four types which include the following:- There are different types of SCADA systems that can be considered as SCADA architectures of four different generations: First Generation: Monolithic or Early SCADA systems, Second Generation: Distributed SCADA systems, Third Generation: Networked SCADA systems and IOT. • Monolithic SCADA Systems. • Distributed SCADA Systems. • Networked SCADA Systems. • IoT SCADA Systems.

Tags in SCADA: Tags are the placeholder of information in SCADA servers; they are similar to OPC items, except that internal tags (results of calculations made by SCADA scripts for example), as well as external tags (information from PLCs or OPC servers) can be used.

Open Platform Communications (OPC) is a series of standards and specifications for industrial telecommunication. OPC specifies the communication of the real-time plant data between control devices for different developers of SCADA software. SCADA has got three types of tags, I/O tag (external), virtual tag (internal) and runtime (memory) tag that add during runtime. SCADA Alarms & Trends SCADA system alarms notify the operator of power supply issues (activation of the SCADA UPS and backup power supply) and network issues such as loss of IP connection. The most common SCADA alarm is "Device Down," which occurs when a device stops communicating on the network. Alarm and Event is both notifier and are used to notify or inform about any important Alarm or event that has occurred or is occurring in present in an Industry. Alarm and Event plays a very important role in Automation Industry and these features should be in every SCADA Software. The difference between alarms and events is that alarms are unexpected and might need corrective action, while events are expected and of importance to the operator.

Trends (or charts, graphs) are essentially important for an industrial automation system. They record real time data from field, retrieve historical data, and present them in graphical ways. SCADA serves as the backbone to an automated system, and it also takes care of trends. It can be said that every qualified SCADA software requires to have the functionality of trends.

The main idea of implementing Trending is to monitor your data. While these data are tags stored in your SCADA, they can be IO tags or Virtual tags. Then, set log to database for the tags you want. For example, create new or open an existing IntegraXor project. Navigate to Virtual tag table, on the particular tag, set the database in “Log” column as shown below. Save the project.

Screen Navigation: Supervisory control and data acquisition (SCADA) is a system of software and hardware elements that allows industrial organizations to: Control industrial processes locally or at remote locations. Monitor, gather, and process real-time data.

Since the goal of well-organized HMI navigation is to create an intuitive way to sort and display all the information a viewer needs, the first step in a successful navigation reorganization is to sort out all of the necessary content for your project (I recommend writing it all down on Post-It notes, so you can move.

Four SCADA Functions SCADA systems perform several functions that allow for proper management of remote facilities. The following are the core functions of a SCADA system.

Data Acquisition

The collection of SCADA data frequently involves some kind of analog to digital conversion. Temperature is converted to degrees Celsius. Transmit signal strength is converted to dBm. Channel quality is measured in errored seconds.

Networked Data Communication

The collected data is transmitted either spontaneously or in response to a request for data to some kind of upstream consolidator or master. The communication channel can be analog (T202, POTS) or digital (RS485, TCP/IP). SCADA network topology typically also includes some kind of transport validation independent of any content validation.

Data Presentation

The collected data is processed, organized and presented for system operators to make appropriate response and control decisions. The presentation can vary from tabular presentation of logged events to graphical presentation against mapping or image backgrounds

Control

If control decisions are warranted and the system supports output, appropriate commands can be dispatched to affect specific operational or configuration changes. Most control actions are performed by RTUs and

Based on the information provided, it seems there is an overview of SCADA systems and their components, types, tags, alarms & trends, screen navigation, and functions.

PLC (Programmable Logic Controller) Components:

PLCs serve as field devices within SCADA systems and are more economical, versatile, flexible, and configurable than special-purpose RTUs. They are often used to control the flow of industrial processes and are connected to sensors and instruments.

SCADA Components:

  1. Human-Machine Interface (HMI): Provides a means for human operators to monitor and control the process.

  2. Supervisory (Computer) System: Gathers data on the process and sends commands or control to the process.

  3. Remote Terminal Units (RTUs): Connect to sensors in the process, convert sensor signals to digital data, and send this digital data to the supervisory system.

  4. Communication Infrastructure: Provides connectivity between the supervisory system and the remote terminal units.

Types of SCADA Systems:

  • Monolithic SCADA Systems
  • Distributed SCADA Systems
  • Networked SCADA Systems
  • IoT SCADA Systems

SCADA Tags:

  • I/O tag (external)
  • Virtual tag (internal)
  • Runtime tag (memory)

SCADA Alarms & Trends:

  • SCADA alarms notify operators of power supply and network issues.
  • Alarms and events are used to inform about important occurrences and play a vital role in the automation industry.
  • Trends record real-time and historical data and present them graphically.

Screen Navigation in SCADA:

  • Supervisory control and data acquisition systems allow for control and monitoring of industrial processes at remote locations.
  • Well-organized HMI navigation is essential to sort and display all necessary information for a project.

SCADA Functions:

  1. Data Acquisition: Involves analog to digital conversion and collection of data.
  2. Networked Data Communication: Transmission of collected data.
  3. Data Presentation: Processing, organization, and presentation of collected data for system operators.
  4. Control: Dispatching appropriate commands to affect operational or configuration changes.

Please let me know if you need further details on any specific component or type of the SCADA system.

Describe alarms and trends in scada , also give its significance ? based on this content : Introduction to SCADA: The term SCADA stands for Supervisory Control and Data Acquisition. A SCADA system is a common process automation system which is used to gather data from sensors and instruments located at remote sites and to transmit and display this data at a central site for control or monitoring purposes.

The Term SCADA usually refers to centralized systems which monitor and control entire sites, or complexes of systems spread out over large areas (anything between an industrial plant and a country). Most control actions are performed automatically by Remote Terminal Units (RTUs) or by programmable logic controllers (PLCs). Host control functions are usually restricted to basic overriding or supervisory level intervention. For example, a PLC may control the flow of cooling water through part of an industrial process, but the SCADA system may allow operators to change the set points for the flow, and enable alarm conditions, such as loss of flow and high temperature, to be displayed and recorded. The feedback control loop passes through the RTU or PLC, while the SCADA system monitors the overall performance of the loop.

Components of SCADA

  1. Human Machine Interface:

It is an interface which presents process data to a human operator, and through this, the human operator monitors and controls the process. 2. Supervisory (computer) system It gathers data on the process and sending commands (or control) to the process. 3. Remote Terminal Units (RTUs) It connects to sensors in the process, converting sensor signals to digital data and sending digital data to the supervisory system. 4. Programmable Logic Controller (PLCs) It is used as field devices because they are more economical, versatile, flexible, and configurable than special-purpose RTUs. 5. Communication infrastructure It provides connectivity to the supervisory system to the Remote Terminal Units • Control industrial processes locally or at remote locations. • Monitor, gather, and process real-time data. • Directly interact with devices such as sensors, valves, pumps, motors, and more through human-machine interface (HMI) software. • Record events into a log file.

SCADA systems are classified into four types which include the following:- There are different types of SCADA systems that can be considered as SCADA architectures of four different generations: First Generation: Monolithic or Early SCADA systems, Second Generation: Distributed SCADA systems, Third Generation: Networked SCADA systems and IOT. • Monolithic SCADA Systems. • Distributed SCADA Systems. • Networked SCADA Systems. • IoT SCADA Systems.

Tags in SCADA: Tags are the placeholder of information in SCADA servers; they are similar to OPC items, except that internal tags (results of calculations made by SCADA scripts for example), as well as external tags (information from PLCs or OPC servers) can be used.

Open Platform Communications (OPC) is a series of standards and specifications for industrial telecommunication. OPC specifies the communication of the real-time plant data between control devices for different developers of SCADA software. SCADA has got three types of tags, I/O tag (external), virtual tag (internal) and runtime (memory) tag that add during runtime. SCADA Alarms & Trends SCADA system alarms notify the operator of power supply issues (activation of the SCADA UPS and backup power supply) and network issues such as loss of IP connection. The most common SCADA alarm is "Device Down," which occurs when a device stops communicating on the network. Alarm and Event is both notifier and are used to notify or inform about any important Alarm or event that has occurred or is occurring in present in an Industry. Alarm and Event plays a very important role in Automation Industry and these features should be in every SCADA Software. The difference between alarms and events is that alarms are unexpected and might need corrective action, while events are expected and of importance to the operator.

Trends (or charts, graphs) are essentially important for an industrial automation system. They record real time data from field, retrieve historical data, and present them in graphical ways. SCADA serves as the backbone to an automated system, and it also takes care of trends. It can be said that every qualified SCADA software requires to have the functionality of trends.

The main idea of implementing Trending is to monitor your data. While these data are tags stored in your SCADA, they can be IO tags or Virtual tags. Then, set log to database for the tags you want. For example, create new or open an existing IntegraXor project. Navigate to Virtual tag table, on the particular tag, set the database in “Log” column as shown below. Save the project.

Screen Navigation: Supervisory control and data acquisition (SCADA) is a system of software and hardware elements that allows industrial organizations to: Control industrial processes locally or at remote locations. Monitor, gather, and process real-time data.

Since the goal of well-organized HMI navigation is to create an intuitive way to sort and display all the information a viewer needs, the first step in a successful navigation reorganization is to sort out all of the necessary content for your project (I recommend writing it all down on Post-It notes, so you can move.

Four SCADA Functions SCADA systems perform several functions that allow for proper management of remote facilities. The following are the core functions of a SCADA system.

Data Acquisition

The collection of SCADA data frequently involves some kind of analog to digital conversion. Temperature is converted to degrees Celsius. Transmit signal strength is converted to dBm. Channel quality is measured in errored seconds.

Networked Data Communication

The collected data is transmitted either spontaneously or in response to a request for data to some kind of upstream consolidator or master. The communication channel can be analog (T202, POTS) or digital (RS485, TCP/IP). SCADA network topology typically also includes some kind of transport validation independent of any content validation.

Data Presentation

The collected data is processed, organized and presented for system operators to make appropriate response and control decisions. The presentation can vary from tabular presentation of logged events to graphical presentation against mapping or image backgrounds

Control

If control decisions are warranted and the system supports output, appropriate commands can be dispatched to affect specific operational or configuration changes. Most control actions are performed by RTUs and'

Alarms and Trends in SCADA:

Alarms in SCADA systems serve as notifiers to operators, informing them of various issues such as power supply problems and network connectivity disruptions. The most common alarm is "Device Down," which indicates a device has stopped communicating on the network. Alarms are unexpected events that may require corrective action.

Trends (or charts, graphs) are crucial for industrial automation systems. They record real-time data from the field, retrieve historical data, and present it graphically. SCADA systems act as the backbone of an automated system and are responsible for managing trends. Implementing trending allows for the monitoring of data stored in SCADA, which can include IO tags or virtual tags. The functionality of trends is considered essential for qualified SCADA software.

Significance of Alarms and Trends in SC:

Alarms play a vital role in the automation industry and are crucial for every SCADA software. They notify operators about important events and occurrences, prompting timely corrective actions. Events are expected and of significance to the operator, while alarms are unexpected and often require immediate attention.

Trends serve as an essential feature for monitoring data in industrial automation systems. They aid in understanding the historical and real-time performance of processes, allowing for informed decision-making. SCADA systems handle trends, recording and presenting data graphically to facilitate efficient monitoring and control of industrial processes.

If you have further questions or need more information on alarms and trends in SCADA systems, feel free to ask.

Explain ladder logic and structured text language in short ? based on this content : Introduction to Programming Languages: The IEC (International Electro technical Commission) officially recognizes five PLC programming languages in the IEC-61131-3 Standard. They are Ladder Diagram (LD), Function Block (FBD), Structured Text (ST), Instruction List (IL), and Sequential Function Chart (SFC). The 5 most popular types of PLC Programming Languages are:

  1. Ladder Diagram (LD)
  2. Sequential Function Charts (SFC)
  3. Function Block Diagram (FBD)
  4. Structured Text (ST)
  5. Instruction List (IL) Ladder Logic: Ladder Logic is the most common language used in PLC programming. It was developed to mimic relay logic, that is why the syntax is very simple.

The inputs are applied as normally open or normally closed contacts. Depending on the logic performed on the inputs, specific outputs (also named coils) are activated. There is also a possibility to read the positive or negative edge of a digital signal. Besides contacts and coils there are also some blocks that have functions for working with different types of data. This language is called Ladder Logic, because the programs represent a ladder which has two vertical rails and a series of horizontal rugs in between. Structured Text Structured Text is a high level language, which represents a combination of three programming languages: Basic, Pascal and C. This language gives the possibility to operate with inputs and outputs, using different statements such as for, while, if and case.

It is easy to implement complex algorithms and work with mathematical functions. The disadvantage is that this language is more difficult to debug, in comparison with a graphical language. Instruction List Instruction List is a low level language that resembles the assembly language. A program consists of a series of instructions, listed as in an assembly program. There are some common operations, such as addition, division, multiplication and subtraction. There are also operations that make it possible to jump to some label, as well as to call a function.

Instruction List makes the program compact and offers a big processing speed. The downsides of this language are the structure and the syntax. It is difficult to debug a big list of instructions.

Function Block Diagram The FBD is a graphical programming language. Each function, even an elementary one, is described by a block with inputs and outputs. The logic is performed by different connection lines between inputs and outputs of the blocks.

Sequential Function Chart Sequential Function Chart is a graphical programming language that is defined as Preparation of function charts for control systems. It is based on GRAFCET. This language is used when programming a process that can be split into several steps. There are 3 main components of an SFC: ▪ Steps with defined actions; ▪ Transitions with defined logic conditions; ▪ Links between steps and transitions. The actions and the conditions can be described in any PLC programming language. The SFC is basically a chart that represents an overview of the project, aimed to ease the analysis of the process.

Each of the PLC programming languages aforementioned has their advantages and disadvantages. The question of which one to use depends on the project requirements and engineer’s expertise.

Ladder Relay Instruction:

NO-NC & coil based instructions: In every control circuits and automation systems, logic is developed based on the open or closed state of switches, sensors or relays. Hence it is mandatory to know the concept behind NO/NC. Normally open(NO) and Normally closed (NC) are terms used to define the states of switches, sensors or relay contacts under when its coil is not excited. It is the fundamental of process automation. A NO contact or a normally open contact is the one that remains open until a certain condition is satisfied. For example, let us consider a limit switch. A limit switch consists of at least one NO contact in it. The NO contact in the limit switch remains open until its actuator is pressed. When the actuator is pressed the contact closes and starts conducting. In the case of proximity switches, NO contacts remain open until it senses some object similarly in the case of pressure switches, the contact remains open until the preset pressure level is reached.

The above image shows the states of the NO contact of a push-button during the normal condition and when pressed. PLC Timer & Counters: A PLC is a specialized computer that is used to control and operation of manufacturing process or machinery. It is not possible to control complex systems by using certain logic and it is because we can’t use sensors to check all the conditions. So during these conditions, we use events to determine the condition of the system. Mostly a PLC would use certain events such as PLC scanning which indicates that the PLC has just been turned on. The timer is used to indicate that the input is turned ON/OFF or to create a delay. Counters are used to count the set of events that have occurred and the latch or unlatch is used to lock something ON or to turn it off. The timers and counters are used in a PLC for its continuous operation so they are inevitable in a PLC. The timer would time up to the value set by the user and the counter will count up to the value set by the user. The timer and counter both are of 16 bits, the timers and counters are the fundamental PLC instructions and it is common to all PLCs. Both the timer and counter would function as output instructions in a PLC program.

The PLC timer consists of an internal clock, a count value register, and an accumulator, and the timer is mostly used for the timing process. Many of the control tasks would need the programming of time. The timer instructions are used in PLC to create the program time delays. The number of timers that we can use in our program is depended on the amount of memory in the CPU. The timers are used in PLC to delay actions; the timer would keep an output for a specified time after an input turns off. The timer would also keep an output off for a specified time before it turns ON. The major function of a timer is to keep an output ON for a specified length of time. A timer has certain parts such as time base, accumulated value, timer address, and preset value. There are bits that are related to the current state of the timer and it is called the status bits. The timing functions are inevitable in PLC applications the cycle time is really critical in many processes. The timers in PLC are considered as a software module and it would generate digital timing. There is memory space in the PLC to store the delay time. Need for timer in a PLC: In many of the PLC control tasks, there is a need to control the time an example of this will be using a PLC to control a motor. The motor would require to be controlled to operate for a certain interval, and that’s why PLCs have timers and the timers are built-in devices in a PLC. By using the internal CPU clock the timer would count the time. Different PLC timers are programmed in different ways, so we can consider a timer to act as a relay with coils, which would open or close when it is energized according to the pre-set time. Timer instructions: The timer instructions are the output instructions which is used to time the intervals for which the rung conditions are true or false. The timer accuracy will be depended upon the microprocessor which is being used. The timer instruction is composed of two values and they are

▪ Accumulated value – This is a current number of time-based intervals that have been counted from the moment when the timer is energized. ▪ Preset value – This value is set by the programmer, if the preset value is less than or equal to the accumulated value then a status bit is set and this bit is to control an output device. Each timer is composed of two status bit ▪ Timer enable-bit – This bit will be set if the rung condition to the left of the timer instruction is true and when this bit is set then the accumulated value will be incremented on each time base interval till it reaches the preset value. ▪ Done bit – This bit will be set if the preset value and the accumulated value are equal and it will be reset if the rung condition is false.

Comparison Instructions in PLC Programming

Comparison instructions in PLC are used to test pairs of values to condition the logical continuity of a rung. Thus, comparison instructions would seldom, if ever, be the last instruction on a rung. As an example, suppose a LES instruction is presented with two values. If the first value is less than the second, then the comparison instruction is true.

Equal (EQU) Instruction Use the EQU instruction to test whether two values are equal. If source A and source B are equal, the instruction is logically true. If these values are not equal, the instruction is logically false. Source A must be an address. Source B can be either a program constant or an address. Values are stored in two’s complementary form. Not Equal (NEQ) Instruction Use the NEQ instruction to test whether two values are not equal. If source A and source B are not equal, the instruction is logically true. Source A must be an address. Source B can be either a program constant or an address. Values are stored in two’s complementary form. Less Than or Equal (LEQ) Instruction Use the LEQ instruction to test whether one value (source A) is less than or equal to another (source B). If the value at source A is less than or equal to the value at source B, the instruction is logically true. Source A must be an address.

Source B can be either a program constant or an address. Values are stored in two’s complementary form. Greater Than (GRT) Instruction Use the GRT instruction to test whether one value (source A) is greater than another (source B). If the value at source A is greater than the value at source B, the instruction is logically true. Greater Than Or Equal (GEQ) Instruction Use the GEQ instruction to test whether one value (source A) is greater than or equal to another (source B). If the value at source A is greater than or equal to the value at source B, the instruction is logically true. Masked Comparison for Equal (MEQ) Use the MEQ instruction to compare data at a source address with data at a compare address. The Use of this instruction allows portions of the data to be masked by a separate word. Source is the address of the value you want to compare. Mask is the address of the mask through which the instruction moves data.

The mask can be a hexadecimal value. Compare is an integer value or the address of the reference. If the 16 bits of data at the source address are equal to the 16 bits of data at the compare address (less masked bits), the instruction is true. The instruction becomes false as soon as it detects a mismatch.

Limit Test (LIM) Instruction Use the LIM instruction to test for values within or outside a specified range, depending on how you set the limits. The Low Limit, Test, and High Limit values can be word addresses or constants, restricted to the following combinations: • If the Test parameter is a program constant, both the Low Limit and High Limit parameters must be word addresses. • If the Test parameter is a word address, the Low Limit and High Limit parameters can be either a program constant or a word address. Scale Instruction SCALE_X scales the normalized real parameter VALUE where ( 0.0 <= VALUE <= 1.0 ) in the data type and value range specified by the MIN and MAX parameters: OUT = VALUE ( MAX – MIN ) + MIN For SCALE_X, parameters MIN, MAX, and OUT must be the same data type. NORM_X normalizes the parameter VALUE inside the value range specified by the MIN and MAX parameters:

OUT = ( VALUE – MIN ) / ( MAX – MIN ), where ( 0.0 <= OUT <= 1.0 ) Normalize Instruction For NORM_X, parameters MIN, VALUE, and MAX must be the same data type. Note: SCALE_X parameter VALUE should be restricted to ( 0.0 <= VALUE <= 1.0 ) If parameter VALUE is less than 0.0 or greater than 1.0: The linear scaling operation can produce OUT values that are less than the parameter MIN value or above the parameter MAX value for OUT values that fit within the value range of the OUT data type. SCALE_X execution sets ENO = TRUE for these cases. It is possible to generate scaled numbers that are not within the range of the OUT data type. For these cases, the parameter OUT value is set to an intermediate value equal to the least-significant portion of the scaled real number prior to final conversion to the OUT data type. SCALE_X execution sets ENO = FALSE in this case. If parameter VALUE is less than MIN or greater than MAX, the linear scaling operation can produce normalized OUT values that are less than 0.0 or greater than 1.0. NORM_X execution sets ENO = TRUE in this case.

PLC ladder program explanation General NORM_X and SCALE_X instructions are used for scaling the value or we can use this instruction in analog value scaling.

By using NORM_X instruction we can normalize the actual value in leaner scale within the value range. For example, here the input value is 0 to 27648 and this value needs to be normalized in linear scaled value range from 0.0 to 1.0. After this normalization of the value we can use this output as input value of the SCALE_X instruction. This instruction maps the value in required range (here 0 to 100). This instructions generally used in Siemens S7-1200 PLC. Jump and Subroutine: Jump instruction in ladder logic is used to skip some process or rungs according to the requirement. It is paired with Label which is used to limit the skipping the process.

JSR, SBR, and RET instructions are used to direct the controller to execute a separate subroutine file within the ladder program and return to the instruction following the JSR instruction. Allen Bradley PLC Subroutines The SBR instruction must be the first instruction on the first rung in the program file that contains the subroutine. • Use a subroutine to store recurring sections of program logic that must be executed from several points within your application program • A subroutine saves memory because you program it only once. • Update critical I/O within subroutines using immediate input and/or output instructions (IIM, IOM), especially if your application calls for nested or relatively long subroutines

• Otherwise, the controller does not update I/O until it reaches the end of the main program (after executing all subroutines) • Outputs controlled within a subroutine remain in their last state until the subroutine is executed again. When the JSR instruction is executed, the controller jumps to the subroutine instruction (SBR) at the beginning of the target subroutine file and resumes execution at that point. You cannot jump into any part of a subroutine except the first instruction in that file. The target subroutine is identified by the file number that you entered in the JSR instruction. The SBR instruction serves as a label or identifier for a program file as a regular subroutine file. The instruction must be programmed as the first instruction of the first rung of a subroutine. The RET instruction marks the end of subroutine execution or the end of the subroutine file. The rung containing the RET instruction may be conditional if this rung precedes the end of the subroutine. In this way, the controller omits the balance of a subroutine only if its rung condition is true. How to install a PLC and how to do the PLC wiring? A PLC is an industrial computer that is capable to do discrete or sequential logic in a factory environment. The PLC was developed to replace the mechanical relays, timers, and counters. The PLC is considered as the heart of the control system in an automated system. The PLC can monitor the control system state by the input device signal and based on the program logic it would determine the course of action to be carried out through the output device. The PLC can be considered as the combination of the solid-state logic device.

PLC installation: We must take proper care while installing a PLC so that we can reduce the damages to the automated control systems. We must avoid the installation of PLC in certain places in a factory. ▪ It must not be installed in places where it would get direct exposure to the sunlight ▪ The temperature of the location where the PLC is installed must not exceed more than 55 degrees Celsius. ▪ The relative humidity range 10%-90% RH ▪ It must not be installed in places where flammable or poisonous gases are present ▪ It should not be installed in places where there is a lot of vibrations ▪ It shouldn’t be installed in places where oil or chemical dust is present ▪ We must allow enough space for air circulation ▪ The power lines and high voltage equipment can cause electrical noise in a PLC ▪ We must not install the PLC in a panel that has high voltage equipment ▪ There should be at least 200 mm distance between the PLC and the nearby power lines ▪ The PLC must be installed in a way that it can be accessed for operation and maintenance ▪ It must not be installed near a high voltage equipment

Installing the CPU unit and I/O unit The small PLC must be installed in a way that it should have adequate cooling; the small PLC must not be installed in the incorrect position. It can be installed on a horizontal surface. The I/O units can be installed in a way that inserting the proper modules in their correct locations. We must connect the I/O units as shown in the wiring diagram; most of the switches are attached to the panel, sensors, and solenoid which is located at the machine which is to be controlled. Special I/O connections We need to give special care while connecting certain field devices, this type of connection is leaky inputs and inductive loads. Certain field devices would have leakage current even they are not working and this leaky input can trigger an input circuit and thus mis-operation. So this can be prevented by using a bleeding resistor, place this resistor across the input. This resistor would provide resistance to the circuit and because of this, there will be a voltage drop between the leaky field device and the input circuit. The inductive loads can interrupt the current and this would create voltage spikes and to avoid this we can use a snubber circuit. Installing the PLC in a panel cabinet

▪ While installing sufficient air circulation is required ▪ Cooling fan ▪ The device which generates heat must be located under the PLC ▪ There shouldn’t be any high voltage equipment

What are the factors that must be considered while wiring a PLC? ▪ We must use short cables as possible ▪ We must use a single line between the equipment and do not connect the cable to make it long ▪ We shouldn’t make sharp curves in the cable ▪ We need to keep the area of the system and the control wiring away from the high voltage wiring ▪ We need to separate the input wiring, output wiring, and other wiring types ▪ The AC and DC wiring must be separate ▪ All the components must be grounded ▪ We must make sure that the wire that is used is of the correct gauge and it must be able to handle the maximum possible current ▪ We can label the field wire and termination point using a reliable labeling method ▪ The wire bundling techniques can be used to simplify the connections, the bundles which carry the same type of signals must be kept in separate ducts so that we can avoid interference. ▪ In case if we need to place the I/O wiring and the power cables in the same duct, then they should be shielded from each other by using metal plates.

Ladder Logic and Structured Text are two of the programming languages recognized by the IEC-61131-3 Standard for PLC programming.

Ladder Logic (LD): Ladder Logic is the most common language used in PLC programming. It was designed to mimic relay logic, making it straightforward and intuitive for engineers familiar with electrical control systems. It consists of vertical rails representing power rails and horizontal rungs representing the control circuit. The inputs are applied as normally open or normally closed contacts, and outputs (coils) are activated based on the logic applied to the inputs. This language is well-suited for mimicking electrical relay and control circuits.

Structured Text (ST): Structured Text, on the other hand, is a high-level language, blending elements of Basic, Pascal, and C programming languages. It offers a wide range of programming capabilities, such as using statements like for, while, if, and case to operate on inputs and outputs. This language is particularly suitable for implementing more complex algorithms and mathematical functions. However, Structured Text is more complex and challenging to debug compared to Ladder Logic, as it is a text-based language.

Both Ladder Logic and Structured Text serve as crucial tools for programming PLCs and are often chosen based on the project's requirements and the engineer's expertise.

If you have any further questions or need additional details regarding PLC programming languages, please feel free to ask.

programming languages in plc according to thi s: Introduction to Programming Languages: The IEC (International Electro technical Commission) officially recognizes five PLC programming languages in the IEC-61131-3 Standard. They are Ladder Diagram (LD), Function Block (FBD), Structured Text (ST), Instruction List (IL), and Sequential Function Chart (SFC). The 5 most popular types of PLC Programming Languages are:

  1. Ladder Diagram (LD)
  2. Sequential Function Charts (SFC)
  3. Function Block Diagram (FBD)
  4. Structured Text (ST)
  5. Instruction List (IL) Ladder Logic: Ladder Logic is the most common language used in PLC programming. It was developed to mimic relay logic, that is why the syntax is very simple.

The inputs are applied as normally open or normally closed contacts. Depending on the logic performed on the inputs, specific outputs (also named coils) are activated. There is also a possibility to read the positive or negative edge of a digital signal. Besides contacts and coils there are also some blocks that have functions for working with different types of data. This language is called Ladder Logic, because the programs represent a ladder which has two vertical rails and a series of horizontal rugs in between. Structured Text Structured Text is a high level language, which represents a combination of three programming languages: Basic, Pascal and C. This language gives the possibility to operate with inputs and outputs, using different statements such as for, while, if and case.

It is easy to implement complex algorithms and work with mathematical functions. The disadvantage is that this language is more difficult to debug, in comparison with a graphical language. Instruction List Instruction List is a low level language that resembles the assembly language. A program consists of a series of instructions, listed as in an assembly program. There are some common operations, such as addition, division, multiplication and subtraction. There are also operations that make it possible to jump to some label, as well as to call a function.

Instruction List makes the program compact and offers a big processing speed. The downsides of this language are the structure and the syntax. It is difficult to debug a big list of instructions.

Function Block Diagram The FBD is a graphical programming language. Each function, even an elementary one, is described by a block with inputs and outputs. The logic is performed by different connection lines between inputs and outputs of the blocks.

Sequential Function Chart Sequential Function Chart is a graphical programming language that is defined as Preparation of function charts for control systems. It is based on GRAFCET. This language is used when programming a process that can be split into several steps. There are 3 main components of an SFC: ▪ Steps with defined actions; ▪ Transitions with defined logic conditions; ▪ Links between steps and transitions. The actions and the conditions can be described in any PLC programming language. The SFC is basically a chart that represents an overview of the project, aimed to ease the analysis of the process.

Each of the PLC programming languages aforementioned has their advantages and disadvantages. The question of which one to use depends on the project requirements and engineer’s expertise.

Ladder Relay Instruction:

NO-NC & coil based instructions: In every control circuits and automation systems, logic is developed based on the open or closed state of switches, sensors or relays. Hence it is mandatory to know the concept behind NO/NC. Normally open(NO) and Normally closed (NC) are terms used to define the states of switches, sensors or relay contacts under when its coil is not excited. It is the fundamental of process automation. A NO contact or a normally open contact is the one that remains open until a certain condition is satisfied. For example, let us consider a limit switch. A limit switch consists of at least one NO contact in it. The NO contact in the limit switch remains open until its actuator is pressed. When the actuator is pressed the contact closes and starts conducting. In the case of proximity switches, NO contacts remain open until it senses some object similarly in the case of pressure switches, the contact remains open until the preset pressure level is reached.

The above image shows the states of the NO contact of a push-button during the normal condition and when pressed. PLC Timer & Counters: A PLC is a specialized computer that is used to control and operation of manufacturing process or machinery. It is not possible to control complex systems by using certain logic and it is because we can’t use sensors to check all the conditions. So during these conditions, we use events to determine the condition of the system. Mostly a PLC would use certain events such as PLC scanning which indicates that the PLC has just been turned on. The timer is used to indicate that the input is turned ON/OFF or to create a delay. Counters are used to count the set of events that have occurred and the latch or unlatch is used to lock something ON or to turn it off. The timers and counters are used in a PLC for its continuous operation so they are inevitable in a PLC. The timer would time up to the value set by the user and the counter will count up to the value set by the user. The timer and counter both are of 16 bits, the timers and counters are the fundamental PLC instructions and it is common to all PLCs. Both the timer and counter would function as output instructions in a PLC program.

The PLC timer consists of an internal clock, a count value register, and an accumulator, and the timer is mostly used for the timing process. Many of the control tasks would need the programming of time. The timer instructions are used in PLC to create the program time delays. The number of timers that we can use in our program is depended on the amount of memory in the CPU. The timers are used in PLC to delay actions; the timer would keep an output for a specified time after an input turns off. The timer would also keep an output off for a specified time before it turns ON. The major function of a timer is to keep an output ON for a specified length of time. A timer has certain parts such as time base, accumulated value, timer address, and preset value. There are bits that are related to the current state of the timer and it is called the status bits. The timing functions are inevitable in PLC applications the cycle time is really critical in many processes. The timers in PLC are considered as a software module and it would generate digital timing. There is memory space in the PLC to store the delay time. Need for timer in a PLC: In many of the PLC control tasks, there is a need to control the time an example of this will be using a PLC to control a motor. The motor would require to be controlled to operate for a certain interval, and that’s why PLCs have timers and the timers are built-in devices in a PLC. By using the internal CPU clock the timer would count the time. Different PLC timers are programmed in different ways, so we can consider a timer to act as a relay with coils, which would open or close when it is energized according to the pre-set time. Timer instructions: The timer instructions are the output instructions which is used to time the intervals for which the rung conditions are true or false. The timer accuracy will be depended upon the microprocessor which is being used. The timer instruction is composed of two values and they are

▪ Accumulated value – This is a current number of time-based intervals that have been counted from the moment when the timer is energized. ▪ Preset value – This value is set by the programmer, if the preset value is less than or equal to the accumulated value then a status bit is set and this bit is to control an output device. Each timer is composed of two status bit ▪ Timer enable-bit – This bit will be set if the rung condition to the left of the timer instruction is true and when this bit is set then the accumulated value will be incremented on each time base interval till it reaches the preset value. ▪ Done bit – This bit will be set if the preset value and the accumulated value are equal and it will be reset if the rung condition is false.

Comparison Instructions in PLC Programming

Comparison instructions in PLC are used to test pairs of values to condition the logical continuity of a rung. Thus, comparison instructions would seldom, if ever, be the last instruction on a rung. As an example, suppose a LES instruction is presented with two values. If the first value is less than the second, then the comparison instruction is true.

Equal (EQU) Instruction Use the EQU instruction to test whether two values are equal. If source A and source B are equal, the instruction is logically true. If these values are not equal, the instruction is logically false. Source A must be an address. Source B can be either a program constant or an address. Values are stored in two’s complementary form. Not Equal (NEQ) Instruction Use the NEQ instruction to test whether two values are not equal. If source A and source B are not equal, the instruction is logically true. Source A must be an address. Source B can be either a program constant or an address. Values are stored in two’s complementary form. Less Than or Equal (LEQ) Instruction Use the LEQ instruction to test whether one value (source A) is less than or equal to another (source B). If the value at source A is less than or equal to the value at source B, the instruction is logically true. Source A must be an address.

Source B can be either a program constant or an address. Values are stored in two’s complementary form. Greater Than (GRT) Instruction Use the GRT instruction to test whether one value (source A) is greater than another (source B). If the value at source A is greater than the value at source B, the instruction is logically true. Greater Than Or Equal (GEQ) Instruction Use the GEQ instruction to test whether one value (source A) is greater than or equal to another (source B). If the value at source A is greater than or equal to the value at source B, the instruction is logically true. Masked Comparison for Equal (MEQ) Use the MEQ instruction to compare data at a source address with data at a compare address. The Use of this instruction allows portions of the data to be masked by a separate word. Source is the address of the value you want to compare. Mask is the address of the mask through which the instruction moves data.

The mask can be a hexadecimal value. Compare is an integer value or the address of the reference. If the 16 bits of data at the source address are equal to the 16 bits of data at the compare address (less masked bits), the instruction is true. The instruction becomes false as soon as it detects a mismatch.

Limit Test (LIM) Instruction Use the LIM instruction to test for values within or outside a specified range, depending on how you set the limits. The Low Limit, Test, and High Limit values can be word addresses or constants, restricted to the following combinations: • If the Test parameter is a program constant, both the Low Limit and High Limit parameters must be word addresses. • If the Test parameter is a word address, the Low Limit and High Limit parameters can be either a program constant or a word address. Scale Instruction SCALE_X scales the normalized real parameter VALUE where ( 0.0 <= VALUE <= 1.0 ) in the data type and value range specified by the MIN and MAX parameters: OUT = VALUE ( MAX – MIN ) + MIN For SCALE_X, parameters MIN, MAX, and OUT must be the same data type. NORM_X normalizes the parameter VALUE inside the value range specified by the MIN and MAX parameters:

OUT = ( VALUE – MIN ) / ( MAX – MIN ), where ( 0.0 <= OUT <= 1.0 ) Normalize Instruction For NORM_X, parameters MIN, VALUE, and MAX must be the same data type. Note: SCALE_X parameter VALUE should be restricted to ( 0.0 <= VALUE <= 1.0 ) If parameter VALUE is less than 0.0 or greater than 1.0: The linear scaling operation can produce OUT values that are less than the parameter MIN value or above the parameter MAX value for OUT values that fit within the value range of the OUT data type. SCALE_X execution sets ENO = TRUE for these cases. It is possible to generate scaled numbers that are not within the range of the OUT data type. For these cases, the parameter OUT value is set to an intermediate value equal to the least-significant portion of the scaled real number prior to final conversion to the OUT data type. SCALE_X execution sets ENO = FALSE in this case. If parameter VALUE is less than MIN or greater than MAX, the linear scaling operation can produce normalized OUT values that are less than 0.0 or greater than 1.0. NORM_X execution sets ENO = TRUE in this case.

PLC ladder program explanation General NORM_X and SCALE_X instructions are used for scaling the value or we can use this instruction in analog value scaling.

By using NORM_X instruction we can normalize the actual value in leaner scale within the value range. For example, here the input value is 0 to 27648 and this value needs to be normalized in linear scaled value range from 0.0 to 1.0. After this normalization of the value we can use this output as input value of the SCALE_X instruction. This instruction maps the value in required range (here 0 to 100). This instructions generally used in Siemens S7-1200 PLC. Jump and Subroutine: Jump instruction in ladder logic is used to skip some process or rungs according to the requirement. It is paired with Label which is used to limit the skipping the process.

JSR, SBR, and RET instructions are used to direct the controller to execute a separate subroutine file within the ladder program and return to the instruction following the JSR instruction. Allen Bradley PLC Subroutines The SBR instruction must be the first instruction on the first rung in the program file that contains the subroutine. • Use a subroutine to store recurring sections of program logic that must be executed from several points within your application program • A subroutine saves memory because you program it only once. • Update critical I/O within subroutines using immediate input and/or output instructions (IIM, IOM), especially if your application calls for nested or relatively long subroutines

• Otherwise, the controller does not update I/O until it reaches the end of the main program (after executing all subroutines) • Outputs controlled within a subroutine remain in their last state until the subroutine is executed again. When the JSR instruction is executed, the controller jumps to the subroutine instruction (SBR) at the beginning of the target subroutine file and resumes execution at that point. You cannot jump into any part of a subroutine except the first instruction in that file. The target subroutine is identified by the file number that you entered in the JSR instruction. The SBR instruction serves as a label or identifier for a program file as a regular subroutine file. The instruction must be programmed as the first instruction of the first rung of a subroutine. The RET instruction marks the end of subroutine execution or the end of the subroutine file. The rung containing the RET instruction may be conditional if this rung precedes the end of the subroutine. In this way, the controller omits the balance of a subroutine only if its rung condition is true. How to install a PLC and how to do the PLC wiring? A PLC is an industrial computer that is capable to do discrete or sequential logic in a factory environment. The PLC was developed to replace the mechanical relays, timers, and counters. The PLC is considered as the heart of the control system in an automated system. The PLC can monitor the control system state by the input device signal and based on the program logic it would determine the course of action to be carried out through the output device. The PLC can be considered as the combination of the solid-state logic device.

PLC installation: We must take proper care while installing a PLC so that we can reduce the damages to the automated control systems. We must avoid the installation of PLC in certain places in a factory. ▪ It must not be installed in places where it would get direct exposure to the sunlight ▪ The temperature of the location where the PLC is installed must not exceed more than 55 degrees Celsius. ▪ The relative humidity range 10%-90% RH ▪ It must not be installed in places where flammable or poisonous gases are present ▪ It should not be installed in places where there is a lot of vibrations ▪ It shouldn’t be installed in places where oil or chemical dust is present ▪ We must allow enough space for air circulation ▪ The power lines and high voltage equipment can cause electrical noise in a PLC ▪ We must not install the PLC in a panel that has high voltage equipment ▪ There should be at least 200 mm distance between the PLC and the nearby power lines ▪ The PLC must be installed in a way that it can be accessed for operation and maintenance ▪ It must not be installed near a high voltage equipment

Installing the CPU unit and I/O unit The small PLC must be installed in a way that it should have adequate cooling; the small PLC must not be installed in the incorrect position. It can be installed on a horizontal surface. The I/O units can be installed in a way that inserting the proper modules in their correct locations. We must connect the I/O units as shown in the wiring diagram; most of the switches are attached to the panel, sensors, and solenoid which is located at the machine which is to be controlled. Special I/O connections We need to give special care while connecting certain field devices, this type of connection is leaky inputs and inductive loads. Certain field devices would have leakage current even they are not working and this leaky input can trigger an input circuit and thus mis-operation. So this can be prevented by using a bleeding resistor, place this resistor across the input. This resistor would provide resistance to the circuit and because of this, there will be a voltage drop between the leaky field device and the input circuit. The inductive loads can interrupt the current and this would create voltage spikes and to avoid this we can use a snubber circuit. Installing the PLC in a panel cabinet

▪ While installing sufficient air circulation is required ▪ Cooling fan ▪ The device which generates heat must be located under the PLC ▪ There shouldn’t be any high voltage equipment

What are the factors that must be considered while wiring a PLC? ▪ We must use short cables as possible ▪ We must use a single line between the equipment and do not connect the cable to make it long ▪ We shouldn’t make sharp curves in the cable ▪ We need to keep the area of the system and the control wiring away from the high voltage wiring ▪ We need to separate the input wiring, output wiring, and other wiring types ▪ The AC and DC wiring must be separate ▪ All the components must be grounded ▪ We must make sure that the wire that is used is of the correct gauge and it must be able to handle the maximum possible current ▪ We can label the field wire and termination point using a reliable labeling method ▪ The wire bundling techniques can be used to simplify the connections, the bundles which carry the same type of signals must be kept in separate ducts so that we can avoid interference. ▪ In case if we need to place the I/O wiring and the power cables in the same duct, then they should be shielded from each other by using metal plates.

Based on the provided content, the IEC-61131-3 Standard recognizes five PLC programming languages:

  1. Ladder Diagram (LD)
  2. Sequential Function Charts (SFC)
  3. Function Block Diagram (FBD)
  4. Structured Text (ST)
  5. Instruction List (IL)

These programming languages cater to diverse needs and offer varying of complexity and flexibility. Here's a brief description of each:

  1. Ladder Diagram (LD):

    • Mimics relay logic and is designed to be simple and intuitive for engineers familiar with electrical control systems.
    • Uses normally open (NO) or normally closed (NC) contacts for inputs and activates specific outputs (coils) based on applied logic.
  2. Sequential Function Charts (SFC):

    • Based on GRAFCET and used for programming processes that can be broken down into several steps.
    • Comprises steps with defined actions, transitions with defined logic conditions, and links between steps and transitions.
  3. Function Block Diagram (FBD):

    • A graphical programming language where each function, even elementary ones, is represented by a block with inputs and outputs. The logic is performed by connection lines between blocks.
  4. Structured Text (ST):

    • A high-level language representing a combination of Basic, Pascal, and C programming languages.
    • Enables complex algorithm implementation and mathematical functions using statements such as for, while, if, and case.
  5. Instruction List (IL):

    • Resembles assembly language and consists of a series of instructions similar to an assembly program.
    • Offers common operations like addition, division, multiplication, and subtraction, along with operations for jumping to labels and calling functions.

Each of these languages has distinct advantages and is chosen based on project requirements and engineer expertise.

In addition, it's important to consider proper installation and wiring of the PLC. Factors such as environmental conditions, equipment handling, I/O connections, and wiring must be carefully considered to ensure optimal performance and safety.

If you need more details on any specific aspect of PLC programming or installation, feel free to ask!

Describe differnt timer instruction and explain them: Introduction to Programming Languages: The IEC (International Electro technical Commission) officially recognizes five PLC programming languages in the IEC-61131-3 Standard. They are Ladder Diagram (LD), Function Block (FBD), Structured Text (ST), Instruction List (IL), and Sequential Function Chart (SFC). The 5 most popular types of PLC Programming Languages are:

  1. Ladder Diagram (LD)
  2. Sequential Function Charts (SFC)
  3. Function Block Diagram (FBD)
  4. Structured Text (ST)
  5. Instruction List (IL) Ladder Logic: Ladder Logic is the most common language used in PLC programming. It was developed to mimic relay logic, that is why the syntax is very simple.

The inputs are applied as normally open or normally closed contacts. Depending on the logic performed on the inputs, specific outputs (also named coils) are activated. There is also a possibility to read the positive or negative edge of a digital signal. Besides contacts and coils there are also some blocks that have functions for working with different types of data. This language is called Ladder Logic, because the programs represent a ladder which has two vertical rails and a series of horizontal rugs in between. Structured Text Structured Text is a high level language, which represents a combination of three programming languages: Basic, Pascal and C. This language gives the possibility to operate with inputs and outputs, using different statements such as for, while, if and case.

It is easy to implement complex algorithms and work with mathematical functions. The disadvantage is that this language is more difficult to debug, in comparison with a graphical language. Instruction List Instruction List is a low level language that resembles the assembly language. A program consists of a series of instructions, listed as in an assembly program. There are some common operations, such as addition, division, multiplication and subtraction. There are also operations that make it possible to jump to some label, as well as to call a function.

Instruction List makes the program compact and offers a big processing speed. The downsides of this language are the structure and the syntax. It is difficult to debug a big list of instructions.

Function Block Diagram The FBD is a graphical programming language. Each function, even an elementary one, is described by a block with inputs and outputs. The logic is performed by different connection lines between inputs and outputs of the blocks.

Sequential Function Chart Sequential Function Chart is a graphical programming language that is defined as Preparation of function charts for control systems. It is based on GRAFCET. This language is used when programming a process that can be split into several steps. There are 3 main components of an SFC: ▪ Steps with defined actions; ▪ Transitions with defined logic conditions; ▪ Links between steps and transitions. The actions and the conditions can be described in any PLC programming language. The SFC is basically a chart that represents an overview of the project, aimed to ease the analysis of the process.

Each of the PLC programming languages aforementioned has their advantages and disadvantages. The question of which one to use depends on the project requirements and engineer’s expertise.

Ladder Relay Instruction:

NO-NC & coil based instructions: In every control circuits and automation systems, logic is developed based on the open or closed state of switches, sensors or relays. Hence it is mandatory to know the concept behind NO/NC. Normally open(NO) and Normally closed (NC) are terms used to define the states of switches, sensors or relay contacts under when its coil is not excited. It is the fundamental of process automation. A NO contact or a normally open contact is the one that remains open until a certain condition is satisfied. For example, let us consider a limit switch. A limit switch consists of at least one NO contact in it. The NO contact in the limit switch remains open until its actuator is pressed. When the actuator is pressed the contact closes and starts conducting. In the case of proximity switches, NO contacts remain open until it senses some object similarly in the case of pressure switches, the contact remains open until the preset pressure level is reached.

The above image shows the states of the NO contact of a push-button during the normal condition and when pressed. PLC Timer & Counters: A PLC is a specialized computer that is used to control and operation of manufacturing process or machinery. It is not possible to control complex systems by using certain logic and it is because we can’t use sensors to check all the conditions. So during these conditions, we use events to determine the condition of the system. Mostly a PLC would use certain events such as PLC scanning which indicates that the PLC has just been turned on. The timer is used to indicate that the input is turned ON/OFF or to create a delay. Counters are used to count the set of events that have occurred and the latch or unlatch is used to lock something ON or to turn it off. The timers and counters are used in a PLC for its continuous operation so they are inevitable in a PLC. The timer would time up to the value set by the user and the counter will count up to the value set by the user. The timer and counter both are of 16 bits, the timers and counters are the fundamental PLC instructions and it is common to all PLCs. Both the timer and counter would function as output instructions in a PLC program.

The PLC timer consists of an internal clock, a count value register, and an accumulator, and the timer is mostly used for the timing process. Many of the control tasks would need the programming of time. The timer instructions are used in PLC to create the program time delays. The number of timers that we can use in our program is depended on the amount of memory in the CPU. The timers are used in PLC to delay actions; the timer would keep an output for a specified time after an input turns off. The timer would also keep an output off for a specified time before it turns ON. The major function of a timer is to keep an output ON for a specified length of time. A timer has certain parts such as time base, accumulated value, timer address, and preset value. There are bits that are related to the current state of the timer and it is called the status bits. The timing functions are inevitable in PLC applications the cycle time is really critical in many processes. The timers in PLC are considered as a software module and it would generate digital timing. There is memory space in the PLC to store the delay time. Need for timer in a PLC: In many of the PLC control tasks, there is a need to control the time an example of this will be using a PLC to control a motor. The motor would require to be controlled to operate for a certain interval, and that’s why PLCs have timers and the timers are built-in devices in a PLC. By using the internal CPU clock the timer would count the time. Different PLC timers are programmed in different ways, so we can consider a timer to act as a relay with coils, which would open or close when it is energized according to the pre-set time. Timer instructions: The timer instructions are the output instructions which is used to time the intervals for which the rung conditions are true or false. The timer accuracy will be depended upon the microprocessor which is being used. The timer instruction is composed of two values and they are

▪ Accumulated value – This is a current number of time-based intervals that have been counted from the moment when the timer is energized. ▪ Preset value – This value is set by the programmer, if the preset value is less than or equal to the accumulated value then a status bit is set and this bit is to control an output device. Each timer is composed of two status bit ▪ Timer enable-bit – This bit will be set if the rung condition to the left of the timer instruction is true and when this bit is set then the accumulated value will be incremented on each time base interval till it reaches the preset value. ▪ Done bit – This bit will be set if the preset value and the accumulated value are equal and it will be reset if the rung condition is false.

Comparison Instructions in PLC Programming

Comparison instructions in PLC are used to test pairs of values to condition the logical continuity of a rung. Thus, comparison instructions would seldom, if ever, be the last instruction on a rung. As an example, suppose a LES instruction is presented with two values. If the first value is less than the second, then the comparison instruction is true.

Equal (EQU) Instruction Use the EQU instruction to test whether two values are equal. If source A and source B are equal, the instruction is logically true. If these values are not equal, the instruction is logically false. Source A must be an address. Source B can be either a program constant or an address. Values are stored in two’s complementary form. Not Equal (NEQ) Instruction Use the NEQ instruction to test whether two values are not equal. If source A and source B are not equal, the instruction is logically true. Source A must be an address. Source B can be either a program constant or an address. Values are stored in two’s complementary form. Less Than or Equal (LEQ) Instruction Use the LEQ instruction to test whether one value (source A) is less than or equal to another (source B). If the value at source A is less than or equal to the value at source B, the instruction is logically true. Source A must be an address.

Source B can be either a program constant or an address. Values are stored in two’s complementary form. Greater Than (GRT) Instruction Use the GRT instruction to test whether one value (source A) is greater than another (source B). If the value at source A is greater than the value at source B, the instruction is logically true. Greater Than Or Equal (GEQ) Instruction Use the GEQ instruction to test whether one value (source A) is greater than or equal to another (source B). If the value at source A is greater than or equal to the value at source B, the instruction is logically true. Masked Comparison for Equal (MEQ) Use the MEQ instruction to compare data at a source address with data at a compare address. The Use of this instruction allows portions of the data to be masked by a separate word. Source is the address of the value you want to compare. Mask is the address of the mask through which the instruction moves data.

The mask can be a hexadecimal value. Compare is an integer value or the address of the reference. If the 16 bits of data at the source address are equal to the 16 bits of data at the compare address (less masked bits), the instruction is true. The instruction becomes false as soon as it detects a mismatch.

Limit Test (LIM) Instruction Use the LIM instruction to test for values within or outside a specified range, depending on how you set the limits. The Low Limit, Test, and High Limit values can be word addresses or constants, restricted to the following combinations: • If the Test parameter is a program constant, both the Low Limit and High Limit parameters must be word addresses. • If the Test parameter is a word address, the Low Limit and High Limit parameters can be either a program constant or a word address. Scale Instruction SCALE_X scales the normalized real parameter VALUE where ( 0.0 <= VALUE <= 1.0 ) in the data type and value range specified by the MIN and MAX parameters: OUT = VALUE ( MAX – MIN ) + MIN For SCALE_X, parameters MIN, MAX, and OUT must be the same data type. NORM_X normalizes the parameter VALUE inside the value range specified by the MIN and MAX parameters:

OUT = ( VALUE – MIN ) / ( MAX – MIN ), where ( 0.0 <= OUT <= 1.0 ) Normalize Instruction For NORM_X, parameters MIN, VALUE, and MAX must be the same data type. Note: SCALE_X parameter VALUE should be restricted to ( 0.0 <= VALUE <= 1.0 ) If parameter VALUE is less than 0.0 or greater than 1.0: The linear scaling operation can produce OUT values that are less than the parameter MIN value or above the parameter MAX value for OUT values that fit within the value range of the OUT data type. SCALE_X execution sets ENO = TRUE for these cases. It is possible to generate scaled numbers that are not within the range of the OUT data type. For these cases, the parameter OUT value is set to an intermediate value equal to the least-significant portion of the scaled real number prior to final conversion to the OUT data type. SCALE_X execution sets ENO = FALSE in this case. If parameter VALUE is less than MIN or greater than MAX, the linear scaling operation can produce normalized OUT values that are less than 0.0 or greater than 1.0. NORM_X execution sets ENO = TRUE in this case.

PLC ladder program explanation General NORM_X and SCALE_X instructions are used for scaling the value or we can use this instruction in analog value scaling.

By using NORM_X instruction we can normalize the actual value in leaner scale within the value range. For example, here the input value is 0 to 27648 and this value needs to be normalized in linear scaled value range from 0.0 to 1.0. After this normalization of the value we can use this output as input value of the SCALE_X instruction. This instruction maps the value in required range (here 0 to 100). This instructions generally used in Siemens S7-1200 PLC. Jump and Subroutine: Jump instruction in ladder logic is used to skip some process or rungs according to the requirement. It is paired with Label which is used to limit the skipping the process.

JSR, SBR, and RET instructions are used to direct the controller to execute a separate subroutine file within the ladder program and return to the instruction following the JSR instruction. Allen Bradley PLC Subroutines The SBR instruction must be the first instruction on the first rung in the program file that contains the subroutine. • Use a subroutine to store recurring sections of program logic that must be executed from several points within your application program • A subroutine saves memory because you program it only once. • Update critical I/O within subroutines using immediate input and/or output instructions (IIM, IOM), especially if your application calls for nested or relatively long subroutines

• Otherwise, the controller does not update I/O until it reaches the end of the main program (after executing all subroutines) • Outputs controlled within a subroutine remain in their last state until the subroutine is executed again. When the JSR instruction is executed, the controller jumps to the subroutine instruction (SBR) at the beginning of the target subroutine file and resumes execution at that point. You cannot jump into any part of a subroutine except the first instruction in that file. The target subroutine is identified by the file number that you entered in the JSR instruction. The SBR instruction serves as a label or identifier for a program file as a regular subroutine file. The instruction must be programmed as the first instruction of the first rung of a subroutine. The RET instruction marks the end of subroutine execution or the end of the subroutine file. The rung containing the RET instruction may be conditional if this rung precedes the end of the subroutine. In this way, the controller omits the balance of a subroutine only if its rung condition is true. How to install a PLC and how to do the PLC wiring? A PLC is an industrial computer that is capable to do discrete or sequential logic in a factory environment. The PLC was developed to replace the mechanical relays, timers, and counters. The PLC is considered as the heart of the control system in an automated system. The PLC can monitor the control system state by the input device signal and based on the program logic it would determine the course of action to be carried out through the output device. The PLC can be considered as the combination of the solid-state logic device.

PLC installation: We must take proper care while installing a PLC so that we can reduce the damages to the automated control systems. We must avoid the installation of PLC in certain places in a factory. ▪ It must not be installed in places where it would get direct exposure to the sunlight ▪ The temperature of the location where the PLC is installed must not exceed more than 55 degrees Celsius. ▪ The relative humidity range 10%-90% RH ▪ It must not be installed in places where flammable or poisonous gases are present ▪ It should not be installed in places where there is a lot of vibrations ▪ It shouldn’t be installed in places where oil or chemical dust is present ▪ We must allow enough space for air circulation ▪ The power lines and high voltage equipment can cause electrical noise in a PLC ▪ We must not install the PLC in a panel that has high voltage equipment ▪ There should be at least 200 mm distance between the PLC and the nearby power lines ▪ The PLC must be installed in a way that it can be accessed for operation and maintenance ▪ It must not be installed near a high voltage equipment

Installing the CPU unit and I/O unit The small PLC must be installed in a way that it should have adequate cooling; the small PLC must not be installed in the incorrect position. It can be installed on a horizontal surface. The I/O units can be installed in a way that inserting the proper modules in their correct locations. We must connect the I/O units as shown in the wiring diagram; most of the switches are attached to the panel, sensors, and solenoid which is located at the machine which is to be controlled. Special I/O connections We need to give special care while connecting certain field devices, this type of connection is leaky inputs and inductive loads. Certain field devices would have leakage current even they are not working and this leaky input can trigger an input circuit and thus mis-operation. So this can be prevented by using a bleeding resistor, place this resistor across the input. This resistor would provide resistance to the circuit and because of this, there will be a voltage drop between the leaky field device and the input circuit. The inductive loads can interrupt the current and this would create voltage spikes and to avoid this we can use a snubber circuit. Installing the PLC in a panel cabinet

▪ While installing sufficient air circulation is required ▪ Cooling fan ▪ The device which generates heat must be located under the PLC ▪ There shouldn’t be any high voltage equipment

What are the factors that must be considered while wiring a PLC? ▪ We must use short cables as possible ▪ We must use a single line between the equipment and do not connect the cable to make it long ▪ We shouldn’t make sharp curves in the cable ▪ We need to keep the area of the system and the control wiring away from the high voltage wiring ▪ We need to separate the input wiring, output wiring, and other wiring types ▪ The AC and DC wiring must be separate ▪ All the components must be grounded ▪ We must make sure that the wire that is used is of the correct gauge and it must be able to handle the maximum possible current ▪ We can label the field wire and termination point using a reliable labeling method ▪ The wire bundling techniques can be used to simplify the connections, the bundles which carry the same type of signals must be kept in separate ducts so that we can avoid interference. ▪ In case if we need to place the I/O wiring and the power cables in the same duct, then they should be shielded from each other by using metal plates.

The PLC timer instructions offer essential functionality for creating time delays and controlling the duration of specific operations within a PLC program. Here are the details of different timer and their operation within PLC programming:

Timer Structure:

  • The timer instruction is composed of two primary values: Accumulated Value and Preset Value.
  • Accumulated Value: This represents the current number of time-based intervals counted from the moment the timer is energized. Preset Value: Set by the programmer. When the preset value is reached or exceeded by the accumulated value, a status bit is set to control an output device.

Timer Enable-Bit:

  • This bit is set when the rung condition to the left of the timer instruction is true. When this bit is set, the accumulated value will be incremented on each time base interval until it reaches the preset value.

Done Bit:

  • This bit is set if the preset value and the accumulated value are equal and it will be reset if the rung condition is false.

Timer Accuracy:

  • The accuracy of the timer is dependent on the microprocessor being used.

Factors to Consider:

  • The number of timers in a program is dependent on the amount of memory in the CPU.
  • Timing functions are critical and inevitable in PLC applications, as cycle time is crucial in many processes.

Need for Timer in PLC:

  • Timers are necessary when controlling the time duration of various processes within the control system such as motors, operations, etc.

Types of Timer Instructions:

  • On-Delay Timer: Delays the turning on of an associated output.
  • Off-Delay Timer: Delays the turning off of an associated output.
  • Retentive Timer: Remembers and maintains current timing information during power cycling.
  • Pulse Timer: Generates a pulse of a fixed length when an input condition is satisfied.
  • Time-On Timer: Provides output timing control when the input is on.
  • Time-Off Timer: Provides output timing control when the input is off.

These instructions are pivotal in implementing delays and efficiently managing sequential operations in PLC programming.

If you have any more questions or need further clarification on any PLC topics, feel free to ask!

List five factors affecting the memory six=ze needed for particular plc installation. DIscuss the structure of allen bardley memory? based on this content : What is PLC? A PROGRAMMABLE LOGIC CONTROLLER (PLC) is an industrial computer control system that continuously monitors the state of input devices and makes decisions based upon a custom program to control the state of output devices

Figure: Block Diagram of PLC

History Industrial automation began long before PLCs. In the early to mid 1900s, automation was usually done using complicated electromechanical relay circuits. However, the amount of relays, wires and space needed to create even simple automation was problematic. COURSE CODE/SUBJECT PLC&SCADA COURSE INSTRUCTOR: DR.V.D.BONDRE DEPARTMENT: ELECTRONICS & TELECOMMUNICATION SESSION: 2021-22 SEMESTER: 7

TH SEMESTER

Thousands of relays could be necessary to automate a simple factory process! And if something in the logical circuit needed to be changed? In 1968 the first programmable logic controller came along to replace complicated relay circuitry in industrial plants. The PLC was designed to be easily programmable by plant engineers and technicians that were already familiar with relay logic and control schematics. Since the beginning PLCs have been programmable using ladder logic which was designed to mimic control circuit schematics. The ladder diagrams look like control circuits where power is flowing from left to right through closed contacts to energize a relay coil. PLC Flowchart Let’s use a familiar example to illustrate how PLCs work. Your dishwasher. Many dishwashers have microprocessors that function similarly to PLCs. The dishwasher has inputs, outputs and, of course, a CPU. Some of the inputs into the dishwasher controller would be the buttons on the front, the water sensors and the door switch. Some of the dishwasher outputs would be the water valves, the heat elements and the pumps. Now let’s think about how the dishwasher uses those different components. NOTE: Remember, the CPU is the processor in the dishwasher that is programmed to make all the decisions we will see below. This is just like a PLC processor (CPU) which makes logical decisions based on input status.

  1. User pushes the cycle mode button (input detected)

  2. User pushes the start button (input detected)

  3. CPU verifies that the door is closed (input detected)

  4. Fill valve opens and the dishwasher begins filling with water (output activated)

  5. CPU waits until proper water level is reached (input detected)

  6. Fill valve closes, and water flow stops (output activated/de-activated)

  7. Heating element is turned on (output activated)

  8. CPU waits until proper water temperature is reached (input detected)

  9. Soap dispenser opens (output activated)

  10. Water pump turns on to force water through sprayers (output activated)

  11. CPU begins timing depending on cycle type (logic timer activated)

  12. Water pump turns off (output deactivated)

  13. Heating element is turned off (output deactivated)

  14. Drain valve opens and the dishwasher begins draining the dirty water (output activated)

  15. CPU waits until it detects the water level to be low enough (input activated/de- activated)

  16. Drain valve closes (output activated/deactivated)

  17. Fill valve opens again to rinse dishes (output activated)

  18. Water pump turns on to force water through sprayers (output activated)

  19. CPU begins timing (logic timer activated)

  20. Water pump turns off (output deactivated)

  21. Drain valve opens and the dishwasher begins draining rinse water (output activated)

  22. CPU waits until it detects the water level to be low enough (input activated/de- activated)

  23. Drain valve closes (output activated/deactivated)

  24. Heating element turns on to heat the air inside the dishwasher and dry the dishes (output activated)

  25. CPU waits until proper interior temperature is reached (input activated)

  26. CPU begins timing (logic timer activated)

  27. Heating element is turned off (output activated/deactivated) Inputs and outputs are often abbreviated with the term “I/O”. In the the dishwasher example above, we treated every input and output as a discrete or digital signal. Discrete signals are signals that can only be on or off. These are the simplest and most common type of I/O. In our example we did not use any analog I/O. Although, there may be some use of analog I/O within a dishwasher control system, I wanted to keep this example simple. With analog signals, instead of only on/off or open/closed possibilities, you may have 0 – 100%, 4 – 20mA, 0 – 100 degrees Celsius, or whatever it is you measuring as an input or driving as an output. We will cover this in more detail in part 3 of this series. PLC Or PAC?

You may have heard of the Programmable Automation Controller (PAC). The term was first coined by the market research firm ARC in 2001 to differentiate the original PLCs from the newer, more powerful, more flexible controllers that were entering the market. There is disagreement about the definition differences between PAC and PLC, and often the terms are used interchangeably in the industry. I often use the terms interchangeably myself. This article, here, from Control Engineering may help you understand the differences between PLCs and PACs. In my opinion PACs are always the better choice unless the system is very simple and minimizing cost of the project is vital. The modern user interface, extra power and memory of most PACs make them easily superior to most PLCs.

Working Principle: PLC is a microprocessor based solid state device. PLC works on the principle of Logic Gates. The input device may be pushbutton or limit s/w, relay contacts or timers etc. which send signal to the control elements and the o/p device may be motors, solenoid, relay coil, etc. Inputs is given in the input image memory, CPU process it according to logic written in the memory and update the o/p in o/p image memory. PLCs control the

components in the DCS and SCADA systems but they are primary components in smaller control configurations.

The new control system developed with following:

  1. Simple Programming
  2. Program change (editing) without system intervention (no internal rewiring) in software. SCADA Training Supervisory Control And Data Acquisition refers to a centralized system and this system is composed of various subsystems like Remote Telemetry Units, Human Machine Interface, Programmable Logic Controller or PLC and Communications. Applications and Advantages of PLC (Programmable Logic Controllers): Advantages of PLC over Relays: PLC increases the reliability, flexibility, and accuracy of the automation system. PLC (especially Compact PLC) has a lower cost associated with it as compared to the other automation technology.1 • Very fast. • Easy to change logic i.e. flexibility. • Reliable due to absence of moving parts. • Low power consumption. • Easy maintenance due to modular assembly. • Facilities in fault finding and diagnostic. • Capable of handling of very complicated logic operations

PLC Programming Languages:

  1. LADDER
  2. FBD
  3. STL
  4. LADDER: It is a language which represents the graphical view of electrical circuit. It is the combination of more than one ‘RUNGS’. RUNGS: When a coil is connected with series or parallel combination of digital inputs (NO/NC Contacts) elements is known as one ‘RUNG’. Combination of rungs known as Ladder diagram. Ladder Programming: Ladder logic (also known as ladder diagram or LD) is a programming language used to program a PLC (Programmable Logic Controller). It is a graphical PLC programming language which expresses logic operations with symbolic notation. ➢ The great thing about ladder logic is that it’s much more visual than most programming languages, so people often find it a lot easier to learn. ➢ They represent conditional, input and output expressions as symbols. So writing a PLC program using ladder diagrams is similar to drawing a relay control circuit.

PLC SCAN (Processor Scan): Every PLC has a scan time and a scan cycle. This is how the PLC and the software inside the PLC works. The scan cycle is the cycle in which the PLC gathers the inputs, runs your PLC program, and then updates the outputs. This will take some amount of time often measured in milliseconds (ms).

➢ The scan time can take as long as 80 ms. If the scan time is longer than about 50 ms (for a machine control project) then the user should be looking for a more powerful processor or ways to make the code more efficient. ➢ When designing a PLC controlled system, one aspect that should not be overlooked is how the PLC scan will affect your operation. The PLC scan consists of a sequence of operations the CPU will follow repeatedly.

➢ PLC Test is designed to measure knowledge and skills in repair and maintenance of Programmable Logic Controllers.

Programming Devices: A programming device is a tool that is used to enter programs or instructions into the memory of the PLC's processor. The program is entered using a programming language called relay ladder logic.

The 5 most popular types of PLC Programming Languages are: • Ladder Diagram (LD) • Sequential Function Charts (SFC) • Function Block Diagram (FBD) • Structured Text (ST) • Instruction List (IL)

The two most common types of PLC programming devices are:

  1. Hand-held programming devices and
  2. PC’s

Memory Types: The common types of memory used in PLCs are Read Only Memory (ROM) and Random Access Memory (RAM). A ROM location can be read, but not written. ROM is used to store programs and data that should not be altered. For example, the PLC's operating programs are stored in ROM.

Figure. Structure of Memory (Siemens)

Input/output Addressing: I/O Addresses - Programmable Logic controllers. The PLC has to be able to identify each particular input and output. It does this by allocating addresses to each input and output. With a small PLC this is likely to be just a number, prefixed by a letter to indicate whether it is an input or an output. An “address” is essentially a means of referencing a location in memory. Addresses allow for physical I/O as well as the data or status of instructions/elements to be accessed by the controller. These values are stored in the Data Files portion of the PLCs memory.

Elements are addressed by number following the colon after the file designator, and individual bits within each element addressed by a number following a slash mark. For example, the first bit (bit 0) of the second element in file 3 (Binary) would be addressed as B3:2/0. Table: PLC Memory Mapping and I/O addressing

Significance: It allows a PLC programmer to set up a routine which contains all the inputs & outputs for a given system. This translates to the easier commission of the system, faster troubleshooting & easier fixes if the problem is determined to be one of the points of IO.

Introduction to Discrete I/O Systems: The discrete input/output (I/O) system provides the physical connection between the CPU and field devices. ► Digital signals are non-continuous signals that have only two states—ON and OFF. ►Through various interface circuits and field devices (limit switches, transducers, etc.), the controller senses and measures physical quantities (e.g., proximity, position, motion, level, temperature, pressure, current, and voltage) associated with a machine or process. ►Based on the status of the devices sensed or the process values measured the CPU issues commands that control the output field devices. I/O Rack Enclosures and Table Mapping: An I/O module is a plug-in–type assembly containing circuitry that communicates between a PLC and field devices. ► All I/O modules must be placed or inserted into a rack enclosure, usually referred to as a rack, within the PLC. ►The rack holds and organizes the programmable controller’s I/O modules, with a module’s rack location defining the I/O address of its connected device. Table Mapping: PLC manufacturers set specifications for placing I/O modules in rack enclosures.  For example, some modules accommodate 2 to 16 field connections, while other modules require the user to follow certain I/O addressing regulations. ►Several factors determine the address location of each module.  The type of module, input or output, determines the first address location from left to right (0 for outputs, 1 for inputs).  The rack number and slot location of the module determine the next two address numbers.  The terminal connected to the I/O module (0 through 7) represents the last address digit.

Fig: Example of I/O Rack & Table mapping

I/O Racks and Mapping: The capacity of a single subsystem (rack) is normally 32, 64, 128, or 256 I/O points.

►A large system with a maximum capacity of 1024 I/O points may have subsystem sizes of either 64 or 128 points—eight racks with 128 I/O, sixteen racks with 64 I/O, or some combination of both sizes equal to 1024 I/O. PLC Instructions for Discrete Inputs: ► A simplified 8-bit image table is shown  LS1 is known as input 014, which stands for rack 0, slot 1, connection 4. ► When an input signal is energized (ON), the input interface senses the field device’s supplied voltage and converts it to a logic level signal (either 1 or 0), which indicates the status of that device.

PLC Instructions for Discrete Inputs: The most common class of input interfaces is digital (or discrete). ► Digital input interfaces have only two states  ON/OFF  OPEN/CLOSED  TRUE/FALSE ► Those states signify either 1 or 0.

PLC Instructions for Discrete Outputs:

UNIT-II

Introduction to Programming Languages: The IEC (International Electro technical Commission) officially recognizes five PLC programming languages in the IEC-61131-3 Standard. They are Ladder Diagram (LD), Function Block (FBD), Structured Text (ST), Instruction List (IL), and Sequential Function Chart (SFC). The 5 most popular types of PLC Programming Languages are:

  1. Ladder Diagram (LD)
  2. Sequential Function Charts (SFC)
  3. Function Block Diagram (FBD)
  4. Structured Text (ST)
  5. Instruction List (IL) Ladder Logic: Ladder Logic is the most common language used in PLC programming. It was developed to mimic relay logic, that is why the syntax is very simple.

The inputs are applied as normally open or normally closed contacts. Depending on the logic performed on the inputs, specific outputs (also named coils) are activated. There is also a possibility to read the positive or negative edge of a digital signal. Besides contacts and coils there are also some blocks that have functions for working with different types of data. This language is called Ladder Logic, because the programs represent a ladder which has two vertical rails and a series of horizontal rugs in between. Structured Text Structured Text is a high level language, which represents a combination of three programming languages: Basic, Pascal and C. This language gives the possibility to operate with inputs and outputs, using different statements such as for, while, if and case.

It is easy to implement complex algorithms and work with mathematical functions. The disadvantage is that this language is more difficult to debug, in comparison with a graphical language. Instruction List Instruction List is a low level language that resembles the assembly language. A program consists of a series of instructions, listed as in an assembly program. There are some common operations, such as addition, division, multiplication and subtraction. There are also operations that make it possible to jump to some label, as well as to call a function.

Instruction List makes the program compact and offers a big processing speed. The downsides of this language are the structure and the syntax. It is difficult to debug a big list of instructions.

Function Block Diagram The FBD is a graphical programming language. Each function, even an elementary one, is described by a block with inputs and outputs. The logic is performed by different connection lines between inputs and outputs of the blocks.

Sequential Function Chart Sequential Function Chart is a graphical programming language that is defined as Preparation of function charts for control systems. It is based on GRAFCET. This language is used when programming a process that can be split into several steps. There are 3 main components of an SFC: ▪ Steps with defined actions; ▪ Transitions with defined logic conditions; ▪ Links between steps and transitions. The actions and the conditions can be described in any PLC programming language. The SFC is basically a chart that represents an overview of the project, aimed to ease the analysis of the process.

Each of the PLC programming languages aforementioned has their advantages and disadvantages. The question of which one to use depends on the project requirements and engineer’s expertise.

Ladder Relay Instruction:

NO-NC & coil based instructions: In every control circuits and automation systems, logic is developed based on the open or closed state of switches, sensors or relays. Hence it is mandatory to know the concept behind NO/NC. Normally open(NO) and Normally closed (NC) are terms used to define the states of switches, sensors or relay contacts under when its coil is not excited. It is the fundamental of process automation. A NO contact or a normally open contact is the one that remains open until a certain condition is satisfied. For example, let us consider a limit switch. A limit switch consists of at least one NO contact in it. The NO contact in the limit switch remains open until its actuator is pressed. When the actuator is pressed the contact closes and starts conducting. In the case of proximity switches, NO contacts remain open until it senses some object similarly in the case of pressure switches, the contact remains open until the preset pressure level is reached.

The above image shows the states of the NO contact of a push-button during the normal condition and when pressed. PLC Timer & Counters: A PLC is a specialized computer that is used to control and operation of manufacturing process or machinery. It is not possible to control complex systems by using certain logic and it is because we can’t use sensors to check all the conditions. So during these conditions, we use events to determine the condition of the system. Mostly a PLC would use certain events such as PLC scanning which indicates that the PLC has just been turned on. The timer is used to indicate that the input is turned ON/OFF or to create a delay. Counters are used to count the set of events that have occurred and the latch or unlatch is used to lock something ON or to turn it off. The timers and counters are used in a PLC for its continuous operation so they are inevitable in a PLC. The timer would time up to the value set by the user and the counter will count up to the value set by the user. The timer and counter both are of 16 bits, the timers and counters are the fundamental PLC instructions and it is common to all PLCs. Both the timer and counter would function as output instructions in a PLC program.

Factors Affecting Memory Size for a PLC Installation:

  1. Program Complexity:

    • The complexity and size of the programmed logic directly impact the required memory size.
  2. Number of Inputs and Outputs:

    • The quantity of inputs and outputs being managed by the PLC significantly influences the memory size needed.
  3. Data Handling:

    • The magnitude of data being processed within the program, such as arrays or large data structures, can impact memory requirements.
  4. Communication Protocols:

    • The variety and number of communication protocols used for integrating with external devices influence the memory size needed.
  5. Program Features:

    • The utilization of advanced features, such as complex mathematical algorithms, advanced data handling, or extensive function libraries, can increase the memory requirements of a PLC program.

Structure of Allen Bradley Memory:

Allen-Bradley PLCs typically include the following types of memory crucial for program execution and data storage:

  1. Non-Volatile Memory:

    • Non-volatile memory is used to store the PLC's operating system and user-developed programs. It retains data even when the PLC is powered off.
  2. Volatile Memory (RAM):

    • Volatile memory, often referred to as RAM, is utilized for temporary data storage and program execution during operation. Its contents are lost when power is turned off.
  3. Data Files:

    • Data files within the memory allocate storage for internal data, tags, user-defined variables, and I/O values.

Allen Bradley PLCs employ a modular memory structure with distinct memory modules serving different functions. Certain memory modules may be dedicated to program storage, data handling, system configuration, or operation-specific functions. This modular approach allows for scalability and adaptability based on the specific application's memory requirements.

The memory structure and organization within Allen Bradley PLCs are pivotal to providing efficient program execution, effective data storage, and seamless integration with external devices.

If you have further questions or need additional information, feel free to ask!