LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-USB-6009 Capability Question -

Does anyone have experience using the PFI 0 input as a counter, then using the count value to gate a subsequent action, like change the states of the DO?  I wish to initialize/reset the counter, set one of the DOs high, wait for a certain count, (like somewhere between 1-25) and then set the same DO low.  

 

While this counter is operating, I want to start an analog aquisition simultaneous with reading the counter.  Is this going to be a problem at a relatively low sample rate of 5kHz?  I have experienced being able to change a DO state simultaneously whilst the 6009 is aquiring a stream of analog input, with apparently no disruption to the data stream. At 5kHz anyway...

 

How far can I push this little module before it chokes?  Perhaps better said, can I read the counter value as fast as LabVIEW will go - or delayed to every millisecond - and still simultaneously get a couple channels at 1200 points of data aquired at 5 - 10kHz?  I'm tending to think so (as why would the counter value read be any more disruptive than a DO state change), but want to ask!  If anyone has experience using the PFI 0 counter to gate/trigger/modify a program's operation, please help me out.  

 

Thanks so much!

0 Kudos
Message 1 of 3
(2,638 Views)

Can you try to setup not the read counter task, but buffered period measurements? As soon as you get 24 periods and your task finishes (wait task done.vi) means you had 25 pulses. I guess it will be less consuming than polling counter.

On the second thought I guess polling happens not through USB (board controller is bottleneck?), but accessing device state in PC memory and usb comminication is the same. 

Anyway it should not be a problem.

Disclaimer:) I did not test exactly this task, it can depend on pc health, but this boards were not giving problems while working simultaneously with counter, AI (max rate) and digital out. It is there normal operation within specs.

0 Kudos
Message 2 of 3
(2,622 Views)

The USB-6009 counter is an event counter only so buffered period measuements are not possible.

 

Because very system is different and both the counter reads and the DO writes are software timed, you  will likely need to do your own testing to see what can be done.  My gut feel is that it will not work that fast and even if if does sometimes it will not be consistent and your DO high/low pattern will have a lot of jitter.

 

I have been able to get very simple things to work at a few hundred hertz. If you want a waveform to look reasonably good, do not plan on more than a few tens of hertz.

 

Lynn

0 Kudos
Message 3 of 3
(2,576 Views)