CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Fri Jul 20, 2018 10:59 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: time visualization
PostPosted: Fri Nov 30, 2012 3:42 pm 
Offline

Joined: Thu Jul 01, 2010 11:19 am
Posts: 30
I have a "TIME" variable to count how much time is working the PLC.

What should I write into the "Text" field to have the time divided in hours, minutes and seconds?

I have tried with %t but it does not work.

Actually I am doing it with %s and I just see the values on minutes and seconds.

Thanks for your help


Top
   
 Post subject: Re: time visualization
PostPosted: Fri Nov 30, 2012 6:58 pm 
Offline

Joined: Thu Nov 15, 2012 11:22 pm
Posts: 24
With your visualization open, choose Extras:Settings:Date/Time. What do you see for the TIME/TOD field? Is Formatted time display checked?


Top
   
 Post subject: Re: time visualization
PostPosted: Mon Dec 03, 2012 8:46 am 
Offline

Joined: Thu Jul 01, 2010 11:19 am
Posts: 30
Where is that "Extras" tab? I am working with a CoDeSys v3.4

Thanks Musashi Aharon


Top
   
 Post subject: Re: time visualization
PostPosted: Mon Dec 03, 2012 1:06 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 985
in 2.3 it is %t this will give system time.

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype shooter paul.deelen
phone +31736139136


Top
   
 Post subject: Re: time visualization
PostPosted: Mon Dec 03, 2012 3:59 pm 
Offline

Joined: Thu Nov 15, 2012 11:22 pm
Posts: 24
Andoni Crespo wrote:
Where is that "Extras" tab? I am working with a CoDeSys v3.4

Ah, sorry. I'm on V2.3.


Top
   
 Post subject: Re: time visualization
PostPosted: Mon Dec 03, 2012 4:19 pm 
Offline

Joined: Thu Jul 01, 2010 11:19 am
Posts: 30
Do not worry, it´s OK.

I have tried %t but it does not work on v3.4, in the visualization appears a "t"


Top
   
 Post subject: Re: time visualization
PostPosted: Tue Jul 18, 2017 8:11 am 
Offline

Joined: Tue Mar 21, 2017 8:07 pm
Posts: 4
Is this problem solved?
Im also facing this issue...Kindly help me solve this.

Thanks
arrvvii


Top
   
 Post subject: Re: time visualization
PostPosted: Fri Jun 01, 2018 3:04 pm 
Offline
User avatar

Joined: Fri Jan 19, 2018 3:38 pm
Posts: 8
Though a bit late, here the solution as found in the codesysv2.3 help;

If you enter "%t", followed by a certain sequence of special placeholders, then this location will be
replaced in Online mode by the system time. The placeholders define the display format, see the
following table. Attention: Do not insert any other characters before %t in the 'Content' field (in
contrast this is allowed for e.g. "%s", see above)
%a Abbreviated weekday name
%A Full weekday name
%b Abbreviated month name
%B Full month name
%c Date and time representation appropriate for locale
%d Day of month as decimal number (01 – 31)
%H Hour in 24-hour format (00 – 23)
%I Hour in 12-hour format (01 – 12)
%j Day of year as decimal number (001 – 366)
%m Month as decimal number (01 – 12)
%M Minute as decimal number (00 – 59)
%p Current locale’s A.M./P.M. indicator for 12-hour clock
%S Second as decimal number (00 – 59)
%U Week of year as decimal number, with Sunday as first day of week (00 – 53)
%w Weekday as decimal number (0 – 6; Sunday is 0)
%W Week of year as decimal number, with Monday as first day of week (00 – 53)
%x Date representation for current locale
%X Time representation for current locale
%y Year without century, as decimal number (00 – 99)
%Y Year with century, as decimal number
%z, %Z Time-zone name or abbreviation; no characters if time zone is unknown
%% Percent sign

Examples:
%t%a %b %d.%m.%y %H:%M:%S
-> Display in online mode: Wed Aug 28.08.02 16:32:45

Between the placeholders you can insert any text strings:
%Today is %d.%m.%y
-> Display in online mode: Today is 28.08.02

_________________
https://github.com/Aliazzzz


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited