LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In a table data is coming in single row

Solved!
Go to solution

In a table my data is coming in single row as shown in below image ,  I required it in multiple Row.

 

Poojaavi123_0-1687146978602.png

It is coming vertical but it should be horizontal.'

Poojaavi123_1-1687147035474.png

Please help me to short out this problem.

0 Kudos
Message 1 of 8
(923 Views)

I am not familiar with these colorful subvis. Is that from a toolkits? What do they do? We cannot tell from a picture!

 

Is seems a bit unusual to take one element from a 1D array and then turn it into a 1D, then a 2D array with one element.

0 Kudos
Message 2 of 8
(916 Views)
Solution
Accepted by topic author Poojaavi123

@Poojaavi123 wrote:

It is coming vertical but it should be horizontal.'


No, it's all in one cell when you want it split into several.

That means your read value isn't an array and needs to be converted to one. Spreadsheet string to array is needed before sending it to your table function.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 8
(870 Views)

Thanks for your response but , String data is not splitting by using spreadsheet also. data is coming before spreadsheet is

Poojaavi123_0-1687164486569.png

and after using spreadsheet only first data is coming in index 0.

Poojaavi123_1-1687164601244.png

 

0 Kudos
Message 4 of 8
(861 Views)
Solution
Accepted by topic author Poojaavi123

Hi Poo,

 


@Poojaavi123 wrote:

String data is not splitting by using spreadsheet also. data is coming before spreadsheet is

and after using spreadsheet only first data is coming in index 0.


It would help when you would set the correct delimiter char at the SpreadsheetStringToArray function!

(Read the help for that function…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(837 Views)
Solution
Accepted by topic author Poojaavi123

LVNinja_0-1687182021452.png

You need to wire the correct delimiter character (in your case is a coma).

if The output is a 1D array you need to wire an empty double 1D array. otherwise it will be 2d by default. 

0 Kudos
Message 6 of 8
(820 Views)
Solution
Accepted by topic author Poojaavi123

@Poojaavi123 wrote:

Thanks for your response but , String data is not splitting by using spreadsheet also. data is coming before spreadsheet is


Most of your operation is in an opaque light blue subVI and we have no idea what that one even does! It seems to interact with some database or instrument and return a 1D array of strings where you are apparently only interested in the first two element (index array is resizable, right?).

 

So far we are looking at element(0) and that seems to contain a spreadsheet string with comma as delimiter, so wire a comma constant to that input if you want to convert it to a 2D array of DBLs. We cannot tell from the probe picture if it should be a 1D array or a 2D array (a 2D array would also have some linefeed characters that we cannot see!). Also %s is NOT the correct format to scan for DBLs, but fortunately LabVIEW is smart enough to ignore that mistake.

 

As has been said millions of times here, we cannot really debug pictures. Assuming that the rest of the code is working fine, please place an indicator at the 1D array right after the light-blue subVI and run your code so it displays data. Now stop the VI and right-click that terminal and "change to constant". Copy that constant to a new VI and attach that VI here. This is the ONLY way to really tell what's going on, so please do so!

 

In your original code, you wired these strings to the green subVIs. You haven't told us what they expect and what they do with it. Who wrote them? Is there a manual?

 

0 Kudos
Message 7 of 8
(809 Views)

Now my problem is resolved by using spreadsheet function.

0 Kudos
Message 8 of 8
(763 Views)