Generate a txt file

Is it possible to generate a txt file, and write something within when I activate one digital input from my I/O module? I’m programming with eclipse in c++.
Is there any documentation I could see?

Hello Ra,
you can exchange the process data via In/Out-Port -Variables between PLCnEng IEC61131program and C++ program:
CppExamples/README.md at master · PLCnext/CppExamples · GitHub
For text file creating and writing data, please find the following C++ example:
https://cplusplus.com/reference/fstream/ofstream/is_open/
BR Eduard