LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arrange the peak magnitude values of multiple strain gages according to their locations.

Solved!
Go to solution

There are 32 strain gages installed on a 53' (that is 636") span beam, which are 20" apart. The first gage is at 26" from the support. The attached vi gives the peak magnitudes of each gage individually by changing the columns and rows in the controls. Now, these peak values should be arranged according to the spacing of the beam and join those points with a spline curve.

 

Open the vi, give the path way to the attached excel sheet. Now, in the start cluster assign 3 to Column, 620 to Row, in the end cluster assign 4 to Column, 845 to Row. Now run the vi. Assigning the start and end columns should be (3,4), (5,6), (7,8) and so on, to get the maximum amplitudes of each strain gage.

 

Venu

Message 1 of 31
(4,193 Views)

Greetings Vgrchada.

 

Since you know the position of the strain maximum values, you can easily get them into an array programmatically with the Index Array function. If your data set changes, or you have several ones, you can still parse the array and search for the max values for each strain gauge.

 

To display them as I understand you want to, try using a XY array and assign the strain maximum value to the position in inches on the span beam. Right click Plot Legend, and in the menu that appears, click on Common Plots and select and option that works for you, for example one that only shows the specific points, and doesn’t connect them. You can then calculate the spline curve with a proper VI from the Mathematics function palette and display it in the same graph.

 

I attach a small example on how to arrange the strain values with their position in inches on the span beam.

 

Have a good day.

 

Luis J.

Application Engineering

National Instruments

Luis J.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 31
(4,151 Views)

Thanks Luis. You sent me the right block diagram for ploting the final XY graph. I couldn't look into the vi because I use version 2010. Is that block diagram and front panal pictures are from the vi that you attached?  If not, can you just send me the printscreen picture of the block diagram and front panal of that vi? 

 

However, I have only two concerns:

 

1) The vi that I attached previously gives out only 1 value of maximum amplitude for respective strain values from 1 strain gage, how should I put 'for loop' to display all maximum amplitude values in an array programmatically with the Index Array function? I tried it out before but it is taking so much time to figure out because I am a civil engg.

 

2) I thought the spline curve will join all the points with the smooth curve, but it doenot work as shown in the front panel picture. What kind of curve subvi should I use to join all the points with the smooth curve? I have to do studies more precisely from the final graph. I am sorry for specifying that I need spline curve. 

 

Thank you very much

Venu

0 Kudos
Message 3 of 31
(4,138 Views)

 Greetings Vgrchada.

 

I apologize for not posting a LabVIEW 2010 VI. However, the screenshots of the Block Diagram and Front Panel are of that VI, so I’m glad you could take a look at the example and solved part of the problem.

 

Now let’s move on to the next part. There are several methods to parse an array for maximum values. Probably the easiest in LabVIEW is to use the Array Max & Min Function. It belongs to the Array Functions palette; you can find more info in the LabVIEW help, or in this webpage:

 

http://zone.ni.com/reference/en-XX/help/371361G-01/glang/array_max_and_min/

 

So, the trick here is to load all the values of the table column by column, by calling the GetXL_CellValues_2D_Dbl.vi once for every strain gauge. The “For loop” will iterate 32 times (the number of gauges) and call the same range of rows 6::49 (where the data is.) Inside the “For loop”, change the column according to where the data of the gauges is. If you run into trouble, try this algorithm in a simpler spreadsheet and work your way up from there. The function you use to read the spreadsheet is very flexible and allows reading ranges of cells, so it is a matter of trying some combinations of parameters until you get it right.

 

Finally, let’s talk about the spline curve. In my example I used the Cubic Spline Fit.vi VI. However, I did not set the smoothness and other parameters correctly, so the resulting interpolation is very crude. Read the help on that function to learn how to set up the parameters in order to get a smoother curve, keep tinkering with them until you get what you want.

 

Let us know how it goes. Have a good day!

Luis J.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 31
(4,128 Views)

Hi Luis, I appreciate your suggestions. I tried doing the same thing before to call the columns one by one starting from 3 till the column 34 and rows always from 620 till 845 (because that's where the real data is) using forloop. I am not able to understand how the forloop can first take the column 3 and run the other loop inside from row 620 till 845. I know the start and end clusters shouId be outside the loop to assign the desired limits. I tried again last couple of hours but couldn't get the right answer. I am basically having trouble calling the values from the start and end cluster. You can take a look at my approach from the attached vi.

 

Thank you

Venu

0 Kudos
Message 5 of 31
(4,104 Views)
Solution
Accepted by topic author vgrchada

Greetings Vgrchada.

 

You can modify independently the column and the row of each Start and End control through a Bundle by Name function. Look at the example I attach. I changed the Star and End controls to constants because they are going to be manipulated programmatically (So there is no need for humans to interact with them) Always use for the Start and End row the same values, since there is where all the data is. As for the columns, use the iteration counter of the For Loop (with the proper offset, so that it starts where it should) Another possibility is to build an array with all indexes and use the auto-index property of the For Loop. (This in the case that the columns are not next to each other)

 

Let me know how it works out. ( I have not tested this code, but the principle should at least help you find your way)

 

Regards.

Luis J.
Applications Engineer
National Instruments
Download All
Message 6 of 31
(4,086 Views)

Dear Luis,

 

Thanks for the support on that issue. I finally got the right mode shape figure. However, I have a small problem. If you take a look at my block diagram, I kept the waveform chart outside so that it would take all the 32 strain gage values and display it but I am not actually getting it. I tried different ways but I couldn't get the right figure. It has to display the strain vs. time data of all gages.

 

I know the purpose of this support is to solve the question that I asked only in my first email. The goal is to find the strain energy. I know how to do it theoretically but now I have to put them in LabVIEW. I will try to do those things myself.

 

However, just to let you know what I am working on.There are two more things on the same block diagram that I need to do.

1) There are actually three tests in each case. Assume that we have used the test data from the first case. So the same test was done three times in each case to take the average value. As we know, we gave a path way to only one test data from spreadsheet. Now I have to give the path way to other tests and finally give the average results in XY graph. (i.e. mode shape). Then compare the averages of mode shapes and strain energies of two cases.

