LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How many train pulses can run a task

Hi!

I'm currently programming in LabView 7.1, with DAQmx 7.3, an application to configure a NI PCI-6602. The purpose of that is to generate whether single TTL pulses or train of TTL pulses after counting one TTL pulse. To accomplish that I've programmed three tasks:
- PULSE_COUNT: to count a finite number pulses using counter C7 as "CI Cnt Edges" virtual channel
- SINGLE_PULSE_GEN: to generate single pulses using counters C0..C5 as "CO Pulse Time" virtual channels(trigger is source of C7)
- TRAIN_PULSE_GEN: to generate train pulses using counter C6 as "CO Pulse Time" retriggerable virtual channel(trigger is source of C7)


The matter of fact is: after configuring these tasks, as soon as the program starts the third task, occurs an error -50103 saying:
"Error -50103 at DAQmx Start.Task.vi
Possible reason(s):
The specified resource is reserved. The operation could not be completed as specified.
Task Name: PULSE_COUNT"

So I have the next questions:
1. If it is possible to generate several single pulses within the same task. Why isn't to generate several trains of pulses in the same task?
2. How many task can be run accessing the NI PCI-6602. Is it limited somehow by the number of DMA channels? Should I better use interrupts?

Thank you for your interests!

Manuel
0 Kudos
Message 1 of 3
(2,363 Views)
Manuel,

It sounds like your task "TRAIN_PULSE_GEN" might be trying to produce a finite pulse train using Counter 6. To do so, DAQmx wants to use the paired counter, Counter 7, to control the # of pulses to generate. However Counter 7 is also needed for your "PULSE_COUNT" task, creating a conflict.

Possible workarounds:

A. Generate a continuous pulse train on Counter 6. Probably this won't work for you app so how about...

B. Only use Counters 0..4 for SINGLE_PULSE tasks, and setup your "PULSE_COUNT" task on Counter 5. Then your finite pulse train on Counter 6 can work because Counter 7 has been left available. If your app won't allow only 5 single pulse sources rather than 6, then you'll probably need to buy an additional counter/timer board. A 6601 may be sufficient.

Now, your specific questions:

1. If it is possible to generate several single pulses within the same task. Why isn't to generate several trains of pulses in the same task?

Yes you can generate up to 8 single pulses, though they will each actually be assigned a unique task. You also could generate up to 4 finite pulse trains provided no counters were reserved for other tasks. And you could generate up to 8 continuous pulse trains. None of these pulse generation tasks require DMA.

2. How many task can be run accessing the NI PCI-6602. Is it limited somehow by the number of DMA channels? Should I better use interrupts?

You can run up to 8 counter tasks on a PCI-6602. Pulse generation does not need DMA nor do single unbuffered measurements. DMA is only used for the first 3 buffered measurements you setup. More buffered measurements can be done, but at a reduced speed because they will need to use interrupts.

None of your pulse generation tasks need DMA. I don't know if your pulse counting task is buffered or not, so it will use either 1 or 0 DMA channels. You shouldn't need to worry about using interrupts for anything in this app.

-Kevin P.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 3
(2,353 Views)
Finally I'm generating four single pulses and two pulse-train due your helpfully information.

Manuel
0 Kudos
Message 3 of 3
(2,337 Views)