Hello,
I am using a PCI-6025E to continuously acquire analog measurements and digital signals.
I want to make the THD measurement on my analog signals.
My program is divided in different threads. My system hangs (dynamic memory corrupt) when I execute the "HarmonicAnalyzer" function. All the arguments are OK prior to execute the function. Every time my system hangs, the other thread is executing the "DIG_In_Prt" function. The arguments passed to these functions are different (no global variable).
I have modified my program to avoid the execution of these function at same time (using a safe variable as traffic light). Till now it seems OK (no crash), but the execution of these functions has been slowed.
If I remove the HarmonicAnalyzer function, my program runs correctly.
1) Are these 2 functions multithread-safe?
2) Is there another way to make THD measurement?
3) If not, which is the best way to avoid two different functions to execute at same time?
I am using CVI6.0; NI-DAQ 7.1.0f1 on a Windows 2000 Professional system.
Thanks