2) I have theoretical formula to find modal curvature (second derivative of mode shape) and strain energy from the mode shape values. Now, I need to use it in LabVIEW and find those two parameters using the XY graph values. I am trying to figure out the way to write the formulas in the LabVIEW.

 

If I need guidance on that, can you further discuss the above problems in this same subject? How can I fill the feedback form? I want to fill it up for you. Kudos!

 

Thank you

Venu

 

 

0 Kudos
Message 7 of 31
(4,068 Views)

Hi Luis,

 

I have been trying to enhance the program by giving the path way to several excel sheets of Case A, average it and compare them to the average of Case B in the final XY graph. The trials can be varying depending on the desired accuracy of the results. Most probably they will be ranging from 3 to 5. I tried it in different ways but I am afraid that you would get confuse with what I did. So I will avoid telling you that.

From the excel sheet that we used before, the actual data was in between rows 620 and 845 but the actual data will not be in the same rows for other trials. It implies, the data in different trials varies from each other.  The data I picked before from row 620 to 845 was purely an approximation by leaving behind some useless data points on either sides (the useless data points are because of delays before and after applying the load). The bottom line is, we should pick the actual data of strain gages, average it with the data from different trials and then compare it with the case B. It is complicated to me, I need you support on this issue.

 

Below are the 2 attached excel sheets from case A and 1 from case B (assume trial 1 case B as an average) for assigning and running the program. The data from this sheets will make you understand more clearly where the actual data is and how it is varying. 

I hope I explained you all the points related to the first problem. Let me know if you have any more questions on this. I will reply you asap.

 

Thank you
Venu

0 Kudos
Message 8 of 31
(4,054 Views)

Greetings vgrchada.

 

I apologize for the late response. I will give you some links that can help you with your questions:

 

On how to plot different signals in the same XY graph:

http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/types_of_graphs_and_charts/

 

On how to implement your modal curvature (second derivative of mode shape) and strain energy from the mode shape values in LabVIEW:

http://www.ni.com/white-paper/7572/en/ (if you have more experience in text-based programming)

http://www.ni.com/white-paper/7593/en/ (if you want to keep using LabVIEW's graphical programming, but your code is becoming messy and hard to read)

 

And finally, regarding the parsing of different excel sheets, with different rows and columns arrangement, I can offer you some advice:

Since you have some trouble with programming, the first step is to try to simplify the procedure. Try to make your experiment data more organize, so that is easier to parse.

If it is out of the question, at least try to define a set of rows which will encompass all the data from all the tests, even if in some sheets there are blanks left at the bottom. So that loading them with the For Loop is easier.
Finally, load from one sheet at the time all the values that you need, and when you parse the next sheet, the newer values will be added to the ones that were before. At the end, divide by the number of sheets you parse and you will get a simple average. You can modify this to more complex statistical functions if you need to.

Good Luck!


PD:
If you have SSP, you have access to some online training that could help you increase your proficiency in LabVIEW faster! Also, National Instruments offer other types of customer education that might be of even greater help to you.

Luis J.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 31
(4,034 Views)

Hi Luis,

 

I could not get back to you today morning because I was busy with other research work. I followed your suggestions and finally did the complete program just now. However, the final results of strain energy are not making sense to me. The strain energy for a zone (i.e., between two adjacent data points) is calculated numerically  by integrating the square of the modal curvature over each zone. If you take a look at the vi, you will understand what I did. The trial 1 case A and trial 1 case B are the excel files for undamaged and damaged sections, respectively. I attached those files in my previous post. When you give file path of those files in the vi, you will see the difference in the mode shape graph at a distance from 200 to 300inches. At this location there should be a peak occuring in the strain energy graph, just like the way it looks in the picture that I attached. The other formula for strain energy is show in the other picture. I tried it both the way but couldn't get it right. Can you tell me if there is an other way to do the integration according to the underlined statements?

 

Thank you

Venu

0 Kudos
Message 10 of 31
(4,014 Views)