03-13-2014 09:06 AM
You can also use script:
Call ChnLinGen("/Time_channel",begin_value,end_value,number_of_values,"")
Simyfren
03-13-2014 09:17 AM
No, this cannot work,
Obviously, ploting channel Vsum as function of the time channel or as function of the lineargenerated channel is not equivalent....
Regards,
Louval
03-13-2014 09:19 AM
Why not?
Simyfren
03-13-2014 09:29 AM
Because the generated time is equidistant, the original is not, so of course plotting the same data channel as function of one or the other is different.
I believe you did not understand my goal.
I need to transform my time channel so that I can perform the ChnTowfChn function on (time, vsum).
Thank you,
Louval
03-13-2014 09:36 AM
Yes I understand Louval.
It isnot the same!. What you need to do is interpolate your original channel. For doing this first generate a linear equidistant channel with the time interval and then use this.
Call ChnMapLinCalc("OriginalTimeChannel","Vsum","LinearGenerated", "ResultChannel",True,"f[bound.slope]",NoValue,"analogue")
Then "ResultChannel" and the equidistant channel can be converted to waveform.
03-13-2014 09:37 AM
I don't why you have time not equidistant, because time is generally equidistant.
But, try to divide channels into 6 channels (so that the time will be equidistant) and create waveforms separately.
Simyfren
03-13-2014 09:42 AM
TIme is not equidistant if the aquisition frequency is changing during the aquisition. That is why.
I would like to avoid dividing channels... but yes this is defintely a solution.
Louval
03-13-2014 09:43 AM
I think you have no choice.
Simyfren
03-13-2014 09:45 AM - edited 03-13-2014 09:51 AM
You don't have to divide the channels, even if you divide the original channel it means that each division should contain exactly the same sample rate!!!. Which i wonder is not true.
The only solution is to interpolate the channels to "fix a sample rate". otherwise there is no way to convert to waveform. If you interpolate close to the average sampling rate of your original signal the results should not be affected considerably.
regards,
03-13-2014 09:52 AM
Use this insted
Call ChnMapLinCalc("OriginalTimeChannel","Vsum","LinearGenerated", "Vsum",True,"f[bound.slope]",NoValue,"analogue")
And then the "LinearGenerated" and "VSum", can be converted to waveform channel!.
Regards.!