Jump to content

Recommended Posts

Hi all,

I'm saving datas in a SD Card thanks to Visilogic. I've a problem with the file's name saved :

I want its name to be the value in ML4-NumAffaires. For exemple it can be 83178.

But instead of having this, I've -D-. 

I think it's a problem of space and conversion, but I don't manage to fix the problem.

Thanks in advance for your help

Capture.PNG

Link to comment
Share on other sites

  • MVP 2023

The name will be a string that is the ASCII equivalent of the values 8 characters long.  It does not do a literal translation of the decimal number.  You will need to enter the values in hex.

One byte is needed per character, so an ML can hold four characters.  In your example, the name would be held in ML 4 and ML 5.  I wouldn't have them power up to zero, as ASCII (0) is a null.

The ASCII table is in the Unitronics Help and can also be found at asciitable.com.

So for your example - 83178 - the ASCII characters needed in hex are 38 33 31 37 38 00 00 00.

So ML 4 needs to contain 38333137h and ML5 needs 38000000h.

I'll leave the rest to you as an exercise.  Let us know what you come up with.

Joe T..  

 

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.