Comparing Values in PLC Programming

Comparing Values in PLC Programming

Subscribe Watch Trailer Share
Comparing Values in PLC Programming
  • 108. Introduction to Comparator Operations PLC Programming

    Some of the most often used instructions in PLC programming are comparator operations. In all of the previous PLC programs that we have worked with so far, we have mostly worked with bits. A bit has only two possible values of one or zero, true or false and based on these limited values you can e...

  • 109. What are Integer and double integer data types in PLC programming?

    As indicated in a previous lesson, each comparator operation has a drop down menu where you can select between different data types.

    Now what are these used for? It's very simple. Every variable or constant that you use in your PLC program has a specific data type. When you're going to compar...

  • 110. Real, Byte, Word, Double Word and Time data types in PLC programming

    You became familiar with integer and double integer data types in the previous lesson. In this lesson you're going to become familiar with the rest of data types in comparator operations including real, byte, word, double word and time.

  • 111. A few Practical Points on Comparator Operations

    Before starting with practical PLC programming examples for comparator operations, I'd like to discuss a few practical points on how to use these instructions in your PLC program.

  • 112. Factory Warehouse PLC Program _ Comparator Operations

    In the previous lessons, in the section about counters, I wrote a PLC program to run a conveyor belt and count the number of products entering the factory warehouse. In this lesson, I'm going to develop that PLC program using the comparator operations in a way such that when the number of product...

  • 113. Error Message While Entering Correct Data Type for Comparator Operations

    In some cases, although you select the correct data type for the comparator operations, you'll see that there are still errors in the software.

    when you enter a variable for comparator instructions and you see that, despite considering all the parameters you'll constantly get an error, you nee...

  • 114. Material Handling PLC Program _ Part 1

    In a section of a factory there are two conveyor belts that are used to move pieces from one sector to another. Next to each conveyor belt, there is a photo eye sensor installed to keep track of the boxes and also commanding the electrical motors to start and stop.

    In this and the next lesson,...

  • 115. Material Handling PLC Program _ Part 2

    In the previous lesson you learned how the machine works and what the input and output components are. In this lesson, I'm going to start writing a PLC program that would be able to control the machine in the best possible way.

    The PLC program that I'm going to write is going to address three...

  • 116. Material Handling PLC Program _ Part 3

    In part 3 of the material handling PLC program I'm going to test the program in the online mode and then continue writing the program based on what I want the PLC program to do for me.

    The first problem that this PLC program has is that when the full blue box is transferred to another section...

  • 117. Material Handling PLC program - Part 4

    In the previous lesson I added the address of the start switch in the reset input of the signal lamp flip-flop and now I'm able to run motor 1 by pressing the start switch but the problem is that as soon as I take my hand off the switch the motor is going to stop again!
    The other problem that t...

  • 118. Material Handling PLC program - Part 5

    As I said previously, I also have a reset switch for this machine. In this lesson, I'm going to add an open contact to the reset input of the counter so that when the reset switch is pressed the accumulated value for the counter is going to be reset to zero.
    At the end, when the PLC program is c...

  • 119. Parking Lot Entrance Barrier PLC Program - Part 1

    In this lesson, I'm going to write a PLC program for a vehicle barrier at the parking entrance using a count up and down instruction and also two comparator instructions. What I need the vehicle barrier to do for me is, when the number of vehicles within the parking lot is equal to 500, it should...

  • 120. Parking Lot Entrance Barrier PLC Program - Part 2

    In the previous lesson I wrote a PLC program to control the vehicle barrier in a parking lot entrance and also counting the number of the vehicles within the parking lot.
    In this lesson I'm going to write a short piece of code for turning on the signal lamp when the parking lot capacity is full...

  • 121. Energizing a PLC Output When a Group of Inputs Are All True

    In some projects you need a PLC output to be energized when a group of PLC inputs are all true at the same time. To write such a PLC program there are two ways:
    1. Writing the PLC program using what I call the "bit logic" approach
    2. Writing the PLC program Using the comparator operations
    In t...

  • 122. Extended Timing in PLC Programs Using Comparator Operations - Part 1

    As you know, the maximum amount of time that you can use on S7 or SIMATIC timers for timing is 2 hours 46 seconds. If you need larger timing values, one of the options might be using the IEC timers.
    If you're not interested in using IEC timers, the other option is to build your own customized t...

  • 123. Extended Timing in PLC Programs Using Comparator Operations - Part 2

    So far I've inserted a timer and a counter in the first network and also a flip-flop in the second network to turn on the fan. Now I'm going to show you how these programming elements should work together to be able keep the output energized continually for 15 seconds.

  • 124. Extended Timing in PLC Programs Using Comparator Operations - Part 3

    The problem with this program is, when I press the start switch, the timer times the 5 seconds once but I need the timer to time the 5 seconds 3 times in a row. Let's fix this by adding some additional code.

  • 125. Extended Timing in PLC Programs Using Comparator Operations - Part 4

    As I said in the previous lesson, the program is complete but it still has an issue. Let's find out what the problem is.

  • 126. Assembly Line PLC Program – Part 1

    In this new video series we're going to write a PLC program for the process of assembling a series of components in a section of a factory. In this process, the final product will be manufactured by assembling two separate parts of the product together. This machine has two 3-phase electrical mot...

  • 127. Assembly Line PLC Program – Part 2

    In the previous lesson, you learned in fine detail, how this machine works. In this lesson I'm going to start writing the PLC program in a step-by-step, easy to follow format.

  • 128. Assembly Line PLC Program – Part 3

    In the previous lesson I wrote a PLC program that I expect to work based on the first diagram. According to this diagram, when the start switch is pressed, motor 1 is going to turn on.

    When sensor 1 sees the parts, motor 1 is going to stop for a few seconds, and the jack will be active after ...

  • 129. Assembly Line PLC Program – Part 4

    In the previous lesson, I completed the PLC program for the first interruption caused by sensor 1 and tested it in the online mode as well to make sure that everything works within my expectations.

    As I promised in part 3 of this video series, I'm going to start writing the PLC program for th...

  • 130. Assembly Line PLC Program – Part 5

    In the previous lesson, I wrote a PLC program for the second interruption based on diagram 2. In this lesson, we're going to test the program in the online mode and then make the necessary changes to ensure that everything is working as we want it to.

  • 130-1. Assembly Line PLC Program – Part 6

    We have been playing around with this assembly line code for several lessons and have been informed by a RealPars student of a bug that we need to address. To refresh your memory, this code has a start and stop switch, 2 conveyor belts, a motor for each belt, 2 photo-eye sensors, and a jaw type c...