LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display signal from oscilloscope on Waveform Chart has problem

Solved!
Go to solution

Hi,

I am currently using LabVIEW to control the instruments on NI ELVIS III. I want to display the signal from the oscilloscope on the soft panel. I use function generation to output sine/triangle wave to the oscilloscope.

The Waveform Graph looks work well, however I cannot monitor the expected waveform during the running time. Waveform Chart does not work. 

Additionally, if I export the data from waveform chart and plot them, it seems that the curve is right.

I wonder how can I use this waveform chart correctly to display the waveform received from oscilloscope?

 

The pictures attached is the waveform chart display during running, waveform graph display after pressing 'stop' and the VI block diagram respectively.

 

 

 

0 Kudos
Message 1 of 26
(4,025 Views)

chart takes single data.
In your case it "thinks" you give him many channels, not many points for one channel.
You can use graph inside loop

0 Kudos
Message 2 of 26
(4,004 Views)

You have 6 different waveform indicators there, so I don't know which one you mean, but Waveform Graph 2 and 4 and "time domain" will only update after the loop stops since they're outside of the loop.

 

I'd recommend getting your code cleaned up a little as well, it's very hard to follow with all of the turns and branches and constants overlaying each other everywhere. You can start by right clicking a wire and telling it to clean it up.

0 Kudos
Message 3 of 26
(4,002 Views)

Thanks for yout replay, and graph works if I put it inside the loop. 

As for chart, you mean I should transfer output data to a series of data not a waveform in 1D array format?

 

Thank you

0 Kudos
Message 4 of 26
(3,969 Views)

Thanks for your advice, it indeed looks better after cleaning up. Now I put waveform graph inside loop and it works during running time, but for waveform chart I do you have any idea making it work?

Thank you

0 Kudos
Message 5 of 26
(3,967 Views)

Hi yangyi,

 

Now I put waveform graph inside loop

The graphs are outside/after the loop, while the charts are inside the loop!

 

it works during running time

So what's the problem?

 

but for waveform chart I do you have any idea making it work?

Your charts also show data, so they apperently work.

What's the problem?

 

Why do you need 2 charts to show the same data?

Why do you need 3 graphs show the very same data?

Why do you initialize your devices with each iteration of the loop?

Why do you never close the hardware references?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 26
(3,959 Views)

Hi GerdW,

 

Thanks for your reply. 

 

Sorry for misunderstanding, I uploaded the wrong screenshot. Latest one is attached where graphs and charts are all inside the loop.

 

When I said "it works during running time", I mean the graphs works.

 

The problem is, I want my charts show a triangle wave while running, but it doesn't, no matter I put it inside or outside the loop. It shows wired lines, so they apparently do not work.

 

There are two charts because I can modify one of them while trying new block and compare to the other simultaneously.

 

Three graphs because at beginning I find some "different" graphs and want to place them together to show differences. Then I know it is not necessary as differences come from the graph properties.

 

As for initialize the device, do you mean those Initialize VI? I think I place them out side the loop.

 

What is the hardware references? Sorry I'm new to LabVIEW so do not know many stuffs.

 

Thanks for your help.

 

 

 

 

 

Download All
0 Kudos
Message 7 of 26
(3,952 Views)

Hi yangyi,

 

The problem is, I want my charts show a triangle wave while running, but it doesn't, no matter I put it inside or outside the loop. It shows wired lines, so they apparently do not work.

They work as long as they show "some" data!

When the display doesn't show what you expect you need to check the underlying data.

Unfortunately you only attach images: we cannot debug them using LabVIEW. We also don't know which data you receive from your scope(s)…

 

A simple example VI seems to work as intended:

check.png

 

As for initialize the device, do you mean those Initialize VI? I think I place them out side the loop.

I mean all those configuration functions: usually you only need to configure a channel once before the loop…

 

What is the hardware references?

Those dark-purple wires, starting with "device name" and "scope/1"…

 

Sorry I'm new to LabVIEW so do not know many stuffs.

You probably noticed that "Learning resources" section in the header of the LabVIEW board, did you?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 26
(3,946 Views)

Hi GerdW,

 

Thanks for your reply and explanation.

 

Data is from a triangle wave in format of 1d array of waveform.

VI file is attached.

 

I want users can adjust the parameters of scope or function generator in the future so I did not place those configuration function outside the loop.

 

Thanks for the explanation of hardware references, but I am still confused why should close them?

 

Yes, I learn new things from those online tutorial as well.

 

Yangyi

 

 

 

 

0 Kudos
Message 9 of 26
(3,939 Views)

Hi Yangyi,

 

unfortunately I'm still using LV2017 so you need to downconvert your VI… (Edit->Save for previous)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 26
(3,934 Views)