LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert a 1-D array of cluster of 5 elements into a 2-D array of numbers? (history data from a chart)

Solved!
Go to solution

Hello,

 

in my vi I have a chart with 5 Plots displaying measurement data.

The user should be able to save all the history data from the chart at anytime. (e.g. the user watches the chart and some event happens, then he presses a "save"-button)

I know, that I can read out the history data with a property node. That is not the problem. The problem is, how do I handle the data? The type of the history data is a 1-D array of cluster of 5 elements.

I have to convert that data somehow into a 2 D-array of numbers or strings, so that I can easily save it in a text-file.

 

How do I convert a 1-D array of cluster of 5 elements into a 2-D array of numbers?

 

I use LabVIEW 7.1

 

Johannes

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 1 of 9
(3,120 Views)
Solution
Accepted by topic author johanneshoer

Hallo Johannes,

 

the picture shows the trivial way:

 

Message Edited by GerdW on 04-28-2009 05:14 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(3,115 Views)

Gerd,

 

thank you for the quick response and the easy solution.

 

Look what I did in the meantime. I solved the problem too, but muuuch more complicate 🙂

 

And I have converted the numbers to strings, so that I can easily write them into a spreasheet file.

 

 

Johannes

Message Edited by johanneshoer on 04-28-2009 10:39 AM
Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
Download All
0 Kudos
Message 3 of 9
(3,105 Views)

Hi Johannes,

 

to show pictures in the message you first have to attach it, submit the post, then edit the post and insert the picture from the attachment-link!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(3,099 Views)

If you want us to see your picture, you must attach the image file to your post.  Your embedded image is located on your hard drive, and we can't access that.

0 Kudos
Message 5 of 9
(3,097 Views)

Hi Johannes,

 

apart from using way to much code (as shown before Smiley Wink ) you only need "convert number to decimal string" once - it also takes arrays as input...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(3,082 Views)

Johannes,

 

There is no need to use 'Convert Number to Decimal String' at all and even if you did, it's the wrong function. Write to Spreadsheet uses a 2D DBL input.

0 Kudos
Message 7 of 9
(3,064 Views)

Hi Dennis,

 

Johannes is using LV7.1 - I can't check the availability of "Write to spreadsheet" nor it's functionality right now at home (only LV8.5 available)...

 

Nevertheless Johannes should know that the "number to string" functions also take arrays...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(3,049 Views)
Write to Spreadsheet was available in 7.1 and the only allowable inputs were a 2D or 1D DBL. The String option was available if you edited the VI according to block diagram instructions. My point about Number to Decimal String is that it converts the DBL to an integer and that is almost certainly incorrect for this application. Number to Fractional String would be more appropriate.
0 Kudos
Message 9 of 9
(3,040 Views)