09-04-2012 03:02 AM
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
09-07-2012 06:53 AM
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,
09-07-2012 08:33 AM
Di Tobias,
do you think the use of the NI Counter/Timer-PCI-Card NI6624 ist a possibility to solve my problem.
Gerhard
09-07-2012 09:49 AM
Gerhard,
yes it is.