RafaelFalcaro Posted December 7, 2023 Share Posted December 7, 2023 Hi, I've set up a network folder on my PowerPMAC and when I try to write files to it via BGCPLC, the controller goes into WatchDog. I did a more simplistic test, outside the PMAC environment, by creating a C program and compiling it in the controller's Linux environment. When running, the same problem occurs (the controller goes into WatchDog). Here is the program used: #include <stdio.h> int main(int argc, char *argv[]) { FILE *fp; int i = 0; fp = fopen("/mnt/data/test.csv", "w"); printf("Ok 0\n"); if (fp == NULL) { printf("Fail\n"); return 0; } printf("Ok 1\n"); for (i = 0; i < 1000000; i++) { fprintf(fp, "%d\n", i); } printf("Ok 2\n"); fclose(fp); printf("Ok 3\n"); return 0; } When run, the program creates the file correctly, and goes through the instructions up to the debug message "Ok 2". After that, communication with the controller is lost due to the error. I imagine that the "fclose()" function is causing the problem. Here is my controller configuration: Here is my /etc/fstab file used to mount the network folder: Here is the permission level of the mounted folder: PS 1: I did the same test with a controller with a PowerPC CPU and the problem didn't occur PS 2: I did the same test on different networks, knowing that some were more overloaded and others much less so PS 3: writing to a original folder on the controller (such as /tmp) everything works correctly PS 4: using linux programs (such as nano, touch etc.) to write files to the network folder everything works correctly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.