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 easily demand the desired command for a PLC output. You don't need comparator operations when you're working with bits but in reality, in almost all projects, you'll have variables with integer and decimal values which are greater than bit values.
In this and next lessons, you're first going to become familiar with comparator operations and then you're going to learn how to use these instructions in your PLC program through a few practical programming examples.
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...
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.
14 Comments