Jump to content

Recommended Posts

Posted

Hey guys,
I need to store files through the "Store DTI to File" Ladder function, but the more complicated is we need to generate them everyday ( everyday we have a new file ) named with the Date and Time it were created, and same for files that contains information for a month.
To make it brief, at the end of the month, the SD should contain about 30 files for the daily information, and 1 file for the month.

Do we really need to use the "Schedule" Ladder function?

Posted

Hi Skout,

To store Data Table files to SD, you have to use some kind of schedule.

You can use midnight condition at vector, starting SI 30. Then store file with required name.

Take care, that file name is in format 8.3.

8ASCII characters for name, and 3 for extension.

You can change only file name.

You can generate file name by RTC TO ASCII and leave 8 8ASCII characters.

I hope this helps.

 

Posted

Skout,

The solution on UniLogic is different (what mentioned on the last post is for VisiLogic),

As you mentioned the trigger for  saving the DT to the SD can be using a schedule.
Now, in order for the file name to contain the date and time you will need to use the attached RTC to ASCII UDFB (there you will select what kind of data you will get in the output of the UDFB), you can get more information in the UDFB comment.
In you case you will need to call the UDFB twice, first for the date and then for the time , then you will have to use the 'Insert string' element in order to create one string from both of the strings, and attach this string to the file name input,  when saving the file to the SD. 

I also attached a short example that uses the UDFB.
*In case you wish for some more information regarding the UDFB, you can view the UDFB webinar on the Unitronics website.

Hope it helps.

DT_date&time_Writing.ulpr

RTC to ASCII.ULLE

Posted

Hi Alex, Hi lirana

Thank you guys for your quick answer.

What lirana said seems to be more familiar to me, i will do it but the only issue is that next to the date and time i want something like that « AAAAMMJJ enreg » 

Do you guys think it is possible to work ?

 

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.