PID controller – simulation and manual operation
Insert a PID controller, explore proportional control in simulation and set the output manually.
1. Measured value, setpoint and output
IST is the measured value, SOLL is the desired setpoint, and STELLGRÖSSE is the controller output, such as a heating-power command. This exercise uses numbers without a device connection. The original screenshots show the German interface.
The proportional term responds to the current error. The integral term accounts for error over time; the derivative term responds to changes in the measured value. We start with Ti = 0 and Td = 0, disabling active integral and derivative action.
2. Insert the controller
Select Structure → PID controller and place the object on the page. A newly inserted controller initially displays its default values and PLC execution mode. Simulation is configured below.
3. Open object properties
The example uses X = 20, Y = 130, width = 340 and height = 144. Text / initial value sets the controller heading.
The standard process variable supplies the measured value. Leave these fields empty for this simulation. Click PID-Regler einstellen to open the controller settings. Assign area assigns the object to a tab, collapsible area or scroll area.
4. Configure the simulation
| Setting | Exercise value |
|---|---|
| Execution location | Simulation only (Nur Simulation) |
| Kp | 2 |
| Ti in seconds (0 = off) | 0 |
| Td in seconds | 0 |
| Sample time in ms | 500 |
| D filter, 0 to 1 | 0.2 |
| Output minimum / maximum | 0 / 100 |
| Safe output | 0 |
| Measured-value timeout in seconds | 2 |
| Initial setpoint | 50 |
| Manual output | 0 |
Leave the setpoint and output PLC assignments empty as well. Click Apply in the PID dialog and then in the object properties. Save the project.
These values are for this simulation exercise. The D filter has no effect here because Td = 0. The output limits restrict the calculated output to 0 through 100.
5. Test proportional control with F5
- Start test mode with F5. Check that SIMULATION and AUTO are displayed.
- Keep SOLL at 50. Enter 40, then 45, then 50 in IST, confirming each entry with Enter.
- Allow a moment for the next calculation after each entry.
| IST | SOLL | Output |
|---|---|---|
| 40 | 50 | 20 |
| 45 | 50 | 10 |
| 50 | 50 | 0 |
For this sequence after startup, output = 2 × (setpoint − measured value). A smaller error produces a smaller output. When measured value equals setpoint, the output is 0.
Simulation calculates the controller output but does not simulate a connected plant. The measured value does not rise by itself; you enter it manually. This exercise does not require a Modbus simulator.
6. Set the output manually
- Keep measured value and setpoint at 50.
- Click AUTO to switch to HAND (manual).
- Enter 30 in STELLGRÖSSE and confirm with Enter.
The output stays at 30 even though measured value and setpoint are equal. Manual mode holds your output command and pauses automatic calculation. Manual values are clamped to the configured output limits.
Returning to AUTO: The change is designed for bumpless transfer, using the current output as its starting point. Do not expect an immediate drop from manual output 30 to 0, even with Ti = 0. The numeric sequence above describes the exercise before this transfer.
7. Understand the three execution modes
| Execution mode | Meaning |
|---|---|
| PLC (SPS) | PamaGlawe displays and operates the controller; the PLC performs the calculation. Manual/automatic switching takes place in the PLC itself. |
| Local PID on this computer | PamaGlawe calculates periodically and writes the output to the configured device. |
| Simulation only | PamaGlawe calculates without writing to a device. The measured value is editable in test mode. |
For device connections, assign the measured value in object properties. Setpoint and output have separate assignments in the PID dialog. Local mode requires an output target, which must not use the same device address as the setpoint or measured value.
The dialog explains that Windows is not a real-time system. Local control is intended only for slow processes that are not safety-critical. Time-critical or safety-related control belongs in the PLC. This chapter covers simulation operation, not commissioning a real plant.
8. Troubleshooting
- Measured value cannot be edited: Check test mode, Simulation only, and PID operation permissions when user management is enabled.
- Output cannot be edited: Switch from AUTO to HAND.
- No response to an entry: Confirm it with Enter.
- Different results: Check Kp, Ti, Td, setpoint and output limits. Account for any previous transfer from manual to automatic mode.
Controller parameters and initial values are saved with the project. Runtime inputs change the current controller state; they do not replace the configured initial values.