Beggar
Member
I'm writing a Rate-of-Change routine that uses the WSR function within Step 7 to progressively fill a data block. I then use the two extrema to calculate the rate of change.
My problem is that early in the acquisition cycle, the upper words in the DB are 0, so I don't want to use them in my calculation. I'm using a counter to keep track of where in the DB is the first non-zero data point but I don't know how to grab the value.
Is there a means by which I can use an index (the value from my counter) to grab the value of a specific word within a data block (for example, word #4)?
Once the data block is full, it's not a problem for I just use the first and last words. For the first part of each cycle, though, I need to use only the first word and whichever is the highest populated word.
My problem is that early in the acquisition cycle, the upper words in the DB are 0, so I don't want to use them in my calculation. I'm using a counter to keep track of where in the DB is the first non-zero data point but I don't know how to grab the value.
Is there a means by which I can use an index (the value from my counter) to grab the value of a specific word within a data block (for example, word #4)?
Once the data block is full, it's not a problem for I just use the first and last words. For the first part of each cycle, though, I need to use only the first word and whichever is the highest populated word.