취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Signal generation with multiple frequencies in time

해결 완료!
솔루션으로 이동

Hello everyone,
I am trying to generate a sinusoidal signal that changes frequency every 3 seconds. The frequencies to be scanned are previously provided by the user in a table that will be read step by step.
My problem comes from the graph which displays the curves with a too fast scrolling, where the units of the X axis are not in second.
Unfortunately, I don't have an oscilloscope to check the output, I want to rely on the graph display for now.
Do you have a solution for me, or another method to do this signal generation

Thanks in advance, for your time,

 

0 포인트
1/3 메시지
2,499 조회수
솔루션
주제 작성자 seb.buchy이(가) 승인함

You have 2 (3?) main problems with your VI:

  1. The Simulate Signal node is set to "Run as fast as possible" - you should change this to "Simulate acquisition timing"
    1. I also adjusted the number of samples to 100 and the samples per second to 1000, you can choose these as you like, but with the setting above ("simulated acquisition timing") this node will take as long as it should for Num Samples / Freq (so with 100 and 1000, 0.1 seconds per iteration)
  2. Your stopping and restarting is more complicated than required - you can replace this with just "Time has Elapsed" going to the Stop condition, and "Auto Reset" constant true.
  3. You're using Express VIs (Simulate Signal, Elapsed Time) - if you used more simple nodes, it would be easier to see what was wrong and you might have not had these problems 🙂

Générateur et analyseur de fréquences.png


GCentral
2/3 메시지
2,489 조회수

Here's a possibly simpler version, using only non-Express nodes:

Générateur et analyseur de fréquences.png

 

I chose 0.1s blocks to update the graph, and used a Property Node to change some aspects of the graph - in particular, I set the "X-Scale Multiplier" to the dt value (so that the x scale would show time in seconds, instead of the index of the plot) and the "History" to an empty array (you can delete this part and see the difference, if you like).

 

The input to the Sine node is 2*pi*f*t, and the output of that node is multiplied by the amplitude to give Y = A*sin(wt).


GCentral
3/3 메시지
2,485 조회수