Author Topic: Time sync system clock R&S RTB2004  (Read 3855 times)

0 Members and 1 Guest are viewing this topic.

Offline R.J.Topic starter

  • Contributor
  • Posts: 21
  • Country: nl
  • Don't take "broken" for an answer!
Time sync system clock R&S RTB2004
« on: May 31, 2023, 09:18:59 am »
I am the proud owner of an R&S RTB2004.
Connected to the internal network of my home, using the web browser integration, remote control of this oscilloscope is very convenient.
I have now found out that when creating screenshots, the system clock of this oscilloscope does not synchronise with the system clock of e.g. the computer(s) on the network. After leaving the device switched off for several weeks, it appears that the clock is several minutes behind.
There is no possibility in the menus to synchronise this time or to synchronise it with e.g. the router acting as NTP server in the network.
The clock can only be set to a time.
This is quite a bad thing, as time synchronisation within a network is essential for many devices.

Perhaps there is a possibility of using a SCPI command to synchronise the system time to the DHCP server/router acting as an NTP server.
I have searched but cannot find a solution.

Does anyone know of a solution?

 

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Time sync system clock R&S RTB2004
« Reply #1 on: May 31, 2023, 09:29:24 am »
You can set the time on the RTB2000 using SCPI commands:

SYSTem:TIME <Hour>,<Minute>,<Second>
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8

Free online test and measurement fundamentals courses from Rohde & Schwarz:  https://tinyurl.com/mv7a4vb6
 

Offline R.J.Topic starter

  • Contributor
  • Posts: 21
  • Country: nl
  • Don't take "broken" for an answer!
Re: Time sync system clock R&S RTB2004
« Reply #2 on: May 31, 2023, 09:46:46 am »
Thank you for replying.
But that's manual setting the time and is not in sync.
I can also set the time by using the menu.
This is not what I want to do.
 

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Time sync system clock R&S RTB2004
« Reply #3 on: May 31, 2023, 10:08:48 am »
Sorry, I assumed that you wanted the RTB2000 time to match the time of a computer on your network.  Is it possible to run (manually or automatically, e.g. using a cron job) a script on one of your computers that checks that computer's time and then issues a SCPI command to the RTB?  I can write an example in Python if that would be helpful.
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8

Free online test and measurement fundamentals courses from Rohde & Schwarz:  https://tinyurl.com/mv7a4vb6
 
The following users thanked this post: tooki

Offline R.J.Topic starter

  • Contributor
  • Posts: 21
  • Country: nl
  • Don't take "broken" for an answer!
Re: Time sync system clock R&S RTB2004
« Reply #4 on: May 31, 2023, 10:28:25 am »
Thanks for your offer.
But weird that such an elaborate device like this scope does not have by default the ability to conform to a system time within an environment it is in. A system time is the most important parameter when it comes to things that are somehow interconnected, dependent on each other and evidence to/about each other.
The menu for TCP parameter settings should also provide an option to retrieve a system time according to the NTP protocol from the DHCP server so that the oscilloscope's system time has a reference.
Then there is no room for error in a script that would have to run on some PC.

Am I the only one who has experienced this "problem" and is now finding out?
 

Offline modoran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ro
Re: Time sync system clock R&S RTB2004
« Reply #5 on: May 31, 2023, 11:11:55 am »
As a workaround you can run the NTP sync on your computer and send SCPI commands automatically to the scope every time. Not ideal, but it will do the job.
 

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Time sync system clock R&S RTB2004
« Reply #6 on: May 31, 2023, 11:34:10 am »
Here's a short Python script that queries the time on the local machine and then connects to and sets the time on the oscilloscope.  I don't have an RTB in my lab at the moment, but I did test it against an RTM and it works as expected. 

I'll talk to the product line about the desire for NTP based synchronization.  It really hasn't come up for me before with this type / class of instrument.  In my experience, very tight time synchronization between devices in a test setup is usually achieved using an external trigger signal. 

