Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

6062E: Any Way To Generate Interrupt from Terminal Count?

Hi,

I need my code to execute a command when the general purpose counter on my 6062E reaches terminal count. The example code that NI provides uses a while loop to poll the counter for values--this is great if I don't particularly care abou timing, but I need to know EXACTLY when terminal count is reached. As the counter is going much faster than my while loop, the polling method means that I could be halfway to the next terminal count before I figure out that the last one happened.

Is there a way to cause the hardware to generate an interrupt on a terminal count event, so I can just run a piece of code when that happens? (note: I'm using NI-DAQ 6.9.3)

Thanks,
Darius
0 Kudos
Message 1 of 5
(3,013 Views)
Darius,

This functionality is not directly supported, but you may be able to accomplish it using DAQ Events if you are not using either the analog input or analog output channels of the NI 6062E. Below, I have included a link to a document that provides an overview of DAQ Events:

An Overview of DAQ Events and Occurrences

You could configure the output of the counter as the clock for the analog input or analog output channels. Then, you could configure DAQ Event 1 and set the number of scans for this event to 1. Thus, each time that terminal count is reached, an interrupt will be generated.

Good luck with your application.

S
pencer S.
0 Kudos
Message 2 of 5
(3,013 Views)
Thanks, I actually ended up figuring out a way to solve my problem without generating an interrupt, per se.
0 Kudos
Message 3 of 5
(3,013 Views)

I am having similar problem with the 6612. How did you trigger an event from the terminal count? I am using C code.

0 Kudos
Message 4 of 5
(2,391 Views)

Seeing that the thread is over a decade old, the solution now will be different (and probably better) due to major changes in DAQ driver, OS'es and hardware capabilities.

 

I'm no help with C syntax, but was recently in a somewhat related thread.  In LabVIEW, there's also a "Signal Event" for the Counter Output Event.  I expect it can be configured similarly to the Sample Clock Event discussed toward the end of that thread.

 

It may also be necessary to explicitly configure the counter task for the behavior "pulse on terminal count".   I don't know the C syntax to do that, hopefully someone else can help out with that part...

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 5
(2,382 Views)