__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 Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted July 18, 2022 MVP 2022 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 Quote 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.(***) Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted July 19, 2022 MVP 2022 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. Quote Link to comment Share on other sites More sharing options...
__sub__g Posted July 19, 2022 Author Report Share Posted July 19, 2022 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 19, 2022 MVP 2022 Report Share Posted July 19, 2022 That will NOT work. You will overflow your MI. Use DWs. 1 Quote 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 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.