Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

USB 6501 COUNTER

84 views
Skip to first unread message

Vicen

unread,
Oct 22, 2007, 9:10:11 AM10/22/07
to
Hello,

 

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

Ian Colman

unread,
Oct 23, 2007, 7:10:05 AM10/23/07
to
Hi,


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

Vicen

unread,
Oct 23, 2007, 7:40:08 AM10/23/07
to
Hi Ian,

 

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

Ian Colman

unread,
Oct 23, 2007, 8:40:05 AM10/23/07
to
Hi 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

Vicen

unread,
Oct 23, 2007, 9:10:13 AM10/23/07
to
 

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?  

Vicen

unread,
Oct 23, 2007, 10:10:06 AM10/23/07
to
Hi Ian,

 

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

Ian Colman

unread,
Oct 23, 2007, 10:40:08 AM10/23/07
to
Hi,
 
If the device is showing up in MAX then, we should just verify that everything is working okay. Click 'Self-Test' at the top of MAX when your device is selected and verify that it passes this. Click 'Test Panels...' at the top and confirm in there that your counter is working by doing the following:

- 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

Vicen

unread,
Oct 23, 2007, 11:40:08 AM10/23/07
to
Hi Ian,

 

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

Ian Colman

unread,
Oct 23, 2007, 11:40:11 AM10/23/07
to
Hi,Oh right I see, that screenshot is a great help. It shows me that your device is setup using a driver called 'DAQmx Base', where as you should normally have the device set up with 'DAQmx'. Its easy to change this. In MAX, with the device selected and window open as in your screenshot:Go to Tools >> NI-DAQmx Configuration >> NI-DAQmx USB Driver SelectorSelect the NI-DAQmx option rather than NI-DAQmx Base optionYou should then have more options avaliable to you, such as test panels etc. More importantly, that should mean the VIs work. If you still cant select your device in the low level VI (eg. Dev1/Ctr0) then do the following:- Right click the drop down menu on the front panel (where you should select your counter)
- Select 'I/O name filtering...'
- Select 'Digital Input' instead of 'Counter Input' in the I/O Type field
This should allow you to select Port2/Bit7 or PFI0 as your input.Hope this helps,IanMessage Edited by Ian Colman on 10-23-2007 10:39 AM

Vicen

unread,
Oct 23, 2007, 12:40:12 PM10/23/07
to
Hi Ian,

 

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

Ian Colman

unread,
Oct 24, 2007, 4:40:06 AM10/24/07
to
Hi Vicente,


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&amp;node=132060_US" target="_blank">http://digital.ni.com/softlib.nsf/websearch/5FDB3A745C91D61C862573540054495F?opendocument&amp;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

Vicen

unread,
Oct 24, 2007, 8:40:06 AM10/24/07
to
Hi Ian,
&nbsp;
I think it's working now, at least there are no errors when I run the program. I haven't checked it yet sending&nbsp;a pulse but I'm optimistic. I hope now it will work. If I have any other problem I will contact with you. Many thanks for your help, it has been very useful.
&nbsp;
Regards
&nbsp;
Vicente
0 new messages