NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
volker_sbk
Posts: 19
0 Kudos
Accepted Solution

rt incorrect time

Hi,
I am trying to set the date / time of my cFP-2120 programmatically in essence using the vi attached.
The vi is based on the 'RT Set Date and Time.vi' utility and seems to do what it is supposed to do just fine. However, when I copy a file to the controller to check the time / date using windows explorer or any other ftp client (lets say the 'file transfer' program in MAX), i see different time stamps for the same file. Windows explorer gives me the time that I was expecting (7AM), while any other ftp client will show 2AM.

I changed the time zones through MAX to GMT and GMT - 5 with the same result.

Could anybody shine some light on this?

Thanks,
Volker
Member
volker_sbk
Posts: 19
0 Kudos

Re: rt incorrect time

I found a link on microsofts support website that may explain this.
As a result I set my PC time zone to GMT to match the time zone of the cFP2120.
And there you go, windows explorer as well as other ftp clients show the same time in the file details of any file copied to the cFP after setting the time.

Now, there is one thing remaining.
Look at the attached vi and run it on your RT target, which is set to GMT.
The current time, which is a time stamp indicator, will trail the time string by 5hours. I found an application note
 that may explain this. However, if my PC is on GMT and my cFP is on GMT, shouldn't both indicators show the same time?

Am I missing something?

Volker

Active Participant
MarkBlack
Posts: 220
0 Kudos

Re: rt incorrect time

Volker,

I believe the reason you are seeing the Get Current Time in Seconds trailing the other indicator is because you changed the time zone your computer  launched LabVIEW.  Closing and reopening LabVIEW should correct this issue. 

The item I cannot explain is for the two times to be appear as the same time I had adjust for daylight savings on my Windows XP machine, but I did not for my FieldPoint RT target.  Have you seen this same behavior?
Mark
LabVIEW R&D
Member
volker_sbk
Posts: 19
0 Kudos

Re: rt incorrect time

Mark,
Thanks for your insight.

I believe the reason you are seeing the Get Current Time in Seconds trailing the other indicator is because you changed the time zone your computer  launched LabVIEW.  Closing and reopening LabVIEW should correct this issue. 
Yes. This works. All time stamps are the same now including the file details on the ftp server.

The item I cannot explain is for the two times to be appear as the same time I had adjust for daylight savings on my Windows XP machine, but I did not for my FieldPoint RT target.  Have you seen this same behavior?
Hmm, that seems odd. My field point is set to GMT and does not adjust for daylight savings.  My Windows XP mashine is set similar; GMT with no daylight savings adjustment.

Volker


Active Participant
MarkBlack
Posts: 220

Re: rt incorrect time

Perhapse there is a setting that I am over looking.  Regardless I am pleased to here you were able to get your VI running with correct behavior. 
Mark
LabVIEW R&D
Member
Javim
Posts: 3
0 Kudos

Re: rt incorrect time

Hi Mark,

 

I have local time in my Crio 9075 GMT+1. When i try to see file details via windows explorer using FTP, its 2 hours more. My computer is also GMT+1. How can i fixe this? I want both local time in cRIO and windows explorer details.

 

Regards

Tarek

Member
0utlaw
Posts: 88
0 Kudos

Re: rt incorrect time

Hi Tarek,

 

I think you may find the information in the following KnowledgeBase article useful:

 

KnowledgeBase 3FAEMDSU: Fixing a CompactRIO Controller System Clock After Changing the Time Zone Setting

http://digital.ni.com/public.nsf/allkb/C60E70A5DC9BD5CF86256F490077761F

 

This thread (https://decibel.ni.com/content/thread/1942) also details how to set the time zone on your CRIO and how to use the RT VIs to configure the system clock.

 

Also, thank you for searching for a relevant thread before posting, but in this case the thread has been inactive for more than four years, so the original posters may not check for new posts or respond in a timely manner.  If you have similar questions in the future, it may be worth starting a new thread with a descriptive title.  In any case, let me know if you have any questions after looking over those documents.

 

Regards,

 

 

Tom L.
Applications Engineer
National Instruments
Trusted Enthusiast
AnalogKid2DigitalMan
Posts: 2,995
0 Kudos

Re: rt incorrect time

Tom:

 

Your second link is to a secure page and will not work.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Member
0utlaw
Posts: 88
0 Kudos

Re: rt incorrect time

Hi AK2DM,

 

Thanks for letting me know; the linked thread is in our FIRST DevZone community and should be open.  It looks like the auto-link included the parenthesis on accident; I had intended to provide it for those who prefer to copy and paste hyperlinks.  The in-text link should still work, but just in case, here is the thread again:

 

https://decibel.ni.com/content/thread/1942

 

Please let me know if that doesn't work.

 

Regards,

Tom L.
Applications Engineer
National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page