
The Function Block PRESIM_CTRL controls a Presence Simulation. This is configured in the context menu under Automation Presence Simulations. Without complete configuration, the Function Block has no effect.
The simulation works as a ring buffer. This means: If for example 7 days are configured, the last 7 fully recorded days will be played back when playing.
Note: All days must be fully recorded to test the simulation.
The recording of a day is completed as soon as the next calendar day begins. Subsequently, existing data is overwritten if it comes from the oldest recorded day. If nothing was recorded on a day, no actions are performed on that day and the existing recording remains intact.
Note: The Function Block controls only the service. It has no influence on the PLC load.
Warning: When changing the time zone, the presence simulation is restarted.
If the input is true, this plays back the recorded data immediately. If a light was on at that time of day, it will be switched after initialization. Depending on the size of the stored data, this can take a few seconds. Since the current recording is discarded as a result, the input should not be turned on and off too often.
The parameter input defines the duration in days of the recording as a number. The parameter can be changed continuously. It should be noted that the days are calculated from the UNIX time and may therefore not be synchronous.
Tip: Give the user the option to define only the number of weeks by multiplying them with 7. Limit the recording, for example, from 7 to 21 days.
The input RESET deletes all recordings immediately and stops the recording and playback.
If the input is true, the entire Function Block is deactivated. All other inputs are then ineffective. The recording and playback will then be stopped.
The output is true when the recording has started. If the value is false, continuous recording is in progress. To deactivate, the input DIS must be true.
The number of recorded days are output with the output as a number. If the value -1 is present, the recording has not yet started or no action has been recorded.