Jump to content

Recommended Posts

Hello , I try to save the values ​​on an SD card into an Excel spreadsheet and I want these valaurs be associated with the date and time of recording .
I know he must use the block ' RTC to ASCII ' . except for the date it works well , but for now not at all, and I do not understand why.

I enclose my blocks. 

When I record my values ​​MI150 MI151 = time = date and MI100 = value , I get a time that is written 1129/01/15 , which does not correspond at all to an hour hh: mm: ss

Thank

 

rtc to ascii.bmp

Link to comment
Share on other sites

Hi,

As you probably know, ASCII is protocol for characters representation. Every character is stored in one byte of data. In visilogic, ASCII strings are stored to MI's, hence two characters in a single MI.

For a full date to be represented, you need to store 9 characters (8 for the actual date + NULL character), which translates to 5 MI's. This information also appears on the format selection in the RTC to ASCII function block.

So, in your application the date should be stored in MI150-154, and the time should be stored in MI155-159 (or anywhere you like).

Link to comment
Share on other sites

  • 2 weeks later...

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...