11-27-2015 01:28 AM
I have pulled my hair out tyring to figure out what I am doing wrong (even after innumerable hours of research) and I cannot seem to figure this out. I am trying to make the amplitude increase by (for example) 5mV after each stimulus. For example,
stimuli=3
change in amp= 5mV
initial amp=10mV
Then the first stimulus will be 10mV, the second 15mV, thrid 20mV. I have everything working (period, duration ... etc) except this periodic increase in amplitude.
I have tried to implement this in a for loop, a while loop, and even separating the components and concatenating them again, yet all to no avail. I attached the subvi below. if you can point out my error or lead me in the right direction that would be much appreciated.
11-30-2015 10:52 AM
11-30-2015 11:10 AM
Do this in LabVIEW -- it is much easier than trying to mix LabVIEW and Matlab for something this simple. Take the Beginning LabVIEW tutorials, learn about loops, shift registers, timing functions, etc. When you have done this, it should be very easy to write some code to do what you propose.
When thinking about problems such as this, you need to think "what varies" and "what stays the same". You also need to think (when considering loops) whether you want to "loop until some condition, such as a button push, occurs" or "Do this twice" or "Do this 1000 times". The first type of loop is a While loop, the second is a For loop. Both are explained in the tutorial material. Also pay attention to Shift Registers (which serve as "loop memory") and how to use them.
Bob Schor
11-30-2015 11:24 AM - edited 11-30-2015 11:25 AM
How do you plan to trigger the amp change? Is this time based, will there be some signal? What should cause the change in Amp?
It also looks like you are doing this in RT environment. Is this correct because it will change what you can do for options?
11-30-2015 11:54 AM
If I'm understanding correctly what you need here, wouldn't just adding a constant multiplied by the number of stimuli, to the amplitude value result in the changes you would want here. I that something similar to what I'm attaching should do what you need.
11-30-2015 12:11 PM - edited 11-30-2015 12:12 PM
The easiest way would be to use an event structure assuming your arcitecture allows for that. Here is an example of what I would do for this.