Jump to content
Skout

Schedule daily and monthly data record

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 ?

 

Share this post


Link to post
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...