08-31-2018 06:38 AM
Hi Gents,
I need help with splitting of channels. I have vibration data (acceleration) in one channel and I need to split them into separated channels by some interval (so for example I need to take 100 values and save it to separated channel).
Is there any function which can do it ?
Or is it possible to do FFT only by some specific time interval ?
The point is I have vibration data from engine sweep and I would like to get FFT only for specific rpm range.
Thank you in advance for help.
Regards,
David
08-31-2018 07:52 AM
Hi Skalda,
You can use DataBlCopy to copy parts of one channel into an other channel.
The following example will copy the first 100 values from the channel "Time" into the new channel "new":
Set oMyNewChn = Data.Root.ChannelGroups(1).Channels.Add("new",DataTypeChnFloat64)
Call DataBlCopy("[1]/Time", 1, 100, oMyNewChn, 1)
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		09-03-2018 03:35 AM
Thank you but I need to split one channel into many of channels (for example each 100 values take and copy it into new channel).
During the FFT there is a function which make intervals (will create new channels with specific interval) but it is not working for amplitude.
09-03-2018 04:46 AM
Hi Skalda,
You need to make a loop around the commands. So the script might look like this:
Dim i, iValues, iLoopLength, oMyNewChn, sSignalChn, sTimeChn, oChnList
iValues = 100
iLoopLength = Data.Root.ChannelGroups(1).Channels("Time").Properties("length").Value/iValues
sTimeChn = "[1]/Time"
sSignalChn = "[1]/Speed"
Set oChnList = data.CreateElementList 'List of split channels
For i = 1 to iLoopLength
  Set oMyNewChn = Data.Root.ChannelGroups(1).Channels.Add("new" & i,DataTypeChnFloat64)
  Call DataBlCopy(sSignalChn, 1 + (i-1)*100, 100, oMyNewChn, 1)
  Call oChnList.Add(oMyNewChn) 'Add result channel to list
Next 
Call ChnFFT1(sTimeChn,oChnList)
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		09-03-2018 05:48 AM
Hi winner,
stupid question but is there any possibility how to do it by Diadem function and not by the script ? If there is some function in Signal Analysis or Channel Functions ?
Thanks
09-03-2018 06:16 AM
Hi Skalda,
You can go to DIAdem VIEW and there in a channel table. Then you can mark the values and select "Block operations". This is the only way to do it interactively.
09-12-2018 03:59 PM
Hi Skalda,
You can configure the ChnFFT1() command to perform a time interval FFT calculation, but in practice it's not likely for your sweep intervals to line up perfectly with the selected time interval boundaries. I say time interval, but really it's a point interval. If your data is measured in sweeps that have exactly the same number of data points each, with no extra data points at the beginning before the first sweep starts, then it might work to cover all the separate FFTs with one command, instead of copying out each point interval and looping over the FFT for the full (copied) channel.
Brad Turpin
DIAdem Product Support Engineer
National Instruments