Just to start filling this forum with usable content, I did attach a small python script which creates function block suitable for the IEC Unit Test feature of the CODESYS Test Manager. This simple example tests a function called "BoringAddition" against a bunch of reference values.
The intended usage scenario is: You have some algorithm implemented in IEC (e. G. some mathematical function) and want to test it against a table of reference values.
You can use this example script as a base to generate your own test function blocks, import them into a testbed project, and run them via the IEC unit test feature as part of your automated test suite.
Note that the generation and import can also be triggered as part of the automated test run, as the Test Manager includes actions to execute external commands, python scripts, and import objects.
Check out the CODESYS store: http://store.codesys.com/CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions