From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer() returns wrong value

 

I have just come across the same problem.  I'm using LabWindows 2013 and am suddenly getting return values from the Timer() function that are incorrect in the same way: they have 2^32 added to their proper value.  I have been using CVI since version 3.1 and have never seen this.  

 

My application is also using a lot of TCP communication now which is an interesting similarity with the original post.

 

The code using the Timer() function is very simple, just comparing Timer() with the last time a TCP message was received and making sure there are still messages coming in.  There is no way that I am incorrectly manipulating the returned value, the Timer() function is clearly returning an invalid number.

 

This computer has been in use since April, I did recompile the application at the end of last week to resolve some other issues, and then after 4 days with no problems, this has now happened twice.

 

I realize this will be a challenging one to sort out, but hopefully it can be sorted.



 

0 Kudos
Message 11 of 15
(2,294 Views)

Hi Mande,

 

I found documentation of this happening to a customer in the past, and it turned out to be a timing issue related to HP Elite PCs.  The KB at the link below provides more information:

 

http://support.microsoft.com/kb/895980

 

That being said, you may also want to try creating a new thread and reposting this question, as it will be more visible to other members.  Feel free to include your code and refer back to this thread to provide more background information for the issue.

 

Thanks,

 

Myriam

0 Kudos
Message 12 of 15
(2,258 Views)

That KB is for older versions of Windows so I am not sure that it will apply here.

 

I didn't want to duplicate topics, but I can do so.

0 Kudos
Message 13 of 15
(2,251 Views)

Mande,

 

It's been some time since I originally posted this problem.

It was helpful to hear that I'm not the only one experiencing the problem.

 

One thing I did was try to create a relatively simple application that I could send to National Instruments that would demonstrate the probelm.

Trouble is my simple application didn't exhibit the the Timer() problem.  I don't yet understand why.

 

If the code you're running can repeat the problems in the hands of NI engineers I urge you to send it in  so we can get somewhere on this.

 

For now, I've added a workaround everywhere I call timer to check for the 2^32 jump and take appropriate action to prevent false timeouts etc.

 

Also if another thread is started please let us know here so I can keep track of it.

 

Thanks all,

Kirk

 

0 Kudos
Message 14 of 15
(2,237 Views)

Here is the link to the new post:  HERE

 

I am not sure I can duplicate it either.  So far it is has only been happening on one specific computer.  A second application running on the same computer did not exhibit the same problem.  On the surface that tells me that something within the application is causing the problem but I don't know how that could be possible.

 

Unfortunately the problem computer is also across the ocean from me and in use 16 hours a day.

Mande.

0 Kudos
Message 15 of 15
(2,232 Views)