Data Logging Time/Date

cmgrath7093

Member
Join Date
Aug 2016
Location
Ohio
Posts
7
I am new to try data tracking. I have figured out how to track the data that I need. However I can not seem to figure out how to get the date and time stamp to the current date and time. Any help or push in the right direction would be great. Thanks.
 
A lot of data logging systems log the data and time in UTC format. That is the usually viewed at GMT. When you set up a view in the data base to display the data you have to specify that you want it displayed in local time. the database will then apply your locale settings to display the data and time as you local timezone and the format that is typical for you region.
 
A lot of data logging systems log the data and time in UTC format. That is the usually viewed at GMT. When you set up a view in the data base to display the data you have to specify that you want it displayed in local time. the database will then apply your locale settings to display the data and time as you local timezone and the format that is typical for you region.

Whilst valid and good advice, I fear this is too far advanced for the OP....
 
Use a GSV instruction to grab the plc time (i.e. plc time is accurate over time)
You will need an array of 7 dints for the time increments.
Also you can Concatenate that and in the final destination use that to fill the resgister from bottom up. ex. Array of 10 the lenght of the final stop in concat would be 9.

Lastly COP that string into whatever buffer you want. Do this a couple rungs ahead of the final concat.

hope this helps
 
Use a GSV instruction to grab the plc time (i.e. plc time is accurate over time)
You will need an array of 7 dints for the time increments.
Also you can Concatenate that and in the final destination use that to fill the resgister from bottom up. ex. Array of 10 the lenght of the final stop in concat would be 9.

Lastly COP that string into whatever buffer you want. Do this a couple rungs ahead of the final concat.

hope this helps

Just where did the OP tell us he was using Logix5000 ??
 
True. I assumed. but if he is however there's a suggestion.

Well it was a suggestion, yes, but not a very good one....

You talk about Concatenating DINTs, that you cannot do, you have to convert them to STRINGs in order to use concatenation, and you will have to trim off all but the last two characters of the STRINGs. Then I assume you are suggesting inserting delimiter characters (eg. "14:22:52.587163" for the time).

All this just to create a final STRING that can't easily be used. You have ended up with a STRING of characters, rather than a time-stamp value that can be compared to other time-stamps.....

If the OP is using Logix5000, then there is a much more useful representation of the current time in the "CurrentValue" attribute. This is a LINT (Long Integer, 64-bit) value, representing the number of microseconds since 00:00 hrs, January 1st, 1970. Any external database worth its salt ought to be able to use that time-stamp directly without having to decode STRING.
 
Thanks for the enlightenment. Can you reply to my personal thread with suggetions on my question from today. Under my profile?
 

Similar Topics

Hi folks, I'm not as accustom with Siemens & WinCC, however I've been asked to increase the amount of data an existing application is logging...
Replies
2
Views
89
Hi, Wy we log data in PLC using DLG instruction, when we have option to log data in HMI
Replies
1
Views
97
Hi everyone id like to start by saying im not a PLC programmer so my technical terminology is limited. i would like advice on what software is...
Replies
4
Views
318
Hi All, I am looking for recommendations for a data logging software package that can be used for a simple 1 PLC installation. The installation...
Replies
13
Views
1,422
Hello all, I am working on a DA70A flex edge data logger. I am it communicating with a computer on the network. I can ping it and everything looks...
Replies
1
Views
398
Back
Top Bottom