Jump to content
OMRON Forums

put and read a file (.txt) into PMAC flashmemory


Recommended Posts



i have a aplication on windows 7 that generate a output file in .txt format.

I need that the pmac have acces to this file to read and load global variables with the information.


I try put file using the ftp ( but i dont have succes.


i create a C aplication into pmac using libraries






but i have dude with the path to acces a file. if you can give me a example how to put the path and where is the best place to put the file.




int main(void)


FILE * fp;

char * line = NULL;

int len = 0;

int read;

struct Data data;




fp = fopen("test.txt", "r");

if (fp != NULL){

while ((read = getline(&line, &len, fp)) != -1) {

data = getValue(line, read);



if (line)




return 0;


Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

If you place the file in the ftp top level directory it should be located in /var/ftp. So pass the full file path to fopen:


fp = fopen("/var/ftp/test.txt", "r");



thanks for your answer.


I try but when i put the file into the ftp folder the system throw the attached problems.


how can i enable and wich is the best folder to put the file?


thanks again




Link to comment
Share on other sites

I am able to drag a text file into gather or usrflash no problem on multiple PMAC CPU types through ftp in a file explorer like your computer shows. What PMAC form factor is this and can you share the file or try with a dummy text file with just a sentence written?


the Pmac is POWER PMAC CLIPsee P233I-E-01 [4-4050JA0-310-000000] and the text file (.txt) that i tried put was:




Link to comment
Share on other sites

I am not able to replicate your problem. Please try using an FTP client like filezilla as windows file explorer as FTP can have some issues.


There is a windows option you can try to see if it helps. Find "internet options" in either the control panel or searching the start menu. Go to the advanced tab and scroll down to "Use passive FTP (for..." and check/uncheck the box. If it doesn't help, just set it back.


Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...