Join us today!
library for folder and file management, free size, rename, oldest file...
Hello,
I am looking for a library for TwinCAT to handle folders and files, which knows the free size left on a hard drive, renames a file, knows the oldest file in case there is no space left on the hard drive, delete the oldest...
For now the libraries that I have found are the following: sysFile, Tc2_System
but they don't have everything I'm looking for...
Is there a more complete file management library or a project that manages this...
or how could i do it? If it is not possible with TwinCAT, it has also occurred to me to launch an external program that does it, but for now I want to exhaust the possibilities so that everything is centralized within the TwinCAT program...
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
Hello,
I am looking in TwinCAT how to know the size that a directory occupies or the free space that is left on a hard disk,
what I have found for now is to use FB_EnumFindFileList and in the ST_FindFileEntry structure the file size is found with this we would have to add the size of all the files found...
It is not valid because many PLC cycles are needed for it to give us all the files that are in a directory and thus be able to calculate the size that all the files occupy within a directory...
Is there an easier way to get it from TwinCAT?...
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
Hello,
I have found Beckhoff Device Manager, 0x8nn6 – Free space (Bytes) but I don't know how to access it through TwinCAT...
searching i found this video,
- [Webinar Przy Kawie 16: Czy Twój sterownik ma gorączkę? Diagnostyka IPC krok po kroku.]
https://www.youtube.com/watch?v=PY0L7lu-wDc
but I have realized that the MDP thing is not worth it either, since the hard disk is going to be a NAS server with linux 😭
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
Hi @runtimevictor, this project comes with a word of warning. Just because we can do something doesn't mean we should 🙂
NT_StartProcess is one of my favourite things to exploit. I often try to condense a whole PowerShell, ads router, program all in to the 510 character limit of this function block.
https://github.com/benhar-dev/tc3-drive-free-space
If you are interested in how I make this type of code, then also see this repo.
My blog: codingbytes
My code: https://github.com/benhar-dev
- 17 Forums
- 268 Topics
- 925 Posts
- 3 Online
- 738 Members