Read an SMLC CoDeSys file's last modified date
Categories

Read an SMLC CoDeSys file's last modified date

The Last Modified date returned by SysFileGetTime is in UTC time. This function returns the value in local time.

It often necessary to display the last modified date for a file. However, the CoDeSys SysFileGetTime function returns the timestamp in UTC (formerly known as G.M.T.) which can be misleading. FILE_DATE reads the file date and converts it to local SMLC time. The function can easily be modified to return the Date Created or the LastAccessed date.

To used the function:

1) Download the FILE_DATE.EXP file and use the CoDeSys Project | Import menu item to import it into your project.

2) FILE_DATE will be placed in the Functions folder of the POU's tab in the Object Organizer.

3) A second function, GET_UTC_OFFSET, which is used by FILE_DATE will also be imported.

4) The output from FILE_DATE is a 32 character string ideal for display on an MMI-series touch screen HMI.

RSS
Archive

Archive by Years
Sitemap
eNews Signup
Trademarks
Privacy StatementTerms Of UseCopyright © 2008-2015 ORMEC Systems Corp.