LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulation of Array Data

Solved!
Go to solution

I would like to be able to manipulate some data (columns 2 and 3 of txt file) that I am collecting as a function of time (column 1 of txt file).

 

Right now, as the VI is running, this data is being plotted on a waveform chart and saved to txt file.

 

What I need to do is:

 

Column 1 - Convert each time point to a wavelength.  I know starting wavelength (nm) and rate of change of wavelength (nm/sec).  I do this conversion on an excel spreadsheet right now where [current wavelength = previous wavelength - rate of change of wavelength*(current time-previous time)].  So how do I extract column one, take the difference between the second value and the first value, and create a new column (somewhere) corresponding to wavelength?  And save to a new column?

 

Column 2 - Need to divide each value by 100 and subtract by a "baseline" (an average of the first 20 points, for instance).

 

Column 3 - As is.

 

Final step - Write to file a new column defined as manipulated column 2 divided by column 3 times 100...and then plot this (on y-axis) as a function of manipulated column 1 (x-axis). 

 

It's not incredibly critical that the data manipulation occur in real-time...it can happen after the file has been written if necessary.  The final graphical result should look like the attached jpeg.

 

Thanks in advance for the help - I'm a little uncertain about array conversion, unbundling, etc. nevermind the mathematical differences and averages that need to be obtained.

 

Meredith

Download All
0 Kudos
Message 1 of 15
(5,500 Views)

hello,

 

i tried to make what i understood , see if it make sense

few textual details in vi, two jpg attached in case your 're not LV8.6

look at xy result to see if that talk to you , not for me :smileyhappy:


Best regards 

 

Tinnitus

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
Download All
0 Kudos
Message 2 of 15
(5,467 Views)

Tinnitus -

 

I've worked through this and it looks like it does exactly what I need to do.  It's taken me some time, as I don't have LabVIEW 8.6.

 

I've been able to replicate everything except the "Directe" going into the dt of the derivative function.  Where can this be found on the LabVIEW control or tool palette?

 

I appreciate your help - I knew I would need to use some of the array functions, but I was unsure exactly how Index Array, Array Subset, etc. should be implemented.

 

After I get the dt input, I should be able to test it with the data myself.

 

Meredith

0 Kudos
Message 3 of 15
(5,390 Views)

hello,

 

just make a right click on method ( blue terminal) at the bottom of derivate block and selecte create -> constante

 

then make a choice in ring menu,

 

@+

 

Tinnitus

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 4 of 15
(5,375 Views)

Am I maybe using the wrong derivate block?  Jpg attached of what I'm using.

 

It only has one blue terminal, and that's the error output.  This is from Mathematics -> Integration and Differentiation.

 

That could explain why I wasn't finding anything similar.

0 Kudos
Message 5 of 15
(5,365 Views)

You are using the correct VI

 

 

This is as the VI appears in 8.6.

Message Edited by Chris_VH on 01-19-2009 01:23 PM
Chris Van Horn
Applications Engineer
0 Kudos
Message 6 of 15
(5,356 Views)

hello,

 

??? maybe an evolution between 8.2 and 8.6

 

1) try to slide your mouse over block diagramme to see if it is not just a neglect display

 

2) try without this option perahaps "direct"  "forward"  methode is the only one used in your release...

 

@+

Tinnitus

 

Message Edité par tinnitus le 01-19-2009 01:18 PM
CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 7 of 15
(5,352 Views)
I am using 8.2.  So does that mean that the VI is going to automatically perform the direct/forward operation?
0 Kudos
Message 8 of 15
(5,346 Views)

I saw

 

just a error of translation :

 

 "forward"  equal " direct" in french

 

Regards

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 9 of 15
(5,345 Views)

Maybe check the actual VI by double clicking on it.

 

It should appear like this:

 

 

on the block diagram.

 

If not, see if you can wire up an input manually.

Chris Van Horn
Applications Engineer
0 Kudos
Message 10 of 15
(5,338 Views)