Pro and contra of variable process image
Voted best answer
In Freelance the I/O task and the user application tasks run asynchroneously and with different cycle times. The I/O task usually runs as fast as possible, the user task's cycle time is configured by the user. Typically the user task's cycle is 10 or more times longer than the I/O cycle. The fast I/O cycle is needed, because the digital control theory assumes that inputs and outputs are read/written at the same time and the calculation time is zero. That can be approximated by the 10 times I/O oversampling and task cycle times being long compared to the task execution time. If the digital control theorem is not met, control quality (like for a PID controller) will suffer.
The zero execution time of the theorem also means, that inputs do not change during the execution. Here comes the proces image into the picture.
When a user tasks starts, the first thing is, that the process image copies all Inputs from the memory into the process image thus freezing the inputs for the tasks application execution. Second the task's application is calculated which produces the outputs and stores them in the process image. As a third step, after the task's application calculations are done, the created output values are written back from the process image to the memory, where the I/O task picks them up during its next cycle and sends them to the outputs.
If you do not use the process image, the inputs and outputs are directly read from or written to the I/O memory, when the function block, that uses the input and creates the output, is calculated. That can lead to the fact that the same input value (if used several times during a task execution by different function blocks) has different values each times it is used, especially if you have a fast process. That might create a problem, depending on your application.
Another benefit of the process image is, that it allows for output consistency. Assume you need to calculate a value pair (in the sense that both belong together like the X/Y coordinates of a data point). Without the process image you could have the situation that X is calculated and taken by the I/O task together with the old Y value which belongs to the previous X before the correct Y value is calculated.
The use of process image prevents this type of problems.
One could argue then: Why do you offer at all to not use it?
Well the reason is that in some cases speed is more important than consistency and quality. If the task cycle is 500 ms and the task execution is 50ms with I/O cycles of 2 ms (Freelance rack I/O, binary signals) then, by not using the process image for creating an emergency binary signal, a switch-off can happen several milliseconds earlier, than with the process image.
Having said all that let me point out, that if you have a slow changing process (slow compared to the task and I/O cycle) you might not see any difference between using the process image or not using it, but with the process image you are always on the save side.
Hope that helps.