Host Engineering Forum
General Category => General Discussion => Topic started by: Bolt on March 24, 2020, 03:34:52 PM
-
I have a program that I've been using for a few years. While it may not be the cleanest way of doing it, I think it always worked "correctly".
Recently, I've had to change the runtime to be (90,000 milliseconds) longer than a 16 bit integer could handle, so I rewrote it with a 32 bit integer.
Watching it on a trend view, it only seems to run for 25 seconds.
Logic attached. It's "triggered" in a Program, and executed in BottomOfScan
What am I missing here?
What is a cleaner way of accomplishing my goal? I want it to run for a precise amount of milliseconds, have a manual/prime function (MC807), and a Kill in case of an Abort.
Thanks!
-
I'm seeing the same thing with just a simple TIMEDOUT. Hmmm...
-
Minimum time is limited to a WORD...65535ms.
-
Minimum time is limited to a WORD...65535ms.
Well would you lookey there, it says that right in the Help file...
So what does it do in this situation when a larger number is presented? 90000 ms - 65535 = 24465, which is about the 25 seconds I was capturing on the Trend View?
Or for simpler math, if it was 66535 it would only have run for 1 second? Can you explain the logic behind that math?
Thanks!
-
It uses the low 16 bits.
-
Simple enough. Replaced the TIMEDOUT logic rungs with some OFFDTMR logic. Thanks!