ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveformgraph plot update time?

Chipping away at this project.  I've got the task running and finally all my scaling correct and plotting a continuous trace to the waveform graph from the Ai virtual voltage channels.  Now.....how do I get the trace to update faster?  It appears that there is a considerable lag from when I adjust the voltage to the Ai channel versus the update rate of the plot on the Waveform Graph.  It appears very "slow".   I know it's something easy but I'm spinning my wheels trying to figure it out and find the problem. 

 

 

0 Kudos
Message 1 of 6
(3,613 Views)

General answer: Read your DAQmx input more often or read more samples at once…

 

For more precise answers you should attach your VI!

Best regards,
GerdW


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

I am coding in vb.net.  I posted here hoping to get a faster reply since the Labview forum is frequented more often.  My code is reading in a continuous loop with no delay time.  Is that the problem?

 

Public Sub dataAcquiring()
        reader = New AnalogMultiChannelReader(myTask.Stream)
        Dim data() As AnalogWaveform(Of Double) ' = reader.ReadWaveform(0)

        'While Scope switch is on, stream each Ai channel's data continuously to its respective WaveForm graph
        Do While swScopeOnOff.Value = True
            data = reader.ReadWaveform(sampleRate)
            wfgCh0.PlotWaveform(data(0))
            wfgCh1.PlotWaveform(data(1))
            wfgCh2.PlotWaveform(data(2))
            wfgCh3.PlotWaveform(data(3))
            wfgCh4.PlotWaveform(data(4))
            wfgCh5.PlotWaveform(data(5))
            wfgCh6.PlotWaveform(data(6))
            wfgCh7.PlotWaveform(data(7))
            wfgCh8.PlotWaveform(data(8))
            wfgCh9.PlotWaveform(data(9))
            wfgCh10.PlotWaveform(data(10))
            wfgCh11.PlotWaveform(data(11))
            wfgCh12.PlotWaveform(data(12))
            wfgCh13.PlotWaveform(data(13))
            wfgCh14.PlotWaveform(data(14))
            wfgCh15.PlotWaveform(data(15))
        Loop
        reader = Nothing
        data = Nothing
    End Sub
0 Kudos
Message 3 of 6
(3,584 Views)
Unless you start coding in LabVIEW, you aren't going to get any help here.
0 Kudos
Message 4 of 6
(3,577 Views)

My timing configuration is as follows:

 

Signal source = device internal clock

Sample rate = 1000

Sample Clock Active Edge = Rising

Sample Quantity Mode = Continuous samples

Sample Per Channnel = 100

 

I've adjusted both the rate and samples per channel.  No change.

 

0 Kudos
Message 5 of 6
(3,571 Views)

Hi busarider,

 

I agree with Dennis: you should ask in a "vb.net" forum…

 

I didn't mention to change the sample rate: I suggested to read the DAQmx buffer more often…

As your loop spins without any additional delays (AFAIK) that shouldn't be a problem.

In LabVIEW I would suggest a consumer-producer-structure to decouple DAQmx handling from UI display!

Best regards,
GerdW


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