LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time and date from an atomic clock

Hi,

I want to make an application in Labview 6i which gets the time and date
from an atomic clock (this is a must!). What is the easiest way to do this?


Regards,

Sergio
0 Kudos
Message 1 of 11
(3,813 Views)
Sergio Cruz wrote:
>
> Hi,
>
> I want to make an application in Labview 6i which gets the time and date
> from an atomic clock (this is a must!). What is the easiest way to do this?

You cannot maintain atomic clock accuracy using software on a PC. Think
about it. You're running on a PC whose clock may gain milliseconds per
day if you're lucky, probably seconds / day.
Out of the box, Windows can do things (like downloading Windows updates)
which can delay operations for seconds.
It can take several milliseconds to update an indicator that shows the
time, if that is what you plan to do.
I can see some approaches:

* If you can accept moderate accuracy of about 1-10 ms run software such
as Dimension 4 from www.thinkman.com.
That can be set up to run ever
y 15 minutes, automatically synchronizing
your PC to Internet time servers.
You don't need to control it from LabVIEW; if you had to, you could run
the executable C:\Program Files\D4\D4.exe using System Exec.

* You haven't described what you are doing. If you want more accurate
time keeping, then you might get a timekeeping board to plug into your
PC and control any other hardware you may be using.
Search the Web for "IRIG board".

Good luck, Mark
0 Kudos
Message 2 of 11
(3,813 Views)
Actually, what I'm trying to do is to implement a method to get the exact
time and date when an application is installed in the computer (it has to do
with licensing the software). To prevent the final user to change the date
of his computer before the installation, I thought the best method was to
get an "Universal Time". Do you have a better solution to do that? What I
had in mind was to get a .dll that could be interfaced with Labview. Do you
know any?

Thanks in advance,

Sergio
0 Kudos
Message 3 of 11
(3,813 Views)
This is some form of copy protection? What happens to the legitimate user when his computer dies or he upgrades? Will it no longer install? Wouldn't it be easier to use one of those dongles that hang off of the parallel or serial port?
0 Kudos
Message 4 of 11
(3,813 Views)
Dennis Knutson wrote:
>
> This is some form of copy protection? What happens to the legitimate
> user when his computer dies or he upgrades? Will it no longer install?
> Wouldn't it be easier to use one of those dongles that hang off of the
> parallel or serial port?

Another approach that I see on some current workstation software: tie
your copy protection to the Ethernet address of the network card (NIC),
such as 03:ae:cf:5d:00:65. Most PCs have a NIC.

This is usually a multi-stage process:

1: The user runs a small utility that tells him the Ethernet address,
and s/he tells you that address.

2: You run an encryption or encoding or type casting utility to
translate that to a software key such as dfpigryi3567.
You send him/h
er that key, which hhe pastes into a dialog box, & the
software is now ready to run.

If the user changes PC, there'll be a new network card, and they have to
repeat the process. I don't know how to handle a PC with 2 or more NICs.

Mark
0 Kudos
Message 5 of 11
(3,813 Views)
Mark Hanning-Lee wrote:
>
> Dennis Knutson wrote:
> >
> > This is some form of copy protection? What happens to the legitimate
> > user when his computer dies or he upgrades? Will it no longer install?
> > Wouldn't it be easier to use one of those dongles that hang off of the
> > parallel or serial port?

PS another approach is to take the high-precision time stamp from a
system clock, a timestamp to <<1 ms precision.

There are 2 different approaches I've seen:

Query Performance Count (QPC)
Read Time Stamp Counter (RDTSC)

Search the recesses of the NI Web sites & you should find sample VIs to
help you.

Best, Mark
0 Kudos
Message 6 of 11
(3,813 Views)

Hello everyone,

 

As Sergio, I have to do make a Labview VI to get the time of an atomic clock and settle it as the time of one device. What we want is to measure the inaccuracy of this device (so after some days we will get again the time of the device and we will compare it with the one of an atomic clock).

 

To get the atomic time I readed the value of the web site of one Internet time server (I was usign DataSocket read function) . To try to be "more accurate", I did a polling compering two consecutive reads just to know the moment at which a new second starts, but it doesn't work. I think it takes my PC a lot to read the value of the web site. (What do you think??)

 

So I was reading Mark's post and I was considering to syncronize directly the clock of my PC. Once the clock of the PC is syncronized I was thinking in using the VI called "Get Date/Time in Seconds (This function uses the clock that we have already syncronized, doesn't it??). After that, do you think the polling technique is a good option?

 

Thanks,

1000A

0 Kudos
Message 7 of 11
(3,263 Views)

Hi 1000A,

you can also get your time from a NTP Server. Maybe it's faster.

 

Hope it helps.

Mike

0 Kudos
Message 8 of 11
(3,253 Views)
Duplicate post, with (apparent) solution already provided.
0 Kudos
Message 9 of 11
(3,232 Views)
NIST publishes NISTtime_32.exe.  It will synchronize your sysem clock with a USNO maintained daytime server and log the error.

"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 11
(3,222 Views)