From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming periodic interrupt generation on PCI-6601/6602

Does anyone have experience or knowledge programming the the PCI-6601/6602 or similar card in Visual C++ using the NI-DAQ library to generate an interrupt at a user defined rate (eg. 60Hz) and tying a user defined ISR to that interrupt? I've been looking for sample code, and even the commands in the NI-DAQ function reference to be able to do this, but have found nothing.

Thanks,

M Evans
0 Kudos
Message 1 of 5
(3,599 Views)
M,

What exactly is your application? What are you trying to do?

Regards,
Anuj D.
0 Kudos
Message 2 of 5
(3,577 Views)
Anuj,

I have a vehicle driving simulation application which must me executed at a constant, steady rate, could be 60, 70, 72 Hz, depending on the hardware in the system. The update rate cannot be controlled internally by the application itself due to the limitation of millisecond resolution in Windows' callbacks, etc. So we want to use the high resolution timer on a card like this one and tie our application to an interrupt or event generated by the card.

With the millisecond resolution in Windows, the closest we can get to 60Hz is 62.5Hz (0.016 seconds per frame). With microsecond resolution we can actually get 60Hz (0.016666 seconds per frame).

I realize that we will still be at the mercy of the Windows operating system to some extent, but this solution gets us a lot closer to the steady, realtime update rate that we need.

Thanks,

M Evans
0 Kudos
Message 3 of 5
(3,573 Views)
To my knowledge, you would not use the 6601/6602 to generate interrupts within a software API or the Windows OS. You can use the 6601/6602 to generate a very precise pulse train at 60 Hz. So the events generated by the card are actually voltage outputs in hardware as opposed to software events.

Can anyone else offer any more insight?

Regards,
Anuj D.
0 Kudos
Message 4 of 5
(3,549 Views)
To my knowledge, you would not use the 6601/6602 to generate interrupts within a software API or the Windows OS. You can use the 6601/6602 to generate a very precise pulse train at 60 Hz. So the events generated by the card are actually voltage outputs in hardware as opposed to software events.

Can anyone else offer any more insight?

Regards,
Anuj D.
0 Kudos
Message 5 of 5
(3,549 Views)