 |
plc.myforum.ro PLCs users www.plc.myforum.ro!
|
| View previous topic :: View next topic |
| Author |
Message |
seekon Junior

Joined: 20 Feb 2014 Posts: 4
|
Posted: 20/02/2014 08:42 Post subject: Changing the Twincat PLC time? |
|
|
Hi All,
I am frankly quite new to PLC's and HMIs, and have been tasked to change the time of the clock in the PLC. We currently are using Beckhoff TwinCAT PLC 2.10 with Proficy HMI/Scada ifix 4.0. The project is currently running on a production line, the project was completed by another company, who is very difficult to get a hold of for support.
Currently our production reports show downtime to be off by 1 hour. The HMI time is correct but the PLC time is probably off.
1. Where would I find the date and time info?
2. Once I find and adjust the time, I assume I need to rebuild the project, can you you provide the basic steps to get the time adjusted?
Sorry for such a newbie question |
|
| Back to top |
|
 |
vakulina Member

Joined: 27 Dec 2013 Posts: 167
|
Posted: 21/02/2014 21:28 Post subject: Re: Changing the Twincat PLC time? |
|
|
| seekon wrote: | Hi All,
I am frankly quite new to PLC's and HMIs, and have been tasked to change the time of the clock in the PLC. We currently are using Beckhoff TwinCAT PLC 2.10 with Proficy HMI/Scada ifix 4.0. The project is currently running on a production line, the project was completed by another company, who is very difficult to get a hold of for support.
Currently our production reports show downtime to be off by 1 hour. The HMI time is correct but the PLC time is probably off.
1. Where would I find the date and time info?
2. Once I find and adjust the time, I assume I need to rebuild the project, can you you provide the basic steps to get the time adjusted?
Sorry for such a newbie question |
Some hints in Beckoff infosys...
FUNCTION_BLOCK NT_SetLocalTime
NT_SetLocalTime
The function block "NT_SetLocalTime" sets the local Windows system time of the TwinCAT system (the local Windows system time is displayed in the task bar).
VAR_INPUT
| Code: | VAR_INPUT
NETID :T_AmsNetId;
START :BOOL;
TIMESTR :TIMESTRUCT;
TMOUT :TIME := DEFAULT_ADS_TIMEOUT; |
http://infosys.beckhoff.com/english.php?content=../content/1033/tcplclibutilities/html/tcplclibutilities_nt_setlocaltime.htm&id=20471
FUNCTION_BLOCK NT_GetTime
NT_GetTime
The local Windows system time of a TwinCAT system can be obtained using the "NT_GetTime" function block (the local Windows system time is displayed in the task bar). The year, month, day, day of the week, hour, minute, second an millisecond are placed in the variables in the structure TIMESTRUCT. Internally, an instance of the ADSREAD function block is called.
VAR_INPUT
| Code: | VAR_INPUT
NETID :T_AmsNetId;
START :BOOL;
TMOUT :TIME := DEFAULT_ADS_TIMEOUT; |
http://infosys.beckhoff.com/english.php?content=../content/1033/tcplclibutilities/html/tcplclibutilities_nt_gettime.htm&id=20470
FUNCTION_BLOCK FB_LocalSystemTime
FB_LocalSystemTime
In some applications the local Windows system time is synchronised via the SNTP time server or a radio clock. The local Windows system time (the local Windows system time is displayed in the task bar) often has to be used in the PLC (e.g. for time stamp log messages to the HMI). For such applications the FB_LocalSystemTime function block can be useful.
http://infosys.beckhoff.com/english.php?content=../content/1033/tcplclibutilities/html/tcplclibutilities_fb_localsystemtime.htm&id= |
|
| Back to top |
|
 |
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro
|