how do i display current time on a labview chart

Upload: williamii

Post on 01-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 How Do I Display Current Time on a LabVIEW Chart

    1/2

    How Do I Display Current Time on a LabVIEW Chart?

    Primary Software:Primary Software Version:1.0

    Primary Software Fixed Version:N/ASecondary Software:N/A

    Problem:I have noticed that setting the time as Absolute Time on a Waveform Chart will cause the time display to startat 6:00 PM, 12/31/1903. How do I display the Absolute Current Time?

    Solution:Without any timing information in your data, a LabVIEW chart will use these default values. To display the timeas both absolute and current, use the following property nodes:

    1. Offset and Multiplier:Multiplier Property. This property node will serve as the delta-T, or time between

    samples displayed on your waveform chart.o Right-click your chart on the Block Diagram.

    o Select CreateProperty NodeX ScaleOffset and MultiplierMultiplier.

    o Right-click the new property and select Change All To Write.

    o Wire in the numeric value 1/x, where xis the number of samples displayed per second.

    2. Offset and Multiplier:Offset Property. This property node will set the starting time for your chart to thecurrent time and date.

    o Drag down the previous property node to create another entry.

    o If the property node does not say XScale.Offset, left-click the new property entry and navigate to XScaleOffset and MultiplierOffset.

    o Place a Get Date/Time In Secondson the block diagram.

    o Place a To Double Precision Floatfunction on the block diagram and wire it to the property node as

    shown below.

    If you have not already set the time Display Format to Absolute, do so by either:

    1. Changing the formatting settings in LabVIEW.o Right-click the chart on the front panel and select Properties.

    o Click the Display Formattab.

    o Select Absolute Timeas the Type.

    o Select System time formatfrom the two drop down boxes on the right.

    o Click the OKbutton.

  • 8/9/2019 How Do I Display Current Time on a LabVIEW Chart

    2/2

    2.3. Using the Display Format:Format Property.o Place a property node on the block diagram.

    o Select X ScaleDisplay FormatFormat.

    o Wire in the numeric value 7 to select Date and Time.

    You can view an example demonstrating the use of these property nodes atNI Community: Display Current

    Time on a LabVIEW Chart with Absolute Time Setting. Note the wait function inside of the while loop. It is

    required for setting the rate of the loop to generate the correct number of samples per second.

    Related Links:

    NI 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

    http://decibel.ni.com/content/docs/DOC-8097http://decibel.ni.com/content/docs/DOC-8097http://decibel.ni.com/content/docs/DOC-8097http://decibel.ni.com/content/docs/DOC-8097http://decibel.ni.com/content/docs/DOC-8097http://decibel.ni.com/content/docs/DOC-8097http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/grphscl_ofst_multimulti/http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/grphscl_ofst_multimulti/http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/grphscl_ofst_multiofst/http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/grphscl_ofst_multiofst/http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/digital_formatprecfrmt/http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/digital_formatprecfrmt/http://digital.ni.com/public.nsf/allkb/46F8542CD3F0208086256D13006F8D48?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/46F8542CD3F0208086256D13006F8D48?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/46F8542CD3F0208086256D13006F8D48?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/4C22ABC2E90DF0E586256CE0007AA12A?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/4C22ABC2E90DF0E586256CE0007AA12A?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/69CABEE9F0BA9A6586256B41006B0BBB?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/69CABEE9F0BA9A6586256B41006B0BBB?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/69CABEE9F0BA9A6586256B41006B0BBB?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/4C22ABC2E90DF0E586256CE0007AA12A?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/46F8542CD3F0208086256D13006F8D48?OpenDocumenthttp://digital.ni.com/public.nsf/allkb/46F8542CD3F0208086256D13006F8D48?OpenDocumenthttp://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/digital_formatprecfrmt/http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/grphscl_ofst_multiofst/http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/grphscl_ofst_multimulti/http://decibel.ni.com/content/docs/DOC-8097http://decibel.ni.com/content/docs/DOC-8097http://decibel.ni.com/content/docs/DOC-8097