Simulating PID_Compact V1 with PLCSIM (S7-1200, S7-1500) - PID

Using PID_Compact (S7-1200, S7-1500)

ft:publication_title
Using PID_Compact (S7-1200, S7-1500)
Product
PID
Version
V20
Publication date
11/2024
Language
en-US
Simulating PID_Compact V1 with PLCSIM

Note

Simulation with PLCSIM

For the simulation with PLCSIM, the time behavior of the simulated PLC is not exactly identical to that of a "real" PLC. The actual cycle clock of a cyclic interrupt OB can have larger fluctuations with a simulated PLC than with "real" PLCs.

In the standard configuration, PID_Compact determines the time between calls automatically and monitors them for fluctuations.

For a simulation of PID_Compact with PLCSIM, for example, a sampling time error (ErrorBits = DW#16#00000800) can therefore be detected.

PID_Compact switches to "Inactive" mode (State = 0) in this case.

To prevent this from happening, you should configure PID_Compact for simulation with PLCSIM as follows:

  • sb_EnCyclEstimation = FALSE

  • sb_EnCyclMonitoring = FALSE

  • sPid_Calc.r_Cycle: Assign the cycle clock of the calling cyclic interrupt OB in seconds to this tag.