Sorry, but that's probably the best I can do in the short-term.  Given that the resolution of the RTB "clock" is only seconds, I don't think an NTP client running on the RTB would achieve significantly greater accuracy than using a SCPI command to check/set the RTB time.  If you can provide me with more details of your test scenario (PM is also fine if you don't want to publicly share), that would also be helpful.



Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8

Free online test and measurement fundamentals courses from Rohde & Schwarz:  https://tinyurl.com/mv7a4vb6
 
The following users thanked this post: Someone, egonotto, 2N3055, skander36, Hexley

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Time sync system clock R&S RTB2004
« Reply #7 on: May 31, 2023, 12:17:21 pm »
Here's a short Python script that queries the time on the local machine and then connects to and sets the time on the oscilloscope.  I don't have an RTB in my lab at the moment, but I did test it against an RTM and it works as expected. 

I'll talk to the product line about the desire for NTP based synchronization.  It really hasn't come up for me before with this type / class of instrument.  In my experience, very tight time synchronization between devices in a test setup is usually achieved using an external trigger signal. 
I think the OP is not after synchronising measurements as NTP is good down to tens of milliseconds anyway. I can imagine that having the correct time on instruments could be helpful to cross-reference measurements / screendumps between various instruments to determine which measurement lead to certain results.

Using NTP is a bit of a can of worms though as NTP provides UTC time. The oscilloscope would need to know the time zone and daylight savings schedule for that time zone.
« Last Edit: May 31, 2023, 12:20:25 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: pdenisowski

Offline R.J.Topic starter

  • Contributor
  • Posts: 21
  • Country: nl
  • Don't take "broken" for an answer!
Re: Time sync system clock R&S RTB2004
« Reply #8 on: May 31, 2023, 01:30:49 pm »
Dear pdenisowski, I understand that you represent R&S and that you work for R&S. I am glad you want to help me with the issue I have run into.
Often it is not possible to "speak" to someone from the manufacturer of the gear purchased.
I appreciate it very much, especially precisely because you could have some "influence" with the manufacturer of this fine tool.

What matters is the following. Measurements taken should have a correct date/time relative to each other in case of e.g. reporting.
This means that when measurements are saved (e.g. in a CSV file on a USB stick) or screenshots are taken, they have the correct date and time.

As nctnico described: The oscilloscope would need to know the time zone and daylight savings schedule for that time zone.
 
The following users thanked this post: pdenisowski

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Time sync system clock R&S RTB2004
« Reply #9 on: May 31, 2023, 02:33:34 pm »
Dear pdenisowski, I understand that you represent R&S and that you work for R&S. I am glad you want to help me with the issue I have run into.
Often it is not possible to "speak" to someone from the manufacturer of the gear purchased.
I appreciate it very much, especially precisely because you could have some "influence" with the manufacturer of this fine tool.

Very happy to help.  We (R&S) are always very interested in feedback, requests, etc. from customers, and I'll discuss this request (time synchronization / timestamps) with our oscilloscope product management team.  Can't promise that we'll implement anything (in the short term), but I can guarantee that the request will be heard :)



Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8

Free online test and measurement fundamentals courses from Rohde & Schwarz:  https://tinyurl.com/mv7a4vb6
 
The following users thanked this post: egonotto, Kean

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Time sync system clock R&S RTB2004
« Reply #10 on: May 31, 2023, 02:36:36 pm »
I think the OP is not after synchronising measurements as NTP is good down to tens of milliseconds anyway. I can imagine that having the correct time on instruments could be helpful to cross-reference measurements / screendumps between various instruments to determine which measurement lead to certain results.

Understood.  I work with a lot of loaner / demo instruments and pretty much none of them arrive at my lab with the date/time set appropriately :)  Can be an issue when I'm searching for measurement results or screenshots I remember making at a certain time or on a certain date.

