From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



为什么获取时间/日期(秒)和时间计数器的时间分辨率不一致?



硬件: PXI/CompactPCI>>Controllers

问题: 获取时间/日期(秒)这个VI似乎有1ms的分辨率,但有时却更长。为什么当我仍然能使用时间计数器来获取1ms的分辨率会发生这样的问题?

解答: 获取时间/日期(秒)这个VI从Windows的日历中获得信息,而时间计数器这个VI则从您的计算机系统的BIOS中获取tick的个数。每次您重启计算机后,tick的个数就会被复位,且它的精度为1ms。Windows日历的更新率却不同,因此并不会给出期望的1ms的分辨率。Windows日历的更新速率大概是这样的, Windows XP 专业版的是60Hz.,这个速率将会使获取时间/日期(秒)这个VI的时间分辨率大致为16.66 ms。

相关链接: KnowledgeBase 3PJC3B8: How do I Convert a Date/Time String into a Timestamp Constant in LabVIEW?
KnowledgeBase 2G27ANEW: Wait Until Next ms Multiple.vi Does Not Wait Properly on First Loop Iteration
KnowledgeBase 0EF854SG: Differences Between Wait (ms) and Wait Until Next ms Multiple
DeveloperZone: Software Timed Loops using Wait (ms) and Wait Until Next ms Multiple


附件:





报告日期: 03/03/2006
最近更新: 01/21/2009
文档编号: 3V2FAKHL