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 compare these variables or constants using comparator operations, you need to define the exact data type for the instructions as well. This means that you need to tell the instruction what the data type of the variable or the constant is that you wish to compare. In this and the next lessons, you're going to learn how to do that.
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.
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.
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...
6 Comments