问题描述:
Somachine平台下RTS_SYSTIMEDATE功能块怎么用ST的方式来编程,如图所示的CFC方式,怎么用ST的方式来编程?所属产品线:
EcoStruxure Machine Expert(原SoMachine)解决方法:
R1(CLK:=A1 , Q=>A2 );
SysTimeRtcHighResGet(pTimestamp:=B1 );
SysTimeRtcConvertHighResToDate(pTimestamp:=B1 , pDate:=B2);
myYear:=B2.wYear;
myMonth:=B2.wMonth;
myDay:=B2.wDay;
myHour:=B2.wHour;
myMinutes:=B2.wMinute;
mySeconds:=B2.wSecond;
myMilliseconds:=B2.wMilliseconds;
是否有帮助?