MVP 2022 Ausman Posted September 23, 2015 MVP 2022 Report Share Posted September 23, 2015 Hi all, is there a way I can delete incorrectly named files, or change the names of files being remotely read via card explorer? 1.0.3.17 working on a V130 in this case. I can find no way of doing this. For some reason, some log files I use have corrupted their names and I cannot delete them because I get the "file name not in 8.3 DOS format" message. It's a bit of a catch 22, because I can't change the name either. Other than doing it manually next time on site, is there a way? Could this be incorporated in future editions, to allow for such situations like simply changing names, which doesn't exist at present etc. Or is it simply that the PLC can't handle such a request for file changes like this..ie it can only work with the 8.3 format and you're stuck if it isn't correct? cheers, Aus Quote Link to comment Share on other sites More sharing options...
Jerther Posted October 13, 2015 Report Share Posted October 13, 2015 This is really annoying. We have such a file on an SD card located hundreds of miles away, and the file is causing another process to fail. Quote Link to comment Share on other sites More sharing options...
Alexander Posted October 13, 2015 Report Share Posted October 13, 2015 What are the file names being changed to? Does it still display the file name with the extension in the SD Card Explorer? Quote Link to comment Share on other sites More sharing options...
Jerther Posted October 13, 2015 Report Share Posted October 13, 2015 See here: http://screencast.com/t/djkskrr6q Quote Link to comment Share on other sites More sharing options...
Jerther Posted October 13, 2015 Report Share Posted October 13, 2015 Here's what happens when I try to delete the file via code: Exception: File name not in 8.3 Dos format at Unitronics.ComDriver.SD.checkNameLegality(String name, NameType nameType) at Unitronics.ComDriver.SD.deleteFile(String folderName, String fileName, Boolean& sdChannelLockInitiated, String& guid, ProgressStatusChangedDelegate del) at Unitronics.ComDriver.SD.DeleteFile(SdFolder sdFolder, String fileName, ProgressStatusChangedDelegate del) Quote Link to comment Share on other sites More sharing options...
Alexander Posted October 13, 2015 Report Share Posted October 13, 2015 We have not encountered this issue previously when testing, due to the inability to reliably replicate file corruption. Would it be possible for someone on site to manually copy the SD files and send them to support@unitronics.com for further assistance? Currently the system is designed to work with the intended file extensions and the nature of a corrupted file may not allow a read, write, rename, or delete function to operate as intended. If we can obtain the corrupted file we may be able to pass it to our R&D team for further review. Quote Link to comment Share on other sites More sharing options...
AlexUT Posted October 13, 2015 Report Share Posted October 13, 2015 Hi All, Corrupted/incorrect file names appears as result of corrupted file system on SD card. Sending files to Unitronics Support will not help, as you cannot copy such files/directories. Recommended corrective steps: -Copy from SD card all not damaged files to PC. -Eject SD card and run chkdsk at PC or Laptop. Check if any found files can be used. *restored files may be largest than data inside files. -Make full format of SD card in windows, preferred by Panasonic SDFormatter. Then format SD card from SD card tools with unchecked Windows check box. -Install SD card to PLC. -Check number of files in SD card directories to keep number of files not more than 60 (64 in root directories). -Use right protection contacts for each file function. -SD card file system will become corrupted, if power failure will happen in the middle of file operation. Use UPS to eliminate file system corruption. 1 Quote Link to comment Share on other sites More sharing options...
Jerther Posted October 13, 2015 Report Share Posted October 13, 2015 I have another SD card here with a corrupted file. I can't read the file, even from a pc with a card reader! Here's how to reproduce such a file: have the PLC (Vision 130) dump UDT files until there are about 30. (I believe just copying them would work also.) Then, in SD Card Explorer, delete them all in one go. At least one corrupted file will appear. If not, try again once. I've found that it is almost always consistent, so I try to delete files in batch of 10 max. We have this situation with three different sd cards, on three different PLCs in three different cities. I have it also here on our test PLC, and it happens while the power supply is steadily on. Quote Link to comment Share on other sites More sharing options...
AlexUT Posted October 14, 2015 Report Share Posted October 14, 2015 Hi Jerther and Ausman, I agree that this is annoying, when SD card file system become corrupted. You can send your projects to support@unitronica.com with explanation of steps, how to reproduce problem, and other details, used SD card size and manufacturer, files size, etc. We will review projects and attempt to simulate problems. By the way, do you use any SD card extenders, or SD card installed inside PLC? Quote Link to comment Share on other sites More sharing options...
Jerther Posted October 14, 2015 Report Share Posted October 14, 2015 Okay I've sent an email to the support team. I use the small slot for Micro SD cards located on the side of the Vision 130. Quote Link to comment Share on other sites More sharing options...
Alexander Posted October 15, 2015 Report Share Posted October 15, 2015 The limit for each folder is only 64 files. Attempting to store additional information past this limit will cause errors such as the file corruption. Although the folder may accept additional files if you attempt to write it will cause issues when trying to read, write, or delete folders which can cause the corruption as shown in your previous post. I would recommend using an incrementer that limits how many times the DT to SD function can be triggered. Once it logs it’s 64th file prevent any additional files from being created unless the SD card is cleared. The incrementer can then be reset and comparison statement will allow the function to operate again. If possible I would also recommend adding in the SD card is Present and SD cards is write enabled, SB 217 and 218 respectively, before the DT to SD write block. This will ensure that it will only execute the function if an SD card is detected and able to write information. By manually tracking how many files are written to the SD card this should prevent any possible data corruption in the future. Quote Link to comment Share on other sites More sharing options...
Walkerok Posted October 15, 2015 Report Share Posted October 15, 2015 I have a secondary question. I know that I can only have 64 files without the possible corruption of files. In todays technology can't we manage to either allow more files than 64 per folder or at least allow for more than 4 "Excel" folders. We have customers that 64x4 will only allow a customer to have a very short term of SD card data logging. In this case the customer is testing aircraft radiator sections and each and every part must have its own file name so that it can be stored with all of the other required files and paperwork relative to the specific part number tested for tracking. Thanks Keith Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted October 15, 2015 Author MVP 2022 Report Share Posted October 15, 2015 Hi all, the process I use for the write is described at the end of my post "Write table to SD with date stamp?" where I also have a jpg of the procedure etc. This has worked perfectly, the card is permanently mounted into the V130 slot and is just there for logging and backup storage. I prepared the card as Alex has described in #7, the system is stable and on a ups. I upload the logs at the most a month apart, and then delete the block, so that at no time am I anywhere near the 64 limit. In deleting the block, though, I perhaps have repeated the procedure that Jerther describes in post #8 to get the problem. It is interesting that his problem is a file with only 4 characters to the name, same as mine has ended up...see the jpg. I don't exactly remember how the file appeared, it was just noticeable next time I logged in to do the upload, and then I couldn't do anything with it remotely. But it is ok in my uploaded data storage off site, so it was fine at one stage. cheers, Aus Quote Link to comment Share on other sites More sharing options...
Jerther Posted October 21, 2015 Report Share Posted October 21, 2015 Could it be that once a corrupted file has appeared, even if the number of files drops below the recommended maximum, there is still a risk of file corruption? We have a case here where the number of files was over 64, a corrupted file appeared so we deleted enough files to drop the count to an acceptable amount but then, after a while, the PLC started reporting that files could not be opened due to possible corruption, even if there was only one file. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted October 21, 2015 Author MVP 2022 Report Share Posted October 21, 2015 Hi again all, I have a suggestion that would get around a lot of the issues involved here. Every single jigger in my life that writes to any card, be it SD, CF, TF etc.....all of them are innately able to do a format and prepare the card to the way they want it to be. This ability should be included within the PLC SD card options accessible via Info mode! It would make things so much easier. Instead of all the hoohah preparation we need to do with the card out of the PLC, we should be able to put the card in and let the unit prepare it itself. Such an improvement can't be that hard to implement, and the only thing that I can see it would need would be an extra password level be able to be set to prevent unauthorised formatting taking place. If this utility was available, it would be a very useful thing, as well as a work-around to the grief that is currently occurring. Cheers, Aus Quote Link to comment Share on other sites More sharing options...
Jerther Posted October 27, 2015 Report Share Posted October 27, 2015 I agree with Ausman. Although I might not say that it "can't be that hard to implement". As programmers, we should know that we can't judge until we actually see the code involved Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted March 24, 2016 Author MVP 2022 Report Share Posted March 24, 2016 Raising this one again with an observation that might help. I went to this site recently for checks and fixed the card issue whilst there. It was curious in that Windows could see the file in the correct window, but when I asked to delete it, I was told that the file didn't exist. Out of interest I ran a few workarounds including rename (couldn't work), disk checking (which told me it had fixed errors) etc but the problem remained...the file was visible but for the system to delete it was impossible because it wasn't there! I didn't bother trying in dos etc. Time was short so I simply lifted the relevant saves needed from the card, reformatted, and then wrote back before insertion. Obviously there was something fundamentally wrong with the file system on the card....I don't know enough about the way they work....but someone might consider this helpful. Maybe the delete procedure has a glitch where it can end it's process a little bit earlier than it should in certain circumstances? Anything involving SD card actions when inserted in the plc takes a verrrrryyyyyyyyy lonnnnngggggggg time, perhaps it is tied up in this? Cheers, Aus 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.
Note: Your post will require moderator approval before it will be visible.