LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-time plot with changing acquisition rate

Hi all,

I have a simple program that collects current and voltage data from a Keithley sourcemeter, plots it in real-time, and saves the data to a text file. A feature of the program is that the frequency of measurement changes during data collection - high frequency measurement for the first (more interesting) period, and low frequency measurement for the duration of the experiment. The problem I'm having is that I can't get the x-axis to adequately scale to reflect this change in frequency. I'm currently using a waveform chart and an x-scale multiplier tied to 1/frequency. It works for the high frequency period, but bonks the scaling when switching to low frequency.

My understanding is that waveform chart is designed for constant rate acquisition. This is probably the problem. Should I be using the XYgraph function? I collect time data, so should be able to build a {time,current} array and just repeatedly redraw the graph. Can I get the XYgraph to behave like a waveform chart?

Basically, I want to keep a fixed scale on the x-axis, but have the chart know that after a certain time each data point represents a smaller delta-t. Any simple approach I'm overlooking?

Cheers,
Kevin
0 Kudos
Message 1 of 16
(3,663 Views)

I don't know a simple way to get you exactly where I think you're trying go.  There *are* some things you can do, but they each have their own side effects to consider.

1.  To make an XY graph behave somewhat like a chart, you'd need to create a software buffer for the XY data, and then periodically graph it all.  This may end up requiring you to do careful memory management, and will also consume extra CPU for the display.

2. You could wait until the end of acquisition and plot a single XY graph of the full dataset against actual sample time.  But I suspect you chose a chart because you need the live feedback while the data collection is in progress, and this method wouldn't give you any.

3. A combination approach would be to simply chart the live data with an X-axis meaning "sample #".   Once the collection is over, *then* draw a single XY graph that includes actual time scale data.  This method doesn't give you good X-axis info until the collection is done, but at least you can easily see your Y-axis data in near real time.

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 16
(3,634 Views)
Hi,

 

       I amtaking sensor input signals through NI FPGA cRIO-9004. i am analysing this using wave graph. the problem is i am not getting accurate singal.How to decrease the frequency? 
0 Kudos
Message 3 of 16
(3,388 Views)
Do you want to decrease your acquisition frequency or how often you plot to the graph? The acquisition rate depends on how fast your I/O loop runs on the FPGA. Are you using a DMA FIFO to send the data to the RT Host or are you passing the data to your PC? Are you displaying the data in a Chart or Graph?
National Instruments
0 Kudos
Message 4 of 16
(3,374 Views)
You will need to give alot more information about your application and problem
National Instruments
0 Kudos
Message 5 of 16
(3,373 Views)

Hi,

 

      I am sorry for unsufficient data. Actually I want to capture  engine crank singal.

Through tekronix scope i am getting correct signal. But when i use NI cRIO-9221 module I am not getting clear graph like tekronix scope graph. I attached the both pictures.I want to build scope using labview(NI cRIO-9221).

 

( NOTE: i taken history of wavechart then i attached this into wave graph. bcoz to get cursors.)

0 Kudos
Message 6 of 16
(3,349 Views)

Hi,

At what frequency do you want to collect the data?

 

FLash

National Instruments
Applications Engineer
Message 7 of 16
(3,324 Views)

Hi,

 

      Max frequency is 10khz.

0 Kudos
Message 8 of 16
(3,310 Views)

We still need more information about your code, how fast is your FPGA loop running?

- are you using a DMA FIFO to pass the data from FPGA to host?

Can you post you code?

National Instruments
0 Kudos
Message 9 of 16
(3,269 Views)

HI,

 

 

      Sorry For the delay. I attached my project setup image. and also i attached my program. 

0 Kudos
Message 10 of 16
(3,224 Views)