LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with generation pulse (Width) by Counter

Samantha hi,
 
I would like to clarify goal of this post. In my program I, personally, avoided the problems. I believe there are something wrong with DAQ, driver or hardware. My purpose is not to know restriction/bug (I am not develop that). My purpose is that NI developers get chance to fix the bugs and users will have less trouble.
 
I hope you would agree with next sentence "program becomes more complicated it is very difficult to catch bug" is correct. The first problem where you provided link to knowledge confirms that. If we will use the simplest examples (one example has one task) from help we wouldn't meet problem. But when we began to use resourses together it's become more complicated ... Trust me I have some experience Smiley Wink
 
So I am fine with your questions. Moreover, thank you that you try to go in the root.
Unfortunately, I have problem to repeate other error messages. The instrument where we use cards is complicated and very expensive. Constantly, there are people who wait the instrument and it it very hard to get access when it works.  I have a lot of other projects but I can find time to repeate the system on the table. But ... again but I don't have spare NI cards. That is why I delayed for a month with answer. I got a little time and reproduced the simplest bug. When I will have next moment I don't know.
 
According you questions.
- I don't remember error code which I got in loop. Definetely, error message had DMA word. It seems it had word "data". If you can point me on all DMA errors (I hope there are not so much errors) maybe I can remember something. Before this error I had DMA error during initialization. So I re-read documentation twice (unfortunately, it is not clear for me) and moved to "interrupt" variant. The error doesn't show immediatly. it can come after 10-100 cycles.
- you are correct about ~75 ms. If signal drops the program increase accumulation time and verse vice. (we lost so much time because instrument data were so strange Smiley Mad)
- loop (actually, "if") was ~10 ms for DELL Precision 390. I moved system to older DELL Precision 530 and got ~20 ms. The program has "Cycle, ms" parameter and show the time always Smiley Wink To calculate real loop time we need to add data acquisiton time (32 ms), data transfer time (depends how driver work but should not be more then 32k * 4 / 100M = 1 ms), and DAQ post-processing time (as minumum transfer from bit to double)
- I use DAQmx but also I installed old DAQ (maybe I will need to use PCI-5411 soon). NI drivers is from Aug 06 or May 07. (I can double check that).
0 Kudos
Message 11 of 19
(1,238 Views)

Hi,

I’m going to step in the forum since Sam is out of the office. Since this issue has been already handling by to other AEs, I’m going to get together with them and review the entire forum. Without knowing the error number or name is really hard to find it in our database there are 524 knowledge bases on DMA.

