Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add two numbers and store the result.
PLC Programming
[1] IN1 , IN2 , OUTAttempts:
3 left
💡 Hint
Common Mistakes
Using SUB instead of ADD will subtract values.
Using MUL or DIV will multiply or divide instead of adding.
✗ Incorrect
The ADD instruction adds the values of IN1 and IN2 and stores the result in OUT.
2fill in blank
mediumComplete the code to subtract IN2 from IN1 and store the result.
PLC Programming
[1] IN1 , IN2 , OUTAttempts:
3 left
💡 Hint
Common Mistakes
Using ADD will add instead of subtract.
Using MUL or DIV will multiply or divide instead of subtracting.
✗ Incorrect
The SUB instruction subtracts IN2 from IN1 and stores the result in OUT.
3fill in blank
hardFix the error in the code to multiply IN1 and IN2 correctly.
PLC Programming
[1] IN1 , IN2 , OUTAttempts:
3 left
💡 Hint
Common Mistakes
Using ADD or SUB will not multiply values.
Using DIV will divide instead of multiply.
✗ Incorrect
The MUL instruction multiplies IN1 and IN2 and stores the result in OUT.
4fill in blank
hardFill both blanks to divide IN1 by IN2 and store the result.
PLC Programming
[1] IN1 , IN2 , [2]
Attempts:
3 left
💡 Hint
Common Mistakes
Using ADD, SUB, or MUL instead of DIV.
Storing the result in IN1 or IN2 instead of OUT.
✗ Incorrect
The DIV instruction divides IN1 by IN2 and stores the result in OUT.
5fill in blank
hardFill all three blanks to create a program that adds IN1 and IN2, multiplies the sum by IN3, and stores the final result.
PLC Programming
[1] IN1 , IN2 , TEMP MUL [2] , [3] , OUT
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up TEMP and OUT variables.
Using wrong instructions for operations.
✗ Incorrect
First, ADD sums IN1 and IN2 storing in TEMP. Then MUL multiplies TEMP by IN3 storing in OUT.
