04-18-2013 07:24 AM
I would like to extract the portion of my signal between 0 and 3 seconds. I have tried using the Extract Portion of Signal Express VI, but it is not working. I am setting the length to 3 seconds and the offset to 0. However, nothing is showing up in the output. I have used this VI before successfully, but it was not in a control and simulation loop. Is there anything special that I have to do to make it work correctly in this case?
Solved! Go to Solution.
04-18-2013 07:25 AM
Or, if there is a better method for extracting a portion of a signal in a control and simulation loop, please let me know.
04-18-2013 07:34 AM
Try this link, it is similar to your query http://forums.ni.com/t5/Measurement-Studio-for-NET/How-to-extract-data-values-from-all-plots-in-grap...
04-18-2013 07:55 AM
I don't think this is the same as what I am looking for. I would like the portion of the signal to be extracted automatically, without input from the user.
04-18-2013 08:02 AM
Did you also look at the troubleshooting provedures mentioned? If it's still not working, try this link http://forums.ni.com/t5/LabVIEW/extract-portion-of-signal-using-a-cursor/td-p/859807
04-19-2013 10:56 AM
Laura
Could you give a bit more information of what you are trying to do? Are you trying to extract the 0 to 3 s after you simulate or you want to 'feed' 3 s for the simulation? Depending of what you are trying to do, we probably have examples that describe what you need. Did you see the examples under <LabVIEW Folder>/examples/Control and Simulation/Simulation ?
One thing to keep in mind is that the Control and Simulation Loop has a solver 'under the hood' and if you have VIs inside the simulation loop AND you are using a variable step size, then the simualtion won't happen as you'd expect.
04-19-2013 11:37 AM
Hello Laura,
What signal are you looking to abstract the 3 seconds of information from? The best way to accomplish this in Control Design & Simulation largely depends on what you're looking to do with the 3 seconds of data. Are you looking to perform calculations on 3 seconds worth of data in the simulation loop or are you looking to simply just record that data? It may help to post your code as a reference.
I've personally not had experience with using the Extract Portion of Signal Express VI but I was able to get it working with a basic example. (Attached as ExtractSignal_CDSim). It is important to remember the execution nature of the Control & Simulation Loop compared to the standard LabVIEW Loop environment. Functions running inside of the Simulation loop operate on your defined simulation time. If you aren't careful about what labels you use on graphs this can get a bit confusing. Just remember to investigate the simulation and step size of your Simulation loop timing parameters.
http://zone.ni.com/reference/en-XX/help/371894G-01/lvsim/sim_configparams/
In any case, If you need help getting your specific code working, go ahead and post it and explain a bit further on what you're looking to achieve with the code. I'll do my best to give a recommendation and help you get everything figured out!
04-22-2013 03:33 AM
My ultimate goal is to calculate the time between each pulse . In my attached example, the time is the same between each pulse, but it will be variable later on. I have decided to change my strategy and try the pulse measurements vi. What I want it to give me is a measure of the time between each pulse, which will then be used as an input for another process (not shown yet). I have attached my code for reference. Do you have any suggestions on how I should be doing this?
04-22-2013 05:20 AM
This forum shows how to measure time between digital pulses http://forums.ni.com/t5/LabVIEW/Measuring-time-between-digital-pulses/td-p/1056881
Also, this would be a good link https://decibel.ni.com/content/docs/DOC-12160