Window 7 And Window Server 2012 R2


Recommended Posts

Hi admin, is there differences between window 7 and window server 2012 to run daq. My project daq run smoothly in window 7. but when i copy as runtime license to window server 2012 r2. it run slowly. my laptop win 7 (core i3, 4gb ram) and win server 2012 r2 (core i7, 32gb ram). when change to other page, it take 5-10s or more to change. Data is ok. i may be a graphic problem? winserver 2012 user intel hd graphic 4600 driver.

 

may i have install other feature on window server 2012?

 

Thanks you so much.

Link to comment
Share on other sites

Not specifically, but its hard to say what you have different in your installation.  Are you sure the display is actually slow?  Or is it the data acquisition?  Try creating a screen component that just has the expression:

 

systime()

 

 

This will change every time the screen refreshes.  Check also that your page refresh rate is quicker than 5 seconds.

Link to comment
Share on other sites

hi admin, my laptop is also get the same data as my server. 2 of them in the same network. the difference is that my server 2012 is so slowwwly. sometime, i can't change from this page to another page.

all my page is 1s refresh.

 

are there another reason?

 

Thanks you so much.

Link to comment
Share on other sites

There are no known issues under server 2012, but server 2012 is doing a bunch of other stuff that Win7 doesn't do (plus 2012 is more like Win8 than Win7), so its possible that the OS is simply using more processor power.  To test, you should open a blank document and start adding controls and see if any of the controls cause a sudden slowdown.  Add lots of controls but without any I/O or sequences.

 
If you can't get it to slow then, you'll have to examine your script as this is the likely source.  And look at your CPU usage.  Also, is it only slow refresh when you click on something, or is it slow to update the page.  You can tell the page refresh by creating a variable value control with the expression "Systime()" which will change with every screen refresh.  If it changes, but other values don't, then its actually your I/O that is slow.
Link to comment
Share on other sites

Have you been getting my emails?

 

At first look, you have a reasonable application.  A lot of channels, very well done graphics (nice job!), but only one apparent issue, and this may be it:

 

The issue I see is that you use registry variables a lot, and more importantly you use them directly inside your logging loops to control the timing:

 

delay(Registry.FILE_LogTiming)

 

You check the registry variable during startup to make sure it's 0, but really you should be instead taking the registry variable value, putting it in a global variable, then checking that it is valid.  In fact, you probably should check that its greater than say 0.1 right there inside the while loop.  

 

Now here is why: if that variable goes to 0 or negative, then you have an infinite loop and your logging sequences are going to run at full speed, using all the CPU they can take.  And since they use the hard drive they are going to bog lots of things down doing it.  Eventually you will likely crash something as the file sizes are going to get huge.

 

This is especially an issue with registry variables because they default to 0.  So if you try and access a numeric registry variable that doesn't exist you get 0 back.  You check for this in startup, but here's the thing: in newer releases of Windows, the default security does not allow DAQFactory to change registry variables, basically rendering them useless.  So, while your system ran fine on Win 7 which is more lenient on this security, Win 8 (which Server 2012 is based on) is not so forgiving, so most likely, even though you do:

 

if (Registry.FILE_LogTiming == 0)
   Registry.FILE_LogTiming = 1
endif
 
The second line isn't actually doing anything so FILE_LogTiming is never getting set and remains at 0.
 
My recommendation is to not use registry variables.  There are a number of other ways to persist data through restarts, but my personal, simple favorite for numeric data is to simply use a Test D/A channel with a unique channel #, and then put the History and Persist to 1.  You can test for whether its been initialized using the isempty() function, and then after that it will always keep the last value.  Since the history is 1, you don't need to use [0] notation.  In addition to getting around the security issues of windows, this causes your variables to be stored in a file in the (by default) c:\daqfactory\persist folder, and so when you move the application you can also simply copy this folder and the settings you had on your test machine will carry over.  Copying registry values is a bit harder.  There also isn't the limitation of only storing integers. 
Link to comment
Share on other sites

Thanks for you reply, admin. But i also test with only 2 scripts (seq_PollingDPM and seq_PollingOTB); run main script at start up, call 2 scripts to get data, and DAQ is crash too.

 

I guest Registry is reason before, but it is not really reason to make DAQ crash. I test main script with one of other script, it 's work. The error is only appear when i run seq_PollingDPM script. Is it too many try/catch in this? or get many channels of many devices?

 

I will reduce my Registry variables. Thanks so much.

Link to comment
Share on other sites

OK, so if you run the system, but don't start the seq_pollingDPM script, everything works fine?  The screen refreshes fast, and DAQFactory doesn't crash?  And then if you run that sequence, it will crash?  After how long?

 

I'd also like you to run the absolute latest build.  Please email us for the link.

Link to comment
Share on other sites

Archived

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