I've created project for runtime and download it to my RPi. Now I want to count execution time of single program cycle. I also need to export stored measurements to .txt or .csv. First I started from adding simple code in main.cpp line 269 which purpose is export "2" to .txt file:
FILE *fptr = fopen("sample.txt", "w");
fprintf(fptr,"%d \n", n);
I didn't get any result in my file sample.txt after starting runtime on RPi. Is it possible to export anything from main.cpp in this way?
I also have problem with running the generated binary directly from the command line (it resides in OpenPLC_v3/webserver/core/openplc) - it doesn't open terminal.