LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an array and extracting values with data from equipment

 Hello,

Newbie here looking for some advice on how to configure an array then grab some data to display. I have tried a couple things but it I can't get it to behave how I want it...

 

  1. Need the three values stored in an array. Channel A, Channel B, Gain. Also would like to store these values in a text file/excel for reference for service or in-house troubleshooting.
  2. Need the peak value of Gain. (which is CHB-CHA) see excel sheet below.
  3. Need the value(s) of that point when it is closest to its -3 point of the Gain. (So if it's peak was 24 we would need 21 obviously.) The trick is it is not always going to plot that exact value so a spline or interpolation would be needed.
  4. Once that value is found, we need the value that corresponds with that Channel B value.

these are where the values are spit out of my loop the controls the equipment.// that write to text file doesn't work either 😕

vi sweep.png

 

IN the end I would like to display somethiong close to this 

 sweep.png

0 Kudos
Message 1 of 4
(3,435 Views)

Hi Justin_t.

 

I'm not sure that I quite understand your question, but I do have one article that might help you out.  I have attached an example of how to Write to a Spreadsheet in LabVIEW.

 

https://decibel.ni.com/content/docs/DOC-36448

 

Good Luck!

 

Casey L.

Application Engineer

0 Kudos
Message 2 of 4
(3,395 Views)

 

1) To analyze array, make the array - autoindexed tunnel on the output of the loop (or build array with shift registers, bad practise though).

You can stream to text (spreadsheet) file or write entire array after you are done. Help-> Find examples.

2) Array Max&Min - it gives value and index,

3) max&min (absolute(array-(max-3))) - location of the element, with value closest to the maximum-3

4) all arrays (A,B,Gain, etc) should have the same size. max&min (Gain) gives index. Index array picks element from array at index

 

>> IN the end I would like to display somethiong close to this 

Format array to array of strings (Number to fractional string), show in table, Property node -> Active Cell, Cell background can highlight cells. Arrows, pointing to elements - possible, but will require some work. Much easier will be to make a button "Locate max" and scroll table (property node -> Index values).

 

PS bold are labview functions from palettes.

0 Kudos
Message 3 of 4
(3,377 Views)

Are you trying to have your output be an Excel (.xls, .xlsx) file, complete with a Graph?  If so, you cannot use the simple "Write to Spreadsheet File", which really writes a Tab-delimited Text File (that you can make a Comma-separated Variables, or .csv, file that Excel can read).  My recommendation (if you want to use Excel) is to use the Report Generation Toolkit.

 

Bob Schor

0 Kudos
Message 4 of 4
(3,367 Views)