From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-15-2015 02:47 PM
Hello,
i use the TriangleWave from the Real-Time Sequence Library for my stimulus profile. Is there any way to curve the edges of this TriangleWave?
Is there any filter in the Stimulus Profile Editor i can use for this problem?
I hope you can help me. 🙂
With best regards Thomas
01-15-2015 05:00 PM
The triangleWave is a sequence file. You can open it like any other nivsseq file and edit it to make it do what you want. Just save it under a different name.
01-16-2015 08:46 AM
FYI there are some example sequences with advanced alroithms here: https://decibel.ni.com/content/docs/DOC-22522
01-16-2015 10:58 AM - edited 01-16-2015 10:59 AM
Hello joshe,
thanks for your feedback. Can you tell me how I edit the code to get curved edges?
I found this Code Example for Matlab to get a triangle wave with curved Edges. Can you tell me how I edit this code to use it in the Stimulus Profile Editor?
clc;clear;close all t = linspace(0,pi); x = zeros(1,100); m = 5; c = 1; n = (1:2:2*m-1); for k=n x(c,:) = x(c,:)+cos(k.*pi.*t)./k.^2; end plot(t,x)
http://www.mathworks.com/matlabcentral/answers/58191-generate-triangle-input-with-curve-edge
With best regards Thomas
01-16-2015 11:04 AM
hello StephenB,
in your posted example sequences there is unfortunately no triangle wave with curved eges, only the normal triangle wave.
with best regards Thomas
01-16-2015 11:55 AM
You would have to reconfigure the math functions in your script to operate point-by-point to produce the desired value. The Stimulus Profile Editor does not support array operations such as multiplication or linspace. This should be possible with time.
One quicker alternative that might work is to just export the data waveform you want to play back to a CSV file and then import it using an Imported Double Array Variable. Then you can play back the data as XY data however you like, including repeating the data.
Here is an example.
01-16-2015 02:12 PM
Hello Jarrod S,
thanks for your feedback.
I can't use your files -> PlayCurvedTriangle.nivsseq, PlayXY.nivsseq, RepeatXY.nivsseq
Is there a Problem with my old Veristand 2012 Version ?
01-16-2015 03:06 PM
Yes, these files were written in VeriStand 2014.
01-16-2015 03:13 PM
You might try this. I removed the elements manually from the files that didn't exist in 2012. It might work now, but I don't have VeriStand 2012 handy to test.
01-17-2015 07:19 AM - edited 01-17-2015 07:20 AM
Thanks you for your support!
But now I can only open the PlayCurvedTriangle.nivsseq and Test.nivsstimprof.
I found a workaraund for my problem:
- add a custom user channel in the system definition file
- generate a standard triangle wave/ map the output to the custom channel
- add a calculated channel with a lowpass filter and a cuteoff frequency of 1 Hz
- now the triangle wave on the calculated channel has curved edges
Is there a possibility to use the lowpass filter in the stimulus profile editor?