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.

Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a pulse with the waveform generator?

Solved!
Go to solution

Yes, you can send each different waveform to a different chart. The easiest way would be to use the for loop's iteration terminal and a case structure to determine which chart to write the waveform to. If this was a continually running loop, you could use something like the Quotient and Remainder function to get the modulo of the number of channels/charts you have to determine where to write the waveform. For the WFChart property node, that is a consequence of using VI Snippets to create screenshots. It is just a property node with a control reference wired in.  On your diagram, it is easiest to right-click the chart and create a property node for Chart History. Then, you will get a property linked to that control. It actually looks like the image below.

 

multiplecharts.png

 

The Basic Function Generator VI uses the sampling info to determine how many samples to take and for how long. For example, in your screenshot, the VI will create a waveform that samples a sine wave at 800 kS/s and returns a waveform with 40000 samples. This means the duration of the waveform will be 40000/800000 = 50 ms. If the waveform is changing frequency like in your example, the number of samlpes will need to change if you want to get a certain number of periods per frequency because in 50 ms, a 100 Hz wave will have 5 periods, while a 40 Hz wave will only have 2. You will need to do some math to figure it out but the number of samples to use = periods * sample rate/frequency.

 

So, if I generate a signal at 100 Hz with a sample rate of 1000 and number of samples of 50, I'll get 5 periods. Then, if I generate a signal of 40 Hz with the same sampling info, I'll get 2 periods and at 200 Hz, I'll get 10 as shown below.

 

chart.png

 

The reason you are seeing the chart update that way is because the reset signal terminal is set to True. This means that the timestamp for the beginning of the waveform is being reset to '0' instead of keeping track of the new timestamp and appending the waveform. This won't affect actual output, since the hardware doesn't care about the timestamp, but it will affect how the chart displays the waveform. For correct display, either leave reset signal false or use the Build Waveform function and set t0 using the Get Date/Time in Seconds function.

Donovan
0 Kudos
Message 21 of 25
(3,920 Views)

Hi, i managed to edit the conditions as mentioned, however, i just realised that the waveforms charts are not running. I can acquire the data but it does not run, is there any way i can make them run simultaneously? Assuming i have collected 4 waveforms.

0 Kudos
Message 22 of 25
(3,844 Views)

Hi, is there any other way to acquire and view a running waveform on labview?

0 Kudos
Message 23 of 25
(3,811 Views)

Is there any way to create an amplifier circuit on labview without using an IC chip?

0 Kudos
Message 24 of 25
(3,810 Views)

Hi, donovan,

can you ignore my other question and answer this one instead?

Is there any way to use labview to do a calculation?

For example, if i were to transmit a 80kHz signal with a sensor, is there any way to use that signal to do calculations such as the distance of the obstacle from the sensor if i the signal were to have an obstacle and reflected back towards the receiving sensor?

 

https://decibel.ni.com/content/docs/DOC-19917 refering to this link, is there any way to modify the program so that it can be done with the Elvis platform instead?

0 Kudos
Message 25 of 25
(3,766 Views)