Okay so here is my dilemma: I need to make a fatigue tester. And this is my fifth day using labview.
And arduino sends a string containing two pieces of data (a strain reading(dbl) and a count reading).
The Vi read this, separates it and then graphs it.
Once the values are had TWO more things need to happen:
I need to know the number of peaks that have a strain value that are a percentage (entered by user) of the max recorded value (the first peak can be expected to be the highest).
I need to output the graph and number (a single value) of peaks to an excel file.
two extra stipulations:
-The arduino doesn't need too actually give the number of cycles as part of the string, in affect, the machine should actually stop after the strain is a certain value lower than it started and print only the number of cycles it took to get to that value. Even then, stopping the machine is secondary, as long as I get the number of cycles I'm good.
-the machine is only currently doing one sample but, in future will be doing four. four separate graphs and cycle counts... This isn't needed as much as just getting the thing working for one.
Here is my current VI. I haven't finished it and I'm running low on time, I will continue trying to get this working but any help would be most appreciated.: (LABVIEW 2014)
- Please enable the TermChar for the serial communication. Then replace that complicated string handling by simple ScanFromString functions. And REMOVE BytesAtPort!
- what's the purpose of that loop interation a million times? It is always processing the very same 100 samples in each iteration…
I need to know the number of peaks that have a strain value that are a percentage (entered by user) of the max recorded value
A simple comparison will do this "percentage of max". Then just count number of TRUE results…
the machine should actually stop after the strain is a certain value lower than it started and print only the number of cycles it took to get to that value.
That's one more comparison of current value with start value…
thank you for your reply.
- i hvae found that the sensor i am using doesn't produce peaks that are clean enough for acting as a counter..
- the interation count was removed and replaced with a different loop.
- I used ScanForString in my current build.you are right, it makes it much simpler.
-why remove bytes at port?
Do you have any suggestions on how I could exort the data to excel?
thank you for your time.