Using NTP is a bit of a can of worms though as NTP provides UTC time. The oscilloscope would need to know the time zone and daylight savings schedule for that time zone.

Yep, that would also need to be addressed as well. 
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8

Free online test and measurement fundamentals courses from Rohde & Schwarz:  https://tinyurl.com/mv7a4vb6
 
The following users thanked this post: egonotto

Offline R.J.Topic starter

  • Contributor
  • Posts: 21
  • Country: nl
  • Don't take "broken" for an answer!
Re: Time sync system clock R&S RTB2004
« Reply #11 on: May 31, 2023, 04:25:54 pm »
That's exactly what I mean.
Without being connected to the network, I can imagine you setting the date and time manually every time.
However, just about everyone has a network in his or her home/lab and will also want to connect his/her measuring equipment to it in order to use the nice and fast remote control that is possible.

How convenient it would then be to have the scope's date/time set by the router in that environment, (that router is basically always used as a time server [NTP server] for the locally connected network equipment) to be set equal to the actual date, time and time zone.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11503
  • Country: ch
Re: Time sync system clock R&S RTB2004
« Reply #12 on: May 31, 2023, 05:10:19 pm »
That's exactly what I mean.
Without being connected to the network, I can imagine you setting the date and time manually every time.
However, just about everyone has a network in his or her home/lab and will also want to connect his/her measuring equipment to it in order to use the nice and fast remote control that is possible.

How convenient it would then be to have the scope's date/time set by the router in that environment, (that router is basically always used as a time server [NTP server] for the locally connected network equipment) to be set equal to the actual date, time and time zone.
I’m not aware of any routers that act as NTP servers. I’m not sure why you’d bother since you can just sync to a public one. It’s not like NTP causes enough traffic to bog down your network.

Using NTP is a bit of a can of worms though as NTP provides UTC time. The oscilloscope would need to know the time zone and daylight savings schedule for that time zone.
Given that there are time libraries that handle all of that, both large libraries for PC software and compact ones for microcontrollers, that is a problem that is absolutely trivial to solve.

I mean, a minimal implementation takes under 20 lines of user code to do on an ESP32 with ready-made libraries.
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28380
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Time sync system clock R&S RTB2004
« Reply #13 on: May 31, 2023, 05:45:51 pm »
I’m not aware of any routers that act as NTP servers. I’m not sure why you’d bother since you can just sync to a public one. It’s not like NTP causes enough traffic to bog down your network.
Yet a member here experienced in security systems maintains some can and we were to investigate to sync with the NTP server in SDS1104X-E which doesn't have a RTC.
He wanted it for portable use with valid timestamps on screenshots however carrying around a router just for that seemed nuts to me so a much simpler solution was devised using the already inbuilt functionality with a USB WiFi dongle and hotspotting it to your phone. < Worked a treat !

Carrying an additional few grams of dongle and the phone that is always with you seemed make far more sense.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline R.J.Topic starter

  • Contributor
  • Posts: 21
  • Country: nl
  • Don't take "broken" for an answer!
Re: Time sync system clock R&S RTB2004
« Reply #14 on: May 31, 2023, 07:44:18 pm »
Quote from: tautech on Today at 18:45:51>Quote from: tooki on Today at 18:10:19>"I’m not aware of any routers that act as NTP servers. I’m not sure why you’d bother since you can just sync to a public one. It’s not like NTP causes enough traffic to bog down your network.
Yet a member here experienced in security systems maintains some can and we were to investigate to sync with the NTP server in SDS1104X-E which doesn't have a RTC.
He wanted it for portable use with valid timestamps on screenshots however carrying around a router just for that seemed nuts to me so a much simpler solution was devised using the already inbuilt functionality with a USB WiFi dongle and hotspotting it to your phone. < Worked a treat !

Carrying an additional few grams of dongle and the phone that is always with you seemed make far more sense."



