How To Get Current System Time From Beckhoff-cx5130

piash.ali

Member
Join Date
Sep 2017
Location
Germany
Posts
19
Hi
I have tried to get current time from the PLC (Beckhoff-cx5130) by "GETSYSTEMTIME", but I am not getting any output.
I have tried "NT_GetTime" "TIMESTRUCT" and "T_FILETIME" but showing some compiling error.
Any suggestion (Example code) regarding this issue will be highly appreciated.
Thanks!
 
Last edited:
Hi Archie.
Thanks for the suggestion.
Because of the library, It did not work yesterday. I have added the TcUtilities.Lib, now its working fine.
PROGRAM MAIN
VAR
systime:GETSYSTEMTIME;
fbSystemTime : GETSYSTEMTIME;
timeAsFileTime : T_FILETIME;
timeAsDT : DT;
END_VAR

fbSystemTime( timeLoDW =>timeAsFileTime.dwLowDateTime , timeHiDW =>timeAsFileTime.dwHighDateTime );
timeAsDT := FILETIME_TO_DT( timeAsFileTime );
 

Similar Topics

I don't actually think my analog input module is the problem but here are the details: I have an Aromat FP10 analog module 24vDC with 4-20 mA...
Replies
9
Views
2,158
Today I was working on my project for school and we were using a power supply with 24V and we accidentally had the current at 0.9A. We heard a pop...
Replies
9
Views
560
Hi all, I have been working on a project that requires me to measure the current across a 90 VDC motor of a medical device (similar to an...
Replies
26
Views
1,580
HI i have a delta VFD M-series in the manual, in order to enter the motor rated current you set the parameter P,52 =the motor rated current my...
Replies
7
Views
686
HI! HOW COULD I OBTAIN THE NAMES OF THE STEPS OF A ROUTINE IN SFC LANGUAGE IN STUDIO5000? Or is there a system variable that gives me those...
Replies
0
Views
351
Back
Top Bottom