Discussion:
Recording peak load with Labview
(too old to reply)
BER1
2008-08-08 14:10:07 UTC
Permalink
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!! 
 
 
smercurio_fc
2008-08-08 15:10:08 UTC
Permalink
What kind of hardware are you using to gather the data? It sounds like a counter would be what you need to do.
BER1
2008-08-08 15:10:11 UTC
Permalink
The load cell is connected to an SCXI strain gauge module. Can't the count be done in Labview?
smercurio_fc
2008-08-08 16:10:05 UTC
Permalink
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).
James McN
2008-08-08 15:40:06 UTC
Permalink
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
BER1
2008-08-08 16:10:06 UTC
Permalink
This post might be inappropriate. Click to display it.
James McN
2008-08-08 16:10:08 UTC
Permalink
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,


Peak Detector Example.vi:
http://forums.ni.com/attachments/ni/170/347916/1/Peak Detector Example.vi
BER1
2008-08-08 16:40:05 UTC
Permalink
That's great. Thanks a lot..

Loading...