Internet PLC Forum

General => Technical support => Topic started by: wjgerth on October 07, 2013, 09:17:55 AM

Title: Error Writing/Reading File
Post by: wjgerth on October 07, 2013, 09:17:55 AM
I am running the ExtendedFileSystem.pc6 program with no modifications to test a few things but the file write  and read functions give errors. I believe that the firmware is r79A. Basically I am in monitor mode and toggle the Make128File input I then look on the 0.html in a browser and click the refresh to see the outcome and it always shows File Write Failed.
I also copied a small file to the plc using filezilla and have changed the readfile function to the name of my file but when I try to read it I get a unable to open file.


What else can I try?
Title: Re:Error Writing/Reading File
Post by: wjgerth on October 07, 2013, 10:40:41 AM
Sorry I am using a Nano-10
Title: Re:Error Writing/Reading File
Post by: wjgerth on October 07, 2013, 11:49:47 AM
I have re-read the manual and example regarding the extended file system. I believe that my problem is that I do not have the memory upgrade, FRAM-RTC-256.

So is it possible to read a file that has been placed in the 60K memory via Filezilla, named t.txt? T.txt has a file size of 797bytes. I would like to use this file as a config file and read in a few values for use in the PLC program.

Thanks,
Bill
Title: Re:Error Writing/Reading File
Post by: support on October 07, 2013, 04:26:54 PM
The files in 0..9 and A... to Y are not accessible by the TBASIC program so unfortunately you can't use the file in the PLC program. Only file names Zxxx.???  (you are right that it requires FRAM-RTC-256) are accessible from the TBASIC.

You can however store some data into the pseudo EEPROM by using the EEPROM manager in i-TRiLOGI. You can store up to 1024 words into the pseudo EEPROM. After you have uploaded the data you need to RESET the PLC or trigger a flag in the PLC to run a custom function that execute the SETSYSTEM 252, 0 to force the CPU to save the pseudo EEPROM data into flash. These data now become non volatile and can be used by your program.