VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency response

Solved!
Go to solution

I am new to Veristand, and am wondering how I could do the following.

 

I have a system configuration running on a target. I would like to continuously compute and plot the frequency response using one specified channel as input and another as output, every time a window of samples has been collected.

 

Is it possible to do the computation on the target in a data processing loop, and then send the computed FRF to the host for display in a workspace screen?

 

Thanks.

0 Kudos
Message 1 of 8
(6,518 Views)

Hi,

 

Doing this is going to require some extra processing and coding on your part.  Where you decide to do this is up to you.  If you are using single point hardware IO, I would suggest either creating a model in LabVIEW or other programming environment that collects data and outputs the frequency response.  You could also do this as a custom device build in LabVIEW for veristand.  I think for your purposes, a model would be easier.  

 

If you are using VS 2012, you have access to waveform streaming api.  You can utilize this to acquire data faster than you otherwise could in Veristand.  You could either implement the processing of this data in a custom device, or in a host application.

 

Cheers,

 

Ryan D

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(6,495 Views)

Ryan,

 

Thank you for your input. I have a couple of follow-up questions.

 

1. If I implemented the processing in a model (or custom device), would it have to execute in one cycle of the model execution loop (or primary control loop)? Can I implement in for example the data processing loop since this is not a time-critical operation?

 

2. A channel that I am using in frequency reponse calculation could also be an input to a different model such as a freddback control that needs to use single-point IO. Could I use the same physical channel for single-point IO and with the waveform streaming api?

 

3. In general when does one use a custom device vs a model?

 

Thanks again.

 

Siva

 

 

0 Kudos
Message 3 of 8
(6,487 Views)

I beleive Models have their own loop.  That loop can be decremented from the main loop (i.e. run every cycle or once every 10 cycles, etc.)  You can also sequence your models by putting them in different groups so you can have the output of one model feed the input of another model.

0 Kudos
Message 4 of 8
(6,484 Views)

It seems that a good place to do such a calculation may be in an ansynchronous custom device. I could get the channel values from the Device Inputs FIFO. But the output is not a channel, but an array containing the frequency response. How would I send this back to the host?

 

Thanks.

0 Kudos
Message 5 of 8
(6,469 Views)

Hi Siva,

 

I just assumed you would be returning the peak frequency, since thats what Veristand does.  Currently, there is not a good way to display an array of data.  I talked with a few of my team members, and we think the easiest solution will be to write a VI that receives wave form data, performs the calculation, and then displays the data.  You would run the VI concurrently with the veristand workspace.  We assumed that this FFT was not being used by other parts of your project, and it is only for visual inspection.

 

For information on when to use a custom device, check out the developers guide.  There is a section that discusses that exact question.

 

http://download.ni.com/pub/devzone/tut/niveristand_cd_dev_guide.pdf

 

Also, this is a good help document about the different loops running in veristand.  Both models and custom devices run in asynchronous loops.

 

http://zone.ni.com/reference/en-XX/help/372846C-01/veristand/understanding_vs_engine/#Model_Executio...

 

Ryan 

Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(6,449 Views)

Ryan,

 

Thank you. I will think in terms of doing the FFT in a VI in the Veristand workspace.

 

To give you some background on what I am trying to so, I wrote a LabVIEW RT application a few years ago, which I have been using for MIL type applications (Please see attached VI block diagram, sorry about the poor quality of the image).

 

Since learning of Veristand, I am wondering about implementing this functionality with Veristand, since I feel it would make it earier to expand in the future.

 

After your input on custom devices, I realized that the different loops I have in my LabVIEW VI map nicely to the loops in the Veristand Engine. However, in my LabVIEW application, I send computed arrays to the host directly via TCP, which is my motivation for trying to do the same thing in Veristand.

 

Thanks.

 

Siva

 

 

0 Kudos
Message 7 of 8
(6,446 Views)
Solution
Accepted by topic author mvsiva

That does look very much like Veristand!

 

I agree that you are on the right track.  Depending on what you are attempting to expand, Veristand will make that process much easier.  It will also alleviate some of the dependence on your code.  A lot of the overhead is taken care of by the VeriStand Engine.  There are some limitations, based on Veristand's channel type configuration, but we have discussed what the best workaround appoaches to that are.

 

Cheers,

 

Ryan

Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(6,423 Views)