07-06-2023 10:05 AM
Hello
I would like to transform a vi that creates a fixed-value square-wave signal on the analog output of the NI-USB-6351 board into a vi with a dynamic variable-frequency signal. Basically, I'd like to change the frequency on the interface to a button with a variable frequency of plus or minus 100Hz, for example. But I get the error that I need to change the buffer size.
Do you have any idea how to change it?
Solved! Go to Solution.
07-06-2023 10:32 AM
Have you looked at the example called Voltage (non-regeneration) - Continuous Output? You can see how it updates multiple channels using an array of parameters. You can change the wave shape, frequency and amplitude on-the-fly, and it even tracks the current phase of each channel to keep the output as smooth as possible. There ARE limitation based on your hardware, and you may need to play with your sampling frequency and # of samples, but it will never work as smoothly as analog generators or dedicated, expensive digital generators.
Hint: If you need further help, back-save (Save for Previous...) your VI to 2018 or so. Many of us have locked in our version to avoid the subscription price increases.
07-10-2023 06:18 AM
Yes, I've seen it and used it.
I'm not trying to compete with commercial generators, I want to be able to simulate a frequency signal to which a slight offset is created in order to simulate a variable TTL.
Behind this VI, I have another VI. This will be triggered on the rising edge of the first VI. The aim is to check that the second VI is triggered at each rising edge of the first VI ....
Following our discussions, I've taken over the "Voltage (non-regeneration) - Continuous Output" VI. It works pretty well. But I'm also having problems with sample size and frequency. I haven't found the right compromise...
For the record, I want a TTL-generated signal of 2kHZ at +/- 100 Hz.
What's more, I had modified it because, as it works on the "OnboardClock" clock, I'm not sure that it retransmits the shape of the signal correctly, but rather a signal that's not very well reconstituted. Not sure anyone can keep up with me.... So I set the source to a signal resembling the output signal, with a much higher frequency for sampling purposes...
This VI with "non-regeneration" works, but its average output signal ....
Translated with www.DeepL.com/Translator (free version)