LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO BUILD AN ARRAY WHEN DATA COME FROM OUTSIDE OF FOR LOOP?

Hello,

i would like ask how to build an array 2D when data come from outside of for loop?

I know how to do it when data are into for loop. I've tried several ways but without desired results.

Could somebody answer this question, please?

thank you and regards

0 Kudos
Message 1 of 7
(2,674 Views)

What does your data look like? How are you getting it? Short of telling you to place a 2D array constant down it would help if you provided more detail as to what you are trying to accomplish and how you are getting your data.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 7
(2,666 Views)

Thank you for your answer.
I have a producer loop wich gets data from RS232. It generates an array of 6 columns an 10 rows. Consumer Loop modifies data to transform them to S.I. magnitud. Here, in Consumer Loop, I get values like average, max or min to show in front panel.
I need do an historical data to know max, min and average of last hour, week or month. One solution may be build an vector (tipe A) with statistical data, date and hour and build an array of 6 vectors, so i could know the statistical data for last hour (resulting vector tipe B). If I build an array with 24 vectors tipe B, I could know the statistical data for last day, an so on.

My problem is that  vector "Tipe A" is outside of FOR LOOP and I dont know how to build that vector because always I have  built array with "for loop" metodo.

What I need is know other way to build this array.

 

Thank you very much.

Santherberg

 

Note: Sorry for my bad english.

0 Kudos
Message 3 of 7
(2,650 Views)

Can you post what you have?  Why can't you use another For loop to build the array?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 7
(2,625 Views)

Hi santherberg,

  Can you try using a global i.e functional global or station global and try to read values from that in your for loop?Or if it is a time critical one,then you can create a queue which will store the vectors (type A) and try reading the queue in for loop.

 

Thanks and regards,

SrikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 5 of 7
(2,616 Views)

It's easily solved with an Action Engine (functional global), then you have 1 data storage which you can manipulate from many different locations.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(2,606 Views)

This nugget explains the use of functional globals and action engines and may be of use to you.

 

http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801#M240328

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 7 of 7
(2,573 Views)