LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

split arrays in more than one part

Hello guys,

I have 2 synchronized arrays(angle from a encoder and torque from a strain gauges) that I want to plot on a xy graph. I have 2 problems:

 

1st- my graph looks bad because I have an overlapping of the values of the torque('cause the values of the relative angle arrays go from 0 to 360 to 0 to 360...and so on)

 

2nd-I want to split the array of the torque in more parts when the value of the angle is 0 or 360 and do the mean value of each part to get the mean torque of each revolution

 

It's very urgent!thank everybody in advance!! 🙂

0 Kudos
Message 1 of 6
(2,451 Views)

Maybe you could use "unwrap phase" then split the array at multiples of 360 degrees. (see also)

 

 


@orsogna wrote:

2nd-I want to split the array of the torque in more parts when the value of the angle is 0 or 360 and do the mean value of each part to get the mean torque of each revolution


 

Do you want the mean for each angle over multiple revolutions? For that you don't need to unwrap, simply create a weighted histogram of the original data for the desired number of angular segments.

 

Can you attach some typical data?

0 Kudos
Message 2 of 6
(2,445 Views)

Thank u a lot for the fast reply! actually I didn't understand how to use unwrap phase in my case,and do you mean a istogramm in labview or outside labview?(I have lots of data so a I don't know how can I use that data in excel)...I attached u my data...thank u again!

Download All
0 Kudos
Message 3 of 6
(2,432 Views)

 


@orsogna wrote:

... ,and do you mean a istogramm in labview or outside labview?


 

Of course do everything in LabVIEW!

 

The data does not look very regular, for example it does not always wrap at a multiple of 360. Also each revolution seems to be concentrated in a different direction. Do you want the average/per direction or e.g. the vector average for each revolution?

0 Kudos
Message 4 of 6
(2,424 Views)

-I want to plot the data in a xy graph where the x axes value are ..0...360...0...360...

-and to get the vector avarage for each revolution

 

anyway I think that it's normal that that first time the phase signal from the encoder arrives(z), the count restart not at 360 but where the value of the counter is...the other problem, I think, is that doing how I did the vi I have some value of the angle repeated... I don't understand what do u mean with direction?

 

0 Kudos
Message 5 of 6
(2,419 Views)

At the first jump, it resets the phase around -300 degrees and there is a note in the spreadsheet about it:

 

("in this case it┤s normal that the encoder restart not at 360 because it┤s the first time that the phase signal is sent")

 

I am not sure why you think this is normal. How is the angle referenced? Should the first angles be shifted so they start at nonzero but end at 360?

 

You only have one complete rotation with an incomplete rotation to the left (0..-300) and left (0..-130), and the vector average of any incomplete rotation seems quite useless.

 

 


orsogna wrote:

 I think, is that doing how I did the vi I have some value of the angle repeated...


 

Your VI has many missing subVIs, so I cannot test.

 

0 Kudos
Message 6 of 6
(2,381 Views)