While you compile the block and try to download your project to simulator,Sometime TIA will give some warning to you like this:
XXX cannot be simulated. If the block is a library block, use a library with simulation support. Otherwise, select the option “Support simulation during block compilation” in the project properties and recompile the block.
What you need to do, open your project and click the Peoperties.
go to the Protection>support and check the checkbox of “Support simulation during block compilation.”