Gentlemen, the situation I am trying to outline concerns a stable situation, not a mobile lab.
Every router connected between the home network and the Internet basically can work/works as an NTP server or is easily set up as such. Precisely because there are more and more devices at home that require time synchronisation. PCs have depended on it for some time, but anything with an internal clock will be able and willing to make use of it. And that just works.
Thank you for understanding.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11503
  • Country: ch
Re: Time sync system clock R&S RTB2004
« Reply #15 on: June 01, 2023, 12:47:05 pm »
Gentlemen, the situation I am trying to outline concerns a stable situation, not a mobile lab.
Every router connected between the home network and the Internet basically can work/works as an NTP server or is easily set up as such. Precisely because there are more and more devices at home that require time synchronisation. PCs have depended on it for some time, but anything with an internal clock will be able and willing to make use of it. And that just works.
Again, I have used myself (or set up for clients) numerous routers over the years and have never encountered one that offered an NTP server out of the box. (One of them could do it via third party firmware.)

So while the FritzBox apparently does do it, I don’t think it’s a particularly common feature. It certainly isn’t something “every router” does, as you claim.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6660
  • Country: hr
Re: Time sync system clock R&S RTB2004
« Reply #16 on: June 01, 2023, 01:23:25 pm »
Gentlemen, the situation I am trying to outline concerns a stable situation, not a mobile lab.
Every router connected between the home network and the Internet basically can work/works as an NTP server or is easily set up as such. Precisely because there are more and more devices at home that require time synchronisation. PCs have depended on it for some time, but anything with an internal clock will be able and willing to make use of it. And that just works.
Again, I have used myself (or set up for clients) numerous routers over the years and have never encountered one that offered an NTP server out of the box. (One of them could do it via third party firmware.)

So while the FritzBox apparently does do it, I don’t think it’s a particularly common feature. It certainly isn’t something “every router” does, as you claim.

Every Mikrotik does..You need to load NTP package but it is available...
 

Offline R.J.Topic starter

  • Contributor
  • Posts: 21
  • Country: nl
  • Don't take "broken" for an answer!
Re: Time sync system clock R&S RTB2004
« Reply #17 on: June 01, 2023, 04:38:01 pm »
The question is not whether the router can be used as an NTP server or whether a network client can synchronise its system clock with a router or not.
Your PC will sync his date/time also, with or without a router configured as a NTP-server. It's just an example.

The issue is that there is currently no way to synchronise the oscilloscope's system clock with the system time of the environment in which it is located.
For example, via parameters (NTP time server URL or such) that could be entered in the network settings of the oscilloscope, you could have the firmware synchronise the system date and time/timezone when booting the scope using the (S)NTP protocol.
« Last Edit: June 01, 2023, 04:40:38 pm by R.J. »
 

Offline modoran

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ro
Re: Time sync system clock R&S RTB2004
« Reply #18 on: June 01, 2023, 05:38:44 pm »


Every Mikrotik does..You need to load NTP package but it is available...

I tried myself on Mikrotik hap ac2 with ntp package installed, it doesn't work if no internet available.  The "server" is still on the internet.   Anyway you still need to set the ntp server to use on your device settings to work, which this scope doesn't have. If it has the setting no router will be needed, just IP adress of ntp server.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11503
  • Country: ch
Re: Time sync system clock R&S RTB2004
« Reply #19 on: June 01, 2023, 07:49:44 pm »
Gentlemen, the situation I am trying to outline concerns a stable situation, not a mobile lab.
Every router connected between the home network and the Internet basically can work/works as an NTP server or is easily set up as such. Precisely because there are more and more devices at home that require time synchronisation. PCs have depended on it for some time, but anything with an internal clock will be able and willing to make use of it. And that just works.
Again, I have used myself (or set up for clients) numerous routers over the years and have never encountered one that offered an NTP server out of the box. (One of them could do it via third party firmware.)

So while the FritzBox apparently does do it, I don’t think it’s a particularly common feature. It certainly isn’t something “every router” does, as you claim.

