11-28-2007 02:46 PM
11-28-2007 02:47 PM
11-28-2007 03:05 PM
By converting the dynamic data to DBL arrays, you are removing all of the timing information. If you were to convert the dynamic data to a single wavevorm, you would see the dt. This is the inverse of the sample rate you select in the Simulate Signal properties. A delta time is required to reproduce a frequency. You have another problem with your code. By using the Insert into Array, all you have done is create a 2D array with all of the y information in a single column. How do you even know where one waveform sttops and another starts?
You can make if much simpler by using the Merge Signal function on the outputs of the Simulate Signals and wiring the result to a Write to Measurement File.
11-28-2007 04:17 PM
Thank you for replying and sorry for the errors in my VI. (I am having problems with dynamic data type)
In my experiment I am monitoring vortex shedding frequency. I am recording 20 seconds of data. Since the frequency is changing at random times to random values I end up with a data set composed of different frequencies.
I was trying to simulate this using the previous Vi. I tried to work on the VI as you told but not sure if it is ok now. Attached text file has the y values of the three sine waves and the first column is the time information. (Data acquisition is at 1000 hz ).
Is it possible to find the time that frequency changes and the value of the frequency?
I will really appreciate if you can help me.
Thank you very much again...
11-30-2007 10:08 AM
Howdy,
Denis made some good points above. To answere: “find the time that frequency changes and the value of the frequency?” This is going to be something you will have to code yourself (there is no perfect VI or example). But it won’t be too difficult. Having the Signal Processing VIs can help you a lot.
Basically, you will want to acquire your data with different frequencies at different ranges in the total domain. I attached a VI that will generate such a signal. Then you will need to break that data up into smaller chunks. Pass each chunk into a function that will return frequency information (maybe an FFT). Finally, make note of where that chunk is relative to the entire data set to know what time the frequency corresponds too. Easier said than done; right. ![]()