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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert 1-D array double to double?

Being a novice to LabVIEW, I'm not sure how to convert a 1-D array of double to double to display. I'm trying to display a time stamp from a waveform to a double precision display.

I would appreciate any help!

Thank you!!!

0 Kudos
Message 1 of 8
(15,456 Views)

If it is a waveform data type, you use the Get Waveform Components to extract t0. You would need to use a To Double Precision Float to convert the timestamp.

Message 2 of 8
(15,448 Views)

You can't "convert" a 1D array to a single value. You can index out an element to a single value. Or you can perform some mathematical operation, like the average value. However, you said you have a waveform, so it sounds to me like what you really should be looking at are the waveform-related functions. Specifically, Get Waveform Components. This will allow you to get the starting time for the waveform, and wire it directly to a timestamp indicator. Is this what you need?

 

 

EDIT: Dennis posted while I was, so you got a double answer.

Message 3 of 8
(15,446 Views)

Hi!

Thank you for the quick reply!

I've tried converting the time array, but I can't seem to display it on the standard double precision display.

I've attached the error.

Thank you for your help!!!

0 Kudos
Message 4 of 8
(15,436 Views)

Interesting attempt with Flatten To String, but ditch all of that.  After you convert the Time Array to DBL, simply Right-click on the thick orange wire (Array of DBL) and Choose Create->Indicator.

 

0 Kudos
Message 5 of 8
(15,427 Views)

And why are you doing all of that instead of just getting t0?

0 Kudos
Message 6 of 8
(15,417 Views)

Your idea to "dump the idea" led me to try another approach. I used the "time stamp" vi, and that did what I wanted to do all along!

Thank you for your help!!

This is a great forum. I really appreciate your help!

 

0 Kudos
Message 7 of 8
(15,403 Views)

Your suggestion to "ditch all that" was a great one. I tried a different approach, that of using the "elapsed time" vi, and that did the trick! It's doing exactly what I wanted it to do.

Thanks so much for your help! This is a great forum!!!

 

0 Kudos
Message 8 of 8
(15,399 Views)