Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to declare a register named 'R1' in the PLC program.
PLC Programming
MOV 0, [1]
Attempts:
3 left
💡 Hint
Common Mistakes
Using data table addresses like D1 instead of register R1.
Confusing timers (T1) or memory bits (M1) with registers.
✗ Incorrect
The register 'R1' is used to store data. MOV 0, R1 initializes it to zero.
2fill in blank
mediumComplete the code to move the value from register R2 to data table D5.
PLC Programming
MOV [1], D5Attempts:
3 left
💡 Hint
Common Mistakes
Using D2 as source instead of R2.
Using memory bit M2 or timer T2 incorrectly.
✗ Incorrect
MOV R2, D5 moves the value stored in register R2 into data table address D5.
3fill in blank
hardFix the error in the code to correctly add the value in register R3 to data table D7.
PLC Programming
ADD [1], D7Attempts:
3 left
💡 Hint
Common Mistakes
Using data table D3 as source instead of register R3.
Using memory bit or timer addresses incorrectly.
✗ Incorrect
ADD R3, D7 adds the value in register R3 to the value in data table D7.
4fill in blank
hardFill both blanks to create a loop that increments register R4 until it equals 10.
PLC Programming
INC R4 LD [1] CMP [2], 10 JNE LOOP_START
Attempts:
3 left
💡 Hint
Common Mistakes
Using different registers or data table addresses for load and compare.
Using memory bits instead of registers.
✗ Incorrect
LD R4 loads the value of register R4, CMP R4, 10 compares it to 10 to control the loop.
5fill in blank
hardFill all three blanks to create a data table that stores squares of numbers 1 to 5.
PLC Programming
FOR [1] = 1 TO 5 MOV [2], [1] MUL [2], [2] MOV [2], D[1] NEXT
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong variable names or registers.
Not moving the squared value to the correct data table address.
✗ Incorrect
Loop variable 'i' controls the loop. R10 holds the number, which is squared in R10 and moved to data table D1 to D5.
