06-18-2023 10:58 PM
In a table my data is coming in single row as shown in below image , I required it in multiple Row.
It is coming vertical but it should be horizontal.'
Please help me to short out this problem.
Solved! Go to Solution.
06-18-2023 11:07 PM - edited 06-18-2023 11:08 PM
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.
06-19-2023 02:53 AM
@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.
06-19-2023 03:50 AM
Thanks for your response but , 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.
06-19-2023 06:47 AM
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…)
06-19-2023 08:41 AM
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.
06-19-2023 10:23 AM
@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?
06-19-2023 10:39 PM
Now my problem is resolved by using spreadsheet function.