02-02-2016 05:58 AM
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.
02-02-2016 10:04 AM
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.
02-03-2016 06:23 AM
Thank you for your reply and time.
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.
02-15-2016 12:52 AM
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?
02-16-2016 01:38 AM
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