LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Chart Like an oscilloscope with Fixed Sampling Rate

I am reading arduino data using VISA, But i could not able to control my X Axis timing according to the signal frequency/sampling rate.

Basically,I woould like to control the X axis like an oscilloscope, fixed timing window like 100ms/ division or with fixed sampling rate.

 

I could not able found right answser throgh google/NI forum.

 

Please suggest me after perusal of attached VI.

0 Kudos
Message 1 of 5
(3,803 Views)

Hello Haristhota,

 

First of all you should disable autoscale of your graph X axis. Then you could change X axis range dynamically using property node.

I made you an example.

 

Regards.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 2 of 5
(3,773 Views)

Thank you for your reply and time.Smiley Happy

 

I tried it for acquiring realtime data, it's working without any errors but there is problem in acquiring data continously.

Every time i need to press the "get waveform" button to acquire each point of data, i am first time using eventstructure & little bit confused..

 and

coluld give some idea, how to acquire data at constant sampling rate?

VI is attached for your perusal pls.

0 Kudos
Message 3 of 5
(3,740 Views)

I tried reading the data with producer consumer loop.

I am able to read it continuously but i could not plot the serial read data because of chinese characters are applearing at the buffer.

But i was able to plot the data without event structure, there i can't control the time axis.

What could be the reason for this?

0 Kudos
Message 4 of 5
(3,635 Views)

Hi, 

 

 I would suspect the way you are performing serial reads. The proper termination characters and baud rates have to be set. The best way would be for the producer loop to continuously read information on the port, convert this to useful numbers and feed to a queue. The consumer will just read from the queue and plot on the waveform chart. You could refer to a very good shipping example called "Continuous Serial Write and Read.vi". Just remove the write part from this example.

 

With the event structure, you could easily implement continuous reads by shifting the VISA read from "Get Waveform" event to "Timeout" case. If you are confused on how to use event structures, go through this white paper - http://www.ni.com/white-paper/3331/en/

 

Thanks

Suraj Pawar

AE, NI India

 

 

0 Kudos
Message 5 of 5
(3,593 Views)