__sub__g Posted July 18, 2022 Report Share Posted July 18, 2022 My program is saving CVS file. I want to display the memory of the SD card in HMI. (E.g., 2 Gb used from 4 GB) Is there a way to do that? Any help would be highly appreciated Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted July 18, 2022 MVP 2023 Report Share Posted July 18, 2022 You can try to use SDW59 SDW 59 SD Card: Free space (bytes) Capacity given in 512-byte chunks. The value is written when SB 217 turns ON, and is updated at each write operation. The operand is reset when SB 217 turns OFF. Initialized at Power-up. 1 Link to comment Share on other sites More sharing options...
__sub__g Posted July 19, 2022 Author Report Share Posted July 19, 2022 @kratmel thank you for your help. I tried to use this in program but I got asterisk mark.(***) Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted July 19, 2022 MVP 2023 Report Share Posted July 19, 2022 You should understand that the number calculated in sdw59 is not the remaining volume, but the volume expressed in elementary particles of 512 bytes. Therefore, first put the number of sdw59 with a huge (maximum number of digits) length on the PLC screen. Then, after seeing what you got - multiply it by 512 bytes (start with a simple calculator) - you will have a number that corresponds to the free space in bytes. It is number that you must convert into megabytes and then gigabytes and display on the screen. By doing all the listed actions hidden in the program, you should get what you want in gigabytes. However, there is a problem - whether the numbers with which you will work will overflow. Link to comment Share on other sites More sharing options...
__sub__g Posted July 19, 2022 Author Report Share Posted July 19, 2022 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted July 19, 2022 MVP 2023 Report Share Posted July 19, 2022 That will NOT work. You will overflow your MI. Use DWs. 1 Link to comment Share on other sites More sharing options...
__sub__g Posted July 19, 2022 Author Report Share Posted July 19, 2022 @Flex727 thank you for your help 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