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: 

Labview basic

Dear forum members. I have one question about labview basic.

I have table of string. How can I choose the columns and rows datas. For example  I want to seperate 2nd column datas from 5 row to 17row elements, and then use.

Can you help me?

Thanks in advise.

Sincerely

Harutyun Melikyan.

0 Kudos
Message 1 of 6
(2,778 Views)
Hi Melikyan,

again you posted the (nearly) same question in atleast two threads! Make ONE new thread for a new question or stick with the old, when the topic didn't change...

The question here is really basic:
There's a subarray-function. Wire the table to this function and supply the correct row/column/length values.

To do the same with an Excel sheet isn't basic. Here you should study the examples that come with LabView!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,772 Views)

Dear forum members. I attach the Vi. Can you help me to show the way how to seperate for example the 5th cloumn and elements from 10 to 20.

Thanks in advise.

Sincerely

Harutyun Melikyan!

0 Kudos
Message 3 of 6
(2,736 Views)

There is no table in this VI. Nor is there anything related to Excel as your other posting asks about. The only thing in this VI is a simple string returned by a VISA Read. If this string is something you need to parse out and need help doing so, you HAVE to include that string. Not only are you doing multiple posts of the same question, you are doing multiple posts without providing the necessary information. Smiley Mad

To do this right, run the VI so that there is data visible in your string indicator. Go to your edit menu and select Make Current Values Default. Save the VI. Attach the VI you just saved.

Message 4 of 6
(2,727 Views)
Excuse me. Now I attach the file with Current Values Default...
0 Kudos
Message 5 of 6
(2,718 Views)

Okay, so you are creating the array correctly. As already mentioned, there are several functions on the array palette that you can use. If you just want a certain rows in a single column, you can first use the Index Array function to extract one column. You do that by wiring a number to just the column input. Then, you can use the Array Subset function to get a specified number of elements from there.

To become familiar with how the array functions work, you can do the following. On the front panel of the VI with the large array, copy the array and paste it onto a new VI's front panel. Right click on the array and select Change to Control. The on the diagram, you can wire the array to various functions. Experiment with controls connected/disconnected to the inputs of the array function you have. With a front panel indicator wired to the function's output, you can see for yourself how the functions behave.

Message 6 of 6
(2,710 Views)