LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does analog read waveform produce repeat timestamp

I am using a USB-6009 to read an anlog input as waveform and update an indicator (waveform chart).  Occasionally my waveform chart will clear itself and I have verified this is due to the current timestamp being equal to the previous timestamp.  I understand this makes the chart clear but why does the Daqmx Read produce two points with the same timestamp?

 

I am using the Daqmx Timing function to setup continuous acq, in the range of 100-500 Hz.  My Read function is in a loop with a Wait for Next ms Mulitple equal to 10ms, and I read all available samples in the buffer.

 

Thanks

Dan

0 Kudos
Message 1 of 20
(4,017 Views)
If these are parallel loops, then you might have race condition. Your read time is equal to your fastest timer rate, so conceivably, you could get the same time (and value) twice. Have you tried a slower Wait?
Richard






0 Kudos
Message 2 of 20
(3,982 Views)

DBerry wrote:

I am using a USB-6009 to read an anlog input as waveform and update an indicator (waveform chart).  Occasionally my waveform chart will clear itself and I have verified this is due to the current timestamp being equal to the previous timestamp.  I understand this makes the chart clear but why does the Daqmx Read produce two points with the same timestamp?

 

I am using the Daqmx Timing function to setup continuous acq, in the range of 100-500 Hz.  My Read function is in a loop with a Wait for Next ms Mulitple equal to 10ms, and I read all available samples in the buffer.

 

Thanks

Dan


 

This sounds strangely familiar. I think I recall reading of a bug that fits your description. So first-off, make sure you have the latest a greatest version of the driver.

 

If you are using the latest version then this may be a bug. Post your code so we can verify.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 20
(3,974 Views)

What Ben said. I was off base thinking you are just looking at data. Indeed the timestamp should change.

I recall the issue with repeated timestamps being with RT and/or Shared Variables. At least I know I had plenty of repeated timestamps on RT using SV.

Message Edited by Broken Arrow on 11-18-2008 09:03 AM
Richard






0 Kudos
Message 4 of 20
(3,970 Views)

Thanks for the replies. 

I will update the drivers and see if my problem is solved.  I have extracted the problem section of code and uploaded.

I am on a Windows (non RT) system and use no shared variables.

 

Thanks


Dan

0 Kudos
Message 5 of 20
(3,951 Views)

Hi Dan,

 

You did not mention the version your are using so I'll asume you have checked this.

 

If you replace the "wait Until Next ...." with a simple "Wait ms Timer" with a delay of 100 ms does the problem change? I suspect the actual loop rate is slower than you expect so the delay ends up being a noop. Check the error cluster coming out the the DAQ read to see if you are getting a warning.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 20
(3,946 Views)

Ben,

 

I am using LV 8.2.1,Daqmx 8.5.0.f5, but I am in the process of updating to Daqmx 8.8

I tried using a Wait ms = 100ms and still get some equal timestamps, but no error from the erro cluster

 

Thanks

Dan

0 Kudos
Message 7 of 20
(3,938 Views)

Ben,

 

I still have the problem with the new drivers installed (8.8).  Is it possible the device is faulty?

Is the timestamp set by the device clock, and if so I guess I don't understand how it could be having issues with such a low sample rate (100-500 Hz).  I have also used this method in several other applications with similar devices without fault.

 

Dan

0 Kudos
Message 8 of 20
(3,921 Views)

Now is the time to wait for NI support to rely to this thread.

 

I see nothing obvious in the code let them investigate.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 20
(3,904 Views)

Hello All,

 

I am looking into this issue.....will hopefully have some sort of explanation shortly.

Regards,
Claire Reid
National Instruments
Message 10 of 20
(3,893 Views)