Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to declare a PID function block instance named 'pid1'.
PLC Programming
VAR
pid1 : [1];
END_VARAttempts:
3 left
💡 Hint
Common Mistakes
Using basic data types like INT or BOOL instead of the PID block type.
✗ Incorrect
The PID function block is declared by using the type 'PID'.
2fill in blank
mediumComplete the code to set the proportional gain (Kp) of the PID block to 2.5.
PLC Programming
pid1.[1] := 2.5;
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing Kp with Ki or Kd parameters.
✗ Incorrect
Kp is the proportional gain parameter of the PID block.
3fill in blank
hardFix the error in the code to assign the setpoint (SP) value 50 to the PID block.
PLC Programming
pid1.SP [1] 50;
Attempts:
3 left
💡 Hint
Common Mistakes
Using '=' instead of ':=' for assignment.
✗ Incorrect
In PLC programming, ':=' is used for assignment, not '='.
4fill in blank
hardFill both blanks to write the process variable (PV) and read the output (OP) of the PID block.
PLC Programming
pid1.[1] := currentPV; controlSignal := pid1.[2];
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing SP (setpoint) with PV or OP.
✗ Incorrect
PV is the process variable input, OP is the output signal of the PID block.
5fill in blank
hardFill all three blanks to configure the PID block with proportional gain 3.0, integral gain 0.5, and derivative gain 0.1.
PLC Programming
pid1.[1] := 3.0; pid1.[2] := 0.5; pid1.[3] := 0.1;
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing the order or names of gain parameters.
✗ Incorrect
Kp, Ki, and Kd are the proportional, integral, and derivative gains respectively.
