Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

New target real time PC, poorer results

Hi,

I've been working with my PCI 6289 on a target desktop pc Dual Core E5400 2.7Ghz + mem DDR2-800 2GB. Now, I'm starting with another PC, a Core i5 660 @3.3Ghz + mem DDR3-1333 4GB.

My development software is CVI 2010 (host pc with vista) + LabView RT 10.0 (multicore support)

I want to run my application on this new target desktop PC and it is not possible. I always get same error of function 'DAQmxWaitForNextSampleClock()' telling me that I cannot run my control loop in the desired time (error -209802).

By the way, I also tried on another two pc's, an old P4 3GHz and a HP xw660 workstation (intel Xeon E5420 @2.5GHz + 4GB mem), same negative results.

My application can be summarized as:

- 2 AI channels:
DAQmxCreateTask("",&AITASK);
DAQmxCreateAIVoltageChan(AITASK,VCHAN,"",DAQmx_Val_RSE,V_MIN,V_MAX,DAQmx_Val_Volts,NULL);
DAQmxCfgSampClkTiming(AITASK,"",100e3,ACTIVE_EDGE_R,CONTINUE_SAMPLES,20);

i.e. 100kHz, 10 samples per channel.
    
- 1 AO channel:

DAQmxCreateTask("",&CONTROL_TASK);
DAQmxCreateAOVoltageChan(CONTROL_TASK,OUTCHAN,"",V_MIN,V_MAX,DAQmx_Val_Volts,NULL);

DAQmxCfgSampClkTiming(CONTROL_TASK,"",10e3,ACTIVE_EDGE_F,HARDWARE_SAMPLES,20);


- 1 counter used as PWM output, updated each 100 us (10kHz).

DAQmxCreateTask("",&PWM_TASK);
DAQmxCreateCOPulseChanFreq(PWM_TASK,PWMCHAN,NAMETOASSIGN,HZ,LOW_STATE,DELAY,10e3,DUTYCYCLE);
DAQmxCfgImplicitTiming (PWM_TASK,CONTINUE_SAMPLES,1);

 

- My control loop is:

while(end_process>0)
{
DAQmxWaitForNextSampleClock(CONTROL_TASK,1.0,NULL);
DAQmxWriteCtrFreqScalar(PWM_TASK,0,TIMEOUT,10e3,newDutyCycle,NULL); //update PWM DC

Measure(); // DAQmxReadAnalogF64(AITASK,-1 ,TIME_OUT,FILLMODE_NO_INTERLEAVED ,data, 20, &datalog,NULL);

ControlAlgorithms(); // next control action

}

NOTES:
1- The only purpose of AO task (CONTROL_TASK) is that of synchronize the control step at 10kHz (hardware based, continuous mode) with the 'wait' function. It was not possible to use same AI task to this aim.

2- Even sometimes with my old system I get some 'mysterious' behaviors, most of the time I can work with it. Now with the new PC I NEVER can.

 

thank you!!!!

WAB.

0 Kudos
Message 1 of 1
(4,807 Views)