Is there any chance you can try the example: “Gen Dig Pulse.vi” and measure the frequency with: “Meas Dig Frequency-Low Freq 1 Ctr.vi” that I have attach, (this one you don’t have to make any physical connections. The reason I ask you to try this example is that I have ran it in my PC with and I was able to generate a 0.02 Hz pulse that is 50 with the 80 MHz Time base, although this is with a M series, I will like to know how does it behaves with the 24 bit counter and 20 MHz time base of your 6711 as so as I get my hands on one of those I will try again with the 6711.

In regards to the DMA problem I have requested assistance from R&D but I will also try it with a 6711.

Why do you think you need a 5411? What is the overall goal in you application? Can we take a step back and look at the big picture?, we might have a different approach.

Thanks a lot for all the information and for your persistence in this case.

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 12 of 19
(1,213 Views)
I forgot to attach the code. Here it is:
Jaime Hoffiz
National Instruments
Product Expert
Download All
0 Kudos
Message 13 of 19
(1,211 Views)
Jaime hi,
 

Can you move your applications to LabVIEW 7.1 ?

I don't have any problem with license (we have volume license for company) but I do had problem with registration of my Full license 8.0 or 8.2. I spent 2-3 hours with NI support to register one of my computers. After that I decided to use LabVIEW 7.1 to prove system for research and then use C++.

I also can say that I used few CI and CO examples from LabVIEW help and didn't see any incorrect behavior.

 

Application goal is to develop advanced method for FTICR 9 Tesla mass-spectrometer. FTICR control system doesn't provide reasonable interface and we have only some output and input TTL signals. We can create special method and according the method FTICR will generate output pulses or wait input pulses.  

So this program had

- 4 AOs with external trigger and clock from FTICR

we added

1. one output TTL signal : ADC external trigger to start loop. The program measures  ~ 50 ms of signal (in parallel FTICR 0.8 sec) to calculate accumulation time for next scan

2. one output TTL signal : recognize that measurement started (come in first scan only) and width of the pulse provides method (currently Standard or AGC)

3. one output and input TTL signal : set accumulation time for AGC method. FTICR sends output trigger and wait input fall slope, CO starts from the input trigger and generate pulse into output trigger

4. one output and input TTL signal : set additional delay = (max time - accumulation time) that scans have always the same time; also there is FTICR problem with data transfer when scan time is less ~1.5 sec

 

 We started the subsystem with 2 points (1st and 3rd) and then came to 4. One measurement takes 100 minutes and generates > 8 GB data. There is central system that re-calculate 8GB to few the most important parameters to compare methods ...

I hope I put a little light on the strange system.

 

I mentioned PCI 5411 because we are developing another advanced method. The new method requires > 1MHz sampling rate. PCI 5411 doesn't have DAQmx driver and I thought that DAQ drivers itself can be reason for incorrect behavior.

0 Kudos
Message 14 of 19
(1,199 Views)

Hi,


You can just open the same example in LabVIEW 7.0 if I’m not mistaken those example are available in 7.0. In either case I was able to generate a pulse of 0.5 Hz (2 seconds) and read it with a PCI-6711. Screenshots are attached. Things that I did that might help you, I did change the time base from the 20 MHz to the 100 KHz in both VIs the one generating and the one measuring.


I was also able to generate from 4 analog outputs, continuously generate a pulse and at the same time measure it with no DMA transfer error.

I read on your previous post that is hard for you to test these behavior that you are seen but since I cannot reproduce the error in my computer is really difficult to find the root of your problem if you don’t isolate the problem to a simpler VI. Let me know if this is something you can do? Do you have another card, that you might be able to use as the counters?



Message Edited by Jaime F on 06-09-2008 12:12 PM
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 15 of 19
(1,180 Views)
Jaime, hi
 
I tested both test examples. I connected output to input. It works. I attached printscreen because I did slight change.
 
Unfortunately, I wouldn't be able to do serious tests, like isolation the problem to a simpler VI, with instrument. Time is one question but main problem that we moved ahead, added another feature, changed intstrument method and program. So old program will not work with new instrument method. Sorry.
 
But I am ready to try something simple and I have spare PCI-6711 and don't have spare PCI-6111.
0 Kudos
Message 16 of 19
(1,167 Views)

Hi,

You already did the simple test with the 6711, the other one I did was setting up an analog output and counter task to confirm the DMA error and I did not get it. I can start the counter task first or the AO first and I don’t get any error messages; if I cannot reproduce it there is not much I can do. Without simplifying your code we will not be able to solve this problem.

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 17 of 19
(1,147 Views)

Hi,

I have been giving a lot of thought to our problem and there is something I will like to try if it is under your possibilities, what version of DAQmx are you using? Can you upgrade to the latest version. If you do so, try first a simple task like the examples and then try running your code, let me know how it goes?


Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 18 of 19
(1,107 Views)
I use NI-DQmx 8.5. I also have Traditional DAQ 7.4.4.
I see that NI-DQmx 8.7.1 is the latest version. Maybe I can upgrade soon it is depends from schedule.
 
I sure that NI samples from help will work without any problem.
Unfortunetely, I am not sure that I could try the old code because instrument method was changed and, probably, the old code is not compatible.
 
0 Kudos
Message 19 of 19
(1,094 Views)