LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MCC PCI-DAS-6031 external clock problem

We use an MCC PCI-DAS-6031 ADC card. It is installed using InstaCal and it works in an application written in C++. I'm now want to make it work in LabVIEW.

 

In short, we have an AI task with an external clock. However, the ULx Read VI reports that there is no external clock. To exclude hardware issues I would like to view the external clock in for example InstaCal.
Are there any other comments or suggestions about the VI shown below?

 

The longer version:

We use a laser trigger (approx 1000 Hz) as the sample clock. The intention is to use two ADC cards, but in the example shown we use only one. (the inline figure is also attached)
From left to right:

  1. we set up a DO task and set DO0 to false to block the laser trigger (using an AND gate).
  2. we set up an AI task with an external clock. We start the task(s), but because the trigger is blocked, no data is converted.
  3. DO0 is set to true, unblocking the laser trigger
  4. we read out data in a while loop
  5. we stop the AI task
  6. we block the trigger and stop the DO task
  7. we clear the tasks

screenshot.png

 

Unfortunately, reading the data gives an error at step 4:

Error 10003 occurred at ULx Read (Analog Dbl NChan NSamp).vi
Possible reason(s):
Measurements: Some or all of the samples requested have not yet been acquired.
To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger, make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.

 

Using the C++ program we know the current hardware configuration works. The cables are connected properly and the use of a single card is not an issue.

 

When I set the clock source to OnboardClock, the LabVIEW program works and shows data from the detector (although it looks weird because it is not synchronized properly).

 

That suggests there is an actual problem with the external clock in LabVIEW, one that is not present in the C++ program. A reasonable suspect is the blocking/unblocking.

  • The DO port number (and when it should be true or false) are taken C++ program. I tried to change these, but that didn't work.
  • The detector hardware has outputs to, according to the labels, monitor the state of DO0 and view the laser trigger after the AND gate on a scope. This shows the same for the C++ and LabVIEW programs.

Unfortunately the hardware has no documentation and the software is rather opaque and has no useful comments. I know that in NIDAQmx it is possible to see the external clock as a counter, but I couldn't find this in InstaCal. Is there another way to check this?

 

I have also tried to change the default channel assignments in InstaCal (such DS A/D START TRIGGER and DS A/D CONVERT). This caused errors in the C++ program and the LabVIEW program still doesn't read any data. I think this suggests that the C++ program does not sneakily change the channel assignments.

 

Are there any other comments or suggestions about the VI? Is it for example a problem that the devices are Dev1 and Dev2, instead of Dev0 and Dev1? I'm really out of ideas...

 

Thanks,

 

Robbert

0 Kudos
Message 1 of 4
(3,374 Views)

Hi, Robbert (unusual spelling, that).  An interesting problem.  It would really help to attach the actual VI, rather than a picture (very tiny on my monitor, hard to read) of only a part of the VI.  There may be things either "off the page", "in another case", or "hidden in the details" that would help us help you figure this out.

 

Bob (yes, with two "b"s, also) Schor

0 Kudos
Message 2 of 4
(3,370 Views)

Hi Bob,

I attached a bigger version of the screenshot to the original post. I can attach the VI as well (tomorrow), but the VI is stripped down to the bare essentials and there is not much more to it than what I show. 

Best,

Robbert

0 Kudos
Message 3 of 4
(3,352 Views)

Here is the actual VI.

0 Kudos
Message 4 of 4
(3,327 Views)