08-11-2011 09:37 PM
I am programming in VBAI but use LV as my Inspection Interface. The VBAI program will go in a finite loop (1000x) and feed the numeric indicator with dbl vaule in the front panel of LV. So the dbl value is in sequence.
In LV, how do I build an array (index 0 - 999) with this stream of data?
Solved! Go to Solution.
08-11-2011 10:09 PM
Build Array
Shift Register
Search the forums and you'll see numerous examples.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
08-13-2011 01:02 AM
Hi Raven,
could you please give me a simple vi code? Thanks..
08-13-2011 01:12 AM
Since you know the exact final array size from the beginning, you should initialize an empty array with 1000 elements, then use "replace array subset" to fill the data as it arrives, keeping track of the insert point.
Can you explain what you mean by the VBAI program "feeds" data to a front panel indicator? How did you implement that? How does the LabVIEW program know when new data arrives? Is this called as a subVI?
08-13-2011 01:13 AM
08-13-2011 01:19 AM - edited 08-13-2011 01:20 AM
You can eliminate that useless FOR loop by using a globally initialized feedback node instead of a shift register.
You also need a mechanism to reset the shift register contents.
08-13-2011 02:13 AM
@altenbach wrote:
You can eliminate that useless FOR loop by using a globally initialized feedback node instead of a shift register.
You also need a mechanism to reset the shift register contents.
What are you doing up at this hour? Don't you sleep? Per your advice. The OP will still need to code in an initial state for the array.
08-13-2011 02:17 AM
@MoReese wrote:
What are you doing up at this hour?
Well, it was not even midnight on the west coast. 😄
08-13-2011 02:20 AM
That's right, I forgot you live in CA. I just remembered that but you beat me on the response. It's 2am here. Why am I not in bed? Good night.
08-13-2011 03:03 AM
I am still up 😉