LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

working with two usb-6009

Hello! I am trying to read data from 2 USB-6009 (expandable to 4). It works fine with the two devices and a finite number of samples and a sample rate. However, I am missing some data between cycles. I tried to run the devices continously but I get an error. How can I do to avoid this? How can I use more that one card without losing data?
 
0 Kudos
Message 1 of 10
(4,095 Views)
Dear davidpaz79
 
I don't think you're missing data, rather drawing the plot goes wrong. In your main VI (from the GIF image) do you use a timed loop around the 'Waveform Chart'?
 
Best regards
 
Philipp Roessler
 
0 Kudos
Message 2 of 10
(4,072 Views)

Hi! I am attaching a picture of the loop, there are another loops like this one. My subvi delivers the data from the cards. I am using a 50ms wait for every loop. At first the loops only had the subvi for the signals and a Waveform, now it has a couple other things, but the problem was from the beginning. Thank you vary much in advance.

0 Kudos
Message 3 of 10
(4,068 Views)
Dear davidpaz79

Please provide us with some more information about your measurement task:

~ What kind of measurements are you performing, analog, digital or both?
~ How many channels are you reading on each USB-6009?
~ Which sample rates and buffer sizes (i.e. number of samples) are you using?
~ Are your devices connected to an USB hub or 2 independent USB buses?
~ Do you use the DAQmx driver for both 6009s?

Best regards

Philipp Roessler
0 Kudos
Message 4 of 10
(4,050 Views)
Hi! So, I am doing an analog measurement with two USB-6009. The number of channels are variable, that means I turn them on and off by request. I start with the first device Dev1 and Channel number AI0 (differential) up to 4 channels, if I need more, I use Dev2 channel AI0 and so on. Right now I only have two cards, but the programm should be expanndable up to 16 channels, that means 4 boxes. (That is what we have available, otherwise we shoukd have used one card with more channels.) I am using 1000 samples at a rate of 1000. I need a resolution of 1msec, if what I did is right, I should be getting 1000 values per second.  Both cards are connected to the same USB-Root-Hub. I am attaching a pic from the subvi that controls the cards, the yellow subvi were originally the DAQ-Assistent (I do not know the correct translation but it is the subvi that configures the cards) wich I change to be able to add channels and devices. Thank you for your help.
 
0 Kudos
Message 5 of 10
(4,031 Views)
Dear davidpaz79

You don't have any synchronization among the various 6009s, right? This might cause the holes in your data plots. Please consider to synchronize the devices (over their PFI0 pin).

Best regards

Philipp Roessler
0 Kudos
Message 6 of 10
(4,012 Views)
Ehmm..no. I am going to try that, thanks!! But it is still happening when I am using only one though. In this example, when I am using only 4 channels, it should be as if I would only have one card. Would I still have to sync.? Thank u!
0 Kudos
Message 7 of 10
(4,009 Views)
Dear davidpaz79

If you only use one single card you certainly don't have to sync.
Please let us know about your progress ...

Best regards

Philipp Roessler
0 Kudos
Message 8 of 10
(3,987 Views)

Thank you Philipp for all your help. I finally got it to work. The problem was that my subvi was initializing the devices in every loop, that is why I had those spaces in the signals. I am now running the cards continously and it works fine. Another problem, tough. Sometimes when I start the devices, there is a delay and I get an error message (saying that the data is not available and that I should use a longer timeout). With a simple error handler and a no action setup, it usually starts the devices after showing the error. But that only happens sometimes, so I cannot tell what is going on. When that happens the signals from one device are delayed compared to the other devices. And sometimes, it is not showing any errors, but the waveformchart does not update, after a few seconds it runs very fast and then stops again and keeps on doing that. How can I make sure that the cards initialize correctly everytime, with no delay and at the same time? I was trying to use the starttrigger but with no results (I cannot figure out how that works, I set up the start trigger at PFI0 but the data-flow does not start). Thank you very much again!

Best regards,

David P.

0 Kudos
Message 9 of 10
(3,971 Views)

Dear David

This again sounds like an error caused by missing synchronization among your devices.

To sync two 6009s you would need a third device (e.g. another 6009) which sends the trigger through a cable connected to the PFI0s of both acquisition devices.

Best regards

Philipp Roessler

 

0 Kudos
Message 10 of 10
(3,966 Views)