Ewon Flexy FTP and clock synchronization

Hi,
on some projects we have a software Topkapi of AREAL with many Flexys.
Topkapi connects on the Flexy by FTP to take the DATA.
Is it possible to do a clock synchronization on the Flexy by this connexion ? By FTP ? A command ?
(If yes, we will see with AREAL if they can add this command on their protocol)

If not, I suppose the solution is to have tag day/Month/year and hour/min/sec by modbus or other protocol (even FTP), and we do a script to write the clock each day on the Flexy ?
An example ?

If we want to use NTP server, is it possible to use it by WAN and LAN, both ?
I suppose with talk2M, you have a NTP server to use with it ? Which ?
I we use Efive or other, no Talk2M, do you have a NTP server to use for the Flexy ?

Maybe another good method for a clock synchronization ?

Thank you,
RĂ©mi

You should be able to connect to any NTP server and have your clock be synced as long as you have an internet connection or local NTP server.

These can be setup either in the system wizard, or in the setup>system>Main>Net Services>NPT

Hi,
many questions don’t have answer.
I know where was the NTP parameter.
Do you can answer correctly to all my questions ?
Thank you,
RĂ©mi

Hi Remi,

I’ll need to get back to you on the clock syncronization with FTP

Writing a script to get the time by grabbing the DDMMYYYY Minute Seconds
The following page should help you with setting up the Basic script as well as setting up differences for month/day ect.

Can use both a LAN NTP server or a WAN server, cannot use both at the same time

For Talk2M, the NTP server we use is ntp.talk2m.com

the Talk2M NTP server is the one that we use by default for Flexy/Ewon/CD devices.

If you use Efive, it doensn’t need to be the Talk2M server, you can choose your NTP server.

There may be other methods for clock syncronization, but we recommend using an NTP server.

Hi, thank you.
I am waiting to your confirmation for the FTP.
For the WAN, LAN and the NTP, how works to know what connexion will be use ?
The Flexy tries on the connexion if the WAN is connected and it tries on LAN if this test doesn’t work ?
I suppose if only the LAN is connected, the Flexy tries directly on LAN ?

Thank you,
RĂ©mi

Hi Remi,

Unfortunately it is not possible to set the time through FTP. As for setting the time through NTP, you can only have one NTP connection at a time. The normal setup we use would be to connect to the NTP through WAN. But if you want to connect to a LAN NTP, this can be done by setting up a script that will check if there is internet connection and if it’s not able to connect to the internet, then it will set another NTP and ask for NTPSYNC.

-Tim

Hi,
Ok for the WAN and NTP, but we are connected all Ewon on LAN.
We think that it is a good idea to use a server with NTP in internal.
Ok, if it is not possible through FTP, I found a solution on the LAN.
I have activated the NTP Server on the PC Server, on Windows.
I can synchronize the clock. Normaly here we are on GMT-5.
To obtain a good clock on Ewon, local clock, I must to put GMT+5 for offset on the Ewon.
I can use this, but the other the problem is now we are on summer clock, I must to put GMT+4.
Probably the solution is with a script to change the offset


Second sunday of March at 2AM => GMT+4
First sunday of November at 2 AM => GMT+5

How I do a ‘ONDATE’ for ‘Second Sunday of march at 2AM’ ?
This : ONDATE 1,“0 2 0 3 7”,“GOTO MyNTPMarch” 
 I think it is for all the sundays

How we reach only the second sunday of the month ?

Thank you,
RĂ©mi

Hi
Humm I don’t see the parameter of ‘GMT Offset’ in the Programming reference guide.
Can I change this parameter by script ?
I hope

RĂ©mi

Hi Remi,

I think this post should help you

-Tim

@RemiNolin

I have a full solution of how I handle ensuring each eWON device adjusts it’s timezone offset value or whatever so see if any of this will help but this particular device uses CDT and CST so adjust accordingly for your time zone.

Setup New Tag

Setup a new tag named DST that’s a memory boolean return type so it remembers it’s last set value since it last changed.

image

Init Section

ONDATE 9, "0 2 8-14 3 *", "IF (DOW TIME$) = 0 THEN DST@ = 1"
ONDATE 10, "0 2 1-7 11 *", "IF (DOW TIME$) = 0 THEN DST@ = 0"
ONCHANGE "DST", "GOTO Adjust_GMT_offset"

// Automatic Summer / Winter Time change
Setsys SYS, "load"
x$ = Getsys SYS, "TimeZoneOffset"

IF x$ = "18000" THEN
  DST@ = 1
ELSE
  DST@ = 0
ENDIF

New Routine

Adjust_GMT_offset:
eName$   = GETSYS SYS, "Identification" 
Subject$ = "DST Change Detected on " + eName$ +  " eWON"
Body$    = "Time change detected with the DST bit on the " + eName$ + " eWON"

// Config the parameters
IF DST@ THEN
  z$= "DST=1;  GMT offset=+5.00"
  Setsys SYS, "load"
  Setsys SYS, "TimeZoneOffset", "18000"
  Setsys SYS, "save"
  Sendmail "emailaddress1@domain.com;emailaddress2@domain.com", "", Subject$, Body$  
ELSE
  z$= "DST=0;  GMT offset=+6.00"
  Setsys SYS, "load"
  Setsys SYS, "TimeZoneOffset", "21600"
  Setsys SYS, "save"
  Sendmail "emailaddress1@domain.com;emailaddress2@domain.com", "", Subject$, Body$  
ENDIF

// Write configuration To flash
// & log event
CFGSAVE
LOGEVENT z$, 120

// Sync Time
NTPSYNC
END
1 Like

Thank you very much !! Perfect :slight_smile:

1 Like

A post was split to a new topic: Flexy NTP server

Hi,
it is a bit complicated to put the script on all Flexy on all projects with different customers
 Does the new firmware can manage simply the summer/winter clock on NTP server without script ?
Simply by clicking a parameter and the Flexy has always the good clock
 ? it would be great !
Thank you,
RĂ©mi

Hi RĂ©mi,

In the new firmware, there was an update that makes it so you can just set the clock to update via NTP and select where you are on the globe. You shouldn’t need the script in newer devices

Thanks,
-Tim