cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Using analog module 9221 for counting edges

Highlighted

Using analog module 9221 for counting edges

In the past I have used the DAQ assistant to use the NI 9221 module for counting edges, i.e. digital input. This seems not to be possible anymore when creating a new vi using the DAQ Assistant, and the old task is not possible to use anymore. Has this support been removed?

I can clearly see that it has been possible to create in the past, see image below from the former working VI.

image.png

0 Kudos
Message 1 of 5
(95 Views)

Re: Using analog module 9221 for counting edges

Hi GGGGGGGGG,

 

Note that unless the module explicitly specifies that it support counters, it most likely won't.

 

Reading the product specifications for the NI-9221, there is nothing that suggests that this module does support counter tasks. 

NI-9221 C Series Voltage Input Module

NI 9221 Datasheet

 

Therefore, I found it strange that you have been able to make a count edge task previously using the DAQ Assistant. I have checked a few versions of NI DAQmx Device Driver ranging from version 9.9 up to 18.1 and tried to create a counter task using a simulated NI 9221 module with a cDAQ chassis, without any success. 

 

What version of LabVIEW and DAQmx did you use at the time of the screenshot?

 

There are digital I/O modules that supports using the chassis' counters and there are also specially designed counter modules that may be worth having a look at as alternatives.

 

If you use analog inputs you could also implement some software-based digital edge counter. See Count edges of AI signal with NI 9221.

 

I hope this was helpful.

 

Best regards,

MBengths

 

0 Kudos
Message 2 of 5
(55 Views)

Re: Using analog module 9221 for counting edges

Thank you for your replay MBengths

 

I agree with you, it doesn't look like it should be possible but still it looks like it has been since I have the VI, I'm getting confused but I'm sure I have run it 1-2 years ago. And I have run it for tests back then. But probably the driver has been updated since then.

Attached is the assistant that should not be possible to make, and I can't do a new one, and this is not working anymore. But as you see, it's configured for NI9221, very strange?

 

I have Labview 2014, 14.0.0 and DACmx 17.6. DACmx is probably updated since the assistant was made but don't know previous version.

 

Best regards

Gustaf

0 Kudos
Message 3 of 5
(52 Views)

Re: Using analog module 9221 for counting edges

Hi Gustav,

 

Judging from the information we have, the NI 9221 module has never supported any hardware counters, hence the configuration in the DAQ Assistant is most likely a text glitch.

 

The VI should not have worked in the current state. If it has been used before, I am certain that another module that supports hardware counters has been used. If that isn't the case, it wouldn't have worked at all. Perhaps it hadn't been saved correctly, which accidentally created this text glitch.

 

The harsh reality is that at the current state using the NI 9221, it doesn't work and it never will.

 

In order to create counter tasks you must use a module that explicitly supports counters.

0 Kudos
Message 4 of 5
(46 Views)

Re: Using analog module 9221 for counting edges

Thank you MBengths for the answer.

 

I think this was just a software function, not hardware, i have rather slow signals I'm counting so that's no problem.

I actually now found output files from a year ago where this module where giving me data. My guess is that there has been a "bug", the HW were not meant to be used for this. However, since it's not working anymore I will buy a digital input to use instead.

0 Kudos
Message 5 of 5
(35 Views)