06-12-2008 05:52 AM
06-12-2008 05:55 AM
bencarrick wrote:
Is there a way to close threads you've previously posted on this forum? I started one yesterday (or possibly the day before) with a fairly vague question in it and it's now redundant after I made some headway on my own, and I don't want to clog the forums up
06-12-2008 07:50 AM
06-12-2008 08:24 AM - edited 06-12-2008 08:24 AM
A shift register in a while loop will retain the last value written to it, so you can compare your current data point with your previous data point. If your current data point is larger than the previous, you have positive slope. If your current data point is less than the previous, you have negative slope. If they're equal, default to whichever state is safer for your experiment and setup.

06-12-2008 08:31 AM
Hi Jeff,
How do I find the slope value? I searched through the help menu and tried a few things but either I'm using them incorrectly or they're not suited for the task. I'll post my vi incase it makes things clearer, the case structure isn't an important part of the code and can be removed if it's not helpful
Thanks,
Ben
06-12-2008 08:53 AM
06-12-2008 11:05 AM
Hi Jeff,
Thanks, that's great. Can I just wire the vaules out of the loop and use them with a (greater than 0) connected to a the logic connection of a case structure?
If I'm not getting this could you walk me through the code? I've only been using LabVEIW for a week and a bit so I'm still learning
Thanks for the help,
Ben
06-12-2008 11:18 AM - edited 06-12-2008 11:19 AM
06-13-2008 04:43 AM
Hi Jeff,
That's ideal, it looks like this will do exactly what I'm trying to do
Thanks for the help,
Ben