02-20-2006 02:08 PM
02-21-2006 09:17 PM
Hello Pascal,
I am afraid it is hard for me to understand what must be going wrong. However, I do have some recommendations for references. First, have you looked at the tutorial Transition from Traditional NI-DAQ to NI-DAQmx? Also, another great getting started reference is Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications.
Finally, the best place to look for information about programming specific application is in the NI Example Finder which you can get to in LabVIEW by going to Help >> Find Examples. You can then browse to Hardware Input and Output >> DAQmx >> Generating Digital Pulses to see examples of generating a digital pulse train with a counter. If you need to find out about performing digital I/O you can look at the Digital Measurements and Digital Generation folders.
Please let us know if we can be of more help.
Laura
02-22-2006 06:23 AM
Pascal,
The first problem you're seeing is actually an intentional feature of DAQmx. At the end of program execution, any DAQmx tasks created within the LV session are automatically stopped & cleared. So when you simply run "INIT" by itself, the task gets automatically cleared before you get a chance to execute "RUN". And if your program is stopped before you call "CLOSE", the task will similarly be cleared automatically.
I think it was a good idea even though it sometimes prevents me from doing certain kinds of debugging I used to be able to do under traditional NI-DAQ. I like to package many of my Data Acq hw interfaces into "action engines" that store the task id in an unitialized shift register. I used to be able to open the action engine's front panel to execute one action at a time, knowing that traditional NI-DAQ task id would be retained and would remain valid. I can't do things that way any more because of the automatic clean up.
There are several advantages to stopping the DAQ tasks when the LV program that launched them stops executing. Rogue tasks that continue generating signals after the LV program stops can be hazardous to test devices. They would also get in the way of future attempts to relaunch the program and regain control of the DAQ hw.
As to the conflict between counter and DIO -- some cards share pins between counter and DIO. I'm guessing that when you configure your DIO task, it grabs control of the I/O pins that were formerly used by the counter. You should bring out all DAQmx error outputs because they should give you some info in such cases.
Now, it certainly is possible to run both counter and DIO tasks simultaneously on a board if you're careful to avoid pin conflict. I find this to actually be much easier in DAQmx, especially with relatively few DIO bits. Just be sure to identify the specific DIO lines you'll be using rather than configuring the entire DIO port. Syntax would like like "Dev1/port0/line4".
-Kevin P.
02-22-2006 08:50 AM
02-22-2006 02:12 PM
I have some acquisitions (with trigger) that I start and after I am not using for a long time (from 10s to 10 min) and I am doing again acquisition. Look’s like, in the new Daqmax the board is in timeout and It need to be initialized again. That’s mean I need to initialized my acquisition each time I am using it. I am not sure it will be as fast as before. We have less control than before.