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.



如何在 Waveform Chart 上顯示現在的時間?



主要軟體:
主要軟體版本:
主要軟體修正版本:
次要軟體: N/A

問題: 在 Waveform Chart 的設定裡我可以把 X 軸設定為絕對時間 (Absolute Time), 但是程式執行時時間會從 6:00 PM, 12/31/1903 開始. 我該如何讓它顯示現在的絕對時間?

解答:

如果您的資料裡沒有時間的資訊, 那 LabVIEW 就會使用 6:00 PM, 12/31/1903 來當作 Waveform Chart 的開始時間. 如果要顯示現在的絕對時間您必須使用以下的 Property Node 來設定您 Waveform Chart 的屬性:

1. Offset and Multiplier: Multiplier 屬性:

2. Offest and Multiplier: Offset 屬性:

 

如果您還沒有把 Waveform Chart 的 X 軸調整成絕對時間的話, 您可以:

1. 在人機介面上直接做設定

 

2. 使用 Display Format: Format 屬性:

附件的程式是以上敘述的範例程式. 在迴圈裡的 Wait 功能是用來控制資料被放到 Chart 上的速度.



相關連結: Developer Zone Community: Display Current Time on a LabVIEW Chart with Absolute Time Setting
LabVIEW 8.5 Help: Offset and Multiplier:Multiplier Property
LabVIEW 8.5 Help: Offset and Multiplier:Offset Property
LabVIEW 8.5 Help: Display Format:Format Property
KnowledgeBase 2WOE97DS: 'Seconds To Date/Time' Function in LabVIEW Does Not Return 12:00 a.m., Jan 01, 1904 When I Input Zero Seconds
KnowledgeBase 2V4FANW0: Wrong Timestamp Listed in Waveform Data Type
KnowledgeBase 2HDCFJV5: Universal Time and LabVIEW

附加檔案:


Charts.vi - Charts.vi


報告日期: 10/07/2004
最後更新: 02/25/2010
文件偏號: 3E6I65K7