Using GSV-Wall Clock to transfer data

ceilingwalker

Lifetime Supporting Member
Join Date
Mar 2010
Location
Phoenix, AZ
Posts
1,586
Hello all. Would anyone have sample code that uses a wall clock to move the CTU.ACC to a another variable in the PLC after 24-hours has elapsed? I need it to move this data at 06:00 every day, overwriting what was in that register each time, from the day before.
 
Can't say I've used it for that exact purpose, but grabbing the time is easy enough:

attachment.php


GLxTime is a user-created DINT[7] Array. Following the GSV:
[0] = year
[1] = month
[2] = day
[3] = hour
[4] = minute
[5] = second
[6] = microsecond

For your purposes just add a rung that uses EQU to check [3] is 6 and [4] and [5] are 0 with a oneshot to move your data.
The GSV can run unconditionally.

Note that this will not catch if the machine is off or not in run mode.

EDIT: Also make sure your clock is set correctly, had a minor issue recently where a new machine didn't have the correct timezone so it was a few hours off.

Example.png
 
Last edited:

Similar Topics

I'm looking for a way to use the Audit Value for the controller to detect changes made programmatically. This link lays it out pretty cleary (page...
Replies
7
Views
2,663
Hi guys, I would like to display the fault message the PLC generates during faults on an HMI. I've tried using GSV instruction with...
Replies
0
Views
1,218
Is there a way to know which is the primary and secondary chassis through gsv? I have read that "PhysicalChassis" (Chassis A/Chassis B) is an...
Replies
2
Views
2,206
I Created "HOURS","MINUTES","SECONDS" In Rslogix5000 data type is DINT. i want to get system time(hours,minutes,seconds) in those tags,without...
Replies
1
Views
2,401
Hello everyone, I'm working on a project that involves controlling an array of nozzles within a CNC environment, where the nozzles travel along a...
Replies
5
Views
118
Back
Top Bottom