LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slope calculation driving me nuts

Can you post a pic of your block diagram so that us poor 6.1 users (I'm not the only one left, am I?) can have a try?

Without being able to see the code, I can't help, but I have the feeling the problem is not so difficult.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 11 of 18
(1,440 Views)
Sure thing. It's a bit messy at this point, but this is the version I am working with now. Thanks!
0 Kudos
Message 12 of 18
(1,435 Views)
Ooookay,

Firstly, your code doesn't look TOO bad.  I've seen (and programmed) worse.

I don't recognise all VIs you're using, but I have noticed an uninitialised shift register in your code (Right beside LT2 Array).  You are aware that this will retain it's value between calls?  I have a sneaking suspicion this should be reset to zero, no?

I'm a bit unsure as to how the code works, but have a look at the uninitialised register first.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 13 of 18
(1,429 Views)
Shane,
Thanks for the idea. I tried it briefly and it didn't seem to make a huge difference. My computer crashed before I got to play with it some more but I'll do so once I get back from lunch, in just a bit.
Thanks again.

0 Kudos
Message 14 of 18
(1,414 Views)

You could possibly try to use point by point DC Estimator in the Signal Processing>Signal Operation pallet.  You may also want to add a rolling filter like Yn=Yn-1*(1-k)+x*k. where x is the current reading and k is a time constant between 0 and 1 (Yn-1 is the previous filter calculated value).

 

Message 15 of 18
(1,299 Views)
Thanks, that actually works better than what I ended up using.
Can anyone tell me how to get this so it's not at the top of the forum list? I didn't mean to have it up there.
0 Kudos
Message 16 of 18
(1,251 Views)
I think I see what you mean, but I am not quite sure. What I think you are referring may have happened because you did not reply directly to the last message of the post. Are you simply trying to edit a preivous post? I hope this helps. Thanks!

Steven

Message Edited by Steven C on 02-21-2007 04:46 PM

0 Kudos
Message 17 of 18
(1,230 Views)
I got it, thanks. I clicked on the arrow at the far right of the list that was "remove this message float," or something along those lines.
0 Kudos
Message 18 of 18
(1,220 Views)