LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

determinism in the host computer

Solved!
Go to solution

Hi there,

 

I want to determine if my programe on the host is deterministic. The thing is that when I use the benchmarking technique and execute the code, the time is variable. How can I fix this?

 

Thanks in advance.

Cheers, Iñigo.

0 Kudos
Message 1 of 9
(2,591 Views)

@IñigoP wrote:

Hi there,

 

I want to determine if my programe on the host is deterministic. The thing is that when I use the benchmarking technique and execute the code, the time is variable. How can I fix this?

 

Thanks in advance.

Cheers, Iñigo.


I suspect that the variance should already tell you something about determinism on your computer?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 9
(2,590 Views)

Well, if you posted the code (meaning something we could examine and, optionally, execute), we might be able to help you answer that question.  What do you mean by "deterministic"?  I presume you are running it on a Windows PC, which "allows" code to run according to its scheduling algorithm (oops, time for a Virus scan, oops, check if Adobe software needs to be updated, etc.).  Your code might also have "non-determinism" built into it -- does it do I/O, for example?

 

Bob Schor

0 Kudos
Message 3 of 9
(2,566 Views)

Hello,

 

Is it possible to achieve determinism on a windows PC? I have a programme, but when I'm trying to benchmark it, I obtain an overflow on the counter (the maximum value for an U32). What can it be?

 

Thank you.

Cheers, Iñigo.

0 Kudos
Message 4 of 9
(2,563 Views)

Determinism is also relative. Loop cycle times of a few seconds with a simple loop can be sort of deterministic in Windows.

 

Best way to measure the determinism is to use another device to time it. If you have a daq connected you can for instance trigger a digital output and measure it with an oscilloscope.

0 Kudos
Message 5 of 9
(2,558 Views)

First of all better to show your code/example of your problem.
Now It is very difficult (impossible?) to say, why your counter is overflow

0 Kudos
Message 6 of 9
(2,558 Views)

Here you have the program. You can see that the 2 ways I use to benchmark show different times, maybe I'm doing it wrong... I don't know...

0 Kudos
Message 7 of 9
(2,543 Views)
Solution
Accepted by topic author IñigoP

yes, both wrong. In both cases, you subtract a larger value from the smaller

see correct

time.PNG

Message 8 of 9
(2,536 Views)

ooh..... I see it know!! Thank you so much!

0 Kudos
Message 9 of 9
(2,530 Views)