hello guys, i need a FIFO (First In First Out) instruction in the PLCnext ENGINNER for my program, i dont know if there is instructions on PLCnext enginner that are similar to FIFO, or i need to create it by C++, but i’m not programming enginner, i really dont know how to create funcition blocks on C++
Hello Ccnb_Innov_2022,
I would like to recommend to use the queue in C++ program. Queues are a type of container adaptors that operate in a first in first out (FIFO) type of arrangement: Queue in C++ Standard Template Library (STL) - GeeksforGeeks . If the C++ Program is implemented, you can instantiate it in PLCnEng and exchange the Data between IEC-Program and C++ Program via Port-variables. Please see the detailed instruction in PLCnextInfoCenter:
C++ programs in PLCnext Technology With PLCnext Technology, you can use programs created with C++ in the real-time context of a PLC along with conventional IEC 61131-3 programs. To use programs and program parts created in C++ within the scope of PLCnext Technology, Phoenix Contact provides tools and add-ins that help to integrate your C++ program in your real-time application in an easy way. Or you can download the “pcworx_basic_333” Library (see OSCAT - OSCAT-Basic). In extracted .zip file you will find the FIFO_32.ST or FIFO_16.ST Code, I assume it can be included/used in PLCnextEngineer (IEC ST Program).
I hope it can help you.
BR Eduard
Hello Eduard,
Wonderful , yes i see that the library is awesome there is lot of function.
i tried to download from library ( add user library) but i dont find the programs, i changed the exetention file from ST to PCWLX, it said that the file is damaged (MSG_PRJ0024).
it will help a lot if you show me the way to use this library.
i appreciate
Ccnb_innov_2022
That library was not written for PLCnext Engineer, so it can’t be imported directly as a library.
What Eduard is suggesting is to try and use the “raw” ST code from that library, in PLCnext Engineer. I’m not sure what format that library has, but worst case you can copy/paste the code from that library and use it as a basis for your own solution.
Hello,
Thank you guys for your support.The library is awesome, one of your colleague helped me to download the fucntion blocks on the PLCnextENGINNER, he helped me to change the ST files to .XML and import them like this ( File … import… import from PLCopen XML … select the XML file … and he wrote a data type array to run the FIFO ).I wish that will help other people to download and use other function blocks.