03-14-2008 01:26 PM
03-14-2008 04:02 PM
03-24-2008 09:34 AM
03-25-2008 08:33 PM
I would need to see the context of your code.
However, building arrays one element at a time is very inefficient in Labview.
I would combine them into one 2D array that is pre allocated and then use replace array element function.
Every time you append another element into the array a copy of the data is made in memory.
This can get really expensive as the size of the array grows.
03-25-2008 08:57 PM
You never have more than one element in each array since you initialize the shift register with every call of the VI.
Use "built array" instead of "insert into array", it's cleaner. However, since you only kep one elements, maybe you can jist place the scalar value inside a shift register. Make sure the default value is NaN so you know when it contains valid data.
All you probably need is an array of fixed size (12) and replace appropriate elements as need arises.
What you probably want is an action engine. See http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=240328#M240328
03-25-2008 09:25 PM
A feedback node will not get initialized everytime the VI is called.
If you wire the init value that value will be passed on first call, after that its n-1
03-26-2008 12:53 AM
fppf wrote:
A feedback node will not get initialized everytime the VI is called.
If you wire the init value that value will be passed on first call, after that its n-1
03-26-2008 06:40 AM
Shift registers and feedback nodes behave differently.
I would suggest you play with them a little to learn them.
A feedback node does not use the init like a shift register.
I don't need to write anything, here is the OP's code thrown in a for loop and run 100 times.
I had to wire the OP's connector pane
03-26-2008 09:10 AM