
adccommunitymod (AutomationDirect) asked a question.
Time stamping transitions?
Created Date: April 07,2000
Created By: sjstein
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
Has anyone written RLL to time-stamp an event? I would like to know when (wall clock time) a certain input transitions from high to low - store the time/date in a register and continue. I can't see any easy way to do this. Any hints? I'm using a DL250
Created Date: April 07,2000
Created by: sjstein
Has anyone written RLL to time-stamp an event? I would like to know when (wall clock time) a certain input transitions from high to low - store the time/date in a register and continue. I can't see any easy way to do this.
Any hints?
I'm using a DL250
Created Date: April 07,2000
Created by: franji1
The following logic should work (I did not test it). In this example, I'm assuming we 're monitoring an ON to OFF transition of X0, storing that event in C0, and storing the date/time of that event as follows:
V2000 - year
V2001 - month
V2002 - day
V2003 - hour
V2004 - minute
V2005 - sec
V2006 - hundredths of a second
In a DirectSoft data view, type V2000, ENTER, UP-ARROW, then CTRL-ENTER 6 times, and you should see the date/time stamp of the event from year down to hundredths of a second.
Ignore the periods, they 're there as spaces so the ladder logic will look correct on the web http://forum1.automationdirect.com/board/smile.gif
X0.......C0
]/ // system year
......|
......+-
......|
......+- // system month
......|
......+-
......|
......+- // system day
......|
......+-
......|
......+- // system hour (0-23)
......|
......+-
......|
......+- // system minute
......|
......+-
......|
......+- // system second
......|
......+-
......|
......+- // system hundredths of a second
......|
......+-
For a more human readable version, check out the following logic:
v2000 4 digit year
V2001 MMDD
V2002 HHMM
V2003 SS.SS
So April 7, 2000 9:40:38.57 would be (all BCD):
V2000 2000
V2001 0407
V2002 0940
V2003 3857
replace the 2nd rung above with the following:
C0
]
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-
......|
......+-