ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problem discarding async timer

Hi

I'm having a problem discarding asynchronous timers under CVI8.5.  After creating and discarding async timers a couple of times I always get to the stage where discarding the timer fails.  I had a look in the source code and think I found a problem with NewAsyncTimer() or DiscardAsyncTimer().  DiscardAsyncTimer() assumes that the list of timers is in ascending order of Id but NewAsyncTimer() always adds the new timer at the end of the list.  This means that I can't do
    
    NewAsyncTimer() // get timer Id 1
    EnableAsyncTimer(1)
    NewAsyncTimer() // get timer Id 2
    EnableAsyncTimer(2)
    DisableAsyncTimer(1)
    DiscardAsyncTimer(1) // discard timer Id 1
    NewAsyncTimer() // get timer Id 1 again - has Id 1 but is added to the end of the async timer list.
    EnableAsyncTimer(1)
    DisableAsyncTimer(1)
    DiscardAsyncTimer(1) // !! fails to discard timer Id 1 because it is in the list after 2!
    DisableAsyncTimer(2)
    DiscardAsyncTimer(2) // discard timer Id 2.

Any suggestions on the best way to fix this?

Thanks
0 Kudos
Message 1 of 5
(4,222 Views)
Hi leonree,

I was able to reproduce this behavior on my machine as well.  I am still investigating why this is occurring and will let you know what I discover.  Thank you for bringing this to our attention.


Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 5
(4,193 Views)

Hi leonree,

 

Just to provide an update, I have filed a Corrective Action Request on this issue and its id is 122632.   Thank you for bringing this to our attention.

 

 

Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 3 of 5
(4,128 Views)
Is this issue fixed in LabWindows Version 9.0.1?
0 Kudos
Message 4 of 5
(3,831 Views)

This was fixed in CVI 9.0 (search for "122632").

 

Luis

0 Kudos
Message 5 of 5
(3,808 Views)