I would like to use the Digital I/O USB 6501 as a pulse counter. I know that there is an input (2.7) that can be used for that purpose. However, I don?t know how to use it. I downloaded an example that it?s working fine, the USB-6501 Interactive Control. With that example I can configure all the lines as high/low outputs/inputs, but how can I use the counter? Is there an existing VI for that purpose?
I would appreciate any help.
Thank in advance
Vicente
The
details of the counter on the NI-USB-6501 are as follows:
Number of
counters - 1 (P2.7 can be configured as a
counter)Resolution - 32 bitsCounter
measurements - Falling edge countingMaximum input
frequency - 5 MHz
Minimum high
pulse width - 100 ns
Minimum low pulse width - 100
ns
I have attached 2 example VIs explaining
how to utilise this counter. One
file is made using LabVIEW Express VIs and the other file is made using lower
level VIs. Both of these methods work, but note that there is more programmatic
control of the process using the lower level approach. If you have any
questions regarding how the VIs work or anything else, just ask.
Both should open in LabVIEW 8.0 onwards
but please let me know if you cannot open the VIs.
Many Thanks,
Ian
Applications
Engineer
National
Instruments UK
Simple Edge Counting (Express).vi:
http://forums.ni.com/attachments/ni/170/279684/1/Simple Edge Counting (Express).vi
Simple Edge Counting (Low-Level).vi:
http://forums.ni.com/attachments/ni/170/279684/2/Simple Edge Counting (Low-Level).vi
Many thanks for your examples; they seem to be exactly what I am looking for. I can open both examples but I can?t run them. I get the following error when I open the Low-Level:
Error -200099 occurred at DAQmx Create Channel (CI-Count Edges).vi:4
Possible reason(s):
Physical channel not specified.
Task Name: _unnamedTask<13>
My device is connected and I guess I have the right drivers because the USB-6501 Interactive Control is working fine, so I don?t know what it might fail. I?m not very familiar with tasks; do I need to configure something else?
Thanks for your help
Vicente
That error just means that you need to specify which counter to use in the programs I?ve sent you (rather than a hardware problem):
-
For the lower level VI, on the front panel, select the counter from the drop down list before you run the program. This tells the program which counter to use if you have multiple counters available. Since you have 1 counter on your USB device, only one option should be available on the drop down list (it will probably look something like ?Dev1/ctr0?).
-
In the express VI example you will need to switch to the block diagram view <ctrl+e>, then double click on the DAQ Assistant express VI to configure your counting task. In the window that pops up click ?remove channels? at the top, then click ?add channels? and select your device. You can confirm that all is well by clicking ?Run? at the top of the DAQ Assistant configuration window and checking that the ?measured value? increases as you count a pulse. Press OK and exit the configuration window when you're finished.
Let me know how you get on,
Ian
Message Edited by Ian Colman on 10-23-2007 07:22 AMMessage Edited by Ian Colman on 10-23-2007 07:22 AM
Hi Ian,
If I click counter I can only see ?Browse? and if I select this I can read ?Select item/s? but there is a blank list. If I type the name you sent me I receive a new error:
Error -200220 occurred at DAQmx Create Channel (CI-Count Edges).vi:1
Possible reason(s):
Device identifier is invalid.
Device Specified: Dev1
Task Name: _unnamedTask<7>
Any suggestion?
Yes, it appears under devices and interfaces. There is a field that says USB devices and if we click there we can read this name:
USB0::0x3923::0x718A::012924F2::RAW
Regards
Vicente
- select the 'Counter' Tab
- selecting 'Edge counting' from the mode drop-down list
- select a suitable source to count during the test
- click start
Let me know if these steps are successfull and as many details as you can if they are not.
Thanks,
IanMessage Edited by Ian Colman on 10-23-2007 09:23 AM
I can?t follow your steps. I print you exactly what I can see in MAX:
On the left side it appears my device but I can?t find the ?self-test? that you mention. Instead of having ?Test panels? I have ?Open Visa Test Panel?, maybe it?s the same. But, definitely I can?t select your last options.
Thanks for your help
Vicente
My screen.doc:
http://forums.ni.com/attachments/ni/170/279763/1/My screen.doc
Sorry, but it?s not working yet. I can?t change the driver, although there is a message that says the driver has been successfully switched, it is not changing. If I access again later, it continues NI-DAQmx Base, I don?t know why. I have tried with the two NI-DAQmx that appear to select.
I also tried what you told me in the Front Panel but it doesn?t work either.
I print you some screenshots if they can help to solve this mistery.
Many thanks
Vicente
My new screen.doc:
http://forums.ni.com/attachments/ni/170/279793/1/My new screen.doc
The front panel change won?t have any effect until we
get the device working in DAQmx rather than DAQmx Base. So let?s try and get
the device working in DAQmx:
- In MAX, click the ?Software? tree on the left
navigator.
- This should give you a list of all National
Instruments software installed on your machine.
- Go to DAQmx and look at the version number.
- The latest version is 8.6. I suggest you download this
from here
- <a href="http://digital.ni.com/softlib.nsf/websearch/5FDB3A745C91D61C862573540054495F?opendocument&node=132060_US" target="_blank">http://digital.ni.com/softlib.nsf/websearch/5FDB3A745C91D61C862573540054495F?opendocument&node=132060_US</a>
- Install that and see if you can successfully switch to
DAQmx.
Best of Luck,
Ian
Message Edited by Ian Colman on 10-24-2007 03:14 AMMessage Edited by Ian Colman on 10-24-2007 03:14 AM