Jump to content

Recommended Posts

Posted

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

Posted

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

  • 2 weeks later...

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.