Not equal NEQ
Passes power while A is not equal to B.
NEQ
AGlobal.Recipe3BGlobal.LastRecipe2
| Tag | After two scans |
|---|---|
| LastRecipe | 2 |
| Recipe | 3 |
How it works
Passes power while Source A does not equal Source B; blocks it when they are equal.
How it's used
Use NEQ to spot a change, such as a new recipe.
NEQ
AGlobal.Recipe3BGlobal.LastRecipe3
Global.NewRecipeOTE
Source3
Dest3
| Tag | Value |
|---|---|
| Recipe | 3 |
| LastRecipe | 3 |
| NewRecipe | 1 |
Recipe changed from 2 to 3, so NewRecipe is on. LastRecipe already shows 3 because the MOV below ran in this scan.
Operands
| Operand | Data type | Read or write |
|---|---|---|
| A | DINT, REAL, STRING, CHAR or a number | Reads |
| B | DINT, REAL, STRING, CHAR or a number | Reads |
Common mistakes
- Forgetting the rest of the rungNEQ only passes power it receives. A false rung stays false.
Learn it in a lesson
- Comparing valuesIntermediate · 25 min