Like computers, PLCs also have program control instructions, such as RESET, JUMP, JUMP to subroutine, as well as immediate input and output functions, etc.
1. Master Control Reset (MCR) Instruction
The MCR (Master Control Reset) instruction is always used in pairs, and is written as the "limit" of a group of instructions that can be executed (see Figure 11.61: Application of MCR Instructions). Some output instructions, commonly called override instructions, imply scanning the control ladder if certain input conditions exist. The use of these instructions will increase the flexibility and efficiency of the program and reduce the scan time by skipping a number of instructions whose processing is not needed. In the relay diagram, this instruction is called the master control relay, in the PLC it is called the master control reset.
Figure 11.64: Application of MCR Instructions
MCR hardware is used to disconnect all or some of the relays in a ladder diagram by connecting the MCR with the relay input logic.
2. Jump (JMP) and Label (LBL) Instructions
Jump (JMP) and label (LBL) instructions are used together. If JMP is executed, then the program in the range will jump to the range with the LBL instruction and continue executing the next sequence of instructions. One application of JMP and LBL instructions can be seen in Figure 12-62). There are products that use skip and go to for jump instructions.
Figure 11.65: Application of JMP Instruction with One LBL
3. Jump to Subroutine (JSR) Instruction
The jump to sub-routine (JSR), subroutine (SBR), and return (RET) instructions are used together in a program. The working principle of these instructions can be seen in Figure 11.63: Jump to Subroutine Instruction.
If the JSR instruction can be executed, then the program will jump from the main program to the ladder rank containing the SBR instruction. The subroutine will be executed until the RET instruction. The RET instruction will return the program to the ladder rank in the main program after the JSR instruction.
Program Maintenance with Module Indicators
To make it easier to visualize the system to be checked, Figure 12-39: Tank Control Block Diagram and Signal Flow and Power Flow can be used for this tracing case, from input to output.
Damage may occur in the following parts:
- Input & output wiring between input or output devices and interface modules.
- Input and Output Devices/Power Supply Module
- Mechanical input switch devices
- Input sensors
- Output actuators
- PLC I/O Modules
- PLC Processor.
1. Input Module Tracking Analysis
In the signal and power flow diagram, the input module is located approximately in the middle of the system block, making it the most ideal place to start troubleshooting. Each vendor has a different I/O module configuration. The following is an example of an input module troubleshooting guide from one PLC vendor.
Figure 11.62: Input Module Failure Tracking
Before reading the description of the indicator, first study the maintenance instructions Figure 11.59: (a). Troubleshooting guide. The damaged parts are marked with color blocks. The description of each possible damage can be seen in the following list:
- Correct indication -- no damage
- Correct indication -- no damage
- The condition of the sensor, input voltage, and indicator module is correct, but there is an incorrect indication on the ladder instruction. Most likely the problem is at the I/O point of the input module. Damage can also be caused by the processor. But because most damage is caused by the input module, then remove the damaged module, replace it with a new one or move the damaged module to another I/O point
- Module indicators and ladder instructions match, but there is no response from the external device, then measure the input voltage on the module as shown in Figure 12-59b. If the measurement result is 0 VDC, then the wiring at that point or path is likely broken or the sensor is in poor condition. If the measured voltage is 28 VDC, then the damage is at the I/O point on the input module, or the problem is with the power supply. Or if the input is fitted with a fuse, make sure that the fuse is in good condition.
- The status of the external PLC device, input voltage and module indicators are all correct, but there is a discrepancy in the ladder. So the problem is usually at the I/O point of the input module. There is a possibility of damage to the processor. But this case is very rare.
- The input voltage, module indicators, and ladder instructions are correct, but do not match the conditions of the devices outside the PLC.
- The 28 VDC input voltage, the external PLC device, and the ladder instruction are correct, but the indicator module is not correct. Check the indicator in the input module section.
While performing Input Module repairs, the following points need to be taken into account:
- If the input is fuse-fed, make sure that the fuse is in good condition/not burnt or broken.
- If the input is turned On while the sensor is working, the input will be Off to the external PLC device.
- If the input module is suspected to be damaged, then remove and move the damaged module to another I/O point that is considered still good, to ensure that the channel is in good condition. Or replace the damaged module with a good one.
- If the indicator module and ladder are correct, then measure the input voltage.
- If the voltage measurement results are in accordance with the conditions of the devices outside the PLC, then this means that the problem is in the input module (not outside the module).
- If the input voltage does not match the condition of the external device of the PLC, then the problem is in the wiring.
2. Output Module Damage Analysis
Refer to the maintenance instructions in Figure 12-60. The color-blocked parts are the damaged parts. The damage description can be seen as follows:
- Indicator is correct (light is on) -- no damage.
- Indicator is correct (light is on) -- no damage
- Output instructions and output indicators match but external devices do not match. Damage usually occurs in disconnected wiring or the module output circuit is in poor condition. If there is a fuse on the output, check the fuse. Damage may also occur in wiring that is short-circuited to the mains line.
- The status of the external device and the module indicator match, but the output instruction condition does not match. Damage may occur at the I/O point of the output module. Damage may also be caused by the processor, although this possibility is very small.
When performing repairs using the discrete output module, pay attention to the following:
- Many I/O output modules use fuses. Many of them use fuse indicators. The fuse will light if it is broken and the output is turned ON. If this happens, check the fuse. Then check the wiring using a voltmeter to measure voltage or use an ohmmeter to find out if the wiring connection is broken.
- The force function can also be used to activate a ladder, without running the ladder program, so that the damaged output can be identified.
Figure 11.63: Descriptive Output Module Tracking. (a). Maintenance instructions, (b). Input voltage measurement.
BCD Conversion Instruction Error Tracking and Logic Diagram
Comparison and Conversion instructions often cause problems in practice. If the part of the Ladder containing these instructions does not work as expected, use the following suggested tracing steps:
- If the PLC circuit with BCD and comparison instructions does not work properly, then the first thing to do is to make sure that the data from the process is correct by looking at the dialog box on the monitor screen (integer table, floating point, and tag control). The values in the register can be displayed in binary, hexadecimal, decimal formats, and there are even vendors that provide hexadecimal data formats.
- Test the operation sequentially for each row, starting from the first to the last. The TND (temporary end) instruction, if any, can be used, with the steps as described in the previous sub-chapter.
- The SUS instruction can be used to check the status values for all registers and critical points.
- Be careful when using comparison instructions to execute a process, due to scan-time considerations and the time used to update internal data.
Maintenance of COMPARASON and CONVERSION Instructions
In the manufacturing automation industry, numerical values are often used as one of the input parameters or values that need to be displayed via a monitor or other display device. The value of a number can be written or displayed according to the number system used. In the automation system, there are 4 number systems outside the system we usually use (decimal), namely: binary, octal, binary code decimal (BCD) and hexadecimal.
1. Basic Number System
All number systems have a base number. The decimal system has a base of 10, meaning there are 10 symbols (0 to 9) used to represent decimal numbers. The value of a number is determined by the position of the digit in the number. In integers, the rightmost position has the lowest weight (called the LSB List Significant Bit), and the rightmost position is called the MSB (Most Significant Bit). The complete position and weight of the number can be seen in the following image:
Figure 11.58: Weight Value and Position Value of a Number
2. Binary Number System
PLC and Computers make logical decisions and form mathematical calculations using electronic circuits. The electronic circuits used work based on two conditions, ON or OFF. This can be analogized to the number system used in electronic systems, namely 0 and 1, which is called the Binary System (base 2 number system). Table 12- : shows a comparison of the binary system and the decimal system. The way of giving weights and values in the binary system is identical to the decimal system. The weight value is determined by the position of the digit.
Number Conversion
PLC works in binary while we generally work with decimal number system. Therefore knowledge of number conversion is very important. The number conversion process can be seen in Figures 12-56 to 12-58. A number system can be converted from one base to another, for example from binary to decimal, as shown in Figure 12-56a, or vice versa.
Figure 11.59a: Conversion from Binary to Decimal
Convert decimal numbers to binary. For example, 8410 to binary. The conversion process can be seen in Figure 11.59b.
Figure 11.59b: Converting Decimal to Binary
3. Octal Number System
The octal number system has a base of 8. This means that there are 8 number symbols, namely 0 to 7. Figure 11.57a: shows the conversion of numbers from octal to decimal, Figure 11.57b shows the conversion of numbers from octal to binary, Figure 11.57c shows the conversion of numbers from binary to octal.
Figure 11.60a: Conversion from Octal to Decimal
Figure 11.60b: Octal to Binary Conversion
Figure 11.60c: Binary to Octal Conversion
4. Binary Coded Decimal (BCD) System
Binary Coded Decimal (BCD) is a numbering system that uses four binary bits to represent the decimal numbers 0 through 9. The BCD of a decimal value is obtained by replacing each decimal digit with its 4-bit binary value.
Figure 11.61: Decimal to BCD Conversion
Arithmetic Instruction Maintenance
The difficulty of programs with mathematical instructions in general is the high execution rate with multiple instructions. While the main problem in maintaining mathematical instruction sequences is in determining the source of the problem itself, whether from within the program or from the data entered into the mathematical instructions.
Move instructions can also cause operational problems. If a section of the ladder involving a Move instruction is not working properly, the following instructions can be used to track down the error as long as there are math instructions.
Maintenance Instructions
- If the PLC sequence with mathematical instructions does not produce the correct operation, then the first step is to check the data from the process through the dialog box. Check the data from the input table, integer and floating point. (Each vendor has a different dialog format). Check the values in the registers, which can be displayed in binary, octal, hexa or decimal format, depending on the type of data present.
- Check the status of the arithmetic bits, to determine whether they are in an overflow state or whether data is being divided by zero.
- Perform the tests sequentially, one circuit at a time to ensure that each circuit is operating properly. TDN and SUS instructions can be used. Follow the instructions for using them as described in the previous section.
- Be careful with the condition where the mathematical calculation value is used to update the internal memory bit of the PLC and cause an instruction to be executed. This is because the scan time of the internal data update time is much faster than the external data processing process.
Counter Maintenance
1. Type of Counter
Counter is a tool used to count observation objects sequentially, either in ascending order (up-counter) or descending order (down-counter). In the field, mechanical and electronic counters are available.
Figure 11.54: Temporary End Instruction
1). Mechanical Counter
Figure 12-52: Mechanical Counter, using a rotary handle to increase or decrease the number of revolutions, the results of which can be displayed. Many counters are equipped with a Reset button to reset the count to zero.
Figure 11.55: Mechanical Counter
2). Electronic Counter
Figure 12-53: is one of the electronic counters. Like mechanical counters. Electronic counters can also be used to count up or count down. Electronic counters are usually equipped with an LCD display and a reset button.
Figure 11.56: Electronic counter
2. Maintenance of Counter from Ladder Diagram
TIP for maintenance of the Shredder
- Test the counters sequentially starting with the first, then add a counter until all the sequences have been operated, as described in section 12.5.4 of this book.
- If there is a Reset instruction, then determine all the counter bits required in the execution process before the counter is reset.
- Use the SUS instruction to verify the status of all registers and bits at critical points in the ladder diagram.
- If the count is inconsistent, that the counter logic transition period is not less than the scan time.
- Be careful when using counters to update internal PLC memory bits and process functions in the PLC, because the scan time and internal update time are usually faster than the process.
1). Suspend Instruction
The SUS instruction is used to identify and capture special conditions during system maintenance and program debugging. A program can have multiple suspend instructions, each controlled by a different input instruction address.
2). Process Speed and Scan Time
Problems will always arise if counting is used for the calculation process in the PLC, because the scan time is relatively faster compared to the calculation process of the controlled object. For example, in an apple packing control machine. The number of apples that enter the box is not the same as the counter value on the monitor screen. When the 10th apple has reached sensor-2, the sensor should activate the counter (increase the count from 9 to 10). But because the sensor response is slower than the counter scan time, the apples that pass are not counted. This will cause a calculation error.
Figure 11.57: Apple Packing Machine
How the machine works under normal circumstances:
If PB1 is pressed, the conveyor will move. If the box passes the box detector, the conveyor will stop and the apple conveyor will move. At that time the apple counter will start working. If the count has reached 10. then the apple conveyor will stop and the box conveyor will move again. The counter will reset and the operation of this machine will repeat again. And so on until PB2 is pressed to end this automatic packing process.
Timer Maintenance
In industry, a production process often consists of several steps or stages in sequence, which are carried out automatically. In principle, the sequence of the process stages is the setting of the working time of a part of the system. This setting is carried out by a tool called a Timer.
Timing by a timer can be done mechanically, electronically or with program instructions in a PLC.
1. Mechanical Relay Timer
Mechanical timing can be fixed or variable, depending on the movement of the contacts when the coil is energized, de-energized or both. In ladder diagrams, this timer is called a timing relay.
Mechanical timing relays use pneumatics to delay time by controlling the air pressure of an orifice as the accumulator tube (bellows) expands or contracts. The time delay is achieved by setting the valve needle position to change the amount of orifice friction.
This pneumatic timer relay provides a choice of ON or OFF delay time between 0.05 seconds to 180 seconds, with an accuracy of ± 10% of the total time set. This setting often shifts, so it must be re-set periodically. This relay is also available for AC and DC voltage, with currents between 6-12 amps and voltages between 120-600 volts.
Figure 11.50: Circuit symbol for relay
Case example: A system uses a motor that must start working 10 seconds after the START Push Button is pressed, and will stop if the STOP Push Button is pressed. The Ladder Diagram for this motor operation arrangement is shown in Figure 11-48. TMR1-1 is a Push Button (PB) that will be connected (contact/ON) for a moment only; TMR1-2 is a contact that has been programmed to be ON some time later after the Start button is pressed. In this case, the button is programmed to start ON 10 seconds after the PB Start is pressed.
Contact time delay relays are available in various modes, as shown in Figure 11.49 below. Basically, there are relays that only contact for a moment, and there are also relays that will work (ON/OFF) for a certain time.
Figure 11.51: Ladder Relay Diagram for the case of motor operation control
Figure 11.52: Various Timing Relays
1) Timed Contact
On Delay Timing Relay
Normally Open, Timed Closed (NOTC)
After the coil of the relay is supplied, the NO contact remains open for a certain period of time, for example 5 seconds. After 5 seconds, the contact will automatically change status from open (off) to closed (on) and will remain closed as long as the relay is supplied with power. If the power supply is disconnected, the relay will open again.
Normally Closed, Timed Open (NOTC)
After the relay coil is powered, the NC contact remains closed for a certain period of time, for example 5 seconds. After 5 seconds, the contact will automatically change status from closed (off) to open (on) and will remain open as long as the relay is powered. If the power supply is disconnected, the relay will close again.
Off Delay Timing Relay
Normally Open, Timed Open (NOTO)
After the coil of the relay is powered, the NO contact will change status to closed and will remain closed as long as the coil is powered. When the power supply is disconnected, the contact will remain closed for a certain time, for example 5 seconds. After 5 seconds, the contact will automatically change status from closed to open.
Normally Closed, Timed Close (NOTO)
After the coil of the relay is powered, the NC contact will change status to open and will remain open as long as the coil is powered. When the power supply is disconnected, the contact will remain open for a certain time, for example 5 seconds. After 5 seconds, the contact will automatically change status from open to closed.
2) Momentary Contact Relay
This type of relay works independently of the time process like a timing contact. If the coil is energized, the contact will change status (for example from Off to ON), and if the power supply is disconnected, the contact will return to its original condition (Off).
Tips for choosing a Timing Relay
- Adjust to the required delay time
- Select a relay with a time delay range according to the machine or process requirements.
- If necessary, select a relay that can have a delay time set to suit the required industrial process.
- Select a relay that can have its delay time reset.
- For control needs, select the appropriate current rating, relay configuration and number of time contacts.
2. Electronic Timer Relay
Electronic Timer Relay is more accurate and can be repeated faster than pneumatic timer relay, the price is also cheaper. In general, electronic timers require a 24 to 48 VDC supply or for AC types require a 24 to 240 VAC supply. Electronic relays are made of semi-conductor materials and can be set to switch time from 0.05 seconds to 60 hours with an accuracy level of 5%, and a reliability of 0.2%.
Figure 11.53: Electronic Timer
While the basic electronic multifunction relay is a microprocessor-controlled relay, which can produce 10 or even more timing functions, with a wider variety of on-delay or off-delay options, as well as several pulse options on its output.
3. Timer Instructions
The Timer instruction on the PLC can function as a time delay, either on-delay or off-delay as in mechanical or pneumatic timers. There are several advantages of the PLC Timer Instruction compared to the Mechanical Timer. These advantages include:
Advantages of PLC Timers compared to Mechanical or Pneumatic Timers:
The delay time can be changed easily through the program, without having to change the wiring; the accuracy is higher than mechanical/pneumatic timers, because the time delay can be generated from the PLC processor itself.
The accuracy of the delay time will be affected if the program consists of many rows, so that the scanning time takes a relatively long time. This delay time instruction must be studied specifically, because each vendor has a different instruction grammar.
It is possible to create a Cascade Timer, which is a Timer that works if it gets a trigger from the previous Timer. A cascade timer is needed if the required delay time exceeds the time capability provided by a Timer.
4. Tracking Ladder Interference with Timer
Some systematic instructions and procedures for tracking PLC system failures as explained in the previous chapter can be used. Tracking can also be done through PLC instructions. Each vendor usually provides this facility. The following will explain how to track Timer failures on a ladder diagram using the Temporary End instruction.
1). Tracking Timer damage on Ladder Diagram
The main difficulty in tracking timer programs in ladder diagrams is to make sure that the timer is the one that is disturbed, because the execution always happens so fast that it is difficult to observe. The following tips can be used to overcome this:
- Test starting from the first sequence, then add a timer to the next sequence. And so on until the entire sequence is finished operating.
- If the preset time is too small, increase all times by the same increment, then test.
2). Temporary End (TND) Instruction
This instruction is very useful for tracking some PLC programs, especially Timer programs. The TND instruction is an output instruction. The following is one of the uses of the TND instruction to track damage to a two-axis pneumatic robot control.
The TDN instruction is an output instruction, placed in the output range, used to debug a program. If the previous logic is correct, then the TDN stops the processor from scanning the remaining files of the program being tested, then updates the I/O and starts scanning the main program from range 0. If the TDN range instruction is incorrect, then the processor will continue scanning until the next TDN instruction or until there is an END instruction.
PLC Software Maintenance
As explained at the beginning of chapter 11, that the work of PLC depends on the program created through instructions. Each vendor has special instructions. Therefore, readers must study it specifically. In this sub-chapter will be given instructions or tips for general PLC software maintenance and some case examples to give students an idea of the application of PLC software tracking methods.
PLC software maintenance cannot be separated from the overall system, including maintenance of input and output devices and modules that are part of the system. To determine the location of damage or error must be done in an organized and comprehensive manner.
1. Tools for Tracking System Damage
Just like motorcycle or car technicians who need equipment to track motorcycle or car damage, for example screwdrivers, keys of various sizes, various testers, and so on.
To track damage to PLC-based systems, especially the software, tools are also needed. These tools are: Block Diagrams, Bracketing, and Signal Flow Analysis.
1). Block Diagram
A block diagram is a set of boxes used to depict parts of an overall system. Each device or function is depicted by a block, for example an input module block, an output module block, etc.
Characteristics of block diagrams:
- Complex systems are depicted by a number of simple boxes.
- Information flow from left to right
- The block structure is the system, sub-system, and program structure.
Figure 11.42. Example of Block Diagram of Tank Filling Control, Signal Flow and Power Flow
Block diagrams of a system are usually not provided by vendors but are created by experts through system simplification techniques.
2). Grouping (Bracket)
Clustering is a technique that uses signs to identify damaged parts of a system (blocks).
Figure 11.43: Stages for Determining Grouping
3). Signal Flow
Signal flow tracking techniques are generally divided into two:
- Power Flow: describes the flow of power from the source to all system components.
- Information Flow: describes the flow of data from the source to the end.
Meanwhile, signal flow patterns generally have 5 patterns/distribution configurations, namely linear, divergent, convergent, feedback or switching.
Figure 11.44a: Signal Flow in a Pump Motor
Figure 11.44b: Input & Output Module Circuit
Figure 11.45: Divergent Flow Configuration
Figure 11.46: Convergent Flow Configuration
Figure 11.47: Flow Configuration with Feedback
Figure 11.48: Switching Path
In reality, every system has a combination of these five configurations.
Signal Flow Analysis
Each configuration has rules to speed up the search for damage.
LINEAR RULE
If the damage group almost occurs in every block, do the test on the part before the mark ( [ ) or before the center point of the block area. If there is a signal error, move the mark ( ] ) to that point. But if the test result is good, move the mark ( [ ) to the block to the right of the mark.
DIVERGENT RULES
Testing starts from the leftmost divergent block (TP-1). If the power is distributed properly, it means the damage is not in the power section. Slide ( [ ) one block to the right. Perform signal testing on TP2.
If the result is not good (for example, no signal or defective), then the damage occurs in the unit between power and TP-1. If the test result is good, then slide ( [ ) to the right and perform the test as in the previous step.
Figure 11.49 : Tracking Steps in Divergent Configuration
CONVERGENCE RULE
- If all convergent inputs are required to produce a good output, then a good output indicates that the input path is free from damage/disturbance:
- If only one convergent input is required to produce a good output, then each input must be checked to ensure that there is no damage.
FEEDBACK RULES
Feedback Rules
If the brackets (grouping) are located near the feedback system block, then make modifications to the feedback path. If the results are normal, then the damage occurs in the feedback path. If the results are still abnormal, do the test from the beginning of the system block.
SWITCHING RULES
Switching Path Rules
If the brackets are located in blocks that have different configurations, change the position of the switch in the suspected section. If the results are good, then the damage is located in the section before the switch. This makes it easier to track the damage.
2. Damage Tracking Sequence:
3. Tracking Damage to Input Modules
The tracking techniques as explained in section 11.3.5 can be used to track damage to PLC input and output devices. The PLC Input and Output Modules themselves are generally equipped with indicator circuits that will turn ON if there is a signal. This can be used to identify whether or not there is a signal (because there is a disturbance in the PLC input or output section). An example of tracking damage for the Water Tank Control case (Figure 11.44 (a) and (b)).
Current tank control system data:
The pump for filling the tank does not work when the Start push button is pressed, while the tank is empty. The input-2 indicator is ON (NC switch is closed) and there is voltage on the terminal. The output-2 indicator is ON. The PLC logic O:2/2 is active.
Problem solving:
From the available data it shows that there is no problem with the NC switch to the PLC input module. So the ( [ ) sign can be shifted to the PLC input (output from the Input Module). This part is also not a problem, because O: 2/2 is active, meaning there is no problem with the input path to the PLC output. Therefore, the ( [ ) sign can be shifted to the right of the Output Module. Looking at the data on the PLC output indicator, it is possible that damage occurs in the output circuit that uses a fuse. Check the Output Module whose fuse is burned. If each port (terminal) uses a fuse, the module must be removed and the output section checked.
After the module output is opened:
Make sure the fuse is broken. Replace it with a new one, then reinstall the Output Module and operate it. Recheck whether the system condition is normal.
More effective Tracking Tips:
Move the faulty output module to another output slot. Operate. If the system works fine, it means there is a fault in the wiring in the original slot where the module is located. If the system still does not work, then the fault is really in the Output Module.
Input Output (I/O) Module
The input module installed on the PLC functions as an interface, which is a part that bridges between the physical quantities being measured (heat, pressure, light intensity, sound, and so on) with the PLC processor. The output module installed on the PLC functions as an interface between the PLC processor and the output actuator (machine, light, motor, and so on).
Knowledge of the working principles and wiring methods of these components in a PLC is essential, so as not to make mistakes when operating and tracking damage or failure of systems that use these components.
1. Industrial Switches
1). Manual Switch
Manual switches installed on PLC inputs function as connectors (ON) or circuit breakers (Off), where the way to operate them is by moving the switch lever mechanically. The size, shape and installation method vary greatly. Switches used as PLC input components are usually of the following types: Toggle, Push Button, Selector, and Push wheel.
Toggle Switch
Figure 11.12a: Toggle Switch
Figure 11.12b: Cutaway view of a toggle switch
Pole is an internal conductor in a switch that is operated by moving it mechanically. The switches used in PLCs generally have one to two poles.
Some Toggle switch configurations
Figure 11.13: Contact Configuration
Example 11-1: Which switch configuration should be selected to control a starter motor that requires a 220 VAC power supply and two 28 VDC indicator lights. The red light will be on if the motor is not receiving power and the green light will be on if the motor is receiving power.
Solution
Because at the same time there must be one lamp lit, a Double Pole Double Throw (DPDT) switch is chosen, as in Figure 11.14.
Figure 11.14: Light and Motor Control Circuit
Push Button Switch (PB)
In general, push button switches are NO (Normally Open) type switches that only contact for a moment when first pressed. While to return to the NO condition again, it needs to be pressed once again.
There are 4 push button switch configurations: no guard, full guard, extended guard, and mushroom button.
Figure 11.15: Push Button Switches
Selector Switch (abbreviated SS)
This type of switch is generally available in two, three or four position options, with various types of knobs, as shown in Figure 12-16: Selector Switch.
Figure 11-16: Selector Switch
2). Mechanical Switch
Mechanical switches will be ON or OFF automatically by a process change in parameters, such as position, pressure, or temperature. The switch will be ON or OFF if the specified process set point has been reached. There are several types of mechanical switches, including: Limit Switch, Flow Switch, Level Switch, Pressure Switch and Temperature Switch.
Limit Switch (LS)
Limit switch is a switch that is widely used in industry. Basically, limit switch works based on the switch fin that rotates the lever because it gets plunger pressure or wobbler fin tripping.
The configurations available on the market are: (a) Adjustable roller fin, (b) plunger, (c) Standard roller fin, (d) wobbler fin, (e) adjustable rod fin.
Figure 11-17: Limit Switch
Flow Switch (FS)
Figure 11.18: Flow Switch in Liquid Flow through Pipes
This switch is used to detect changes in the flow of liquid or gas in the pipe, available for various viscosities. The schematic and symbol can be seen in Figure 12-18.
Level Switch or Float Switch (FS)
Level switch or float switch, is a discrete switch used to control the surface level of liquid in a tank. The position of the liquid level in the tank is used to trigger changes in the switch contacts. The contacts will connect and disconnect quickly forming hysteresis.
Figure 11.19 (a) & (c): Level Switch or Float Switch (FS) with open tank configuration against air pressure; (b) FS with closed configuration; (d) NO and NC switch circuit symbols.
Hysteresis is the separator between the activation point and the deactivation point of the switch. Hysteresis is used to keep the switch in the ON condition when there is a shock, shaking, or change in the liquid surface level, until the switch reaches its deactivation point.
FS is available in two configurations, namely open tank (Figure 11.19 a and c) and closed tank (Figure 11.19 b). Open tank is used for open tanks so that it is also open to atmospheric pressure. While closed tank is used for closed and pressurized tanks.
Pressure Switch
Pressure switch is a discrete switch whose operation depends on the pressure on the switch device. The pressure comes from water, air or other fluids, such as oil.
There are two types of Pressure Switch: absolute (trigger occurs at a certain pressure) and differential configuration (trigger occurs due to pressure differences).
Figure 11.20: Pressure Switch
Temperature Switches
Physically, this switch consists of two components, namely the moving/shifting part (driven by pressure) and the contact part. The moving part can be a diaphragm or piston. Electrical contacts are usually connected to the moving part, so that if there is a shift it will cause a change in condition (On to Off or vice versa).
Discrete temperature switches are usually called Thermostats, working based on temperature changes. Changes in electrical contacts are triggered by the expansion of the fluid in a sealed chamber. This chamber consists of a capillary tube and a cylinder made of stainless steel.
Figure 11.21: Temperature scale
The fluid inside the chamber has a high temperature coefficient, so if the cylinder heats up, the fluid will expand, and cause pressure on the entire chamber cover layer. This pressure causes the contact to change status.
2. Industrial Sensors
In an industrial automation system, sensors are sensing devices such as eyes, ears, noses, etc. Sensing devices can be categorized into two: Contact Devices: Physically touch the parameter being measured, and Non-contact Devices: Physically do not touch the parameter being measured.
1). Proximity Sensor:
It is a non-contact sensor, commonly used for automation of production processes in manufacturing systems. There are two types of Proximity Sensors:
- a) Inductive Proximity Sensor
- b) Capacitive Proximity Sensor.
Inductive Proximity Sensor
This sensor works following the principle of inductor and detects the presence or absence of metal, if the metals are in the influence of the magnetic field generated by the coil in the sensor. When working, the sensor only requires a little material that can flow current.
Figure 11.22: Inductive Proximity Sensor
If the target moves into a high frequency field, Eddy currents enter the target material, and energy transfer occurs to the target which causes the oscillator amplitude to drop. The decrease in the oscillator amplitude will be detected by the detector, thus producing an output.
Inductive Proximity Sensor applications can be found in metal detectors for objects in bags or other closed packaging (boxes, containers, packages, etc.); bottle cap detectors (made of metal) in bottled beverage factories.
Figure 11.24: Example of Inductive Proximity Sensor Application
Capacitive Proximity Sensor
This sensor works by following the principle of capacitance and detects the presence or absence of parts of an object if the metals are under the influence of the magnetic field generated by the capacitor plates in the sensor.
Figure 11.25: Block Diagram of Capacitive Proximity Sensor
The capacitive value of the sensor is determined by the size of the boundary plates, the distance between the plates and the dielectric value between the plates.
Given the nature of this capacitor, capacitive sensors can be used to detect the presence or absence of objects, both stationary and moving objects, both metals and non-metals that have a dielectric greater than 1.2. In Figure 11.25: Block Diagram of Capacitive Proximity Sensor, the target functions as the 2nd plate.
Figure 11.26: Example of Capacitive Proximity Sensor Application
Plate-1 and Plate-2 are "connected" by the electrostatic generated by the sensor. If the Target moves, then the distance between the two plates will change, so the capacitive value also changes. Capacitive Proximity Sensors are widely used in the packaging industry. For example, they are used to check products in containers; another application is to detect the level of liquid in a tank, by utilizing its dielectric properties.
Ultrasonic Proximity Sensor
Ultrasonic Proximity Sensor works based on sound waves reflected by the target object, by measuring the time required for the sound waves to return to the sound source (sensor). This time is proportional to the distance or height of the target. The best performance will be obtained under the following conditions:
- The target is a solid object that has a flat, smooth or even surface, with a temperature of 1000C or less.
- The object is within the cone region of the ultrasonic pulse ? 4 degrees from the axis, the reflecting surface is at the position of the reflected wave receiver.
Figure 11.27: Example of Ultrasonic Sensor Application
Photoelectric Sensor
Used to detect objects without touching the object. The important parts of this sensor are: Light source and light receiver.
Photoelectric Sensors work based on the presence or absence of light received by the receiver. The light received by the receiver can come from a light source or reflection of an object that is the object of measurement and can work from a distance of 5 mm to 300 m more.
Photoelectric sensor parts:
- Light source: generator of visible light
- Light Detector: detects light falling on it, then converts it into a current whose magnitude is proportional to the strength of the light.
- Lens: to focus light and increase the range.
- Logic Circuit: modulates the light source, amplifies the signal from the light detector, decides whether the sensor output changes or not.
- Output Devices: can be transistors, FETs, MOSFETs, TRIACs or electromechanical relays.
Light sensor operating mode:
- Beam beam: the light source and receiver are separate (not in one package/ through beam mode)
- Reflection: the source and receiver of light are in one package.
- Polarized reflex: there is a filter in front of the light source, which is 900 out of phase with respect to the receiver.
Figure 11.30: Retroreflective Photoelectric Sensor
Figure 12-32: Diffused photoelectric sensor
Figure 11.28: Photoelectric section
Figure 11.29: Through beam mode photoelectric sensor
Figure 11.31: Polarized retroreflective photoelectric sensor
Diffused or photo proximity sensors: have a source and receiver in one package, but use components that can reflect light to the receiver.
One example of a photoelectric sensor application is in an automatic cutting machine. The sensor will detect the edge/tip of the material to activate the cutter.
Figure 11.33: Example of photoelectric sensor application in cutting machine
3. Electromagnetic Actuator
1). DC solenoid
DC solenoid basically consists of a coil of wire winding and an iron core plunger. When S is open, the iron core is pushed up. When S is closed, current flows in the coil, so that an electromagnet is created with the direction of the magnetic flux from top to bottom. The magnetic field will pull the iron core down because its pulling force is greater than the spring force. The magnitude of the motive force is proportional to the difference between the position of the core when S is open and the position of the core when S is closed.
Figure 11.34: Basic Solenoid, (a) energy released, (b) when charged with energy.
As in the DC solenoid, in the AC solenoid there is one more component, namely the frame. When the coil gets power (energy charging), the armature will be pulled by the spring until it touches the frame. At this time, magnetic flux flow occurs as in Figure 12-35: AC Solenoid.
Figure 12-35: AC solenoid
3). Solenoid Valve
It is an electromagnetic device, used to control the flow of air or liquid (water, liquid oil, gas, coolant). The working principle is the same as other solenoids (DC or AC). The spring wrapped in the plunger will press the Pilot valve and hold it in that position, so that there is no liquid flow in the valve body, at this time the solenoid is in a state of releasing energy. When the coil is energized, a magnetic field is created, which will move the plunger, pilot valve, and piston, allowing liquid flow through the valve body.
Figure 12-36: Solenoid Valve, (a) sectional view, (b) valve description.
4). Control Relay
This relay is a combination of electromagnetic and solenoid. The main function of this relay is to control large currents/voltages with only small electrical signals; as power isolation between objects and controllers.
Figure 11.37: Relay Control Circuit
ATTENTION !
Things to consider when choosing a relay:
- Contact Rating: Voltage rating: is the recommended operating voltage for the coil. If it is too low, the relay does not operate, if it is too high the relay is shorted. Current rating: the maximum current before the contact is damaged (melted or burned).
- Contact Configuration: Normally Open (NO): Relay is open if not working; Normally Closed (NC): relay is closed if not working.
- Holding contact or seal-in contact: is a method to maintain current flow for a moment after the switch is pressed or released. In the ladder diagram it is depicted parallel to the switch being operated.
5). Relay Latching
This type of relay will remain ON and/or OFF even if the power supply has been removed from the coil.
Figure 11-38: Seal-in Contact
6). Contactor
A contactor is a relay designed to switch large currents from a large source voltage.
Contactors have multi-contacts so that channels from single-phase sources or 3-phase sources can be connected to this switch. Contactors usually have several additional switches called auxiliary contacts, to connect the contactor to the main voltage. In addition, contactors also have an arc-quenching system to suppress the arc that forms if the contacts carry an open inductive current.
Figure 11-39: Contactor
7). Starter Motor
In general, a starter motor consists of: overload block or thermal unit, for overcurrent protection for motors equipped with overload thermal contacts. The contacts will open when detecting an overload.
Figure 11-40: Starter Motor
4. Visual & Audio Output Components
In fact, PLCs are also used to turn on various audio and/or visual devices, such as pilot lights, horns or alarms.
Figure 11.41. Horn
5. Input/Output Device Failure Tracking Tips
1). Tracking Switch Damage
All switches have the same common problems, which are divided into two groups:
- a) operator problems (handle, push button, i.e. mechanical problems)
- b) contact problems (always open or always closed)
If the system problem is suspected to be from the switch, perform the following procedure:
- If the contact should be open: measure the voltage across the contact. If the measured voltage is equal to the switch/contact operating voltage, then the switch is good. If the measured voltage is close to zero, then the contact is shorted.
- If the contact should be closed: measure the voltage across the contact. If the voltage is close to zero, then the contact is in good condition. If the measured voltage is equal to the contact operating voltage, then the contact is open/broken.
- If the contact resistance is suspected to be damaged, remove the resistance, then measure it with an ohmmeter.
- If the switch is not connected to the contacts, then test the jumper that connects the contacts.
- If the switch does not open, remove one of the wires to confirm the problem.
2). Tracking Relay Damage
Relay problems can be divided into two as in switches: the contact part and the operator part. Tracking damage to the contact part can be done by the switch tracking procedure. Because the relay contact works based on the solenoid or electromagnetic work, then the current that does not match will be the main problem. Therefore, tracking the operator part (electromagnetic coil) or solenoid can be done by measuring the current flowing in the coil.
- Measure the minimum current flowing through the contacts. This is called the pull-in current, which is the minimum current required for the armature to make contact.
- After the armature is connected, immediately measure the current through the contacts before the armature passes the normal condition (this current is called the drop-out current). The measured current should be less than the pull-in current.
- Current that does not match the operating conditions indicates that the relay is not connected properly, causing heat in the coil.
- For devices using AC solenoids, it will be equipped with one coil winding called a shading ring which is a part of the magnetic armature. The shading ring is used to reduce the humming noise of the AC solenoid.
3). Tracking Proximity Sensor Damage
Since the operating characteristics of each sensor are different, the first thing to do is to know how the sensor works in the system. Here are some tips for tracking down Proximity Sensor errors
- Make sure that the sensor is working within its power range, by measuring the device connected to the sensor.
- Make sure that all amplifier settings are correct and check that all seals are still good.
- Make sure that all switch settings are correct.
Use the operation indicator on the sensor or sensor amplifier to ensure that the electronic part of the sensor is still in good condition, by measuring the relay output or transistor working conditions. Some devices with NO output set will indicate ON if they have sensed an object.
- Meanwhile, out with the NC setting will have the opposite condition.
- Make sure there are no foreign objects affecting sensor performance.
- Make sure that the speed of the part passing through the sensor does not exceed the frequency response of the part.
- Make sure that the sensing range is not reduced due to lack of supply voltage or due to temperature changes.
4). Tracking Photoelectric Sensor Damage
- Make sure that the sensor has the appropriate power for its range, by taking measurements on all devices connected to the sensor.
- Make sure that all amplifier settings are correct and check that all seals are still good.
- Make sure that all switch settings are correct.
- Use the operation indicator on the sensor or sensor amplifier to ensure that the electronic part of the sensor is still in good condition, by measuring the relay output or the working condition of the transistor. Some devices with NO output sets will show ON if they have sensed an object. While for out with NC settings will have the opposite condition.
- Make sure that the lens is clean and free from foreign objects.
- Make sure that the speed of the part passing through the sensor does not exceed the frequency response of the part.
- Make sure that the sensing range is not reduced due to lack of supply voltage or due to temperature changes.
PLC Electrical and Safety
It is very important to pay attention to health and safety issues regarding the use of electrical energy sources used every day, for example electrical power supplies, especially those related to the safety of users and the equipment used.
The most important thing is that we must know the nature of the energy source itself and know how to safely work or use this energy, so that accidents due to the use of electrical energy can be avoided.
Judging from the impact of electricity on electricity users, there are several important components related to the safety of electricity use:
- Electrical Shock
- The Natural Properties of Electric Shock
- Safe Electrical Practices
- Response to Shock victim.
1. Electric Shock
If an electric current passes through the body, the resistance in the muscle tissue will convert most of the energy in the muscle into heat. DC electric shock can cause uncontrolled muscle work. If the current source is AC current, it will cause fibrillation (excessive heart rate). If the current flowing into the body is high enough (greater than 50 mA), it can cause death.
2. Basic / Natural Properties of Electric Shock
Electric shock occurs when part of the body becomes a current carrier of an electric circuit (Figure 11.8: Electric Shock). The amount of current flowing in a shock condition depends on the body's resistance to the electric source.
The research results show that the magnitude of contact resistance between body parts and the contact points of the electrical circuit is as shown in Table: (Body Part Contact Resistance).
Table 11.6: Contact Resistance of Body Parts
[
3. Electrical Safety in Practice
Systems controlled by PLCs have a variety of power sources:
- Voltage source,
- Compressed spring,
- High pressure fluid,
- Potential energy of weight,
- Chemical energy (flammable and reactive substances),
- Nuclear energy (radio activity).
PLCs usually operate with a 110V or 220V AC power supply, while output modules may have a source voltage of 5V -- 440V, and have valves as switches for systems with very high air or liquid pressure.
4. Industrial Safety Procedures
Meanwhile, industrial safety mainly uses lock-out / tag-out (sign / writing "under repair"), then measure the voltage with the following procedure:
- Check and ensure that the meter is still working by measuring a known voltage source.
- Use a meter to test the circuit
- Once again make sure that the meter is still working by measuring a known voltage source.
5. Response to Electric Shock Victims
If someone contacts/touches an electrical conductor of a circuit and cannot remove themselves from the circuit, then the first step to take is to disconnect/disconnect the power source from the circuit as quickly as possible. Then call the medical team/ambulance to follow up on the victim's health care.
CAUTION! Do not touch a victim who is being electrocuted. Turn off the power source as soon as possible, then provide emergency assistance to the victim.
Motion Operators and Sensors
In this topic, what is meant by Operator is anything that is controlled by the microprocessor; while Motion Operator is an operator that causes movement, such as electric motors, solenoids, and pneumatic or hydraulic actuators. Reactive Operator is an operator that can provide information to the robot, such as information about the robot's environmental conditions. Instructions for the operator can be very simple instructions, such as turning on a motor or sensor.
1. Motion Operator with/without Sensor
The operator equipped with the sensor will receive instructions from the microprocessor after the microprocessor receives information from the sensor, about the status of the robot and its environment. Here the sensor functions as feedback (providing information to the microprocessor about the status of the robot, for example, the robot is currently at coordinate position A). So, if the motor or other operator is not working properly, then the first thing to check is the sensor loop associated with that operator.
An operator who is not equipped with a sensor (without feedback), will work based on the data pattern (in the form of pulses) sent to him by the microprocessor. The problem that will arise with this operator without feedback is, if there is a force that stops the robot arm motor from its actual position. The microprocessor will continue to assume that the robot arm continues to move according to instructions, and is currently in the position it should be, when in fact it is not.
This "misunderstanding" can be overcome by zeroing the position of each robot stepper motor. This must be done every time the robot is turned on and every time an inaccurate movement occurs.
2. Zeroing
Zeroing means pushing the motor in one direction. This can be done in two ways: using an end point, such as a Limit Switch, or without an end point.
Zeroing with endpoint
The microprocessor will get information about the final position (coordinates) of the robot's limbs (e.g. the robot's arm; this is identical to the "motor position") after the motor runs one way until it touches a limit switch. The limit switch will inform the microprocessor that the arm has reached the desired position.
Figure 9.13: Robot Limb Coordinate System
Zeroing without an end point
With this method, the motor is instructed to run for a certain time, assuming (without interference) that during the specified time, the robot arm has reached and stopped at the desired position. For that, the microprocessor needs information about the initial position of the arm. An end point will be information as a starting point for the next instruction. This method is suitable for low-power robots.
3. Pneumatic and Hydraulic Drive
The robot's body parts can move (for example, arms extending or rotating) because of the presence of pneumatic or hydraulic devices (devices that work based on the pressure they receive) that receive force. This force is obtained from the pressure produced by the pump through several mediums, for example air or liquid).
Figure 9.14: Gas Laws
Devices that work based on air pressure are called pneumatic devices. While devices that work based on liquid pressure are called hydraulic devices. This pressure will move the piston on the robot arm. So if there is a jam in the robot's part drive, then tracking the damage to this device starts from checking the force received by the piston.
4. Electropneumatic
In industry, a combination of pneumatic and electric devices is often used, so it is called electro-pneumatic. The stored power of the pneumatic device will control the operation of the device with the help of an electrical signal (usually 24 VDC). Here this device functions as a switch. In fact, these electro-pneumatic switches work based on a logic circuit (study section 11.2.4. of this book)
Figure 9.15: Electropneumatic Components
The Final Method of Industrial Control Troubleshooting
- Note down all parts that have been replaced, all changes that have been made, and all measurements that have been taken.
- Look at the manufacturer's manual carefully first, look at the original block diagram, review each function of the equipment, and see how it relates to the current equipment.
- Realizing the possibility that one of the replacement modules is also damaged, replace each replacement part with the original part, one by one. After everything is installed, recheck the system to see if the damage is still there or if the replacement part has fixed it.
- Using the correct manual book, make a visual inspection of each part of the circuit on each part of the equipment (figure 7.16). Then, check whether the test results on the equipment are the same as the specifications indicated by the manual hand book. With the right test, see if you can match each voltage and measurement value indicated by the manual book.
- Try to set the test-load condition and check the result again against the value in the manual. If the equipment is operated under test-load condition, make sure the full-load condition is under the actual condition as well.
- Double check the mechanical connections (figure 7.17). The rotating shaft may move freely when there is no load or at low speeds, but may experience friction when there is a load or when rotating at high speeds. Remember that mechanical failure is easier to occur than electronic failure.
- Check the power supply voltage when all the equipment is working, there should be no voltage drop. For a 117 Volt AC power source, the lowest limit is usually 105 volts where the equipment can work at this level. Performance is poor and control accuracy may be lost because the reference voltage is not calibrated.
- Identify at least the part where the damage occurred and try to isolate the components that could cause other components not to work properly (figure 7.18).
- We may need to measure some components such as resistors and capacitors, and ensure that their values are still correct in the determining/examined circuits.
- No matter how difficult a troubleshooting job is, remember that the equipment previously worked well and therefore should be repairable. If someone can make it work, you can make it work again.
Conclusion
- Note What Has Been Changed.
- Use the Correct Manual Book
- Test the condition of the tool.
- Supply Voltage Recheck and Inspection
- Measurement For Damage Identification
- Work Carefully.
Major Problems Found In Control
- In electronic balancing systems, strain gauges are the most common failures.
- In chemical plants, especially those using chemicals that can cause corrosion/rust, failures that often occur are rusting of electronic components, connections, grounding.
- In heat sink equipment, using power tubes to generate the required energy. These tubes have a limited lifespan so they are a source of frequent problems.
- Mechanical transducers are more prone to failure than photoelectric transducers. Temperature transducer failures are relatively rare.
- Solenoid actuators fail more often than motors, and both phneumatic and hydraulic actuators often experience valve failure but not solenoid failure. Whenever relays are used they are often a source of trouble, since they control much larger currents in industry.
- Mechanical damage occurs more often than electronic damage, due to mechanical vibrations, friction, rust, abrasion, dust, loss of spring pressure and other damaging effects.
Figure 7.13 Example of Control System in Industry
Searching for Component Failure
- If the equipment uses a tube amplifier (figure 7.10), then replacing the tubes one by one is a step that should be taken, because on some electron tubes, the tube tester cannot be used.
- Some of these tubes are quite expensive and if replaced with a new one, damage to the circuit or circuit can cause the tube to fail again. Before taking any risks, one should first measure the voltage, at least on the controlling element of the tube.
- In industrial control systems, the electronic circuitry can be connected to a PC module (Figure 7.11) and then it is possible to replace the entire module. Because the equipment is expensive, most factories that use electronic control also keep spare parts including supplies and PC modules.
- The connections (sockets) of Figure 7.12 spare parts are very useful for troubleshooting. Relays in particular are often connected with sockets, so that whenever a relay is suspected of being damaged, it can simply be replaced.
- If none of the electronic parts fail, then test the cables and connectors with an ohmmeter.
- Transformers are more likely to fail in industrial equipment. Be sure to check the coating, cables and insulation or the area around the transformer.
Figure 7.10 Equipment With Tubes
Figure 7.11 Computerized System
Figure 7.12 Types of Sockets