11-06-2009 04:55 AM
Answer my last post, had another look at this problem and found a possible solution.
First thing to mention is that when setting up a DAQ channel I tend to use the DAQ MX Start Task on digital, analogue and counters etc.
To try and bottom this problem out I set the dataflow during intialisation to go through each of the DAQ initialisations in turn using the Error connections and monitoring dataflow using the trace function.
What I found was that the counter output was generating a frequency on channel 3 but after the digital input DAQ was started it shut down. I removed the DAQ MX Start task from this digital channel and the counter gave a frequency output until it hit the next digital channel that had a DAQ MX Start task. So removed all of the DAQ MX Start tasks from digital input and output channels but leaving them on the 3 counter output channels and 2 quadrature channels and it all worked fine.
Out of interest the next thing I will try is first setting up all of the digital channels using DAQ MX Start and then afterwards setting up the quadrature encoders followed by the counter output channels.
Perhaps it is critical in what order the hardware is set up??
11-09-2009 05:13 AM
Hi Jack1
Just to confirm have you solved your problem? As you have said 'it all worked fine'. To set up the digital channels, using the DAQmx Start VI is the best way to do this, however only one channel can be selected per VI. It shouldnt be critical which way you set your hardware up, so long as each of the channels are correctly selected within your code.
11-09-2009 05:32 AM
Hi David
As you say it does not matter in what order the counter vi, digital vi etc were initialised.
However I have now confirmed that the Start vi cannot be used on the digital channels if there are counter outputs being requested. If you do use the Start vi on both digital and counter channels then the counter outputs will not always start. It does not make any difference if the counters are in the same loop or separate loops.
Cheers
Joack
11-09-2009 07:20 AM
Hi Jack1
Thanks for your quick reply. It does matter what loop you place these counters in as they will then repeat after the start task only, otherwise they can be placed both in the same loop. Could you please clarify if/what problem you are still having? Many thanks
11-09-2009 08:06 AM
Hi David
Basically I set 2 counters on the PCI 6601 to output a 1800Hz signal but after intialisation one of the counters stopped. In the same intilisation case frame there are 2 further counter channels being set up as quadrature encoders and one digital input channel and also one digital output channel.
Originally I had these 6 DAQ using individual Start vi's and they each had their own error path. With this config occasionally (50% of the time) one of the 2 counter outputs was found not to function.
Solution??
1) Removed the DAQ Start function from the digital input and also the digital output channel
2) Had one error path that went through each of the initialisation vi's, Start vi's etc
Following these mods the 2 counters function every time.
Just to check I put back the Start vi's into the digital input and output channels and it caused one of the counters to fail again
Cheers Jack