10-29-2015 01:25 PM
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.
10-29-2015 01:36 PM
10-29-2015 02:33 PM
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
10-29-2015 02:51 PM
10-29-2015 02:53 PM
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.
10-29-2015 03:32 PM - edited 10-29-2015 03:34 PM
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!