LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with table management

hello guys

first of all,  thanks in advance for all the help you could provide me.

i am trying to work with some tables but i dont have much experience with them. 

basically, i have implemented a VI that takes 2 sine signals with the DAQ, calculates an impedance value (by using the RMS values from the signals) and their phase difference.

my output values are Z and PHASE DIFF. these 2 are numeric values that change constantly. there are no loops or conditional stops on the program. right now, it just runs whenever i click the Continous run button.

what i need to do is to take 15 of both values (Z and Phase Diff), put them on a table and calculate their mean value. i was also thinking that stopping the program just after the 15 values of each output are taken.

can anyone please give me some help with this?! i will appreciate it! 🙂

Message Edited by Support on 11-10-2008 09:07 AM
0 Kudos
Message 1 of 11
(3,683 Views)

Hi,

 

           You need to stop your program after 15 values just to calculate you can doo that dynamically also use insert into array keep checking the index of the table once it reaches to 15 values calclate the mean. hope this gives some idea.

    

0 Kudos
Message 2 of 11
(3,665 Views)

thanks for the reply. indeed, i have lots of ideas regarding this. i do not know how to implement the table and the mean measurement after 15 values .

i was hoping someone could take a loot to what i have in the vi, and help me out with the table Smiley Sad

 

0 Kudos
Message 3 of 11
(3,662 Views)
bump
0 Kudos
Message 4 of 11
(3,635 Views)

moreins wrote:

 these 2 are numeric values that change constantly. there are no loops or conditional stops on the program. right now, it just runs whenever i click the Continous run button.


 Well, the "continuous run" button is a debugging tool and should never be used for normal program execution. You need a loop.


moreins wrote:

what i need to do is to take 15 of both values (Z and Phase Diff), put them on a table and calculate their mean value. i was also thinking that stopping the program just after the 15 values of each output are taken.


You could place your code inside a FOR loop, wire 15 to N, and autoindex the two values (as DBL) at the loop boundary. Feed the resulting two arrays to the "mean" primitive (mathematics ..probability&statistics palette) and you get your averages.

0 Kudos
Message 5 of 11
(3,627 Views)

hello

thanks for the info. i believe this is what im looking for.

one question: can you please be mofe specific with the"autoindex" and the "dbl" terms? i dont understand this part

thanks

0 Kudos
Message 6 of 11
(3,618 Views)

DBL means double precision.  It is the representation of the number in memory.  If you right click on a constant, indicator or control and select representation you'll see numerous choices such as double precision, single precision, complex, and signed and unsigned integers of various bit lengths.

 

 

Autoindexing is a type of tunnel for an array passing into or out of a loop.  If you have a scalar value coming out of a loop, and the tunnel is autoindexing (changeable by selecting the tunnel and right clicking), the result is an array where each element of the array is a value from one of the loop iterations.  If you pass an array into a loop with an indexing tunnel, the loop will act on each element of the array in turn.  Kind of like a "For Each" statement.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
0 Kudos
Message 7 of 11
(3,610 Views)

Hello

thanks for all your support. I put my code inside a FOR loop and wired it to 15. I also took both results and wired them to a MEAN simbol using SLG. So far, my program takes 15 values and shows the mean. I need to do one final thing: how do i make the program stop after it takes the 15 values??

i will really appreciate your help with this! 🙂

0 Kudos
Message 8 of 11
(3,549 Views)

Howdy moreins,

 

Your program will stop after all of the code inside has executed.  The beauty of using a FOR loop is that after 15 iterations, the FOR loop will finish execution and pass control onto the next block of code.  If this isn't the behavior you are seeing, I suggest posting a screenshot of your block diagram so that we can see exactly how you are implementing this design.

Sincerely,

Chris G in AE
0 Kudos
Message 9 of 11
(3,499 Views)

For some reason, that part of the conversation got moved into a new thread.  http://forums.ni.com/ni/board/message?board.id=170&message.id=369036#M369036

0 Kudos
Message 10 of 11
(3,495 Views)