Author Topic: Error Writing/Reading File  (Read 12698 times)

wjgerth

  • Newbie
  • Posts: 6
  • Now I am a European Swallow!
    • View Profile
Error Writing/Reading File
« 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?

wjgerth

  • Newbie
  • Posts: 6
  • Now I am a European Swallow!
    • View Profile
Re:Error Writing/Reading File
« Reply #1 on: October 07, 2013, 10:40:41 AM »
Sorry I am using a Nano-10

wjgerth

  • Newbie
  • Posts: 6
  • Now I am a European Swallow!
    • View Profile
Re:Error Writing/Reading File
« Reply #2 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

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Error Writing/Reading File
« Reply #3 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.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS