Jump to content

Multi columns file


Recommended Posts

Hallo,

I have this problem, I take measure from a machine giving the following input: star vol, stop volt, step size, number of points. What i recive from the machine are two arrays like: (after using built array and turned row to column):

//startvolt= 0, stop volt=3, step size=1, number of points= 3//

Voltage Current

0 84

1 85

2 86

3 87

0 90

1 91

2 92

3 93

0 100

1 101

2 102

3 103

I want to cut the columns (or the rows as u prefer) when the voltage reach again the starting value and and obtain something like:

Voltage current1 current2 current3

0 84 90 100

1 85 91 101

... ... ... ...

I can easily delete from the voltage array the values but for the current i don't know what to do.

My idea is to do a for loop where number of loops = number of points, where i put "subset of array" vi giving in input the length (Stop-start)/step, the index is (i * ((stop-start)/step))+1 but I don't know how to collect the subset of array every loop and then put them in different column.

Thank you very much

pesce :throwpc:

Link to comment

Look at some of the build and sort array examples in

\examples\general folders, like the arrays.llb

There is a simple ex: Separate Array Values.vi that you could modify by subindexing the array using the loop counters. You'd probably have to drag one more layer of loop around the example code, but this should get you started. If you get stuck, post your modified version of the VI along with your caller (or a subset saved as a scratchpad VI) and we'll see what we can do.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.