Time stamp with CLGX and Versaview

rta53

Lifetime Supporting Member
Join Date
Feb 2003
Location
North Carolina
Posts
619
I need to do a time stamp when an event occurs such as an operator starting and stopping a pump motor. We need to have a unique number associated with these events and figured it would be simpler to use a time stamp rather than having the operator enter a number. We are using a Control Logix processor and a Versaview running RSView SE. My question is this. Can we pull the time stamp from the Versaview as opposed to doing it from the PLC? These time stamped events will be logged to a SQL database on the Versaview so I was wondering if we could do the time stamp from the Versaview also.
 
Uhhh... Why not just create a field in the SQL table that has a default value of GETDATE() or GETUTCDATE()?

Quick edit---

Using SQL's internal timestamps to use the fields in queries and reports, without having to try to format the value you could get from RSView (which is possible, but not nearly as efficient).
 
One of my co-workers is doing the database and the Versaview stuff. I'm doing the RSLogix programming. Actually I know very little about databases. How would we do this if we needed to generate this time stamp based on a tag changing state in the PLC?
 
Well, you'd need to use the system date and time tags, combine them into a single field (a string or numeric memory tag), and send that to the database with your other field information.

I still think it would be better to use either a default value field in SQL, or, if you need to store multiple timestamps in a single record, INSERT or UPDATE the record using a stored procedure which includes timestamps, or even possible use SQL triggers on insertions/updates.
 
I need to do a time stamp when an event occurs such as an operator starting and stopping a pump motor.
Based on past experience, it depends on whether it is important that the PLC time agree closely with the Versaview time. If the clocks of each system are not synchronized periodically, then there may be several seconds difference. If that difference matters to what your are doing, then it may be best to use the PLC internal clock to record timestamps. The PLC will know right away when a pump motor starts, and Versaview will know at some time later (after the event has been communicated from the PLC, taking some finite amount of time).
 

Similar Topics

Does anybody know how 'timestamp output' functionality internally works in a controller? I do not mean the instructions you use as a programmer...
Replies
0
Views
65
Hello Everyone, I hope we are all good! I have a strange one, and wondering if anyone has seen this before. When I look at the CSV Export Logs...
Replies
3
Views
1,595
So I've got an issue I have yet to figure out. I have a PVPlus standard HMI runtime v12. I've gone into the system and set the date and time and...
Replies
7
Views
4,777
Hi.. I was looking for a bit of help from someone that works with intouch scada... At the moment I have a Box that contains an animated Tick when...
Replies
4
Views
2,708
Dear Members; I make a date and time stamp by using GSV and SSV instructions. The DINT array with 7 elements stores those values. Now I want to...
Replies
5
Views
1,504
Back
Top Bottom