Meeg Posted May 27, 2016 Report Share Posted May 27, 2016 Hello. I have a problem that might be related memory capability in the SDcard. Suddenly (after a Power Off/Reset) all my trends stopped. When I open the trend it is empty and the Run/stop button displays Run. If I press the Run button nothing happens, but I am still able to open and view the "History" trends. Also all my trends had status -3; Save file error (File name may contain illegal character) (my file names are the same as when the trends was working). In my Project I use 12 data samplers/trends, 4-8 REAL variables in each trend, sampling interval 1s - 1min.The trends had been running for several weeks when the problem occured. After I changed my SD card to a new (empty) one, the trends worked again. So I assume that the problem was related to running out of memory on the SD. My SDcard is 16GB Do I have to delete history files from the Unilogic program to avoid running out of memory, or is this automaticcaly handeled by Unilogic? If I have to do it from the Unilogic program, do you have any examples on how to do this? Thanks! Link to comment Share on other sites More sharing options...
Saragani Posted May 29, 2016 Report Share Posted May 29, 2016 Did you actually see that the SD Card ran out of memory? (Maybe you still had lots of GB free). If you did see that there was no free space left, then this can explain the behavior. Link to comment Share on other sites More sharing options...
Meeg Posted May 29, 2016 Author Report Share Posted May 29, 2016 You were right. My SD card had plenty of memory left (14GB of totally 16GB) when I checked it on my PC. So that was not the cause of the problem. But still, after I changed my SD card to a new (empty) one, the trends worked again.... My questions are also still relevant: Can used/free memory be checked from the system? (I could not find any function for this under UNIapps) Do I have to delete history files from the Unilogic program to avoid running out of memory, or is this automaticcaly handeled by Unilogic? If I have to do it from the Unilogic program, do you have any examples on how to do this? Thanks Anders Link to comment Share on other sites More sharing options...
Saragani Posted May 29, 2016 Report Share Posted May 29, 2016 Can you try your old SD Card again? (Maybe it will work again) Q: Can used/free memory be checked from the system A: In the System tags, there is "External Storage" which contains: Is SD Present SD Used Space (%) SD Used Space (KBytes) SD Capacity Etc... As you've said, you have 14GBs free space. So you have used 2GB for logs (Maybe less... I don't know if you have external media, like audio and video, or maybe other files on your sd card that consumed space, and as much as I remember 16GB doesn't really means that you have 16GB free on a clean SD, but less). You will have to delete the files eventually. UniLogic and UniStream will never delete a file without you requesting for it. There are Ladder Elements for handling files. search for Delete File in the ladder toolbox. You will have to know the specific file name for deletion. You can also delete it with the File Browser HMI Element (So this is done manually, by the user, other than an automatic code that is executed by ladder). Link to comment Share on other sites More sharing options...
Meeg Posted May 31, 2016 Author Report Share Posted May 31, 2016 Thank you! That helped a lot! But my worry is still the same: A common problem with trend tools is that they, after some time, fill upp ALL available Storage (and then fail) Hence they often have som kind of automatic delete function. This is usually triggered either by the age of files or by total memory used. As far as I can see the, the samples files are named automatically by the system including date and time (Example; FT_26_05_16__03-51-33.uspm), so there is no way this can be deleted automatically from the ladder (since the file name must be known),. One may offcause be to read the filename in the file browser and then Write it in to a text string, but it might be hundreds of files.... However, it seems to me that the system sometimes deletes files automatically, is this correct,? If so what is the criteria used by the system for deleting files? Regards Anders Link to comment Share on other sites More sharing options...
Saragani Posted June 1, 2016 Report Share Posted June 1, 2016 Hi, in the Data Sampler struct, there is a member called: Filename. As written in the description of this member: The user can set a filename. If left empty, the PLC will select the name. This gives you the ability to select the name that you want. However, you will need to give a different name each time the sampler is starting to re-sample (for example, it saved data to file, and continues sampling). For example, add indexing to the file name. And when you decide to delete, then you know that you need to delete, for example, indexes 1 to 17, There isn't, as far as I know, anything in the system that deletes files automatically. I'll add a feature request of searching files by names, or by dates Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now