From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing and performing calculations on analog signals

I want to run a cyclic fatigue test using LabVIEW to collect the data.  The test will cycle from min-displacement to max-displacement and 6 load cells will capture the result forces on the 6 specimens.  LabVIEW will acquire analog signals 6 from load cells, and 2 signals from a mechanical test frame (displacement and cycle count).  The cyclic test will run a total of 10,000,000 cycles.

 

At every 10,000 cycles, the loads (min and max) and displacement (min & max) will be averaged for 10 cycles.  Those averages will be used to calculate the following values: 1. average stiffness for each specimen (avg. max-load/avg. max-displacement and avg. min-load/avg. min-displacement) and 2. secant stiffness (avg. max-load - avg. min-load)/(avg. max-displacement - avg. min-displacement).  Therefore, there will be 6 average stiffness and 6 average secant stiffness calculations and I would like to plot them on the same chart (average stiffness vs. cycle count and secant stiffness vs. cycle count). A real-time graph of loads vs. time or frequency would also be generated.  These calculations will be stored in a data file throughout testing. 

 

My question is what would be the most efficient and best way of achieving all of this?  Can I use a master/slave pattern, producer/consumer architecture, queues, notifiers?  I could see this being a very cluttered block diagram, so that's why I thought I could use the aforementioned structures.  Any help would be appreciated on getting me started.

 

Thanks,

Ron

 

 

0 Kudos
Message 1 of 2
(2,299 Views)

The producer/consumer template is a common way to start applications like this.  You will collect your data and display it in real time in the producer loop and do your calculations and data storage in the consumer loop.  Depending on your cycle time though, this kind of architecture my not be significantly beneficial.

 

While planning out your design ahead of time is always a good idea, I recommend just getting a start on your coding with some thought given to organization.  It may turn out to be simpler than you think but you can always do some reorganization later once you've identified the weak/slow areas of your program.

 

If you have any specific concerns, let us know and we'll do our best to help address them.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,275 Views)