10-21-2011 05:46 AM
Dear LabView community,
I am currently a student who has a very limited computer coding background. My supervisor wants me to start testing testing next week, so i am under a bit of pressure to get my VI code up an running.
The VI (version 9) which i have created calls for one double data point from another separate software (dll plugin) each time the iteration run.
The streamed data into labview (volts which is converted to acceleration G’s in the vi) of which is leg accelerations during continous treadmill running. I have set up a moving average based on 5 previous acceleration peaks. The moving average is being constantly updated during the continous running of the vi.
The thing that i am having trouble with is implementing a buzzer/LED feedback system to set off at every 5th moving average update. At present the buzzer/LED is set up on going off on each moving aveage change/update.an i implement the buzzers/LED to go off every 5th moving average change?
Could you implement this logic in my VI and show me in a png/jpeg format? See attachment.
Also is there a way to set the LED boolean lights to stay on for lets say 0.5 of a sec?
Thank you so much
10-21-2011 08:01 AM
I have made some changes to clean things up and make your code a little better.
The shift registers -- leave separation between single SR, otherwise they look stacked which doesn't change the functionality, but in the mind of anyone else looking at your code, will appear to be stacked SRs.
Feedback node--use the iteration terminal if you want to count the loop iterations. What's the purpose behind this?
Case structure (Peak Detect Enable)--Use the Select function to switch between two different values. The case will work, but this is cleaner.
The stop button--I assume this is for testing purposes only? In your final version, you will want a way to exit the loop gracefully, rather than a hard stop from the operator. Or is this a separate dialog that will open to the user?
I added code to your buzzer/LED section of code to only work on the 5th multiple of testing. See if this will work for you.
10-21-2011 08:17 AM
Hi MoReese,
Could you send me the vi for version 9? As I cannot open your attactment.
The purpose of the vi is to provide real-time (biofeedback) to runners while they are running continously on a treadmill. The feedback is based on peak tibial accelerations (5 previous peaks), for example if the threshold is set at greater or equal to 10g then the high shock buzzer/LED boolean will come on. The aim is to get runners to reduce their peak accelerations to an acceptable level while they are running (no buzzer sound/green LED boolean).
Also could you help me increase the LED/booleans duration once they are activated as true?
Thank you so much!!!!
Ad
10-21-2011 08:33 AM
Sorry about that. Here you go.
10-21-2011 08:36 AM
Hi Mo,
It still says it a version newer 10.0 vi, i have 9.0 labview.
Sorry about this.
Thanks for your support.
10-21-2011 09:22 AM
Let's try it again.
10-21-2011 11:20 AM
Hi Mo,
Yes the VI loop is working. My only concern is that I want the threshold set buzzers/LED booleans to go off at the actual 5th multiple average value rather in what I think is happening, is that the buzzers/LEDs are activating on the multiple change of 5th value above the set threshold. For example the high shock threshold is set greater than 10g, then the buzzer/LED is activating once 5 values are above 10g. Can you change this to make the thresholds go off at the 5th multiple change of the average value?
I wish i could be you a drink in return!
Thank you so much
10-21-2011 04:51 PM
Here. I only changed the Equal to Zero funtion to Not-Equal to Zero so that the LEDs should turn off when the iteration is a multiple of 5. I believe the logic is correct. I also included an elapsed time counter to keep the LEDs on for 1/2 sec. Your VI is broken, so I could not test it in your application, but this might give you an idea of how the Elapsed Timer works; however, it sounds like you want the LEDs to turn off every 5th cycle, in which case you may not need the timer.
10-24-2011 11:04 AM
Hi Mo,
The VI you created seems to be using the 5th multiple of each iteration of the wire loop surrounding the whole code. What i want is to enable the 5 multiple change from the moving average (labelled SHOCK RATING AVERAGE 5 PEAK VALUE) . So somehow i would like to be able to connect your iteration rule to the average iteration change rather than the wire loop streamed data iteration. The beeps/LEDs are activating off at every peak acceleration (see bitmap for the example of data being streamed in). Can you do this?
Thanks again
Adam
10-24-2011 11:14 AM
Hi Mo,
Just had a quick idea. Could i create a type of node from the shock rating indicator and run track loop off that, then implement this into the buzzer/LED threshold examples?
Ad