Jump to content

Display SD card memory on screen


Recommended Posts

  • MVP 2023

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.

  • Like 1
Link to comment
Share on other sites

  • MVP 2023

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.