Here is an example of PLC program & testing it in Virtual Environment. Here the component is a “Buffer Unit” from standard VC Library. After some rework the component is good to function with the PLC program . The order of execution of this Buffer unit is LIFO. Here is the link with Detailed explanation: