Jump to content

RTC time to String


Rob Miller

Recommended Posts

I'm brand new to UniLogic so it's probably right in front of me and i can't find it.

How do i get a string of the date & time? I see the RTC Date and Time system tags that consist of the parts but i need to get a strings of mm/dd/yyyy and hh:mm:ss

Also, is there a way to concatenate strings? I'd like to save a data table to a SD file based on a user input name, ascii date, ascii time (name_mmddyyyy_hhmmss) 

 

Link to comment
Share on other sites

  • 6 years later...
  • MVP 2023

I'm assuming you're working with a UniStream.  This PLC does not have a native RTC to ASCII function.   Read up on UDFBs (User Defined Function Blocks) in the Help - these are loadable functions written in ladder code.  Flex has posted a UDFB file above that you can load into your PLC to get the functionality you're looking for.

Joe T.

Link to comment
Share on other sites

On 5/14/2024 at 10:10 AM, Paar said:

where do I find the rtc to ascii code?  I'm a new unitronics user and have no idea where to find it

Thank you for your help!!

Link to comment
Share on other sites

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.