Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter Channel and the "Connect Terminals.vi"

Hi,

I am trying to write a seemingly simple program but I keep getting myself confused when it comes to the channel names! 

 

I want to generate a pulse train using one of the counters, e.g. ctr0.  Then, I want to internally connect the output of that counter to another channel (PFI)  so that then I could graph the output pulse train (from ctr0).  I would like to do this without physically using wires to connect one pin to another in the connector box.  I get an error trying to do this.  I have attached a screen shot of the part that seems to be creating the problem.  

 

Can someone please help me see what I am missing when it comes to counter (source/out) channels and/or the "DAQmx Connect Terminals.vi"?  

 

Thanks.

 

P.S. I am using PCI 6251 with the SCB-68 breakout box, Labview 7.1.

0 Kudos
Message 1 of 6
(6,507 Views)

Hi DanceWiz,

 

To internally route counter signals, you will need to use DAQmx channel property nodes.  This KnowledgeBase shows how to accomplish said routing.

David
Applications Engineer
National Instruments


Digital Multimeters
0 Kudos
Message 2 of 6
(6,485 Views)

Hi David,

Thanks for your reply.  I read and tried to implement the KnowledgeBase article that you said but ran into a couple of problems:

 

i) The article mentions that "Routing the output of one counter to the source of another counter should be done using property nodes and/or DAQmx Signal Routing" but it only shows one example of how to use the property nodes, and nothing about how to use the DAQmx Signal Routing, which is what I would prefer to use (DAQmx Connect Terminals.vi). 

 

ii) The channel property node method/example that they talk about only works for counters (not PFIs, which is where I am trying to connect the output of counter 0). 

 

When I use the DAQmx Connect Terminal.vi to do this, I get the following error:

 

Error 200022 occurred at DAQmx Start Task.vi

Measurements: Resources requested by this task has already been reserved by a different task.

Device: Dev1

Terminal: PFI0

Task name: _unnamed Task<14>

 

I am attaching a copy of the code that I have written using DAQmx, and also a .jpg of the same code trying to use the property node.  

 

Thanks

 

P.S. I am using Labview 7.1, and NI PCI-6251.

Message Edited by DanceWiz on 06-05-2009 02:51 PM
0 Kudos
Message 3 of 6
(6,459 Views)

Hi DanceWiz,

 

The issue with using the connect terminal vi is that it reserves the terminals that it connects.  As such, you are receiving error 200022.  To achieve the functionality you desire, property nodes must be used.  Implementing the counter output and digital input tasks as displayed below should work.  The CO.Pulse.Term property node sets the CO task output to PFI0, while the DI.Tristate property node (when set to false) enables the reading of the digital line even though it is used in the CO task.

 

2009-06-08_160229.jpg

David
Applications Engineer
National Instruments


Digital Multimeters
Message 4 of 6
(6,418 Views)

Hi David,

When I try this, I still get an error, plus the output is a sawtoothed train.  The error that I get is the following:

 

Error -89137 occurred at DAQmx Start Task.vi

Possible reason(s):

Specified route cannot be satisfied, because it requires resources that are currently in use by another route.

Property: CO.Pulse.Term
Destination Device: Dev1
Destination Terminal: PFI0

Required Resources in Use by
Source Device: Dev1
Source Terminal: PFI12
Destination Device: Dev1
Destination Terminal: PFI0

Task Name: _unnamedTask<36>

 

I have attached a .jpg copy of the vi and of its output.  Thanks again for your help.

 

 

Download All
0 Kudos
Message 5 of 6
(6,413 Views)

Hi DanceWiz,

 

First, reset the device in MAX.  Then, set up the write and read portions of your task like this:

 

 

2009-06-10_082541.jpg

David
Applications Engineer
National Instruments


Digital Multimeters
Message 6 of 6
(6,396 Views)