Industrielle styresystemer - Wiki
...
And the outputs needs to be,
This Function block could have been a Function. However, to make it easy to expand on the function block in the future, it was created as a Function Block.
The coded implementation looks like this,
Visually the new function block looks as following,