LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Max Peak Measurements of a Signal from a Radar

Hello,
I work on a project dealing with the design of a chain to acquire measurements of propagation losses. So, in principle, I have set up a labview scheme with a reception block, an acquisition block, a block for recording measurements in the form of a text file, an interface displaying the signal in question.
Now my problem is to make it so that my program can send me the values ​​of the max peaks knowing that the radar sends measurements all the time and so my program runs all the time, every 5 min it gives me a new Tracing signal and new measured values.
  
In case you have an idea, will your help be welcome?
I am attaching my code and a capture of a sample signal that the radar sent me
0 Kudos
Message 1 of 9
(3,052 Views)

Unfortunately, your code is in LabVIEW 2017, which I am not installing at the present time (it appears to have some problems ...).

 

Could you do us the courtesy of typing your question into the Forum so that we can read it clearly?  The image you pasted cuts off the question, so I don't know what problems you are having.  Judging from your title, however, if you can use LabVIEW to get a signal into your computer and create a graph of it, then surely you could take the wire containing the data being graphed and pass it to a function that tells you the location and value of the peak.

 

Bob Schor

0 Kudos
Message 2 of 9
(2,997 Views)

Hello,

 

My problem is to make a loop so that my code can continue to run without stopping because i need to receive data from a radar connected to my computer  for a year.

My idea wa to put a while loop to all my code but it doesn't so simply than that i need help to know where to put exacty my loop.

 

Find join the version of the code for Labview 2015, and ESA PSA drivers.

Firstable you have to put the file drivers in program files x86/National INstruments/Labview/instr.lib before trying to open the project.

Also you will not be able to run the code because your local laptop is not connected to the radar 🙂

 

I need just to know where to put the while loop and it's over 🙂

Thanks for help

Download All
0 Kudos
Message 3 of 9
(2,995 Views)

Well, I don't have the Help files on the Agilent ESA PSA Series VIs, so I'm not sure whether this would work or not, but for many DAQmx or other VISA-related routines I've written, the While Loop goes around the Reads Traces VI, with the Traces Array.  I'd make this loop the Producer part of a Producer/Consumer Design, with whatever on-going processing you want to do with the radar data for a year (like spooling the Wave data to disk, or computing peaks and writing them to disk) can take place in parallel with the acquisition loop.

 

Incidentally, you don't need to put the ESA drivers in instr.lib -- if you unzip the two folders to, say, your desktop, you can open the Projet Ducting folder, open Acquisition, and when it asks for a file from the Drivers folder, find the appropriate file from the unzipped file on your desktop.  Everything will load with no errors.

 

Bob Schor

0 Kudos
Message 4 of 9
(2,985 Views)

Hi thanks for responding me,

have i to apply my while loop just like that ?

 

thankswhile loop on read traces.PNG

0 Kudos
Message 5 of 9
(2,975 Views)

I remark if i did that , if execute the code, it stops in level of read trace.VI because of the while loop so i want to know how to put the while loop in a way that it will do exactly what i want.

0 Kudos
Message 6 of 9
(2,974 Views)

Again, I don't know what the Agilent code really does, nor what exactly you are trying to do, but this is what I mean:

  • There is "initialization code" that defines the I/O channel, sets up the parameters of reading/writing, including naming the channels being used, setting up the sampling rate, setting up the number of samples per read/write, etc.
  • There is a "Start" function that starts the instrument reading or writing.  Let's say, for example, you are sampling 1000 samples from 5 channels at the rate of 1KHz.
  • There is a While Loop that had a "Read 1000 samples" inside it.  This loop will (typically) wait for 1000 samples to be ready (which will take 1 second), then give them to you as a 2D Array or a 1D Array of Waveform.  If you can process them in less than 1 second, you can do the processing "inside" the While loop, but I prefer the Producer/Consumer Design, so I put the data on a Queue and send to the Consumer loop.
  • There is a Stop button to end the Data Collection process.
  • When the While Loop exits, you have additional functions that stop the Read/Writes and shut down the I/O channel.

Basically, the only thing in the While loop is the Read/Write function, as you usually don't need to "spin up" and "shut down" the entire I/O process for every data acquisition.

 

Bob Schor

0 Kudos
Message 7 of 9
(2,966 Views)

Thanks finally i find out that i do not need to poot a loop and my problem was just a TimeOut problem.

In fact in the Read Traces.VI you have timeOut defined , it represents the amount time in seconds to wait for samples to become available. It was 30000 ms and it was not enough for me to have all my samples , so i put the value to -1 so that we'll wait until having all the samples. 

Concerning the while loop i don't need it , i use the button of execution continuously.

 

Here is the error that it returns me before find the way to fix it. 🙂

Capture.PNG

 

thanks for help

0 Kudos
Message 8 of 9
(2,962 Views)

@mdwoury wrote:

Concerning the while loop i don't need it , i use the button of execution continuously.

 

 


No, no, no, no, no!  Do NOT use Continuous Execution (even though "it works"), as it is absolutely the "wrong model" and is the first step on the Road to That Bad Place Down Under (and I do not mean Australia!).

 

There are many reasons to stop a loop -- you push a Stop Button on your Front Panel, you hit an Error condition that you decide means you should stop, you collect sufficient data, etc.  You wire one or all of your Stop conditions to the Stop Terminal of the While loop, and you (the LabVIEW Program Developer) are "in charge" of your Program and its execution.

 

With Run Continuously, errors, "bad code", etc. won't stop your program -- you depend on the User "knowing" when to stop and hitting the "Abort" button, another Control that shouldn't be used (as it doesn't allow your program to "control" the Stop step).

 

Note that many LabVIEW programs have the following general form -- Initialization (done once), Loop (done many times until some Stop condition is realized), Finalization (done once).  For example, if you are acquiring and saving data, Initialization would include opening the data file, Loop would include writing to the data file, and Finalization would include closing the data file.

 

Run Continuously + Abort means you need to do the Open-Write-Close step in the Loop, which is inefficient.  

 

Bob Schor

0 Kudos
Message 9 of 9
(2,956 Views)