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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...