Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse sequence with NI6518 and MSVC2010

Hello,

 

we are using NI PCI6518, WinXP, MSVC2010 and  the  DAQmx-Library to perform  a signal generation on a fixed timebase.  For instance I need a pulse sequence of 500 pulses with an “on time” of 25 msec and an “off time” of 15 msec  for each pulse. My idea was to use a high prior thread, programmed as a state machine,  with  the DAQmx-function  DAQmxWriteDigitalLines() and the high-resolution performance counter functions as central elements..  In principle the  thread works  (I checked the output with an oscilloscope). But I don’t get constant pulses. Often  the pulse times differ up to 100 msec!  I know that windows XP isn’t real time. But when I use the same code sequence in a button click event handler it works very well. Here I get a satisfactory pulse sequence. But this solution is not very helpful., because I can*t operate my application for 20 sec.

What can I do ?

 

Best regards

Gerhard

0 Kudos
Message 1 of 4
(3,217 Views)

Hi Gerhard (GeFi57),

 

as I see your question I think the most relyable way to get a puls or puls trian with constant high/low (pulse) times is to use an different HW that provides counters.

With counters you can generate pules or puls trains that are independet form the SW. The pulse / pulse train is just started by the SW.

The way you tried to implement your pulse is always dependent from the SW timing of the OS, even you give the task a high priority.

An idea is to use a multifunction DAQ device that provides you all typical IO as AI, AO, DIO and counter, 

Kind regards
Tobias S.
0 Kudos
Message 2 of 4
(3,197 Views)

Di Tobias,

do you think the use of the NI Counter/Timer-PCI-Card NI6624 ist a  possibility to solve my problem.

 

Gerhard

0 Kudos
Message 3 of 4
(3,192 Views)

Gerhard,

 

yes it is. 

Kind regards
Tobias S.
0 Kudos
Message 4 of 4
(3,189 Views)