DateTime DINT Array to String

whussain6

Member
Join Date
Oct 2013
Location
Newcastle
Posts
108
Hi

I am using GSV to get localTime when a specific event happen, which is stored in DINT array (DINT[0] to DINT[7]).

Now I want to log this date time to WW Historian. What is the best method?
OR
How to convert this datetime to string format and log string tag to historian?

L71 Processor
 
XIC SYS_One_Second_OS BST DTOS PLC_Time[1] PLC_DateTime_Str CONCAT PLC_DateTime_Str STR_Slash PLC_DateTime_Str NXB DTOS PLC_Time[2] Temp_String CONCAT PLC_DateTime_Str Temp_String PLC_DateTime_Str CONCAT PLC_DateTime_Str STR_Slash PLC_DateTime_Str NXB DTOS PLC_Time[0] Temp_String CONCAT PLC_DateTime_Str Temp_String PLC_DateTime_Str CONCAT PLC_DateTime_Str STR_Space PLC_DateTime_Str NXB LES PLC_Time[3] 10 CONCAT PLC_DateTime_Str STR_Zero PLC_DateTime_Str NXB DTOS PLC_Time[3] Temp_String CONCAT PLC_DateTime_Str Temp_String PLC_DateTime_Str CONCAT PLC_DateTime_Str STR_Colon PLC_DateTime_Str NXB LES PLC_Time[4] 10 CONCAT PLC_DateTime_Str STR_Zero PLC_DateTime_Str NXB DTOS PLC_Time[4] Temp_String CONCAT PLC_DateTime_Str Temp_String PLC_DateTime_Str CONCAT PLC_DateTime_Str STR_Colon PLC_DateTime_Str NXB LES PLC_Time[5] 10 CONCAT PLC_DateTime_Str STR_Zero PLC_DateTime_Str NXB DTOS PLC_Time[5] Temp_String CONCAT PLC_DateTime_Str Temp_String PLC_DateTime_Str BND
 
This subroutine use the DTOS & CONCAT instructions to build a timestamp

01/14/2013 08:35:57

Just unzip and import into program to create subroutine.

use the STR_TimeStamp[0] tag for logging or display.
 

Similar Topics

Good Afternoon, I am playing with the GSV WallClockTime and an AOI i downloaded off the Rockwell website to try and return a day of week for a...
Replies
9
Views
3,072
How do you go about implementing, on the M580 PLC, how many days, hours, minutes before a predefine event in the future? The RRTC_DT yields the...
Replies
3
Views
1,814
Hi , I'm using GSV and SSV instruction set and read dates but I see there are 2 attributes for the wallclock object. DateTime and LocalTime...
Replies
3
Views
2,828
I am trying to determine a "projected completion date and time" for a batch process based on the process start time, and the total recipe time...
Replies
4
Views
1,460
Hi all, Is there an efficient way to compare the UDT elements below in ladder logic, I need to know when they're not equal? Compare...
Replies
13
Views
4,663
Back
Top Bottom