08-29-2007 09:31 PM
08-30-2007 12:36 AM
@Raghunathan wrote:
2. Or is it easy to just copy this code inside of a TimedLoop which my application anyway has ?
First of all, your VI is overly complicated. You need two shift registers just to keep track if indices because you use "insert into array" to appen a row to an existing array. You don't need those if you use "built array".
(Actually, if performance is an issue, you should allocate a fixed size array and replace columns as you go. In this case you would need these shift registers again ;))
The final code is almost nothing, and I don't think it is worth to create a subVI for it. Just put it inline in the main VI.
You are doing things again way too complicated! Here are some examples:
The attached is a quick attempt to solve some of these issues. Now it seems to operate correctly. See it if makes sense to you. The code works well at 50ms loop time.
08-30-2007 03:09 AM
Thanks for your quick fix. solution. Oh yes it worked fine in the limited time I tested. And as recommended by you I will in-line the code.
@altenbach wrote:
You are doing things again way too complicated! Here are some examples:
- Your code skips an acquisition set whenever it does the calculation (your new data array doe not enter the case!). You should use all data!
- You do an incredible song and dance to duplicate what we already have in "AND array elements" and "Or array elements".
- You don't need the "NoOfChannels" control, because the number is given by the array dimension already.
The attached is a quick attempt to solve some of these issues. Now it seems to operate correctly. See it if makes sense to you. The code works well at 50ms loop time.