LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6602: semi-period measurement error: -89137

Hi,

I'm trying to accurately start the semi-period counting on rising edges
on all 8 counters of the NI 6602. I'm using the following code:

        for ( int i = 0; i < 8; ++i)
        {
            ...

            ret = DAQmxGetCISemiPeriodTerm( handles[i], "CI", name, sizeof( name));
            CLEAR_ON_FAILED( ret)
            ret = DAQmxSetDigEdgeArmStartTrigSrc( handles[i], name);
            CLEAR_ON_FAILED( ret);
            ret = DAQmxSetArmStartTrigType( handles[i], DAQmx_Val_DigEdge);
            CLEAR_ON_FAILED( ret)
            ret = DAQmxSetDigEdgeArmStartTrigEdge( handles[i],
DAQmx_Val_Rising);
            CLEAR_ON_FAILED( ret)
            ret = DAQmxSetCISemiPeriodStartingEdge( handles[i], "CI",
DAQmx_Val_Falling);
            CLEAR_ON_FAILED( ret)
        }

All calls succeed but when I try to start the tasks, the 7th and 8th task can't be started due to the error:

#define DAQmxErrorResourcesInUseForRoute_Routing                                         (-89137)

It works as long as I only configure and active only 6 counters. The counters could be counter 0-6, 2-8, 1-7 or the like.

Is it possible that only 6 counters may be configured with an "arm start trigger" connected to the counter input?

Best regards,
Michael
0 Kudos
Message 1 of 4
(2,914 Views)
Sorry, I obviuosly made a mistake in the description.

The counters could be:

counter 0 to 5
counter 1 to 6
counter 2 to 7

All these combinations do work. However configuring the arm start trigger and start edges on all 8 counters does not work.

Regards,
Michael
0 Kudos
Message 2 of 4
(2,910 Views)
Hey Michael,
 
Please go ahead with your other thread (http://forums.ni.com/ni/board/message?board.id=40&message.id=5878) at the hardware board.
 
Thanks, Christian
0 Kudos
Message 3 of 4
(2,888 Views)
Hi Christian,

yes it's possible to start all 8 counter tasks without the "arm start" trigger. It's also possible to start 6 counters with the "arm start" trigger AND the remaining 2 counters without. Of course I get the "first sample is not valid"-problem on the counters started without the "arm start" trigger and I'd like to have all 8 counters running with only valid samples in their buffers.

The code I use to accomplish this is more or less the same as described here:

http://digital.ni.com/public.nsf/allkb/47BAA9569AEDFC0886257091007A217A

Any idea why this doesn't work for the last two counters (of the 8 counters used)?

Best regards,
Michael


0 Kudos
Message 4 of 4
(2,882 Views)