C++ Time Delay/Wait Fuction
I'm writting a c++ program to run the plcnext controller and I want to know what is the best way to add a wait funtion. In the orginal code I used
#include
Sleep(20);
For a 20ms delay but when I moved the program into eclipse it shows an error message next to the include saying "unresolved conclusion" and then error next to Sleep(20); can I still build the program as it and it still work or do I need to use a different alternative?
Image of code is attached
#include
Sleep(20);
For a 20ms delay but when I moved the program into eclipse it shows an error message next to the include saying "unresolved conclusion" and then error next to Sleep(20); can I still build the program as it and it still work or do I need to use a different alternative?
Image of code is attached
Comments
I can see, that you included the Window API (windows.h) in your project. Please note, the Linux operating system is installed on the PLCnext Controller. You can use functions described in PLCnext C++ API documentation and standard C/C++ librarys.
Please delete the "#include <windows.h>" and replace the "Sleep(20);" with "sleep(20);"
Best Regards
Eduard