LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recording peak load with Labview

i have an application where a cylic load is applied to an object via a load cell. I need to record the peak load of every cycle and plot it on an XY graph versus the cycle number.
 
However, the only trigger available to tell labview to look for a peak and add a count to the cycle number, is when the load goes over a certain threshold. The load is over that threshold for 3/4 seconds normally.
 
I am struggling to:
 
1. Add a single count i.e. if I use a case structure the condition is true for 3/4 seconds so the count is not single
 
2. Record the peak load - If I use a while loop, the live load cell reading freezes at the point the loop starts.
 
I appreciate it is probably very easy code and I'm being a bit thick - but can someone help please!! 
 
 
Message 1 of 8
(3,924 Views)
What kind of hardware are you using to gather the data? It sounds like a counter would be what you need to do.
0 Kudos
Message 2 of 8
(3,906 Views)
The load cell is connected to an SCXI strain gauge module. Can't the count be done in Labview?
0 Kudos
Message 3 of 8
(3,902 Views)

Hi,

If I were you I would always tak a reading and programmatically use a peak detector VI (there is one to work on arrays and one pt by pt) that will return the peak values and the index in the case of feeding it an array. Is this the functionality you are after?

Regards

James Mc
========
Ask me about Rust & NI Hardware
My writings are at https://www.wiresmithtech.com/devs/
0 Kudos
Message 4 of 8
(3,897 Views)

@BER1 wrote:
The load cell is connected to an SCXI strain gauge module. Can't the count be done in Labview?

Of course it can be done with LabVIEW. My reason for asking the question about what hardware you had is that if you had the right hardware then you could do it in hardware. In LabVIEW all you need to do is to have a loop that's continuously reading the gauge and see if you've hit a peak based on the value that's read. You can do this with the Peak Detector function, as suggested, or just by looking at the value and determining if you're on your way up or down (indicating the upswing or downswing of the cycle).
Message 5 of 8
(3,881 Views)

Hi James,

Just tried the Peak detector vi, not exactly sure if it'll do what I want. Is there any chance you could show me a simple bit of example code using it i.e. using a numeric control such as a knob as the input signal and detecting the peak every time the value is above 10 for example?

Thanks

 

0 Kudos
Message 6 of 8
(3,880 Views)

Hi,

Attached is a sample VI that shows the two types of peak detector available side by side.  For the point by point graph I have also divided by the cycle time in samples and returned only the quotient that should give the cycle number.  Is this what you were after?

Regards,

James Mc
========
Ask me about Rust & NI Hardware
My writings are at https://www.wiresmithtech.com/devs/
0 Kudos
Message 7 of 8
(3,871 Views)
That's great. Thanks a lot..
0 Kudos
Message 8 of 8
(3,868 Views)