03-23-2007 08:38 AM
03-23-2007 08:48 AM
The problem is that you have your array constant onside the loop not attached to the shift register to initialize it. It's just running through an indexing terminal that will just grab one element at a time and pass it into the loop and to the Add function.
You need to delete the small white box with the [] in it that is on top of the left shift register and wire the array constant directly to the shift register. Then delete the broken wire inside the loop and wire from the left shift register to the Add function.
See if that works and let us know.
Ed

Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.03-23-2007 08:55 AM - edited 03-23-2007 08:55 AM
You've got a couple of problems. First, you have an empty array wired to the for loop. This should be wired to the shift register on the left to initialize it. Second, you don't have the input terminal of the add function wired to the shift register at all. It's wired to the empty array. Third, the result is not wired to the shift register on the right. It's just the Y array. In other words, nothing is wired correctly.![]()
It should be like this.
Message Edited by Dennis Knutson on 03-23-2007 07:56 AM
03-23-2007 09:05 AM
@Dennis Knutson wrote:
Third, the result is not wired to the shift register on the right.

Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.03-23-2007 09:07 AM
03-23-2007 09:09 AM
Sorry, I should look at what I'm sending more closely - I tried what you said and it still doesn't work. Here's the amended version.
03-23-2007 09:10 AM
I'll try what you just sent - I think that's my main problem because the array that I hoped would be the sum is always empty.
03-23-2007 10:04 AM - edited 03-23-2007 10:04 AM
As others have said, you cannot add to an empty array. The result will be, and remain, an empty array. 🙂
Just don't add at iteration zero and the rest will fall into place. See image (the "other" case is shown in the insert on the left):

Also, do you really need to do a full initialization of the DAQ at each iteration? Wouldn't it be sufficient to do everything except the read operation outside the loop?
Message Edited by altenbach on 03-23-2007 08:09 AM
03-23-2007 10:05 AM
03-23-2007 10:07 AM