Jump to content
OMRON Forums

Problems with writing files to a mounted network folder on ARM CPU controllers


Recommended Posts


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) {
        return 0;

    printf("Ok 1\n");
    for (i = 0; i < 1000000; i++) {
        fprintf(fp, "%d\n", i);

    printf("Ok 2\n");

    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

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Posted Images

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...