LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the time interval of a graphical indication of analog/digital input

Hi,


I am trying to get some analog/digital inputs using NI USB 6009 and plot them. But when I do that (I tried for analog) the graph is moving and is not readable for the user. So I was wondering if there is any way I can make the user choose the x-axis (time) of the graph (similar to oscilloscope) so s/he will have a steady graph.

 

Thanks.

0 Kudos
Message 1 of 8
(2,441 Views)

You did not attach your VI but you are probably using a chart and not a waveform graph.

0 Kudos
Message 2 of 8
(2,435 Views)

It's just a part of my VI. So I made a simple example. I get the analog input and it goes to waveform graph. So I just want to have a steady signal so the user can compare two different siganls. 

Also I was wondering how the user can change the time interval of the graph, so instead of 0-1 it can be like 0-T, based on what he is interested.

 

thanks. 

0 Kudos
Message 3 of 8
(2,430 Views)

Every time, there are exactly 1000 samples written to the graph and if the signal is changing, it will reflect that - just like a scope. Since you only have a single channel being acquired, I don't know what you want to compare it to. To change the time scale, you have to turn off autoscaling. Then you can use the zoom tool or simply use the text tool to change the min and max value. These are also settable with a property node.

 

Perhaps you really want to do a single acquisition instead of continuous?

0 Kudos
Message 4 of 8
(2,427 Views)

I want to have two signals going to the same graph, but since the other one is digital and I have not figured out how to wire that to this waveform plot, I didn't put that in the VI.

 

I need either N-samples or continuous, so I can have the sin wave and the digital pulse wave both available. Does that make sense? I know if I have one sample it just get one sample per run, and if I get N-samples based on the sampling frequency and N, it will get the signal for couple of seconds. Is that right?

Download All
0 Kudos
Message 5 of 8
(2,418 Views)

Baran,

 

Everything Dennis said above was correct. Did he answer everything you needed to know about fixing your x-scale?

 

In reference to the second part of your problem, I found an KB that will help you plot analog and digital signals on the same chart.

http://digital.ni.com/public.nsf/allkb/0B597D11F893B1B7862575B4005AE388?OpenDocument

 

Hope that helps!

 

Allie

Message 6 of 8
(2,403 Views)

Thanks. It's what I was looking for. But I changed my mind in using digital input, and now I am just using analog inputs for even the pulse signals, and the reason is that it looks like I cannot have two different types of inputs at the same time, and it gives me the error as you can see in my previous post (I am using DAQ assistant). 

 

Thanks though. I am sure It will be helpful in future.

0 Kudos
Message 7 of 8
(2,398 Views)

Hi Baran,

 

This error occurs when you specify a parameter that is not supported by your hardware.  In your case, you're trying to continously acquire Digitial In continuously which is not supported because digital signals are software timed on the USB-6009.  What you can do as a workaround is set the sampling rate to On Demand and put the DAQ Assistant in a while loop.  

 

Allie

0 Kudos
Message 8 of 8
(2,376 Views)