当前位置:网站首页>Beifu PLC obtains system time, local time, current time zone and system time zone conversion through program
Beifu PLC obtains system time, local time, current time zone and system time zone conversion through program
2022-06-26 13:15:00 【Dusk and starry sky】
This article explains TwinCAT To get the local 、 System time and current time zone , And explain how the current time is converted into a string type .
- Operation process
1.1. Get system time
1.1.1. GETSYSTEMTIME
Use to GETSYSTEMTIME Function block , What you get here is Greenwich mean time . Use this block to read the operating system timestamp . The time stamp is a 64 Bit integer value , Accuracy of 100ns, Every time PLC Will be updated when called . Among other purposes , It can also be used for timing tasks or time measurement . One unit is equivalent to 100 nanosecond . The reason for implementing this service as a block rather than a function , The reason is simple , Because you have to return two values , According to the definition , This is a function that cannot be completed .
1.1.2. The system time is converted to a string String
Need to use FILETIME_TO_SYSTEMTIME and SYSTEMTIME_TO_STRING


1.2. Get local time
1.2.1. NT_GetTime
This function block is used to obtain the local time , Time obtained in TIMESTRUCT Data structure output :
边栏推荐
- MySQL数据库讲解(三)
- Learning Processing Zoog
- G - Cow Bowling
- 倍福CX5130换卡对已有的授权文件转移操作
- 中国剩余定理模板题 互质与非互质
- Biff TwinCAT can quickly detect the physical connection and EtherCAT network through emergency scan
- C structure: definition and example
- Processing random generation line animation
- 倍福通过CTU和TON实现时间片大小和数量的控制
- Deep parsing MySQL binlog
猜你喜欢
随机推荐
利用scrapy爬取句子迷网站优美句子存储到本地(喜欢摘抄的人有福了!)
C structure: definition and example
Common creation and usage of singletons
Adapter mode
Summary of wechat applet test points
倍福PLC选型--如何看电机是多圈绝对值还是单圈绝对值编码器
C# 结构体:定义、示例
Electron official docs series: Examples
HDU 3555 Bomb
Processing polyhedron change
POJ 3070 Fibonacci
Beifu PLC realizes zero point power-off hold of absolute value encoder -- use of bias
code force Party Lemonade
scrapy——爬取漫画自定义存储路径下载到本地
倍福PLC实现绝对值编码器原点断电保持---bias的使用
Is it safe for the head teacher to open a stock account and open an account for financial management?
Analysis and protection of heart blood dripping vulnerability (cve-2014-0160)
OPLG: 新一代云原生可观测最佳实践
Arcpy - - utilisation de la fonction insertlayer (): ajout de calques dans un document de carte
偶言佳句,孤芳自赏









