LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Source: String Converted Sink: 2D Array of String

I need help converting. My error list shows this

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is string.
The type of the sink is 2D array of
string.

If anyone knows how to convert pls help

0 Kudos
Message 1 of 10
(1,603 Views)

You can "convert" a scalar string to a 2D array of strings with a single element (built array, init array, etc.) or multiple elements (spreadsheet string to array, etc.), but I believe that this is pointless and your problem is elsewhere and more fundamental. What is the "sink" (indicator, graph, function, etc.). Where does the string come from? What does it's content represent? Whys is a 2D array needed?

 

Can yo show us your actual code so we can help you fix the problem instead of simply covering it up with a bandaid.

 

Message 2 of 10
(1,582 Views)

hai

I am bit new to LabVIEW and I am doing project  on generating report of founded peaks in the given report, So here I am finding difficulty while loading the different data array output to table so please help me in finding the solution for this any help will be greatly appreciated.

0 Kudos
Message 3 of 10
(1,367 Views)

Hi kavyatweetee,

 

I am bit new to LabVIEW

So you could take all those training resources offered in the header of the LabVIEW board!?

 

You have a 1D array of DBL values and you want to display them in a table, which is a 2D array of strings.

As has been said before you need to convert your values to strings using the StringConversion functions. I suggest to use NumberToFractString function…

(Or use a simple DBL array indicator: right click the output of the BuildArray node and select create->indicator.)

 

Edit:

In your image you already create a table ("Table Control 2"), but you fail in creating the content for "Table Control3"???

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
Message 4 of 10
(1,358 Views)

Hai Gerdw

Sir I tried "Number to fractional string conversion" and then to table but it shows error in wire and when i am using array it shows only first values of the "Build array" and actually i want the same data output that is given to the input of "Build array" with three different columns in table. So help me in finding the solution for this.

0 Kudos
Message 5 of 10
(1,348 Views)

Hi kavyatweetee,

 

you just need to replicate the conversion as has been done for TableControl2.

I guess you are able to do so!

 

Suggestion: When you have problems with your VI you should attach your VI. We cannot debug images using LabVIEW!

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
Message 6 of 10
(1,344 Views)

thank you sir,

This time i will attach my VI and sir i can easily load the output values of "peak detector" that is both amplitudes and locations to "table control 3" as i was previously done with "table control 2". But here i also want to load the values of amplitudes to table after subtracting it with 3. Basically i want the total output as in report format.

0 Kudos
Message 7 of 10
(1,340 Views)

Hi kavyat,

 

I told you to replicate the existing code:

check.png

Just do that!

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
Message 8 of 10
(1,336 Views)

Hi GerdW

It is working.Thank you so much your help means a lot to me and sir another question if you don't mine I want to add serial number for that table and i will not Predefine those values and how can i add those numbers in increasing format is there any other option for that??????

 

0 Kudos
Message 9 of 10
(1,329 Views)

Hi kavyat,

 

a table is just a 2D array of strings.

 

When you want to add elements to your table you need to use BuildArray to append/prepend elements to that array!

(Or use property nodes of the table to set column/row headers as needed.)

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
Message 10 of 10
(1,321 Views)