Strange Computer Response


Recommended Posts

Any reason why the following code would produce the result shown below:

private nexttime = floor(systime() / 30) * 30 + 30
// nexttime is now the next even 5 minute mark.  300 is 5 minutes in seconds.  To do, say 10 minutes, change to 600.

system.ErrorMessage("Started - " + formatdatetime("%c", systime()))

   system.ErrorMessage("Ran at - " + formatdatetime("%c", systime()))
   nexttime += 30

The computer it is running on is a Comfile CUPC-P80. No matter what the interval, it runs for a couple of minutes then freezes on the waituntil code line. I have reinstalled daqfactory, but the problem continues. Any thoughts?

Link to comment
Share on other sites

That is all it is doing. I cut it down to just that to try to figure out what is going on. The ctl only contains that sequence, which is an autostart up. It appears that sometimes daqfactory gets a minute or so ahead of the system clock.

Link to comment
Share on other sites

I'm not seeing the same problem so it is likely a hardware / OS issue. I'm assuming you got the XPe installation on the Comfile unit. Its possible that the configuration is just off for what DF expects, though I know of a number of people that have successfully used DAQFactory with XPe. It also might simply be that the computer isn't powerful enough and is busy doing other things. 512 meg is not a lot of memory for XP.

Anyhow, you might try using the DLL described in this post: to have DF use the system time instead of the high precision clock. The time stamps will be less precise (though you won't know it), but it might work better if the high precision clock on that machine isn't very good.

As for alerts[], no there is no way to clear the history. You can clear the command alert window by right clicking and selecting Clear, but that doesn't clear the alert history. You should instead consider just using a string variable and the AddValue() function:

global string myalerts

myalerts.addvalue("something went wrong!!!")

then to clear, just set myalerts to null

myalerts = null

Link to comment
Share on other sites

I will give that a shot. I also noticed that I am getting several blank values in the Alerts array. Is there anyway to track down the cause? I assume something is throwing an error, but I am unsure how to go about tracking it down.



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.