Every Mikrotik does..You need to load NTP package but it is available...
Niche equipment hardly makes up a significant share of the routers in use. And I even said “out of the box”, which an added package does not qualify as.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Time sync system clock R&S RTB2004
« Reply #20 on: June 01, 2023, 08:38:20 pm »
Either way, if you have an internet connection you can use oodles of NTP servers. So it is not like having an NTP server on a router is going to provide more features. After all, the NTP server on a router will need to get the time from somewhere as it likely doesn't have an accurate internal RTC. For standalone use you might want to venture into GPS enabled NTP servers but it appears there are also phone apps that can turn your phone into an NTP server.
« Last Edit: June 01, 2023, 08:40:17 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: tooki

Offline RBBVNL9

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: nl
Re: Time sync system clock R&S RTB2004
« Reply #21 on: June 02, 2023, 09:45:06 am »
I totally sympathize with the desire of the OP to have the right time set on instruments in order to have files and screenprints carry the right time and date. If possible, a time server function that automatically updates, with time zone support and all, would be ideal. Some instruments have this (the degree to which this actually works varies ;-) and others do not have it.

But to put this into perspective: I have several recent and not-always-so-cheap instruments in my lab that have no time and date setting at all!! Not even manual...  (Not going to do naming and shaming now). That is hugely inconvenient. The files created on a USB stick etc. carry time stamps like “30 Dec 1999 at 23:00”. Oef!
« Last Edit: June 02, 2023, 09:48:46 am by RBBVNL9 »
 
The following users thanked this post: 2N3055

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28380
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Time sync system clock R&S RTB2004
« Reply #22 on: June 02, 2023, 09:50:37 am »
I totally sympathize with the desire of the OP to have the right time set on instruments in order to have files and screenprints carry the right time and date. If possible, a time server function that automatically updates, with time zone support and all, would be ideal. Some instruments have this (the degree to which this actually works varies ;-) and others do not have it.

But to put this into perspective: I have several recent and not-always-so-cheap instruments in my lab that have no time and date setting at all!! Not even manual...  (Not going to do naming and shaming now). That is hugely inconvenient. The files created on a USB stick etc. carry time stamps like “30 Dec 1999 at 23:00”. Oef!
Now there's a project for you to check which instruments you have that keep the most accurate time.
1 month should show some variance......
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 
The following users thanked this post: RBBVNL9

Offline Hexley

  • Regular Contributor
  • *
  • Posts: 198
  • Country: us
Re: Time sync system clock R&S RTB2004
« Reply #23 on: June 02, 2023, 03:12:41 pm »
But to put this into perspective: I have several recent and not-always-so-cheap instruments in my lab that have no time and date setting at all!!<snip> The files created on a USB stick etc. carry time stamps like “30 Dec 1999 at 23:00”. Oef!
Now there's a project for you to check which instruments you have that keep the most accurate time.
At the risk of derailing this nice R&S thread, I have to say that the Siglent SDG1000X arbitrary wave generator (and probably its siblings) gets a special mention for waking up at each power-on thinking it is midnight, January 1, 1970.  :-//
   I actually modified pdenisowski's Python script to set the time and date of the SDG, but there is really not much point since the data is volatile and resets on every power cycle. In case anyone is interested, though, that modified script is attached.
 
The following users thanked this post: pdenisowski

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Time sync system clock R&S RTB2004
« Reply #24 on: June 02, 2023, 10:10:00 pm »
At the risk of derailing this nice R&S thread, I have to say that the Siglent SDG1000X arbitrary wave generator (and probably its siblings) gets a special mention for waking up at each power-on thinking it is midnight, January 1, 1970:-//

That's a Unix-style timestamp that's set to all zeros.  "Unix time" is the number of seconds since midnight, January 1, 1970 :)
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8

Free online test and measurement fundamentals courses from Rohde & Schwarz:  https://tinyurl.com/mv7a4vb6
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf