LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetAsyncTimerAttribute ASYNC_ATTR_INTERVAL fails to reset timer on Real-time system

The interval timer does not get reset when using a timer created in a real-time program (PXI chassis using NewAsyncTimerWithPriority).  It works correctly on a non real-time system (Windows 7 Laptop using NewAsyncTimer).

 

Example of problem:

  1. timer is set to 20 seconds (NewAsyncTimerWithPriority)
  2. wait 15 seconds
  3. timer interval is set to 30 seconds (SetAsyncTimerAttribute ASYNC_ATTR_INTERVAL)
  4. timer fires 5 seconds later instead of 30 seconds

GetAsyncTimerAttribute returns the correct value as if it worked properly.  Note that the timer fires every 30 seconds after the early firing in step 4.  It appears that changing the interval on a real-time system does not reset the timer as stated in the help file "If the timer has already started, setting ASYNC_ATTR_INTERVAL resets the timer."

 

Am I doing something wrong?  Has anyone seen this problem?

 

Using: LabWindows/CVI 2012, Real-time module 2012.

Also installed: LabView 2012, Real-time module 2012, FPGA module 2012.

 

Thanks.

0 Kudos
Message 1 of 2
(2,954 Views)

Hi Moxcoak,

 

You are right this is a known issue, the async timer does not reset properly in a RT system from CVI. We have already filed a bug report on it (#387902) and I will add your service request to that corrective action report to hopefully push it to be resolved faster. Meanwhile, I will try to find the best workaround for you. One option is to set a flag with the communication thread and check it with another asynchronous thread. I will get back to you with the details on how to implement that, but it would depend on your setup.

 

Regards,

Basil Beirouti

Applications Engineering

National Instruments

Regards,
Basil
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,932 Views)